aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCrystalwarrior <Varsash@Gmail.com>2021-02-11 19:53:47 +0300
committerGitHub <noreply@github.com>2021-02-11 19:53:47 +0300
commitb78479f4cc1d4cec41edcd40f4817db368e4acb0 (patch)
tree4be219cbdf090ac3021d23d3d9ada74577135f07 /include
parent3ac6b337a1e6de51a257af70631c7e02a12fe00f (diff)
Update the Settings screen - reload theme, restore defaults (#463)
* Add a Reload Theme button to the settings screen (works with both lobby and courtroom) * Move all value updates on elements to "update_values" func in the settings screen Add a "restore to defaults" option that allows you to restore all the configuration to its default values. Set up a .temp settings file that allows you to undo the effects of restoring default options. * wtf why didn't this error
Diffstat (limited to 'include')
-rw-r--r--include/aooptionsdialog.h8
-rw-r--r--include/courtroom.h2
2 files changed, 9 insertions, 1 deletions
diff --git a/include/aooptionsdialog.h b/include/aooptionsdialog.h
index 81dd191f..b128ce23 100644
--- a/include/aooptionsdialog.h
+++ b/include/aooptionsdialog.h
@@ -8,6 +8,7 @@
#include <QtWidgets/QApplication>
#include <QtWidgets/QCheckBox>
#include <QtWidgets/QComboBox>
+#include <QtWidgets/QPushButton>
#include <QtWidgets/QDialog>
#include <QtWidgets/QDialogButtonBox>
#include <QtWidgets/QFormLayout>
@@ -24,6 +25,9 @@
#include <QDirIterator>
#include <QTextStream>
+class Lobby;
+class Courtroom;
+
class AOOptionsDialog : public QDialog {
Q_OBJECT
public:
@@ -41,6 +45,7 @@ private:
QFormLayout *ui_gameplay_form;
QLabel *ui_theme_label;
QComboBox *ui_theme_combobox;
+ QPushButton *ui_theme_reload_button;
QFrame *ui_theme_log_divider;
QLabel *ui_downwards_lbl;
QCheckBox *ui_downwards_cb;
@@ -159,12 +164,15 @@ private:
QCheckBox *ui_log_cb;
bool needs_default_audiodev();
+ void update_values();
signals:
public slots:
void save_pressed();
void discard_pressed();
+ void button_clicked(QAbstractButton *button);
+ void on_reload_theme_clicked();
};
#endif // AOOPTIONSDIALOG_H
diff --git a/include/courtroom.h b/include/courtroom.h
index 036a60ce..43a0910a 100644
--- a/include/courtroom.h
+++ b/include/courtroom.h
@@ -801,6 +801,7 @@ public slots:
void case_called(QString msg, bool def, bool pro, bool jud, bool jur,
bool steno);
+ void on_reload_theme_clicked();
private slots:
void start_chat_ticking();
@@ -911,7 +912,6 @@ private slots:
void on_guilty_clicked();
void on_change_character_clicked();
- void on_reload_theme_clicked();
void on_call_mod_clicked();
void on_settings_clicked();
void on_announce_casing_clicked();