aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRosemary Witchaven <32779090+in1tiate@users.noreply.github.com>2021-09-22 18:59:59 -0500
committerGitHub <noreply@github.com>2021-09-22 18:59:59 -0500
commitc163aab671b9590910039a7031ed4f02ff989ed8 (patch)
treed2e116e33e6b8ba136665d9f5bb7baffad5c297a /include
parentb2a4a41fd707633a03ecdef8a484c0f16f13779e (diff)
Allow user to configure log timestamp format (#590)
* user configurable timestamp format * fix label making the entire settings window move jankily * add a dropdown for sane timestamp formats * streamline adding options to log timestamp format
Diffstat (limited to 'include')
-rw-r--r--include/aoapplication.h3
-rw-r--r--include/aooptionsdialog.h4
-rw-r--r--include/courtroom.h3
3 files changed, 10 insertions, 0 deletions
diff --git a/include/aoapplication.h b/include/aoapplication.h
index 718029a..0c5359a 100644
--- a/include/aoapplication.h
+++ b/include/aoapplication.h
@@ -285,6 +285,9 @@ public:
// Returns whether the log should have a timestamp.
bool get_log_timestamp();
+ // Returns the format string for the log timestamp
+ QString get_log_timestamp_format();
+
// Returns whether to log IC actions.
bool get_log_ic_actions();
diff --git a/include/aooptionsdialog.h b/include/aooptionsdialog.h
index 4568b1e..77d19a4 100644
--- a/include/aooptionsdialog.h
+++ b/include/aooptionsdialog.h
@@ -62,6 +62,8 @@ private:
QSpinBox *ui_log_margin_spinbox;
QLabel *ui_log_timestamp_lbl;
QCheckBox *ui_log_timestamp_cb;
+ QLabel *ui_log_timestamp_format_lbl;
+ QComboBox *ui_log_timestamp_format_combobox;
QLabel *ui_stay_time_lbl;
QSpinBox *ui_stay_time_spinbox;
QLabel *ui_desync_logs_lbl;
@@ -197,6 +199,8 @@ public slots:
void save_pressed();
void discard_pressed();
void button_clicked(QAbstractButton *button);
+ void on_timestamp_format_edited();
+ void timestamp_cb_changed(int state);
void on_reload_theme_clicked();
void theme_changed(int i);
};
diff --git a/include/courtroom.h b/include/courtroom.h
index 09ec486..4bc8624 100644
--- a/include/courtroom.h
+++ b/include/courtroom.h
@@ -416,6 +416,9 @@ private:
// True, if the log should have a timestamp.
bool log_timestamp = false;
+ // format string for aforementioned log timestamp
+ QString log_timestamp_format;
+
// How long in miliseconds should the objection wait before appearing.
int objection_threshold = 1500;