diff options
| author | TrickyLeifa <date.epoch@gmail.com> | 2024-05-15 00:00:17 +0200 |
|---|---|---|
| committer | TrickyLeifa <date.epoch@gmail.com> | 2024-05-15 00:04:16 +0200 |
| commit | c9f52b7223685d2e7fca925594171f94dd8c6e3b (patch) | |
| tree | 740bb32a40da98a4d52836432f59a16b31333900 /include/widgets | |
| parent | 951766666621fa77e257e6b5616fe4ab1eb2a52f (diff) | |
Ported to CMake, ...
* Ported the project to CMake
* Android and Mac support dropped for the time
being.
* Tests, BASS and Discord-RPC are now options
* Restructured and reformated the project.
* Merged `include` and `src`
* Renamed `resource` to `data`
* Renamed various files
* External libraries headers are no longer included in `src`
* Replaced header guards with #pragma once
* Multiple refactors (keywords, headers)
* Added Qt6 compatibility
* Removed various unused functions and headers
* Reworked AOPacket
* When content is passed to AOPacket, it should be ensured that the content is already decoded.
* Encoding/decoding are now static methods.
* Fixed various memory leaks
* Removed animation code for AOImage
* AOImage is always using static images
* Simplified ChatLogPiece
Diffstat (limited to 'include/widgets')
| -rw-r--r-- | include/widgets/add_server_dialog.h | 44 | ||||
| -rw-r--r-- | include/widgets/aooptionsdialog.h | 160 | ||||
| -rw-r--r-- | include/widgets/direct_connect_dialog.h | 46 | ||||
| -rw-r--r-- | include/widgets/edit_server_dialog.h | 46 |
4 files changed, 0 insertions, 296 deletions
diff --git a/include/widgets/add_server_dialog.h b/include/widgets/add_server_dialog.h deleted file mode 100644 index db999bfe..00000000 --- a/include/widgets/add_server_dialog.h +++ /dev/null @@ -1,44 +0,0 @@ -#pragma once - -#ifndef ADD_SERVER_DIALOG_H -#define ADD_SERVER_DIALOG_H - -#include "interfaces/server_dialog.h" - -class QComboBox; -class QDialogButton; -class QDialogButtonBox; -class QLabel; -class QLineEdit; -class QPlainTextEdit; -class QPushButton; -class QSpinBox; - -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 - QLabel *ui_server_legacy_lbl; - QLineEdit *ui_server_legacy_edit; - QPushButton *ui_server_legacy_load_button; - -private slots: - void onSavePressed() override; - void onCancelPressed() override; - void parseLegacyServerEntry(); -}; - -#endif // ADD_SERVER_DIALOG_H diff --git a/include/widgets/aooptionsdialog.h b/include/widgets/aooptionsdialog.h deleted file mode 100644 index ab366528..00000000 --- a/include/widgets/aooptionsdialog.h +++ /dev/null @@ -1,160 +0,0 @@ -#ifndef AOOPTIONSDIALOG_H -#define AOOPTIONSDIALOG_H - -#include "options.h" - -#include <QtCore/QVariant> -#include <QtWidgets/QApplication> - -class QCheckBox; -class QComboBox; -class QDialogButtonBox; -class QLineEdit; -class QPlainTextEdit; -class QScrollArea; -class QSpinBox; -class QTabWidget; -class QLabel; -class QAbstractButton; - - -#include <QtWidgets/QDialog> -#include <QDirIterator> -#include <QListWidget> -#include <QTextBrowser> -#include <QTextStream> - -class AOApplication; - -struct OptionEntry { - std::function<void()> load; - std::function<void()> save; -}; - -class AOOptionsDialog : public QDialog { - Q_OBJECT -public: - explicit AOOptionsDialog(QDialog *parent = nullptr, - AOApplication *p_ao_app = nullptr); - -private: - AOApplication *ao_app; - - // Dialog interaction buttons. Save/Discard/Restore Defaults - QDialogButtonBox *ui_settings_buttons; - - // The gameplay tab - QWidget *ui_settings_widget; - QComboBox *ui_theme_combobox; - QComboBox *ui_subtheme_combobox; - QSpinBox *ui_theme_scaling_factor_sb; - QPushButton *ui_theme_reload_button; - QPushButton *ui_theme_folder_button; - QCheckBox *ui_evidence_double_click_cb; - QCheckBox *ui_animated_theme_cb; - QSpinBox *ui_stay_time_spinbox; - QCheckBox *ui_instant_objection_cb; - QSpinBox *ui_text_crawl_spinbox; - QSpinBox *ui_chat_ratelimit_spinbox; - QFrame *ui_log_names_divider; - QLineEdit *ui_username_textbox; - QCheckBox *ui_showname_cb; - QLineEdit *ui_default_showname_textbox; - QFrame *ui_net_divider; - QLineEdit *ui_ms_textbox; - QCheckBox *ui_discord_cb; - QLabel *ui_language_label; - QComboBox *ui_language_combobox; - QLabel *ui_scaling_label; - QComboBox *ui_scaling_combobox; - QCheckBox *ui_shake_cb; - QCheckBox *ui_effects_cb; - QCheckBox *ui_framenetwork_cb; - QCheckBox *ui_colorlog_cb; - QCheckBox *ui_stickysounds_cb; - QCheckBox *ui_stickyeffects_cb; - QCheckBox *ui_stickypres_cb; - QCheckBox *ui_customchat_cb; - QCheckBox *ui_sticker_cb; - QCheckBox *ui_continuous_cb; - QCheckBox *ui_category_stop_cb; - QCheckBox *ui_sfx_on_idle_cb; - - // The callwords tab - QPlainTextEdit *ui_callwords_textbox; - QCheckBox *ui_callwords_char_textbox; - - // The audio tab - QWidget *ui_audio_tab; - QWidget *ui_audio_widget; - QComboBox *ui_audio_device_combobox; - QSpinBox *ui_suppress_audio_spinbox; - QFrame *ui_volume_blip_divider; - QSpinBox *ui_bliprate_spinbox; - QCheckBox *ui_blank_blips_cb; - QCheckBox *ui_loopsfx_cb; - QCheckBox *ui_objectmusic_cb; - QCheckBox *ui_disablestreams_cb; - - // The asset tab - QListWidget *ui_mount_list; - QPushButton *ui_mount_add; - QPushButton *ui_mount_remove; - QPushButton *ui_mount_up; - QPushButton *ui_mount_down; - QPushButton *ui_mount_clear_cache; - - // The logging tab - QCheckBox *ui_downwards_cb; - QSpinBox *ui_length_spinbox; - QCheckBox *ui_log_newline_cb; - QSpinBox *ui_log_margin_spinbox; - QLabel *ui_log_timestamp_format_lbl; - QCheckBox *ui_log_timestamp_cb; - QComboBox *ui_log_timestamp_format_combobox; - QCheckBox *ui_desync_logs_cb; - QCheckBox *ui_log_ic_actions_cb; - QCheckBox *ui_log_text_cb; - QCheckBox *ui_log_demo_cb; - - /** - * Allows the AO2 master server hoster to go broke. - */ - QWidget *ui_privacy_tab; - QCheckBox *ui_privacy_optout_cb; - QFrame *ui_privacy_separator; - QTextBrowser *ui_privacy_policy; - - bool asset_cache_dirty = false; - - bool needsDefaultAudioDevice(); - void populateAudioDevices(); - void updateValues(); - - QVector<OptionEntry> optionEntries; - - template <typename T, typename V> - void setWidgetData(T *widget, const V &value); - - template <typename T, typename V> V widgetData(T *widget) const; - - template <typename T, typename V> - void registerOption(const QString &widgetName, V (Options::*getter)() const, - void (Options::*setter)(V)); - -signals: - void reloadThemeRequest(); - -private slots: - void savePressed(); - void discardPressed(); - void buttonClicked(QAbstractButton *button); - void onTimestampFormatEdited(); - void timestampCbChanged(int state); - void onReloadThemeClicked(); - void themeChanged(int i); - void setupUI(); - -}; - -#endif // AOOPTIONSDIALOG_H diff --git a/include/widgets/direct_connect_dialog.h b/include/widgets/direct_connect_dialog.h deleted file mode 100644 index 93175249..00000000 --- a/include/widgets/direct_connect_dialog.h +++ /dev/null @@ -1,46 +0,0 @@ -#ifndef DIRECT_CONNECT_DIALOG_H -#define DIRECT_CONNECT_DIALOG_H - -#include <QDialog> -#include <QTimer> -#include <QRegularExpression> - -class QLabel; -class QSpinBox; -class QLineEdit; -class QPushButton; -class QComboBox; -class QLabel; -class NetworkManager; - -class DirectConnectDialog : public QDialog { - Q_OBJECT -public: - DirectConnectDialog(NetworkManager* p_net_manager); - ~DirectConnectDialog() = default; - -private slots: - void onConnectPressed(); - void onServerConnected(); - void onConnectTimeout(); - -private: - NetworkManager* net_manager; - - QLineEdit* ui_direct_hostname_edit; - - QLabel* ui_direct_connection_status_lbl; - QPushButton* ui_direct_connect_button; - QPushButton* ui_direct_cancel_button; - - QWidget* ui_widget; - QTimer connect_timeout; - - const int TCP_INDEX = 0; - const QRegularExpression SCHEME_PATTERN{"^\\w+://.+$"}; - const int CONNECT_TIMEOUT = 5 * 1000; - const QString DEFAULT_UI = "direct_connect_dialog.ui";; - -}; - -#endif // DIRECT_CONNECT_DIALOG_H diff --git a/include/widgets/edit_server_dialog.h b/include/widgets/edit_server_dialog.h deleted file mode 100644 index 3c4595ec..00000000 --- a/include/widgets/edit_server_dialog.h +++ /dev/null @@ -1,46 +0,0 @@ -#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 |
