-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
281 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
BasedOnStyle: LLVM | ||
BreakBeforeBraces: Stroustrup | ||
AllowShortIfStatementsOnASingleLine: true | ||
AllowShortIfStatementsOnASingleLine: true | ||
NamespaceIndentation: All | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#include <QDialog> | ||
#pragma once | ||
|
||
#ifndef AO_UI_FAVORITESERVERDIALOG | ||
#define AO_UI_FAVORITESRRVERDIALOG | ||
namespace AttorneyOnline { | ||
namespace UI { | ||
class FavoriteServerDialog : public QDialog { | ||
public: | ||
FavoriteServerDialog() = default; | ||
~FavoriteServerDialog() = default; | ||
|
||
const QString DEFAULT_UI = "favorite_server_dialog.ui"; | ||
const int TCP_INDEX = 0; | ||
private slots: | ||
virtual void onSavePressed() = 0; | ||
virtual void onCancelPressed() = 0; | ||
}; | ||
} // namespace UI | ||
} // namespace AttorneyOnline | ||
#endif // AO_UI_FAVORITESERVERDIALOG |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,44 @@ | ||
#pragma once | ||
|
||
#ifndef ADD_SERVER_DIALOG_H | ||
#define ADD_SERVER_DIALOG_H | ||
|
||
#include <QDialog> | ||
#include <QString> | ||
#include "interfaces/server_dialog.h" | ||
|
||
class QPushButton; | ||
class QDialogButton; | ||
class QLabel; | ||
class QLineEdit; | ||
class QComboBox; | ||
class QSpinBox; | ||
class QPlainTextEdit; | ||
class QDialogButtonBox; | ||
class QSettings; | ||
|
||
class AddServerDialog : public QDialog { | ||
Q_OBJECT | ||
public : | ||
AddServerDialog(); | ||
~AddServerDialog() = default; | ||
class AddServerDialog : public AttorneyOnline::UI::FavoriteServerDialog { | ||
Q_OBJECT | ||
public: | ||
AddServerDialog(); | ||
~AddServerDialog() = default; | ||
|
||
private: | ||
QWidget* ui_widget; | ||
|
||
QLineEdit* ui_server_display_name_edit; | ||
QLineEdit* ui_server_hostname_edit; | ||
QSpinBox* ui_server_port_box; | ||
QComboBox* ui_server_protocol_box; | ||
QPlainTextEdit* ui_server_description_edit; | ||
QDialogButtonBox* ui_server_dialog_button; | ||
|
||
// Legacy Server UI | ||
QLineEdit* ui_server_legacy_edit; | ||
QPushButton* ui_server_legacy_load_button; | ||
|
||
|
||
QSettings* m_favorite_ini; | ||
QWidget *ui_widget; | ||
|
||
const int TCP_INDEX = 0; | ||
QLineEdit *ui_server_display_name_edit; | ||
QLineEdit *ui_server_hostname_edit; | ||
QSpinBox *ui_server_port_box; | ||
QComboBox *ui_server_protocol_box; | ||
QPlainTextEdit *ui_server_description_edit; | ||
QDialogButtonBox *ui_server_dialog_button; | ||
|
||
const QString DEFAULT_UI = "add_server_dialog.ui"; | ||
// Legacy Server UI | ||
QLabel *ui_server_legacy_lbl; | ||
QLineEdit *ui_server_legacy_edit; | ||
QPushButton *ui_server_legacy_load_button; | ||
|
||
private slots: | ||
void savePressed(); | ||
void discardPressed(); | ||
void parseLegacyServerEntry(); | ||
void onSavePressed() override; | ||
void onCancelPressed() override; | ||
void parseLegacyServerEntry(); | ||
}; | ||
|
||
#endif // ADD_SERVER_DIALOG_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#pragma once | ||
|
||
#ifndef EDIT_SERVER_DIALOG_H | ||
#define EDIT_SERVER_DIALOG_H | ||
|
||
#include "interfaces/server_dialog.h" | ||
|
||
class QPushButton; | ||
class QDialogButton; | ||
class QLabel; | ||
class QLineEdit; | ||
class QComboBox; | ||
class QSpinBox; | ||
class QPlainTextEdit; | ||
class QDialogButtonBox; | ||
|
||
class EditServerDialog : public AttorneyOnline::UI::FavoriteServerDialog { | ||
Q_OBJECT | ||
public: | ||
EditServerDialog(int index); | ||
~EditServerDialog() = default; | ||
|
||
private: | ||
QWidget *ui_widget; | ||
|
||
QLineEdit *ui_server_display_name_edit; | ||
QLineEdit *ui_server_hostname_edit; | ||
QSpinBox *ui_server_port_box; | ||
QComboBox *ui_server_protocol_box; | ||
QPlainTextEdit *ui_server_description_edit; | ||
QDialogButtonBox *ui_server_dialog_button; | ||
|
||
// Legacy Server UI | ||
QLabel *ui_server_legacy_lbl; | ||
QLineEdit *ui_server_legacy_edit; | ||
QPushButton *ui_server_legacy_load_button; | ||
|
||
int index; | ||
void loadEntry(); | ||
|
||
private slots: | ||
void onSavePressed() override; | ||
void onCancelPressed() override; | ||
}; | ||
|
||
#endif // EDIT_SERVER_DIALOG_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.