diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2013-09-15 03:44:46 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2013-09-15 03:44:46 +0200 |
commit | e1cf876626aad4cbed2db96f30867c8e11af340e (patch) | |
tree | 06603562438276f37e7bfc6243bc0791d37b8f87 | |
parent | 51fb3e42f915c3b538c423cfb9e5dfae11778717 (diff) |
Fix MSVC build. Also, minor reformat
-rw-r--r-- | CMakeLists.txt | 8 | ||||
-rw-r--r-- | facetracknoir/curve-config.h | 1 | ||||
-rw-r--r-- | facetracknoir/facetracknoir.cpp | 2 | ||||
-rw-r--r-- | facetracknoir/facetracknoir.h | 104 | ||||
-rw-r--r-- | facetracknoir/tracker.h | 15 | ||||
-rw-r--r-- | ftnoir_filter_accela/ftnoir_filter_accela.h | 5 | ||||
-rw-r--r-- | ftnoir_filter_base/ftnoir_filter_base_global.h | 2 | ||||
-rw-r--r-- | ftnoir_protocol_base/ftnoir_protocol_base_global.h | 2 | ||||
-rw-r--r-- | ftnoir_tracker_base/ftnoir_tracker_base.h | 6 | ||||
-rw-r--r-- | ftnoir_tracker_base/ftnoir_tracker_base_global.h | 2 | ||||
-rw-r--r-- | ftnoir_tracker_base/ftnoir_tracker_types.h | 5 | ||||
-rw-r--r-- | qfunctionconfigurator/functionconfig.cpp | 5 | ||||
-rw-r--r-- | qfunctionconfigurator/functionconfig.h | 11 | ||||
-rw-r--r-- | qfunctionconfigurator/qfunctionconfigurator.h | 2 |
14 files changed, 66 insertions, 104 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 25d3a809..f906d0a2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,8 +28,6 @@ if(NOT SDK_FACEAPI_ONLY) find_package(OpenCV) find_package(Qt4 COMPONENTS QtCore QtGui QtDesigner QtXml QtNetwork REQUIRED) - add_definitions(-DFTNOIR_FILTER_BASE_LIB -DFTNOIR_TRACKER_BASE_LIB -DFTNOIR_PROTOCOL_BASE_LIB) - if(NOT WIN32) if(NOT QXT_QXTGUI_LIB_RELEASE) find_package(Qxt COMPONENTS QxtGui REQUIRED) @@ -297,7 +295,6 @@ endif() SET (CMAKE_MODULE_LINKER_FLAGS ${CMAKE_MODULE_LINKER_FLAGS_INIT} -rdynamic CACHE STRING "Flags used by the linker during the creation of modules.") endif() - add_library(opentrack-compat SHARED ${opentrack-compat-c}) if(NOT WIN32) target_link_libraries(opentrack-compat rt) @@ -314,8 +311,8 @@ endif() add_library(opentrack-pose-widget SHARED ${opentrack-pose-widget-c} ${opentrack-pose-widget-moc} ${opentrack-pose-widget-rcc}) target_link_libraries(opentrack-pose-widget ${MY_QT_LIBS}) - add_library(opentrack-spline-widget SHARED ${opentrack-spline-widget-c} ${opentrack-spline-widget-moc} ${MY_QT_LIBS} ${QT_QTDESIGNER_LIBRARY_RELEASE}) - target_link_libraries(opentrack-spline-widget ${MY_QT_LIBS}) + add_library(opentrack-spline-widget SHARED ${opentrack-spline-widget-c} ${opentrack-spline-widget-moc}) + target_link_libraries(opentrack-spline-widget ${MY_QT_LIBS} ${QT_QTDESIGNER_LIBRARY_RELEASE}) add_library(opentrack-filter-accela SHARED ${opentrack-filter-accela-c} ${opentrack-filter-accela-moc} ${opentrack-filter-accela-uih} ${opentrack-filter-accela-rcc}) target_link_libraries(opentrack-filter-accela ${MY_QT_LIBS}) @@ -508,6 +505,7 @@ endif() if(NOT WIN32) target_link_libraries(opentrack dl) endif() + set_target_properties(opentrack PROPERTIES COMPILE_FLAGS -DOPENTRACK_MAIN) endif() # make install diff --git a/facetracknoir/curve-config.h b/facetracknoir/curve-config.h index 1fcddc4e..d02f1587 100644 --- a/facetracknoir/curve-config.h +++ b/facetracknoir/curve-config.h @@ -8,7 +8,6 @@ class CurveConfigurationDialog: public QWidget { Q_OBJECT public: - explicit CurveConfigurationDialog( FaceTrackNoIR *ftnoir, QWidget *parent ); virtual ~CurveConfigurationDialog(); void showEvent ( QShowEvent * event ); diff --git a/facetracknoir/facetracknoir.cpp b/facetracknoir/facetracknoir.cpp index 534f18c8..17dded92 100644 --- a/facetracknoir/facetracknoir.cpp +++ b/facetracknoir/facetracknoir.cpp @@ -24,7 +24,7 @@ #include "facetracknoir.h" #include "shortcuts.h" #include "tracker.h" -#include <ftnoir_tracker_ht/ht-api.h> +#include "curve-config.h" #include <QDebug> #if defined(_WIN32) diff --git a/facetracknoir/facetracknoir.h b/facetracknoir/facetracknoir.h index b4ea2912..2aa6614f 100644 --- a/facetracknoir/facetracknoir.h +++ b/facetracknoir/facetracknoir.h @@ -25,13 +25,6 @@ #ifndef FaceTrackNoIR_H #define FaceTrackNoIR_H -#undef FTNOIR_PROTOCOL_BASE_LIB -#undef FTNOIR_TRACKER_BASE_LIB -#undef FTNOIR_FILTER_BASE_LIB -#define FTNOIR_PROTOCOL_BASE_EXPORT Q_DECL_IMPORT -#define FTNOIR_TRACKER_BASE_EXPORT Q_DECL_IMPORT -#define FTNOIR_FILTER_BASE_EXPORT Q_DECL_IMPORT - #include <QtGui/QMainWindow> #include <QApplication> #include <QFileDialog> @@ -55,15 +48,14 @@ #include "ui_facetracknoir.h" -#include "ftnoir_protocol_base/ftnoir_protocol_base.h" -#include "ftnoir_tracker_base/ftnoir_tracker_base.h" -#include "ftnoir_filter_base/ftnoir_filter_base.h" - #include "global-settings.h" #include "tracker.h" -#include "facetracknoir/curve-config.h" #include "facetracknoir/shortcuts.h" +#include "ftnoir_protocol_base/ftnoir_protocol_base.h" +#include "ftnoir_tracker_base/ftnoir_tracker_base.h" +#include "ftnoir_filter_base/ftnoir_filter_base.h" + class Tracker; // pre-define class to avoid circular includes class FaceTrackNoIR; @@ -105,7 +97,7 @@ public: QxtGlobalShortcut* keyCenter; #endif public slots: - void shortcutRecentered(); + void shortcutRecentered(); private: HeadPoseData pose; @@ -133,50 +125,50 @@ private: QList<DynamicLibrary*> dlopen_protocols; bool looping; - + private slots: - //file menu - void open(); - void save(); - void saveAs(); - void exit(); -// void setIcon(int index); - void profileSelected(int index); - - void showVideoWidget(); - void showHeadPoseWidget(); - void showTrackerSettings(); - void showSecondTrackerSettings(); - - void showServerControls(); - void showFilterControls(); - void showKeyboardShortcuts(); - void showCurveConfiguration(); - - void setInvertAxis( Axis axis, int invert ); - void setInvertYaw(int invert) { - setInvertAxis(Yaw, invert); - } - void setInvertPitch(int invert) { - setInvertAxis(Pitch, invert); - } - void setInvertRoll(int invert) { - setInvertAxis(Roll, invert); - } - void setInvertX(int invert) { - setInvertAxis(TX, invert); - } - void setInvertY(int invert) { - setInvertAxis(TY, invert); - } - void setInvertZ(int invert) { - setInvertAxis(TZ, invert); - } - void showHeadPose(); - - void startTracker(); - void stopTracker(); - + //file menu + void open(); + void save(); + void saveAs(); + void exit(); + // void setIcon(int index); + void profileSelected(int index); + + void showVideoWidget(); + void showHeadPoseWidget(); + void showTrackerSettings(); + void showSecondTrackerSettings(); + + void showServerControls(); + void showFilterControls(); + void showKeyboardShortcuts(); + void showCurveConfiguration(); + + void setInvertAxis( Axis axis, int invert ); + void setInvertYaw(int invert) { + setInvertAxis(Yaw, invert); + } + void setInvertPitch(int invert) { + setInvertAxis(Pitch, invert); + } + void setInvertRoll(int invert) { + setInvertAxis(Roll, invert); + } + void setInvertX(int invert) { + setInvertAxis(TX, invert); + } + void setInvertY(int invert) { + setInvertAxis(TY, invert); + } + void setInvertZ(int invert) { + setInvertAxis(TZ, invert); + } + void showHeadPose(); + + void startTracker(); + void stopTracker(); + }; #endif // FaceTrackNoIR_H diff --git a/facetracknoir/tracker.h b/facetracknoir/tracker.h index 0476eec4..31489d87 100644 --- a/facetracknoir/tracker.h +++ b/facetracknoir/tracker.h @@ -35,22 +35,7 @@ #include "global-settings.h" #include <ftnoir_tracker_base/ftnoir_tracker_types.h> -//#define DIRECTINPUT_VERSION 0x0800 -//#include <Dinput.h> -#undef FTNOIR_PROTOCOL_BASE_LIB -#undef FTNOIR_TRACKER_BASE_LIB -#undef FTNOIR_FILTER_BASE_LIB -#undef FTNOIR_PROTOCOL_BASE_EXPORT -#undef FTNOIR_TRACKER_BASE_EXPORT -#undef FTNOIR_FILTER_BASE_EXPORT -#define FTNOIR_PROTOCOL_BASE_EXPORT Q_DECL_IMPORT -#define FTNOIR_TRACKER_BASE_EXPORT Q_DECL_IMPORT -#define FTNOIR_FILTER_BASE_EXPORT Q_DECL_IMPORT - #include <qfunctionconfigurator/functionconfig.h> -#include "ftnoir_tracker_base/ftnoir_tracker_base.h" -#include "ftnoir_protocol_base/ftnoir_protocol_base.h" -#include "ftnoir_filter_base/ftnoir_filter_base.h" #include "tracker_types.h" class FaceTrackNoIR; // pre-define parent-class to avoid circular includes diff --git a/ftnoir_filter_accela/ftnoir_filter_accela.h b/ftnoir_filter_accela/ftnoir_filter_accela.h index 82766293..effb06c2 100644 --- a/ftnoir_filter_accela/ftnoir_filter_accela.h +++ b/ftnoir_filter_accela/ftnoir_filter_accela.h @@ -26,9 +26,6 @@ #ifndef INCLUDED_FTN_FILTER_H
#define INCLUDED_FTN_FILTER_H
-#undef FTNOIR_TRACKER_BASE_LIB
-#define FTNOIR_TRACKER_BASE_EXPORT Q_DECL_IMPORT
-
#include "ftnoir_filter_base/ftnoir_filter_base.h"
#include "ui_ftnoir_accela_filtercontrols.h"
#include "facetracknoir/global-settings.h"
@@ -36,7 +33,7 @@ #define ACCELA_SMOOTHING_ROTATION 60.0
#define ACCELA_SMOOTHING_TRANSLATION 40.0
-#define ACCELA_ZOOM_SLOWNESS 35 +#define ACCELA_ZOOM_SLOWNESS 35
//*******************************************************************************************************
// FaceTrackNoIR Filter class.
diff --git a/ftnoir_filter_base/ftnoir_filter_base_global.h b/ftnoir_filter_base/ftnoir_filter_base_global.h index 02733ace..ce112411 100644 --- a/ftnoir_filter_base/ftnoir_filter_base_global.h +++ b/ftnoir_filter_base/ftnoir_filter_base_global.h @@ -3,7 +3,7 @@ #include <QtGlobal> -#ifdef FTNOIR_FILTER_BASE_LIB +#ifndef OPENTRACK_MAIN # define FTNOIR_FILTER_BASE_EXPORT Q_DECL_EXPORT #else # define FTNOIR_FILTER_BASE_EXPORT Q_DECL_IMPORT diff --git a/ftnoir_protocol_base/ftnoir_protocol_base_global.h b/ftnoir_protocol_base/ftnoir_protocol_base_global.h index 9f66d67a..bed874c4 100644 --- a/ftnoir_protocol_base/ftnoir_protocol_base_global.h +++ b/ftnoir_protocol_base/ftnoir_protocol_base_global.h @@ -3,7 +3,7 @@ #include <QtGlobal> -#ifdef FTNOIR_PROTOCOL_BASE_LIB +#ifndef OPENTRACK_MAIN # define FTNOIR_PROTOCOL_BASE_EXPORT Q_DECL_EXPORT #else # define FTNOIR_PROTOCOL_BASE_EXPORT Q_DECL_IMPORT diff --git a/ftnoir_tracker_base/ftnoir_tracker_base.h b/ftnoir_tracker_base/ftnoir_tracker_base.h index 4d968e59..39db6bb6 100644 --- a/ftnoir_tracker_base/ftnoir_tracker_base.h +++ b/ftnoir_tracker_base/ftnoir_tracker_base.h @@ -22,12 +22,6 @@ * with this program; if not, see <http://www.gnu.org/licenses/>. * * This class implements a tracker-base * *********************************************************************************/ -/* - Modifications (last one on top): - 20122109 - C14: Replaced Release with virtual destructor - 20120009 - WVR: Removed AutoClosePtr (seemed like it didn't work OK) - 20110415 - WVR: Added overloaded operator - and -= -*/ #ifndef FTNOIR_TRACKER_BASE_H #define FTNOIR_TRACKER_BASE_H diff --git a/ftnoir_tracker_base/ftnoir_tracker_base_global.h b/ftnoir_tracker_base/ftnoir_tracker_base_global.h index af9899c5..30fb95e9 100644 --- a/ftnoir_tracker_base/ftnoir_tracker_base_global.h +++ b/ftnoir_tracker_base/ftnoir_tracker_base_global.h @@ -3,7 +3,7 @@ #include <QtGlobal> -#ifdef FTNOIR_TRACKER_BASE_LIB +#ifndef OPENTRACK_MAIN # define FTNOIR_TRACKER_BASE_EXPORT Q_DECL_EXPORT #else # define FTNOIR_TRACKER_BASE_EXPORT Q_DECL_IMPORT diff --git a/ftnoir_tracker_base/ftnoir_tracker_types.h b/ftnoir_tracker_base/ftnoir_tracker_types.h index 591728a6..74612371 100644 --- a/ftnoir_tracker_base/ftnoir_tracker_types.h +++ b/ftnoir_tracker_base/ftnoir_tracker_types.h @@ -22,11 +22,6 @@ * with this program; if not, see <http://www.gnu.org/licenses/>. * * This class implements a tracker-base * *********************************************************************************/ -/* - Modifications (last one on top): - 20120924 - C14: Moved T6DOF to separate file (not pulic interface) - 20110415 - WVR: Added overloaded operator - and -= -*/ #ifndef FTNOIR_TRACKER_TYPES_H #define FTNOIR_TRACKER_TYPES_H diff --git a/qfunctionconfigurator/functionconfig.cpp b/qfunctionconfigurator/functionconfig.cpp index af350143..5dab2b52 100644 --- a/qfunctionconfigurator/functionconfig.cpp +++ b/qfunctionconfigurator/functionconfig.cpp @@ -39,6 +39,11 @@ FunctionConfig::FunctionConfig(QString title, int intMaxInput, int intMaxOutput) reload(); } +void FunctionConfig::setTrackingActive(bool blnActive) +{ + _tracking_active = blnActive; +} + FunctionConfig::FunctionConfig() : _tracking_active(false), _max_Input(0), diff --git a/qfunctionconfigurator/functionconfig.h b/qfunctionconfigurator/functionconfig.h index 21e9e43e..f1310a8c 100644 --- a/qfunctionconfigurator/functionconfig.h +++ b/qfunctionconfigurator/functionconfig.h @@ -6,6 +6,8 @@ * notice appear in all copies. */ +#pragma once + #include <QList> #include <QPointF> #include <QString> @@ -13,9 +15,6 @@ #include <QMutex> #include "ftnoir_tracker_base/ftnoir_tracker_base.h" -#ifndef FUNCTION_CONFIG_H -#define FUNCTION_CONFIG_H - #define MEMOIZE_PRECISION 500 class FTNOIR_TRACKER_BASE_EXPORT FunctionConfig { @@ -69,10 +68,6 @@ public: void saveSettings(QSettings& settings); void loadSettings(QSettings& settings); - void setTrackingActive(bool blnActive) { - _tracking_active = blnActive; - } + void setTrackingActive(bool blnActive); QString getTitle() { return _title; } }; - -#endif diff --git a/qfunctionconfigurator/qfunctionconfigurator.h b/qfunctionconfigurator/qfunctionconfigurator.h index 7260de1f..c9290722 100644 --- a/qfunctionconfigurator/qfunctionconfigurator.h +++ b/qfunctionconfigurator/qfunctionconfigurator.h @@ -50,9 +50,11 @@ // The Function is coded in a separate Class and can exists, without the Widget. When the widget is displayed (therefore 'created'), the Function can be attached to the // Widget and the Widget used to change the Function. // + class FTNOIR_TRACKER_BASE_EXPORT QFunctionConfigurator : public QWidget { Q_OBJECT + Q_PROPERTY(int maxInputEGU READ maxInputEGU WRITE setmaxInputEGU) Q_PROPERTY(int maxOutputEGU READ maxOutputEGU WRITE setmaxOutputEGU) Q_PROPERTY(int pixPerEGU_Input READ pixPerEGU_Input WRITE setpixPerEGU_Input) |