summaryrefslogtreecommitdiffhomepage
path: root/gui/options-dialog.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-12-06 00:43:58 +0100
committerStanislaw Halik <sthalik@misaki.pl>2015-12-06 00:43:58 +0100
commit52b75a02aeeaf2c23f5af32fededf4e5fb24bade (patch)
tree158d9a60763ce6a149ee12f78bc746a0dc8670fc /gui/options-dialog.hpp
parent0f577dbe8adb8f7e210241c6bee0be73349f8d45 (diff)
api, main: implement global shortcuts for controlling tracking
Issue: #252 That involves moving stuff around to get rid of circular dependencies. You need to bind keys to shortcuts again this once.
Diffstat (limited to 'gui/options-dialog.hpp')
-rw-r--r--gui/options-dialog.hpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/gui/options-dialog.hpp b/gui/options-dialog.hpp
index 308b5b0f..72ae3c30 100644
--- a/gui/options-dialog.hpp
+++ b/gui/options-dialog.hpp
@@ -1,9 +1,10 @@
#pragma once
-#include <QObject>
-#include <QWidget>
#include "ui_settings.h"
#include "opentrack/shortcuts.h"
+#include <QObject>
+#include <QWidget>
+#include <functional>
class OptionsDialog: public QWidget
{
@@ -11,13 +12,14 @@ class OptionsDialog: public QWidget
signals:
void reload();
public:
- OptionsDialog();
+ OptionsDialog(main_settings& main, std::function<void()> register_global_keys);
private:
+ main_settings& main;
+ std::function<void()> register_global_keys;
Ui::UI_Settings ui;
- Shortcuts::settings s;
void closeEvent(QCloseEvent *) override { doCancel(); }
private slots:
void doOK();
void doCancel();
- void bind_key(Shortcuts::key_opts &kopts, QLabel* label);
+ void bind_key(key_opts &kopts, QLabel* label);
};