
* Reworked favorite server widget * Renamed `server_type` to `ServerInfo` * Renamed `connection_type` to `ServerConnectionType` * Refactored `AOCharButton` * Reimplemented `AOButton` * Partially reimplemented `AOEmoteButton` * Refactored `AOEvidenceButton`
44 lines
830 B
C++
44 lines
830 B
C++
#pragma once
|
|
|
|
#include "datatypes.h"
|
|
|
|
#include <QComboBox>
|
|
#include <QDialog>
|
|
#include <QDialogButtonBox>
|
|
#include <QLabel>
|
|
#include <QLineEdit>
|
|
#include <QPlainTextEdit>
|
|
#include <QPushButton>
|
|
#include <QSpinBox>
|
|
|
|
class ServerEditorDialog : public QDialog
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
ServerEditorDialog(QWidget *parent = nullptr);
|
|
ServerEditorDialog(const ServerInfo &server, QWidget *parent = nullptr);
|
|
|
|
ServerInfo currentServerInfo() const;
|
|
|
|
void loadServerInfo(ServerInfo server);
|
|
|
|
private:
|
|
static const QString UI_FILE_PATH;
|
|
|
|
QWidget *ui_body;
|
|
|
|
QLineEdit *ui_name;
|
|
QLineEdit *ui_hostname;
|
|
QSpinBox *ui_port;
|
|
QComboBox *ui_protocol;
|
|
QPlainTextEdit *ui_description;
|
|
QDialogButtonBox *ui_button_box;
|
|
|
|
QLineEdit *ui_legacy_edit;
|
|
QPushButton *ui_parse_legacy;
|
|
|
|
private Q_SLOTS:
|
|
void parseLegacyEntry();
|
|
};
|