summaryrefslogtreecommitdiffhomepage
path: root/gui/ui.h
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/ui.h
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/ui.h')
-rw-r--r--gui/ui.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/gui/ui.h b/gui/ui.h
index b4bab271..12ef1f24 100644
--- a/gui/ui.h
+++ b/gui/ui.h
@@ -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();