diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2015-12-06 00:43:58 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2015-12-06 00:43:58 +0100 |
commit | 52b75a02aeeaf2c23f5af32fededf4e5fb24bade (patch) | |
tree | 158d9a60763ce6a149ee12f78bc746a0dc8670fc /gui/ui.h | |
parent | 0f577dbe8adb8f7e210241c6bee0be73349f8d45 (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/ui.h')
-rw-r--r-- | gui/ui.h | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -17,6 +17,9 @@ #include <QString> #include <QMenu> +#include <vector> +#include <tuple> + #include "ui_main.h" #include "opentrack-compat/options.hpp" @@ -35,6 +38,8 @@ using namespace options; class MainWindow : public QMainWindow, private State { Q_OBJECT + + Shortcuts global_shortcuts; Ui::OpentrackUI ui; mem<QSystemTrayIcon> tray; @@ -76,6 +81,7 @@ class MainWindow : public QMainWindow, private State static bool get_new_config_name_from_dialog(QString &ret); void set_profile(const QString& profile); void maybe_save(); + void register_shortcuts(); private slots: void _save(); void save(); @@ -100,6 +106,10 @@ private slots: void startTracker(); void stopTracker(); void reload_options(); +signals: + void emit_start_tracker(); + void emit_stop_tracker(); + void emit_toggle_tracker(); public: MainWindow(); ~MainWindow(); |