summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2013-04-29 15:53:44 +0200
committerStanislaw Halik <sthalik@misaki.pl>2013-04-29 15:53:57 +0200
commit6fdcf9004e0aafb796592ab5120f1bd90190e2c3 (patch)
tree6137eec789f565791008667741e44136140556eb
parent64a5350500baf0db90dca6a753ab6e6ece52043d (diff)
Remove rarely-used features to improve maintainability
-rw-r--r--facetracknoir/facetracknoir.cpp327
-rw-r--r--facetracknoir/facetracknoir.h42
-rw-r--r--facetracknoir/facetracknoir.ui133
-rw-r--r--facetracknoir/ftnoir_keyboardshortcuts.ui988
-rw-r--r--facetracknoir/ftnoir_preferences.ui240
-rw-r--r--facetracknoir/main-facetracknoir.qrc2
-rw-r--r--facetracknoir/tracker.cpp112
-rw-r--r--facetracknoir/tracker.h25
-rw-r--r--facetracknoir/uielements/aboutfacetracknoir.pngbin30557 -> 0 bytes
-rw-r--r--facetracknoir/uielements/donate.pngbin778 -> 0 bytes
-rw-r--r--facetracknoir/uielements/setupfacetracknoir.jpgbin21508 -> 0 bytes
11 files changed, 226 insertions, 1643 deletions
diff --git a/facetracknoir/facetracknoir.cpp b/facetracknoir/facetracknoir.cpp
index 58644f76..e868b02a 100644
--- a/facetracknoir/facetracknoir.cpp
+++ b/facetracknoir/facetracknoir.cpp
@@ -162,9 +162,6 @@ void KeybindingWorkerDummy::run() {
}
PROCESS_KEY(kCenter, shortcutRecentered);
- PROCESS_KEY(kInhibit, shortcutInhibit);
- PROCESS_KEY(kZero, shortcutZero);
- PROCESS_KEY(kStartStop, shortcutStartStop);
Sleep(25);
}
@@ -205,7 +202,6 @@ FaceTrackNoIR::FaceTrackNoIR(QWidget *parent, Qt::WFlags flags) :
// Initialize Widget handles, to prevent memory-access errors.
//
_keyboard_shortcuts = 0;
- _preferences = 0;
_keyboard_shortcuts = 0;
_curve_config = 0;
@@ -216,14 +212,6 @@ FaceTrackNoIR::FaceTrackNoIR(QWidget *parent, Qt::WFlags flags) :
setupFaceTrackNoIR();
- //
- // Read the AutoStartTracking value from the registry. If it is '1', start the Tracker and Minimize...
- //
- QSettings settings("Abbequerque Inc.", "FaceTrackNoIR"); // Registry settings (in HK_USER)
- if (settings.value ( "AutoStartTracking", 0 ).toBool()) {
- startTracker();
- }
-
//Q_INIT_RESOURCE(PoseWidget);
ui.lblX->setVisible(false);
@@ -261,7 +249,6 @@ void FaceTrackNoIR::setupFaceTrackNoIR() {
connect(ui.btnSaveAs, SIGNAL(clicked()), this, SLOT(saveAs()));
connect(ui.actionExit, SIGNAL(triggered()), this, SLOT(exit()));
- connect(ui.actionPreferences, SIGNAL(triggered()), this, SLOT(showPreferences()));
connect(ui.actionKeyboard_Shortcuts, SIGNAL(triggered()), this, SLOT(showKeyboardShortcuts()));
connect(ui.actionCurve_Configuration, SIGNAL(triggered()), this, SLOT(showCurveConfiguration()));
connect(ui.btnEditCurves, SIGNAL(clicked()), this, SLOT(showCurveConfiguration()));
@@ -269,7 +256,6 @@ void FaceTrackNoIR::setupFaceTrackNoIR() {
connect(ui.actionSupport, SIGNAL(triggered()), this, SLOT(openurl_support()));
connect(ui.actionYour_Support, SIGNAL(triggered()), this, SLOT(openurl_donation()));
- connect(ui.btnDonate, SIGNAL(clicked()), this, SLOT(openurl_donation()));
connect(ui.actionAbout, SIGNAL(triggered()), this, SLOT(about()));
connect(ui.actionVideoWidget, SIGNAL(triggered()), this, SLOT(showVideoWidget()));
@@ -321,7 +307,6 @@ void FaceTrackNoIR::setupFaceTrackNoIR() {
timUpdateHeadPose = new QTimer(this);
connect(timUpdateHeadPose, SIGNAL(timeout()), this, SLOT(showHeadPose()));
ui.txtTracking->setVisible(false);
- ui.txtAxisReverse->setVisible(false);
settingsDirty = false;
}
@@ -332,28 +317,7 @@ FaceTrackNoIR::~FaceTrackNoIR() {
// Stop the tracker, by simulating a button-push
//
stopTracker();
-
- //
- // Ask if changed Settings should be saved
- //
- if (settingsDirty) {
- int ret = QMessageBox::question ( this, "Settings have changed", "Do you want to save the settings?", QMessageBox::Save | QMessageBox::Discard, QMessageBox::Discard );
-
- switch (ret) {
- case QMessageBox::Save:
- saveAs();
- break;
- case QMessageBox::Discard:
- // Don't Save was clicked
- break;
- case QMessageBox::Cancel:
- // Cancel was clicked
- break;
- default:
- // should never be reached
- break;
- }
- }
+ save();
}
//
@@ -673,34 +637,6 @@ void FaceTrackNoIR::loadSettings() {
looping = false;
}
-/** show support page in web-browser **/
-void FaceTrackNoIR::openurl_support() {
- QDesktopServices::openUrl(QUrl("http://facetracknoir.sourceforge.net/manual/manual.htm", QUrl::TolerantMode));
-}
-
-/** show donations page in web-browser **/
-void FaceTrackNoIR::openurl_donation() {
- QDesktopServices::openUrl(QUrl("http://facetracknoir.sourceforge.net/information_links/donate.htm", QUrl::TolerantMode));
-}
-
-/** show about dialog **/
-void FaceTrackNoIR::about() {
-
- QPoint offsetpos(100, 100);
- aboutDialog.move(this->pos() + offsetpos);
- aboutDialog.show();
-
- /** ABOUT DIALOG **/
- aboutDialog.setBaseSize(270, 440);
-
- aboutDialog.setMaximumWidth(270);
- aboutDialog.setMaximumHeight(440);
-
- aboutDialog.setMinimumWidth(270);
- aboutDialog.setMinimumHeight(440);
- aboutDialog.setStyleSheet("background:#fff url(:/uielements/aboutfacetracknoir.png) no-repeat;");
-}
-
/** start tracking the face **/
void FaceTrackNoIR::startTracker( ) {
bindKeyboardShortcuts();
@@ -817,25 +753,6 @@ void FaceTrackNoIR::startTracker( ) {
GetCameraNameDX();
//
- // Get the TimeOut value for minimizing FaceTrackNoIR
- // Only start the Timer if value > 0
- //
- int timevalue = iniFile.value ( "AutoMinimizeTime", 0 ).toInt() * 1000;
- if (timevalue > 0) {
-
- bool minimizeTaskBar = iniFile.value ( "MinimizeTaskBar", 1 ).toBool();
- if (minimizeTaskBar) {
- connect(timMinimizeFTN, SIGNAL(timeout()), this, SLOT(showMinimized()));
- }
- else {
- connect(timMinimizeFTN, SIGNAL(timeout()), this, SLOT(hide()));
- }
-
- timMinimizeFTN->setSingleShot( true );
- timMinimizeFTN->start(timevalue);
- }
-
- //
// Start the timer to update the head-pose (digits and 'man in black')
//
timUpdateHeadPose->start(40);
@@ -887,7 +804,6 @@ void FaceTrackNoIR::stopTracker( ) {
ui.lcdNumOutputRotY->setVisible(false);
ui.lcdNumOutputRotZ->setVisible(false);
ui.txtTracking->setVisible(false);
- ui.txtAxisReverse->setVisible(false);
//
// Delete the tracker (after stopping things and all).
@@ -980,7 +896,6 @@ void FaceTrackNoIR::showHeadPose() {
ui.lcdNumRotZ->display(QString("%1").arg(newdata[RZ], 0, 'f', 1));
ui.txtTracking->setVisible(tracker->getTrackingActive());
- ui.txtAxisReverse->setVisible(tracker->getAxisReverse());
//
// Get the output-pose and also display it.
@@ -1096,23 +1011,6 @@ void FaceTrackNoIR::showFilterControls() {
}
}
}
-
-/** toggles FaceTrackNoIR Preferences Dialog **/
-void FaceTrackNoIR::showPreferences() {
-
- // Create if new
- if (!_preferences)
- {
- _preferences = new PreferencesDialog( this, this, Qt::Dialog );
- }
-
- // Show if already created
- if (_preferences) {
- _preferences->show();
- _preferences->raise();
- }
-}
-
/** toggles Keyboard Shortcut Dialog **/
void FaceTrackNoIR::showKeyboardShortcuts() {
@@ -1361,116 +1259,6 @@ void FaceTrackNoIR::filterSelected(int index)
ui.btnShowFilterControls->setEnabled ( true );
}
-//
-// Constructor for FaceTrackNoIR=Preferences-dialog
-//
-PreferencesDialog::PreferencesDialog( FaceTrackNoIR *ftnoir, QWidget *parent, Qt::WindowFlags f ) :
-QWidget( parent , f)
-{
- ui.setupUi( this );
-
- QPoint offsetpos(100, 100);
- this->move(parent->pos() + offsetpos);
-
- mainApp = ftnoir; // Preserve a pointer to FTNoIR
-
- // Connect Qt signals to member-functions
- connect(ui.btnOK, SIGNAL(clicked()), this, SLOT(doOK()));
- connect(ui.btnCancel, SIGNAL(clicked()), this, SLOT(doCancel()));
-
- connect(ui.spinAutoMinimizeTime, SIGNAL(valueChanged(int)), this, SLOT(keyChanged(int)));
- connect(ui.chkAutoStartTracking, SIGNAL(stateChanged(int)), this, SLOT(keyChanged(int)));
- connect(ui.radioMinimize, SIGNAL(toggled(bool)), this, SLOT(keyChanged(bool)));
-
- // Load the settings from the current .INI-file
- loadSettings();
-}
-
-//
-// Destructor for server-dialog
-//
-PreferencesDialog::~PreferencesDialog() {
- qDebug() << "~PreferencesDialog() says: started";
-}
-
-//
-// OK clicked on server-dialog
-//
-void PreferencesDialog::doOK() {
- save();
- this->close();
-}
-
-// override show event
-void PreferencesDialog::showEvent ( QShowEvent * event ) {
- loadSettings();
-}
-
-//
-// Cancel clicked on server-dialog
-//
-void PreferencesDialog::doCancel() {
- //
- // Ask if changed Settings should be saved
- //
- if (settingsDirty) {
- int ret = QMessageBox::question ( this, "Settings have changed", "Do you want to save the settings?", QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel, QMessageBox::Discard );
-
- qDebug() << "doCancel says: answer =" << ret;
-
- switch (ret) {
- case QMessageBox::Save:
- save();
- this->close();
- break;
- case QMessageBox::Discard:
- this->close();
- break;
- case QMessageBox::Cancel:
- // Cancel was clicked
- break;
- default:
- // should never be reached
- break;
- }
- }
- else {
- this->close();
- }
-}
-
-//
-// Load the current Settings from the currently 'active' INI-file.
-//
-void PreferencesDialog::loadSettings() {
-
- QSettings settings("Abbequerque Inc.", "FaceTrackNoIR"); // Registry settings (in HK_USER)
- ui.spinAutoMinimizeTime->setValue( settings.value ( "AutoMinimizeTime", 0 ).toInt() );
- ui.chkAutoStartTracking->setChecked( settings.value ( "AutoStartTracking", 0 ).toBool() );
- ui.radioMinimize->setChecked( settings.value ( "MinimizeTaskBar", 1 ).toBool() );
-
- settingsDirty = false;
-
-}
-
-//
-// Save the current Settings to the currently 'active' INI-file.
-//
-void PreferencesDialog::save() {
-
- QSettings settings("Abbequerque Inc.", "FaceTrackNoIR"); // Registry settings (in HK_USER)
- settings.setValue( "AutoMinimizeTime", ui.spinAutoMinimizeTime->value() );
- settings.setValue( "AutoStartTracking", ui.chkAutoStartTracking->isChecked() );
- settings.setValue( "MinimizeTaskBar", ui.radioMinimize->isChecked() );
-
- //
- // Send a message to the main program, to update the Settings (for the tracker)
- //
- mainApp->updateSettings();
-
- settingsDirty = false;
-}
-
//**************************************************************************************************//
//**************************************************************************************************//
//
@@ -1495,30 +1283,6 @@ QWidget( parent , f)
connect(ui.chkCenterCtrl, SIGNAL(stateChanged(int)), this, SLOT(keyChanged(int)));
connect(ui.chkCenterAlt, SIGNAL(stateChanged(int)), this, SLOT(keyChanged(int)));
- connect(ui.cbxGameZeroKey, SIGNAL(currentIndexChanged(int)), this, SLOT(keyChanged( int )));
- connect(ui.chkGameZeroShift, SIGNAL(stateChanged(int)), this, SLOT(keyChanged(int)));
- connect(ui.chkGameZeroCtrl, SIGNAL(stateChanged(int)), this, SLOT(keyChanged(int)));
- connect(ui.chkGameZeroAlt, SIGNAL(stateChanged(int)), this, SLOT(keyChanged(int)));
-
- connect(ui.cbxStartStopKey, SIGNAL(currentIndexChanged(int)), this, SLOT(keyChanged( int )));
- connect(ui.chkStartStopShift, SIGNAL(stateChanged(int)), this, SLOT(keyChanged(int)));
- connect(ui.chkStartStopCtrl, SIGNAL(stateChanged(int)), this, SLOT(keyChanged(int)));
- connect(ui.chkStartStopAlt, SIGNAL(stateChanged(int)), this, SLOT(keyChanged(int)));
- connect(ui.radioSetZero, SIGNAL(toggled(bool)), this, SLOT(keyChanged(bool)));
-
- connect(ui.cbxInhibitKey, SIGNAL(currentIndexChanged(int)), this, SLOT(keyChanged( int )));
- connect(ui.chkInhibitShift, SIGNAL(stateChanged(int)), this, SLOT(keyChanged(int)));
- connect(ui.chkInhibitCtrl, SIGNAL(stateChanged(int)), this, SLOT(keyChanged(int)));
- connect(ui.chkInhibitAlt, SIGNAL(stateChanged(int)), this, SLOT(keyChanged(int)));
-
- // Also add events for the Axis-checkboxes
- connect(ui.chkInhibitShift, SIGNAL(stateChanged(int)), this, SLOT(keyChanged(int)));
- connect(ui.chkInhibitYaw, SIGNAL(stateChanged(int)), this, SLOT(keyChanged(int)));
- connect(ui.chkInhibitRoll, SIGNAL(stateChanged(int)), this, SLOT(keyChanged(int)));
- connect(ui.chkInhibitX, SIGNAL(stateChanged(int)), this, SLOT(keyChanged(int)));
- connect(ui.chkInhibitY, SIGNAL(stateChanged(int)), this, SLOT(keyChanged(int)));
- connect(ui.chkInhibitZ, SIGNAL(stateChanged(int)), this, SLOT(keyChanged(int)));
-
// Clear the Lists with key-descriptions and keycodes and build the Lists
// The strings will all be added to the ListBoxes for each Shortkey
//
@@ -1528,9 +1292,6 @@ QWidget( parent , f)
for ( int i = 0; i < global_key_sequences.size(); i++) {
ui.cbxCenterKey->addItem(global_key_sequences.at(i));
- ui.cbxGameZeroKey->addItem(global_key_sequences.at(i));
- ui.cbxStartStopKey->addItem(global_key_sequences.at(i));
- ui.cbxInhibitKey->addItem(global_key_sequences.at(i));
}
// Load the settings from the current .INI-file
@@ -1741,38 +1502,6 @@ void KeyboardShortcutDialog::loadSettings() {
ui.cbxCenterKey->setCurrentIndex(iniFile.value("Key_index_Center", 0).toInt());
- ui.chkGameZeroShift->setChecked (iniFile.value ( "Shift_GameZero", 0 ).toBool());
- ui.chkGameZeroCtrl->setChecked (iniFile.value ( "Ctrl_GameZero", 0 ).toBool());
- ui.chkGameZeroAlt->setChecked (iniFile.value ( "Alt_GameZero", 0 ).toBool());
- ui.cbxGameZeroKey->setCurrentIndex(iniFile.value("Key_index_GameZero", 0).toInt());
-
- ui.chkStartStopShift->setChecked (iniFile.value ( "Shift_StartStop", 0 ).toBool());
- ui.chkStartStopCtrl->setChecked (iniFile.value ( "Ctrl_StartStop", 0 ).toBool());
- ui.chkStartStopAlt->setChecked (iniFile.value ( "Alt_StartStop", 0 ).toBool());
- ui.cbxStartStopKey->setCurrentIndex(iniFile.value("Key_index_StartStop", 0).toInt());
-
- ui.radioSetZero->setChecked (iniFile.value ( "SetZero", 1 ).toBool());
- ui.radioSetFreeze->setChecked(!ui.radioSetZero->isChecked());
-
- ui.chkInhibitShift->setChecked (iniFile.value ( "Shift_Inhibit", 0 ).toBool());
- ui.chkInhibitCtrl->setChecked (iniFile.value ( "Ctrl_Inhibit", 0 ).toBool());
- ui.chkInhibitAlt->setChecked (iniFile.value ( "Alt_Inhibit", 0 ).toBool());
- ui.cbxInhibitKey->setCurrentIndex(iniFile.value("Key_index_Inhibit", 0).toInt());
-
- ui.chkInhibitPitch->setChecked (iniFile.value ( "Inhibit_Pitch", 0 ).toBool());
- ui.chkInhibitYaw->setChecked (iniFile.value ( "Inhibit_Yaw", 0 ).toBool());
- ui.chkInhibitRoll->setChecked (iniFile.value ( "Inhibit_Roll", 0 ).toBool());
- ui.chkInhibitX->setChecked (iniFile.value ( "Inhibit_X", 0 ).toBool());
- ui.chkInhibitY->setChecked (iniFile.value ( "Inhibit_Y", 0 ).toBool());
- ui.chkInhibitZ->setChecked (iniFile.value ( "Inhibit_Z", 0 ).toBool());
-
-
- // Reverse Axis
- ui.chkEnableReverseAxis->setChecked (iniFile.value ( "Enable_ReverseAxis", 0 ).toBool());
- ui.spinYawAngle4ReverseAxis->setValue( iniFile.value ( "RA_Yaw", 40 ).toInt() );
- ui.spinZ_Pos4ReverseAxis->setValue( iniFile.value ( "RA_ZPos", -20 ).toInt() );
- ui.spinZ_PosWhenReverseAxis->setValue( iniFile.value ( "RA_ToZPos", 50 ).toInt() );
-
iniFile.endGroup ();
settingsDirty = false;
@@ -1797,35 +1526,6 @@ void KeyboardShortcutDialog::save() {
iniFile.setValue ( "Ctrl_Center", ui.chkCenterCtrl->isChecked() );
iniFile.setValue ( "Alt_Center", ui.chkCenterAlt->isChecked() );
- iniFile.setValue ( "Key_index_GameZero", ui.cbxGameZeroKey->currentIndex() );
- iniFile.setValue ( "Shift_GameZero", ui.chkGameZeroShift->isChecked() );
- iniFile.setValue ( "Ctrl_GameZero", ui.chkGameZeroCtrl->isChecked() );
- iniFile.setValue ( "Alt_GameZero", ui.chkGameZeroAlt->isChecked() );
-
- iniFile.setValue ( "Key_index_StartStop", ui.cbxStartStopKey->currentIndex() );
- iniFile.setValue ( "Shift_StartStop", ui.chkStartStopShift->isChecked() );
- iniFile.setValue ( "Ctrl_StartStop", ui.chkStartStopCtrl->isChecked() );
- iniFile.setValue ( "Alt_StartStop", ui.chkStartStopAlt->isChecked() );
- iniFile.setValue ( "SetZero", ui.radioSetZero->isChecked() );
-
- iniFile.setValue ( "Key_index_Inhibit", ui.cbxInhibitKey->currentIndex() );
- iniFile.setValue ( "Shift_Inhibit", ui.chkInhibitShift->isChecked() );
- iniFile.setValue ( "Ctrl_Inhibit", ui.chkInhibitCtrl->isChecked() );
- iniFile.setValue ( "Alt_Inhibit", ui.chkInhibitAlt->isChecked() );
-
- iniFile.setValue ( "Inhibit_Pitch", ui.chkInhibitPitch->isChecked() );
- iniFile.setValue ( "Inhibit_Yaw", ui.chkInhibitYaw->isChecked() );
- iniFile.setValue ( "Inhibit_Roll", ui.chkInhibitRoll->isChecked() );
- iniFile.setValue ( "Inhibit_X", ui.chkInhibitX->isChecked() );
- iniFile.setValue ( "Inhibit_Y", ui.chkInhibitY->isChecked() );
- iniFile.setValue ( "Inhibit_Z", ui.chkInhibitZ->isChecked() );
-
- // Reverse Axis
- iniFile.setValue ( "Enable_ReverseAxis", ui.chkEnableReverseAxis->isChecked() );
- iniFile.setValue( "RA_Yaw", ui.spinYawAngle4ReverseAxis->value() );
- iniFile.setValue( "RA_ZPos", ui.spinZ_Pos4ReverseAxis->value() );
- iniFile.setValue( "RA_ToZPos", ui.spinZ_PosWhenReverseAxis->value() );
-
iniFile.endGroup ();
settingsDirty = false;
@@ -2053,28 +1753,3 @@ void FaceTrackNoIR::shortcutRecentered()
tracker->do_center = true;
}
}
-
-void FaceTrackNoIR::shortcutZero()
-{
- if (tracker)
- {
- tracker->do_game_zero = true;
- }
-}
-
-void FaceTrackNoIR::shortcutStartStop()
-{
- if (tracker)
- {
- tracker->do_tracking = !tracker->do_tracking;
- qDebug() << "do-tracking" << tracker->do_tracking;
- }
-}
-
-void FaceTrackNoIR::shortcutInhibit()
-{
- if (tracker)
- {
- tracker->do_inhibit = !tracker->do_inhibit;
- }
-}
diff --git a/facetracknoir/facetracknoir.h b/facetracknoir/facetracknoir.h
index 8a2b6c49..cfe440ae 100644
--- a/facetracknoir/facetracknoir.h
+++ b/facetracknoir/facetracknoir.h
@@ -56,7 +56,6 @@
#include "ui_facetracknoir.h"
#include "ui_ftnoir_keyboardshortcuts.h"
-#include "ui_ftnoir_preferences.h"
#include "ui_ftnoir_curves.h"
#include "ftnoir_protocol_base/ftnoir_protocol_base.h"
@@ -128,9 +127,6 @@ public:
#endif
public slots:
void shortcutRecentered();
- void shortcutZero();
- void shortcutStartStop();
- void shortcutInhibit();
private:
Ui::FaceTrackNoIRClass ui;
@@ -185,12 +181,6 @@ private:
void save();
void saveAs();
void exit();
-
- //about menu
- void openurl_support();
- void openurl_donation();
- void about();
-
// void setIcon(int index);
void iconActivated(QSystemTrayIcon::ActivationReason reason);
void profileSelected(int index);
@@ -205,7 +195,6 @@ private:
void showServerControls();
void showFilterControls();
- void showPreferences();
void showKeyboardShortcuts();
void showCurveConfiguration();
@@ -235,33 +224,6 @@ private:
};
-// Widget that has controls for FaceTrackNoIR Preferences.
-class PreferencesDialog: public QWidget, public Ui::UICPreferencesDialog
-{
- Q_OBJECT
-public:
-
- explicit PreferencesDialog( FaceTrackNoIR *ftnoir, QWidget *parent=0, Qt::WindowFlags f=0 );
- virtual ~PreferencesDialog();
- void showEvent ( QShowEvent * event );
-
-private:
- Ui::UICPreferencesDialog ui;
- void loadSettings();
- void save();
-
- /** helper **/
- bool settingsDirty;
- FaceTrackNoIR *mainApp;
-
-private slots:
- void doOK();
- void doCancel();
- void keyChanged( int index ) { settingsDirty = true; }
- void keyChanged( bool foo ) { settingsDirty = true; }
-};
-
-// Widget that has controls for Keyboard shortcuts.
class KeyboardShortcutDialog: public QWidget, public Ui::UICKeyboardShortcutDialog
{
Q_OBJECT
@@ -283,8 +245,8 @@ private:
private slots:
void doOK();
void doCancel();
- void keyChanged( int index ) { settingsDirty = true; };
- void keyChanged( bool index ) { settingsDirty = true; };
+ void keyChanged( int index ) { settingsDirty = true; }
+ void keyChanged( bool index ) { settingsDirty = true; }
};
// Widget that has controls for Keyboard shortcuts.
diff --git a/facetracknoir/facetracknoir.ui b/facetracknoir/facetracknoir.ui
index 63107a80..63961f4e 100644
--- a/facetracknoir/facetracknoir.ui
+++ b/facetracknoir/facetracknoir.ui
@@ -11,7 +11,7 @@
<x>0</x>
<y>0</y>
<width>890</width>
- <height>431</height>
+ <height>400</height>
</rect>
</property>
<property name="sizePolicy">
@@ -23,13 +23,13 @@
<property name="minimumSize">
<size>
<width>890</width>
- <height>431</height>
+ <height>400</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>890</width>
- <height>431</height>
+ <height>410</height>
</size>
</property>
<property name="contextMenuPolicy">
@@ -39,7 +39,7 @@
<string>FaceTrackNoIR</string>
</property>
<property name="windowIcon">
- <iconset resource="../ftnoir_protocol_ftn/ftn-protocol.qrc">
+ <iconset resource="main-facetracknoir.qrc">
<normaloff>:/images/facetracknoir.png</normaloff>:/images/facetracknoir.png</iconset>
</property>
<property name="toolTip">
@@ -1450,7 +1450,7 @@ background:none;</string>
<property name="geometry">
<rect>
<x>10</x>
- <y>50</y>
+ <y>20</y>
<width>231</width>
<height>169</height>
</rect>
@@ -1698,23 +1698,6 @@ color: rgb(0, 255, 0);</string>
<string>Tracking</string>
</property>
</widget>
- <widget class="QLabel" name="txtAxisReverse">
- <property name="geometry">
- <rect>
- <x>110</x>
- <y>30</y>
- <width>101</width>
- <height>16</height>
- </rect>
- </property>
- <property name="styleSheet">
- <string notr="true">border:none;
-color: rgb(0, 255, 0);</string>
- </property>
- <property name="text">
- <string>Axis Reverse</string>
- </property>
- </widget>
</widget>
</widget>
<widget class="QWidget" name="widget4logo" native="true">
@@ -1738,41 +1721,11 @@ color: rgb(0, 255, 0);</string>
<height>90</height>
</size>
</property>
- <widget class="QPushButton" name="btnDonate">
- <property name="geometry">
- <rect>
- <x>5</x>
- <y>0</y>
- <width>151</width>
- <height>31</height>
- </rect>
- </property>
- <property name="cursor">
- <cursorShape>PointingHandCursor</cursorShape>
- </property>
- <property name="toolTip">
- <string>Please help us: make gaming fun...</string>
- </property>
- <property name="text">
- <string>Click here to
-Support FaceTrackNoIR!</string>
- </property>
- <property name="icon">
- <iconset resource="main-facetracknoir.qrc">
- <normaloff>:/uielements/donate.png</normaloff>:/uielements/donate.png</iconset>
- </property>
- <property name="iconSize">
- <size>
- <width>18</width>
- <height>18</height>
- </size>
- </property>
- </widget>
<widget class="QLCDNumber" name="lcdNumOutputRotX">
<property name="geometry">
<rect>
<x>101</x>
- <y>30</y>
+ <y>19</y>
<width>50</width>
<height>21</height>
</rect>
@@ -1800,7 +1753,7 @@ Support FaceTrackNoIR!</string>
<property name="geometry">
<rect>
<x>101</x>
- <y>48</y>
+ <y>37</y>
<width>50</width>
<height>21</height>
</rect>
@@ -1828,7 +1781,7 @@ Support FaceTrackNoIR!</string>
<property name="geometry">
<rect>
<x>101</x>
- <y>66</y>
+ <y>55</y>
<width>50</width>
<height>21</height>
</rect>
@@ -1856,7 +1809,7 @@ Support FaceTrackNoIR!</string>
<property name="geometry">
<rect>
<x>17</x>
- <y>30</y>
+ <y>19</y>
<width>50</width>
<height>21</height>
</rect>
@@ -1884,7 +1837,7 @@ Support FaceTrackNoIR!</string>
<property name="geometry">
<rect>
<x>17</x>
- <y>48</y>
+ <y>37</y>
<width>50</width>
<height>21</height>
</rect>
@@ -1912,7 +1865,7 @@ Support FaceTrackNoIR!</string>
<property name="geometry">
<rect>
<x>17</x>
- <y>66</y>
+ <y>55</y>
<width>50</width>
<height>21</height>
</rect>
@@ -1940,7 +1893,7 @@ Support FaceTrackNoIR!</string>
<property name="geometry">
<rect>
<x>9</x>
- <y>31</y>
+ <y>20</y>
<width>16</width>
<height>16</height>
</rect>
@@ -1956,7 +1909,7 @@ Support FaceTrackNoIR!</string>
<property name="geometry">
<rect>
<x>10</x>
- <y>51</y>
+ <y>40</y>
<width>16</width>
<height>16</height>
</rect>
@@ -1972,7 +1925,7 @@ Support FaceTrackNoIR!</string>
<property name="geometry">
<rect>
<x>10</x>
- <y>70</y>
+ <y>59</y>
<width>16</width>
<height>16</height>
</rect>
@@ -1988,7 +1941,7 @@ Support FaceTrackNoIR!</string>
<property name="geometry">
<rect>
<x>69</x>
- <y>70</y>
+ <y>59</y>
<width>20</width>
<height>16</height>
</rect>
@@ -2004,7 +1957,7 @@ Support FaceTrackNoIR!</string>
<property name="geometry">
<rect>
<x>71</x>
- <y>31</y>
+ <y>20</y>
<width>20</width>
<height>16</height>
</rect>
@@ -2020,7 +1973,7 @@ Support FaceTrackNoIR!</string>
<property name="geometry">
<rect>
<x>69</x>
- <y>51</y>
+ <y>40</y>
<width>25</width>
<height>16</height>
</rect>
@@ -2056,57 +2009,6 @@ Support FaceTrackNoIR!</string>
</property>
</widget>
</widget>
- <widget class="QMenuBar" name="menuBar">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>890</width>
- <height>21</height>
- </rect>
- </property>
- <property name="styleSheet">
- <string notr="true">b</string>
- </property>
- <widget class="QMenu" name="menuFile">
- <property name="title">
- <string>File</string>
- </property>
- <addaction name="actionOpen"/>
- <addaction name="actionSave"/>
- <addaction name="actionSave_As"/>
- <addaction name="separator"/>
- <addaction name="actionExit"/>
- </widget>
- <widget class="QMenu" name="menuView">
- <property name="title">
- <string>View</string>
- </property>
- <addaction name="actionVideoWidget"/>
- </widget>
- <widget class="QMenu" name="menuOptions">
- <property name="title">
- <string>Options</string>
- </property>
- <addaction name="actionPreferences"/>
- <addaction name="actionKeyboard_Shortcuts"/>
- <addaction name="separator"/>
- <addaction name="actionCurve_Configuration"/>
- </widget>
- <widget class="QMenu" name="menuHelp">
- <property name="title">
- <string>Help</string>
- </property>
- <addaction name="actionSupport"/>
- <addaction name="actionYour_Support"/>
- <addaction name="separator"/>
- <addaction name="actionAbout"/>
- </widget>
- <addaction name="menuFile"/>
- <addaction name="menuView"/>
- <addaction name="menuOptions"/>
- <addaction name="menuHelp"/>
- </widget>
<action name="actionOpen">
<property name="text">
<string>&amp;Open</string>
@@ -2283,7 +2185,6 @@ Support FaceTrackNoIR!</string>
<tabstop>iconcomboProtocol</tabstop>
</tabstops>
<resources>
- <include location="../ftnoir_protocol_ftn/ftn-protocol.qrc"/>
<include location="main-facetracknoir.qrc"/>
</resources>
<connections/>
diff --git a/facetracknoir/ftnoir_keyboardshortcuts.ui b/facetracknoir/ftnoir_keyboardshortcuts.ui
index 0faaf4d0..e70b7536 100644
--- a/facetracknoir/ftnoir_keyboardshortcuts.ui
+++ b/facetracknoir/ftnoir_keyboardshortcuts.ui
@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>591</width>
- <height>438</height>
+ <width>289</width>
+ <height>81</height>
</rect>
</property>
<property name="windowTitle">
@@ -23,802 +23,194 @@
<property name="autoFillBackground">
<bool>false</bool>
</property>
- <layout class="QVBoxLayout" name="_vertical_layout">
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout_3">
- <item>
- <layout class="QGridLayout" name="gridLayout">
- <item row="5" column="3">
- <widget class="QCheckBox" name="chkInhibitAlt">
- <property name="maximumSize">
- <size>
- <width>50</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="text">
- <string>Alt</string>
- </property>
- </widget>
- </item>
- <item row="3" column="3">
- <widget class="QCheckBox" name="chkStartStopAlt">
- <property name="maximumSize">
- <size>
- <width>50</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="text">
- <string>Alt</string>
- </property>
- </widget>
- </item>
- <item row="5" column="2">
- <widget class="QCheckBox" name="chkInhibitCtrl">
- <property name="maximumSize">
- <size>
- <width>50</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="text">
- <string>Ctrl</string>
- </property>
- </widget>
- </item>
- <item row="3" column="2">
- <widget class="QCheckBox" name="chkStartStopCtrl">
- <property name="maximumSize">
- <size>
- <width>50</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="text">
- <string>Ctrl</string>
- </property>
- </widget>
- </item>
- <item row="1" column="2">
- <widget class="QCheckBox" name="chkCenterCtrl">
- <property name="maximumSize">
- <size>
- <width>50</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="text">
- <string>Ctrl</string>
- </property>
- </widget>
- </item>
- <item row="5" column="1">
- <widget class="QCheckBox" name="chkInhibitShift">
- <property name="maximumSize">
- <size>
- <width>50</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="text">
- <string>Shift</string>
- </property>
- </widget>
- </item>
- <item row="5" column="4">
- <widget class="QComboBox" name="cbxInhibitKey">
- <property name="minimumSize">
- <size>
- <width>90</width>
- <height>0</height>
- </size>
- </property>
- </widget>
- </item>
- <item row="1" column="4">
- <widget class="QComboBox" name="cbxCenterKey">
- <property name="minimumSize">
- <size>
- <width>90</width>
- <height>0</height>
- </size>
- </property>
- <property name="toolTip">
- <string>Select Number</string>
- </property>
- <property name="insertPolicy">
- <enum>QComboBox::InsertAlphabetically</enum>
- </property>
- </widget>
- </item>
- <item row="5" column="6">
- <widget class="QGroupBox" name="groupBox">
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>80</height>
- </size>
- </property>
- <property name="styleSheet">
- <string notr="true">color: rgb(0, 0, 0);</string>
- </property>
- <property name="title">
- <string>Rotations</string>
- </property>
- <widget class="QCheckBox" name="chkInhibitYaw">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>20</y>
- <width>50</width>
- <height>17</height>
- </rect>
- </property>
- <property name="maximumSize">
- <size>
- <width>50</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="text">
- <string>Yaw</string>
- </property>
- </widget>
- <widget class="QCheckBox" name="chkInhibitPitch">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>40</y>
- <width>46</width>
- <height>17</height>
- </rect>
- </property>
- <property name="maximumSize">
- <size>
- <width>50</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="text">
- <string>Pitch</string>
- </property>
- </widget>
- <widget class="QCheckBox" name="chkInhibitRoll">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>60</y>
- <width>50</width>
- <height>17</height>
- </rect>
- </property>
- <property name="maximumSize">
- <size>
- <width>50</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="text">
- <string>Roll</string>
- </property>
- </widget>
- </widget>
- </item>
- <item row="3" column="6">
- <widget class="QGroupBox" name="groupBox_2">
- <property name="minimumSize">
- <size>
- <width>60</width>
- <height>60</height>
- </size>
- </property>
- <property name="styleSheet">
- <string notr="true">color: rgb(0, 0, 0);</string>
- </property>
- <property name="title">
- <string>View</string>
- </property>
- <widget class="QRadioButton" name="radioSetZero">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>20</y>
- <width>46</width>
- <height>17</height>
- </rect>
- </property>
- <property name="text">
- <string>Zero</string>
- </property>
- </widget>
- <widget class="QRadioButton" name="radioSetFreeze">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>40</y>
- <width>45</width>
- <height>17</height>
- </rect>
- </property>
- <property name="text">
- <string>Stay</string>
- </property>
- </widget>
- </widget>
- </item>
- <item row="3" column="0">
- <widget class="QLabel" name="label_6">
- <property name="text">
- <string>Start/stop</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
- </property>
- </widget>
- </item>
- <item row="5" column="7">
- <widget class="QGroupBox" name="groupBox_3">
- <property name="styleSheet">
- <string notr="true">color: rgb(0, 0, 0);</string>
- </property>
- <property name="title">
- <string>Translations</string>
- </property>
- <widget class="QCheckBox" name="chkInhibitX">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>20</y>
- <width>30</width>
- <height>17</height>
- </rect>
- </property>
- <property name="maximumSize">
- <size>
- <width>30</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="text">
- <string>X</string>
- </property>
- </widget>
- <widget class="QCheckBox" name="chkInhibitY">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>40</y>
- <width>30</width>
- <height>17</height>
- </rect>
- </property>
- <property name="maximumSize">
- <size>
- <width>30</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="text">
- <string>Y</string>
- </property>
- </widget>
- <widget class="QCheckBox" name="chkInhibitZ">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>60</y>
- <width>30</width>
- <height>17</height>
- </rect>
- </property>
- <property name="maximumSize">
- <size>
- <width>30</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="text">
- <string>Z</string>
- </property>
- </widget>
- </widget>
- </item>
- <item row="2" column="0">
- <widget class="QLabel" name="textLabel2_2">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Game Zero</string>
- </property>
- <property name="wordWrap">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="QCheckBox" name="chkGameZeroShift">
- <property name="maximumSize">
- <size>
- <width>50</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="text">
- <string>Shift</string>
- </property>
- </widget>
- </item>
- <item row="2" column="2">
- <widget class="QCheckBox" name="chkGameZeroCtrl">
- <property name="maximumSize">
- <size>
- <width>50</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="text">
- <string>Ctrl</string>
- </property>
- </widget>
- </item>
- <item row="1" column="3">
- <widget class="QCheckBox" name="chkCenterAlt">
- <property name="maximumSize">
- <size>
- <width>50</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="text">
- <string>Alt</string>
- </property>
- </widget>
- </item>
- <item row="2" column="3">
- <widget class="QCheckBox" name="chkGameZeroAlt">
- <property name="maximumSize">
- <size>
- <width>50</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="text">
- <string>Alt</string>
- </property>
- </widget>
- </item>
- <item row="2" column="4">
- <widget class="QComboBox" name="cbxGameZeroKey">
- <property name="minimumSize">
- <size>
- <width>90</width>
- <height>0</height>
- </size>
- </property>
- <property name="toolTip">
- <string>Select Number</string>
- </property>
- <property name="insertPolicy">
- <enum>QComboBox::InsertAlphabetically</enum>
- </property>
- </widget>
- </item>
- <item row="0" column="4">
- <widget class="QLabel" name="textLabel2_3">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Keyboard</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignCenter</set>
- </property>
- <property name="wordWrap">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item row="4" column="0">
- <widget class="Line" name="line_12">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- </widget>
- </item>
- <item row="3" column="4">
- <widget class="QComboBox" name="cbxStartStopKey">
- <property name="minimumSize">
- <size>
- <width>90</width>
- <height>0</height>
- </size>
- </property>
- </widget>
- </item>
- <item row="5" column="5">
- <widget class="QLabel" name="label_3">
- <property name="text">
- <string>Disables:</string>
- </property>
- </widget>
- </item>
- <item row="3" column="5">
- <widget class="QLabel" name="label_5">
- <property name="text">
- <string>When OFF:</string>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="textLabel2">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Center</string>
- </property>
- <property name="wordWrap">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item row="5" column="0">
- <widget class="QLabel" name="label_2">
- <property name="text">
- <string>Axis Inhibitor</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QCheckBox" name="chkCenterShift">
- <property name="maximumSize">
- <size>
- <width>50</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="text">
- <string>Shift</string>
- </property>
- </widget>
- </item>
- <item row="3" column="1">
- <widget class="QCheckBox" name="chkStartStopShift">
- <property name="maximumSize">
- <size>
- <width>50</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="text">
- <string>Shift</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout_4">
- <item>
- <spacer name="horizontalSpacer_3">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QLabel" name="label_4">
- <property name="text">
- <string>The axis inhibitor shortkey toggles the selected axis Off/On</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <widget class="Line" name="line">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- </widget>
- </item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout_5">
- <item>
- <layout class="QGridLayout" name="gridLayout_2">
- <item row="2" column="1">
- <widget class="QLabel" name="lblYawAngle4ReverseAxis">
- <property name="text">
- <string>Yaw angle for Reverse Axis</string>
- </property>
- </widget>
- </item>
- <item row="2" column="2">
- <widget class="QSpinBox" name="spinYawAngle4ReverseAxis">
- <property name="minimumSize">
- <size>
- <width>50</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>60</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="maximum">
- <number>90</number>
- </property>
- <property name="value">
- <number>45</number>
- </property>
- </widget>
- </item>
- <item row="2" column="7">
- <spacer name="horizontalSpacer_4">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="2" column="3">
- <widget class="QLabel" name="lblYawAngle4ReverseAxisEgu">
- <property name="text">
- <string>degrees</string>
- </property>
- </widget>
- </item>
- <item row="3" column="1">
- <widget class="QLabel" name="lblZ_Pos4ReverseAxis">
- <property name="text">
- <string>Z-position for Reverse Axis</string>
- </property>
- </widget>
- </item>
- <item row="3" column="2">
- <widget class="QSpinBox" name="spinZ_Pos4ReverseAxis">
- <property name="minimumSize">
- <size>
- <width>50</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>60</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="minimum">
- <number>-50</number>
- </property>
- <property name="maximum">
- <number>150</number>
- </property>
- <property name="value">
- <number>50</number>
- </property>
- </widget>
- </item>
- <item row="3" column="3">
- <widget class="QLabel" name="lblZ_Pos4ReverseAxisEgu">
- <property name="text">
- <string>cm</string>
- </property>
- </widget>
- </item>
- <item row="3" column="4">
- <widget class="QLabel" name="label_7">
- <property name="text">
- <string>When Reverse:</string>
- </property>
- </widget>
- </item>
- <item row="3" column="5">
- <widget class="QSpinBox" name="spinZ_PosWhenReverseAxis">
- <property name="minimumSize">
- <size>
- <width>50</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>60</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="minimum">
- <number>-50</number>
- </property>
- <property name="maximum">
- <number>150</number>
- </property>
- <property name="value">
- <number>-20</number>
- </property>
- </widget>
- </item>
- <item row="3" column="6">
- <widget class="QLabel" name="lblZ_PosWhenReverseAxisEgu">
- <property name="text">
- <string>cm</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QLabel" name="lblZ_Pos4ReverseAxis_2">
- <property name="text">
- <string>Enable Revers Axis</string>
- </property>
- </widget>
- </item>
- <item row="1" column="2">
- <widget class="QCheckBox" name="chkEnableReverseAxis">
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </item>
- <item>
- <spacer name="verticalSpacer">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>40</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout_6">
- <item>
- <spacer name="horizontalSpacer_5">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QLabel" name="label_8">
- <property name="text">
- <string>These settings are saved 'per game' (INI-file)</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout">
- <item>
- <spacer name="horizontalSpacer_2">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout_2">
- <property name="sizeConstraint">
- <enum>QLayout::SetDefaultConstraint</enum>
- </property>
- <item>
- <widget class="QPushButton" name="btnOK">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>100</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>100</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="text">
- <string>OK</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="btnCancel">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>100</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>100</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="text">
- <string>Cancel</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <spacer name="horizontalSpacer">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>QSizePolicy::Fixed</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>10</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </item>
- </layout>
+ <widget class="QPushButton" name="btnCancel">
+ <property name="geometry">
+ <rect>
+ <x>180</x>
+ <y>50</y>
+ <width>100</width>
+ <height>23</height>
+ </rect>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>100</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>100</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Cancel</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" name="btnOK">
+ <property name="geometry">
+ <rect>
+ <x>74</x>
+ <y>50</y>
+ <width>100</width>
+ <height>23</height>
+ </rect>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>100</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>100</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>OK</string>
+ </property>
+ </widget>
+ <widget class="QComboBox" name="cbxCenterKey">
+ <property name="geometry">
+ <rect>
+ <x>179</x>
+ <y>19</y>
+ <width>101</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>90</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="toolTip">
+ <string>Select Number</string>
+ </property>
+ <property name="insertPolicy">
+ <enum>QComboBox::InsertAlphabetically</enum>
+ </property>
+ </widget>
+ <widget class="QLabel" name="textLabel2_4">
+ <property name="geometry">
+ <rect>
+ <x>210</x>
+ <y>0</y>
+ <width>46</width>
+ <height>16</height>
+ </rect>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Keyboard</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="QCheckBox" name="chkCenterAlt">
+ <property name="geometry">
+ <rect>
+ <x>141</x>
+ <y>21</y>
+ <width>36</width>
+ <height>17</height>
+ </rect>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>50</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Alt</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="textLabel2_3">
+ <property name="geometry">
+ <rect>
+ <x>5</x>
+ <y>23</y>
+ <width>33</width>
+ <height>16</height>
+ </rect>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Center</string>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="QCheckBox" name="chkCenterCtrl">
+ <property name="geometry">
+ <rect>
+ <x>95</x>
+ <y>21</y>
+ <width>40</width>
+ <height>17</height>
+ </rect>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>50</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Ctrl</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" name="chkCenterShift">
+ <property name="geometry">
+ <rect>
+ <x>44</x>
+ <y>21</y>
+ <width>45</width>
+ <height>17</height>
+ </rect>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>50</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Shift</string>
+ </property>
+ </widget>
</widget>
<resources/>
<connections/>
diff --git a/facetracknoir/ftnoir_preferences.ui b/facetracknoir/ftnoir_preferences.ui
deleted file mode 100644
index 9e4bcd34..00000000
--- a/facetracknoir/ftnoir_preferences.ui
+++ /dev/null
@@ -1,240 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>UICPreferencesDialog</class>
- <widget class="QWidget" name="UICPreferencesDialog">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>485</width>
- <height>151</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>FaceTrackNoIR Preferences</string>
- </property>
- <property name="windowIcon">
- <iconset>
- <normaloff>images/FaceTrackNoIR.png</normaloff>images/FaceTrackNoIR.png</iconset>
- </property>
- <property name="layoutDirection">
- <enum>Qt::LeftToRight</enum>
- </property>
- <property name="autoFillBackground">
- <bool>false</bool>
- </property>
- <layout class="QVBoxLayout" name="_vertical_layout">
- <item>
- <layout class="QGridLayout" name="gridLayout">
- <item row="0" column="0">
- <widget class="QLabel" name="textLabel2">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Auto Minimize FaceTrackNoIR (0 = disable):</string>
- </property>
- <property name="wordWrap">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QSpinBox" name="spinAutoMinimizeTime">
- <property name="toolTip">
- <string extracomment="Time after Start Tracker"/>
- </property>
- <property name="maximum">
- <number>1000</number>
- </property>
- <property name="singleStep">
- <number>5</number>
- </property>
- </widget>
- </item>
- <item row="0" column="2">
- <widget class="QLabel" name="label">
- <property name="text">
- <string>sec. (after 'Start')</string>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="label_2">
- <property name="text">
- <string>Automatically Start tracking on Startup</string>
- </property>
- </widget>
- </item>
- <item row="0" column="3">
- <widget class="QRadioButton" name="radioMinimize">
- <property name="text">
- <string>Taskbar</string>
- </property>
- </widget>
- </item>
- <item row="0" column="4">
- <widget class="QRadioButton" name="radioTray">
- <property name="text">
- <string>Tray</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QCheckBox" name="chkAutoStartTracking">
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <spacer name="verticalSpacer">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>40</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout_3">
- <item>
- <spacer name="horizontalSpacer_3">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QLabel" name="textLabel2_2">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>These settings are saved globally (Registry)</string>
- </property>
- <property name="wordWrap">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout">
- <item>
- <spacer name="horizontalSpacer_2">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout_2">
- <property name="sizeConstraint">
- <enum>QLayout::SetDefaultConstraint</enum>
- </property>
- <item>
- <widget class="QPushButton" name="btnOK">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>100</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>100</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="text">
- <string>OK</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="btnCancel">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>100</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>100</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="text">
- <string>Cancel</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <spacer name="horizontalSpacer">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>QSizePolicy::Fixed</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>10</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </item>
- </layout>
- </widget>
- <resources/>
- <connections/>
- <slots>
- <slot>startEngineClicked()</slot>
- <slot>stopEngineClicked()</slot>
- <slot>cameraSettingsClicked()</slot>
- </slots>
-</ui>
diff --git a/facetracknoir/main-facetracknoir.qrc b/facetracknoir/main-facetracknoir.qrc
index 27b7dd30..83c93425 100644
--- a/facetracknoir/main-facetracknoir.qrc
+++ b/facetracknoir/main-facetracknoir.qrc
@@ -3,12 +3,10 @@
<file>uielements/tools.png</file>
<file>images/settings16.png</file>
<file>images/settingsopen16.png</file>
- <file>uielements/donate.png</file>
<file>uielements/curves.png</file>
<file>images/rotation_dofs.png</file>
<file>images/translation_dofs.png</file>
<file>images/330px-6dof_en.png</file>
<file>images/facetracknoir.png</file>
- <file>uielements/aboutfacetracknoir.png</file>
</qresource>
</RCC>
diff --git a/facetracknoir/tracker.cpp b/facetracknoir/tracker.cpp
index 8dbeb6c2..db6c0af2 100644
--- a/facetracknoir/tracker.cpp
+++ b/facetracknoir/tracker.cpp
@@ -73,51 +73,30 @@ HeadPoseData* GlobalPose = NULL;
/** constructor **/
Tracker::Tracker( FaceTrackNoIR *parent ) :
confid(false),
- useAxisReverse(false),
- YawAngle4ReverseAxis(40),
- Z_Pos4ReverseAxis(-20.0f),
- Z_PosWhenReverseAxis(50.0),
should_quit(false),
- do_tracking(true),
- do_center(false),
- do_game_zero(false),
- do_axis_reverse(false)
+ do_center(false)
{
// Retieve the pointer to the parent
mainApp = parent;
// Load the settings from the INI-file
loadSettings();
- for (int i = 0; i < 6; i++)
- {
- GlobalPose->axes[i].headPos = 0;
- inhibit[i] = false;
- }
- do_inhibit = false;
}
Tracker::~Tracker()
{
}
-static void get_curve(bool inhibitp, bool inhibit_zerop, double pos, double& out, THeadPoseDOF& axis) {
- if (inhibitp) {
- if (inhibit_zerop)
- out = 0;
- axis.curvePtr->setTrackingActive( true );
- axis.curvePtrAlt->setTrackingActive( false );
+static void get_curve(double pos, double& out, THeadPoseDOF& axis) {
+ bool altp = (pos < 0) && axis.altp;
+ if (altp) {
+ out = axis.invert * axis.curvePtrAlt->getValue(pos);
+ axis.curvePtr->setTrackingActive( false );
+ axis.curvePtrAlt->setTrackingActive( true );
}
else {
- bool altp = (pos < 0) && axis.altp;
- if (altp) {
- out = axis.invert * axis.curvePtrAlt->getValue(pos);
- axis.curvePtr->setTrackingActive( false );
- axis.curvePtrAlt->setTrackingActive( true );
- }
- else {
- out = axis.invert * axis.curvePtr->getValue(pos);
- axis.curvePtr->setTrackingActive( true );
- axis.curvePtrAlt->setTrackingActive( false );
- }
+ out = axis.invert * axis.curvePtr->getValue(pos);
+ axis.curvePtr->setTrackingActive( true );
+ axis.curvePtrAlt->setTrackingActive( false );
}
}
@@ -129,7 +108,6 @@ void Tracker::run() {
/** Direct Input variables **/
T6DOF offset_camera;
- T6DOF gamezero_camera;
T6DOF gameoutput_camera;
bool bTracker1Confid = false;
@@ -183,13 +161,8 @@ void Tracker::run() {
if (Libraries->pFilter)
Libraries->pFilter->Initialize();
}
-
- if (do_game_zero) {
- gamezero_camera = gameoutput_camera;
- do_game_zero = false;
- }
- if (do_tracking && confid) {
+ if (getTrackingActive()) {
// get values
for (int i = 0; i < 6; i++)
target_camera.axes[i] = GlobalPose->axes[i].headPos;
@@ -210,26 +183,13 @@ void Tracker::run() {
}
for (int i = 0; i < 6; i++)
- get_curve(do_inhibit && inhibit[i], inhibit_zero, new_camera.axes[i], output_camera.axes[i], GlobalPose->axes[i]);
-
- if (useAxisReverse) {
- do_axis_reverse = ((fabs(output_camera.axes[RX]) > YawAngle4ReverseAxis) && (output_camera.axes[TZ] < Z_Pos4ReverseAxis));
- } else {
- do_axis_reverse = false;
- }
-
- //
- // Reverse Axis.
- //
- if (do_axis_reverse) {
- output_camera.axes[TZ] = Z_PosWhenReverseAxis; // Set the desired Z-position
- }
+ get_curve(new_camera.axes[i], output_camera.axes[i], GlobalPose->axes[i]);
//
// Send the headpose to the game
//
if (Libraries->pProtocol) {
- gameoutput_camera = output_camera + gamezero_camera;
+ gameoutput_camera = output_camera;
Libraries->pProtocol->sendHeadposeToGame( gameoutput_camera.axes, newpose ); // degrees & centimeters
}
}
@@ -237,10 +197,10 @@ void Tracker::run() {
//
// Go to initial position
//
- if (Libraries->pProtocol && inhibit_zero) {
+ if (Libraries->pProtocol) {
for (int i = 0; i < 6; i++)
output_camera.axes[i] = 0;
- gameoutput_camera = output_camera + gamezero_camera;
+ gameoutput_camera = output_camera;
Libraries->pProtocol->sendHeadposeToGame( gameoutput_camera.axes, newpose ); // degrees & centimeters
}
for (int i = 0; i < 6; i++)
@@ -264,25 +224,6 @@ void Tracker::run() {
}
//
-// Handle the command, send upstream by the game.
-// Valid values are:
-// 1 = reset Headpose
-//
-bool Tracker::handleGameCommand ( int command ) {
-
- qDebug() << "handleGameCommand says: Command =" << command;
-
- switch ( command ) {
- case 1: // reset headtracker
- Tracker::do_center = true;
- break;
- default:
- break;
- }
- return false;
-}
-
-//
// Get the raw headpose, so it can be displayed.
//
void Tracker::getHeadPose( double *data ) {
@@ -311,29 +252,6 @@ void Tracker::loadSettings() {
QSettings iniFile( currentFile, QSettings::IniFormat ); // Application settings (in INI-file)
qDebug() << "loadSettings says: iniFile = " << currentFile;
-
- iniFile.beginGroup ( "KB_Shortcuts" );
- // Reverse Axis
- useAxisReverse = iniFile.value ( "Enable_ReverseAxis", 0 ).toBool();
- YawAngle4ReverseAxis = iniFile.value ( "RA_Yaw", 40 ).toInt();
- Z_Pos4ReverseAxis = iniFile.value ( "RA_ZPos", 50 ).toInt();
- Z_PosWhenReverseAxis = iniFile.value ( "RA_ToZPos", 80 ).toInt();
-
- static const char* names[] = {
- "Inhibit_X",
- "Inhibit_Y",
- "Inhibit_Z",
- "Inhibit_Yaw",
- "Inhibit_Pitch",
- "Inhibit_Roll"
- };
-
- for (int i = 0; i < 6; i++)
- {
- inhibit[i] = iniFile.value(names[i], false).toBool();
- }
- inhibit_zero = iniFile.value("SetZero", false).toBool();
- iniFile.endGroup ();
}
void Tracker::setInvertAxis(Axis axis, bool invert) { GlobalPose->axes[axis].invert = invert?-1.0f:1.0f; }
diff --git a/facetracknoir/tracker.h b/facetracknoir/tracker.h
index 035a88ed..c10ae6fb 100644
--- a/facetracknoir/tracker.h
+++ b/facetracknoir/tracker.h
@@ -135,15 +135,6 @@ class Tracker : public QThread {
Q_OBJECT
private:
- bool useAxisReverse; // Use Axis Reverse
- float YawAngle4ReverseAxis; // Axis Reverse settings
- float Z_Pos4ReverseAxis;
- float Z_PosWhenReverseAxis;
-
-
- volatile bool inhibit[6];
- volatile bool inhibit_zero;
-
FaceTrackNoIR *mainApp;
protected:
@@ -153,17 +144,8 @@ protected:
public:
Tracker( FaceTrackNoIR *parent );
~Tracker();
-
-// void registerHeadPoseCallback();
- bool handleGameCommand ( int command );
void loadSettings(); // Load settings from the INI-file
- //bool isShortKeyPressed( TShortKey *key, BYTE *keystate );
- //bool isMouseKeyPressed( int *key, DIMOUSESTATE *mousestate );
-
- bool getTrackingActive() { return do_tracking && confid; }
- bool getAxisReverse() { return do_axis_reverse; }
-
- bool getConfid() { return confid; }
+ bool getTrackingActive() { return confid; }
void setInvertAxis(Axis axis, bool invert);
@@ -174,12 +156,7 @@ public:
float getRadsFromDegrees ( float degrees ) { return (degrees * 0.017453f); }
volatile bool should_quit;
// following are now protected by hTrackMutex
- volatile bool do_tracking; // Start/stop tracking, using the shortkey
volatile bool do_center; // Center head-position, using the shortkey
- volatile bool do_inhibit; // Inhibit DOF-axis, using the shortkey
- volatile bool do_game_zero; // Set in-game zero, using the shortkey
- volatile bool do_axis_reverse; // Axis reverse, using the shortkey
-
// Flags to start/stop/reset tracking
volatile bool confid; // Tracker data is OK;
diff --git a/facetracknoir/uielements/aboutfacetracknoir.png b/facetracknoir/uielements/aboutfacetracknoir.png
deleted file mode 100644
index 90f8f792..00000000
--- a/facetracknoir/uielements/aboutfacetracknoir.png
+++ /dev/null
Binary files differ
diff --git a/facetracknoir/uielements/donate.png b/facetracknoir/uielements/donate.png
deleted file mode 100644
index cf4223fb..00000000
--- a/facetracknoir/uielements/donate.png
+++ /dev/null
Binary files differ
diff --git a/facetracknoir/uielements/setupfacetracknoir.jpg b/facetracknoir/uielements/setupfacetracknoir.jpg
deleted file mode 100644
index 8778c6d5..00000000
--- a/facetracknoir/uielements/setupfacetracknoir.jpg
+++ /dev/null
Binary files differ