aboutsummaryrefslogtreecommitdiff
path: root/src/widgets/server_editor_dialog.h
diff options
context:
space:
mode:
authorTrickyLeifa <date.epoch@gmail.com>2024-05-16 03:09:21 +0200
committerTrickyLeifa <date.epoch@gmail.com>2024-05-16 03:09:21 +0200
commit39e4354b1dae5d8487ea5b84be9f304b1950a61a (patch)
tree734c99d3ef1a8e69007dd870a8b6763deca5ffce /src/widgets/server_editor_dialog.h
parenta0cee58c048772b2dcfe3992f60728d5a6f7d786 (diff)
Reimplemented favorite server widget, ...
* Reworked favorite server widget * Renamed `server_type` to `ServerInfo` * Renamed `connection_type` to `ServerConnectionType` * Refactored `AOCharButton` * Reimplemented `AOButton` * Partially reimplemented `AOEmoteButton` * Refactored `AOEvidenceButton`
Diffstat (limited to 'src/widgets/server_editor_dialog.h')
-rw-r--r--src/widgets/server_editor_dialog.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/src/widgets/server_editor_dialog.h b/src/widgets/server_editor_dialog.h
new file mode 100644
index 00000000..1ceb3524
--- /dev/null
+++ b/src/widgets/server_editor_dialog.h
@@ -0,0 +1,43 @@
+#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();
+};