summaryrefslogtreecommitdiffhomepage
path: root/opentrack/work.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2014-10-20 09:33:56 +0200
committerStanislaw Halik <sthalik@misaki.pl>2014-10-20 09:33:56 +0200
commitba0cd4a1fd743a7d0d025ca76c211c8f466e6879 (patch)
tree2bbd5f1939a7413e76cbe782e3da7b7c844cea8c /opentrack/work.hpp
parent7f0d0d1b9ef7711a4f1835b0120f014799b71e90 (diff)
refactor 2/n
Diffstat (limited to 'opentrack/work.hpp')
-rw-r--r--opentrack/work.hpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/opentrack/work.hpp b/opentrack/work.hpp
index bd69f7ba..c0962b9a 100644
--- a/opentrack/work.hpp
+++ b/opentrack/work.hpp
@@ -16,14 +16,17 @@ struct Work
ptr<Tracker> tracker;
ptr<Shortcuts> sc;
- Work(main_settings& s, Mappings& m, SelectedLibraries& libs, QObject* recv) :
+ Work(main_settings& s, Mappings& m, SelectedLibraries& libs, QObject* recv, WId handle) :
s(s), libs(libs),
tracker(std::make_shared<Tracker>(s, m, libs)),
- sc(std::make_shared<Shortcuts>())
+ sc(std::make_shared<Shortcuts>(handle))
{
#ifndef _WIN32
QObject::connect(&sc->keyCenter, SIGNAL(activated()), recv, SLOT(shortcutRecentered()));
QObject::connect(&sc->keyToggle, SIGNAL(activated()), recv, SLOT(shortcutToggled()));
+#else
+ QObject::connect(sc->keybindingWorker.get(), SIGNAL(center()), recv, SLOT(shortcutRecentered()));
+ QObject::connect(sc->keybindingWorker.get(), SIGNAL(toggle()), recv, SLOT(shortcutToggled()));
#endif
tracker->start();
}
@@ -34,4 +37,4 @@ struct Work
tracker = nullptr;
libs = SelectedLibraries();
}
-}; \ No newline at end of file
+};