summaryrefslogtreecommitdiffhomepage
path: root/facetracknoir/ui.h
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-08-30 09:28:22 +0200
committerStanislaw Halik <sthalik@misaki.pl>2015-08-30 09:28:31 +0200
commit77542be46d3b56c48735f72d7345a1f1034a0a90 (patch)
treecce871bdbd22830f892c7ea9f79a774489463384 /facetracknoir/ui.h
parentf281b514b060a2225702b2e7c9420b73d0b2bb72 (diff)
ui: save settings on a timer
The QSettings IO is damn slow on Windows. Save only after five seconds have elapsed with nothing being changed.
Diffstat (limited to 'facetracknoir/ui.h')
-rw-r--r--facetracknoir/ui.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/facetracknoir/ui.h b/facetracknoir/ui.h
index 65a7647a..cfaf47cb 100644
--- a/facetracknoir/ui.h
+++ b/facetracknoir/ui.h
@@ -51,6 +51,7 @@ class MainWindow : public QMainWindow, private State
process_detector_worker det;
QMenu profile_menu;
bool is_refreshing_profiles;
+ QTimer save_timer;
mem<dylib> current_tracker()
{
@@ -72,10 +73,11 @@ class MainWindow : public QMainWindow, private State
void display_pose(const double* mapped, const double* raw);
void ensure_tray();
void set_title(const QString& game_title = QStringLiteral(""));
- void save();
static bool get_new_config_name_from_dialog(QString &ret);
void set_profile(const QString& profile);
private slots:
+ void _save();
+ void save();
void exit();
void profileSelected(QString name);