summaryrefslogtreecommitdiffhomepage
path: root/facetracknoir/shortcuts.h
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2014-10-20 08:09:08 +0200
committerStanislaw Halik <sthalik@misaki.pl>2014-10-20 08:09:08 +0200
commitfeb12bd0eecc9f09ef7a1ab7fc60858ea519edbe (patch)
tree5e2132290e27490d6878f442a6762b406934d503 /facetracknoir/shortcuts.h
parentf493c94a8d8e44efa9bfbccba81ae8016efb9fee (diff)
refactor 1/2 (?)
Diffstat (limited to 'facetracknoir/shortcuts.h')
-rw-r--r--facetracknoir/shortcuts.h83
1 files changed, 0 insertions, 83 deletions
diff --git a/facetracknoir/shortcuts.h b/facetracknoir/shortcuts.h
deleted file mode 100644
index 8e665211..00000000
--- a/facetracknoir/shortcuts.h
+++ /dev/null
@@ -1,83 +0,0 @@
-#pragma once
-#include <QWidget>
-#include <QElapsedTimer>
-#include <QThread>
-#include <QMessageBox>
-#include <QCheckBox>
-#include <QComboBox>
-#include <QSettings>
-#include "ui_ftnoir_keyboardshortcuts.h"
-
-class FaceTrackNoIR;
-
-class KeyboardShortcutDialog: public QWidget
-{
- Q_OBJECT
-public:
- KeyboardShortcutDialog( FaceTrackNoIR *ftnoir, QWidget *parent );
-private:
- Ui::UICKeyboardShortcutDialog ui;
- FaceTrackNoIR *mainApp;
-private slots:
- void doOK();
- void doCancel();
-};
-
-extern QList<QString> global_key_sequences;
-
-#if defined(_WIN32)
-extern QList<int> global_windows_key_sequences;
-# undef DIRECTINPUT_VERSION
-# define DIRECTINPUT_VERSION 0x0800
-# include <windows.h>
-# include <dinput.h>
-
-struct Key {
- BYTE keycode;
- bool shift;
- bool ctrl;
- bool alt;
- bool ever_pressed;
- QElapsedTimer timer;
-public:
- Key() : keycode(0), shift(false), ctrl(false), alt(false), ever_pressed(false)
- {
- }
-};
-#else
-typedef unsigned char BYTE;
-struct Key { int foo; };
-#endif
-
-#if defined(_WIN32)
-class KeybindingWorkerImpl {
-private:
- LPDIRECTINPUT8 din;
- LPDIRECTINPUTDEVICE8 dinkeyboard;
- Key kCenter;
- Key kToggle;
- FaceTrackNoIR& window;
-public:
- volatile bool should_quit;
- ~KeybindingWorkerImpl();
- KeybindingWorkerImpl(FaceTrackNoIR& w, Key keyCenter, Key keyToggle);
- void run();
-};
-#else
-class KeybindingWorkerImpl {
-public:
- KeybindingWorkerImpl(FaceTrackNoIR& w, Key keyCenter, Key keyToggle);
- void run() {}
-};
-#endif
-
-class KeybindingWorker : public QThread, public KeybindingWorkerImpl {
- Q_OBJECT
-public:
- KeybindingWorker(FaceTrackNoIR& w, Key keyCenter, Key keyToggle) : KeybindingWorkerImpl(w, keyCenter, keyToggle)
- {
- }
- void run() {
- KeybindingWorkerImpl::run();
- }
-};