atrooney-online-2/src/widgets/server_editor_dialog.h
TrickyLeifa 39e4354b1d 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`
2024-05-16 03:09:21 +02:00

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();
};