diff options
-rw-r--r-- | CMakeLists.txt | 10 | ||||
-rw-r--r-- | TODO.txt | 17 | ||||
-rw-r--r-- | facetracknoir/tracker.cpp | 2 | ||||
-rw-r--r-- | ftnoir_filter_accela/ftnoir_accela_filtercontrols.ui | 287 | ||||
-rw-r--r-- | ftnoir_filter_accela/ftnoir_filter_accela_dialog.cpp | 4 | ||||
-rw-r--r-- | ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp | 2 |
6 files changed, 137 insertions, 185 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 5a10f8b9..e458fab3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -492,11 +492,13 @@ endif() target_link_libraries(opentrack-tracker-rift ${MY_QT_LIBS}) if(MSVC) target_link_libraries(opentrack-tracker-rift "${SDK_RIFT}/Lib/Win32/libovr.lib" winmm.lib) - else(WIN32) - target_link_libraries(opentrack-tracker-rift "${SDK_RIFT}/LibOVR.a" winmm.lib setupapi.lib) else() - target_link_libraries(opentrack-tracker-rift "${SDK_RIFT}/LibOVR.a") - endif() + if(WIN32) + target_link_libraries(opentrack-tracker-rift "${SDK_RIFT}/LibOVR.a" winmm.lib setupapi.lib) + else() + target_link_libraries(opentrack-tracker-rift "${SDK_RIFT}/LibOVR.a" udev Xinerama) + endif() + endif() if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_GNUCC) SET_TARGET_PROPERTIES(opentrack-tracker-rift PROPERTIES @@ -1,3 +1,6 @@ +20131023 sh + Low-hanging fruit: Go through all forms and replace ok/cancel with + QButtonBox which works better with layouts. 20131020 sh Add unit testing by means of batch execution, protocol/filter that does nothing, add separate executables for readers of specific protocols, @@ -20,21 +23,9 @@ Hydra is really just a hack just now, could be improved a lot. Add per-tracker hotkey support - -20131005 sh - what do you think about boost 1.54 for property maps -> qsettings? - also, boost concepts - and qt5 -20131007 sh - respect hier(7) with regard to shared object installation. - install them inside ../lib/opentrack relative to ./bin where - the main program oughta reside. -20131008 sh - during the switch to qt5, recreate widgets, this time with layouts. - the original layouts were pretty crappy, hence the original breakage. 20131011 sh low-hanging fruit: default saving profiles to a directory in user home, not into global stuffies - as for build system, low-hangin fruit is writing functions/macrology + as for build system, low-hanging fruit is writing functions/macrology for all the repetition out there. diff --git a/facetracknoir/tracker.cpp b/facetracknoir/tracker.cpp index 25b42ece..38b70199 100644 --- a/facetracknoir/tracker.cpp +++ b/facetracknoir/tracker.cpp @@ -116,7 +116,7 @@ void Tracker::run() { for (int i = 0; i < 6; i++)
offset_camera.axes[i] = mainApp->axis(i).headPos;
- Tracker::do_center = false;
+ do_center = false;
if (Libraries->pFilter)
Libraries->pFilter->Initialize();
diff --git a/ftnoir_filter_accela/ftnoir_accela_filtercontrols.ui b/ftnoir_filter_accela/ftnoir_accela_filtercontrols.ui index 6cf3d20b..098213ef 100644 --- a/ftnoir_filter_accela/ftnoir_accela_filtercontrols.ui +++ b/ftnoir_filter_accela/ftnoir_accela_filtercontrols.ui @@ -9,8 +9,8 @@ <rect> <x>0</x> <y>0</y> - <width>427</width> - <height>235</height> + <width>459</width> + <height>207</height> </rect> </property> <property name="sizePolicy"> @@ -21,14 +21,14 @@ </property> <property name="minimumSize"> <size> - <width>248</width> - <height>235</height> + <width>0</width> + <height>0</height> </size> </property> <property name="maximumSize"> <size> - <width>428</width> - <height>235</height> + <width>459</width> + <height>207</height> </size> </property> <property name="windowTitle"> @@ -47,23 +47,14 @@ <property name="styleSheet"> <string notr="true"/> </property> - <layout class="QGridLayout" name="gridLayout_2"> - <property name="sizeConstraint"> - <enum>QLayout::SetMaximumSize</enum> - </property> - <property name="horizontalSpacing"> - <number>-1</number> - </property> - <property name="verticalSpacing"> - <number>0</number> - </property> + <layout class="QFormLayout" name="formLayout_3"> <item row="0" column="0"> <widget class="QGroupBox" name="groupbox2"> <property name="enabled"> <bool>true</bool> </property> <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Minimum"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> @@ -77,29 +68,32 @@ <property name="title"> <string>Basic settings</string> </property> - <layout class="QGridLayout" name="gridLayout"> - <property name="leftMargin"> - <number>10</number> + <property name="alignment"> + <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set> + </property> + <layout class="QFormLayout" name="formLayout_2"> + <property name="fieldGrowthPolicy"> + <enum>QFormLayout::ExpandingFieldsGrow</enum> </property> - <property name="topMargin"> - <number>10</number> + <property name="rowWrapPolicy"> + <enum>QFormLayout::DontWrapRows</enum> </property> - <property name="rightMargin"> - <number>10</number> + <property name="labelAlignment"> + <set>Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing</set> </property> - <property name="bottomMargin"> - <number>2</number> + <property name="formAlignment"> + <set>Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing</set> </property> <property name="horizontalSpacing"> - <number>20</number> + <number>6</number> </property> <property name="verticalSpacing"> - <number>0</number> + <number>2</number> </property> - <item row="1" column="0"> + <item row="0" column="0"> <widget class="QLabel" name="label_2"> <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <sizepolicy hsizetype="Fixed" vsizetype="Expanding"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> @@ -112,50 +106,57 @@ </property> </widget> </item> - <item row="1" column="1"> - <widget class="QSpinBox" name="spinZoom"> + <item row="0" column="1"> + <widget class="QDoubleSpinBox" name="rotation_alpha"> <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <sizepolicy hsizetype="Expanding" vsizetype="Minimum"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> - <size> - <width>35</width> - <height>22</height> - </size> + <property name="alignment"> + <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set> </property> - <property name="styleSheet"> - <string notr="true">background:none;</string> + <property name="correctionMode"> + <enum>QAbstractSpinBox::CorrectToPreviousValue</enum> </property> - <property name="readOnly"> - <bool>false</bool> + <property name="decimals"> + <number>3</number> </property> <property name="minimum"> - <number>0</number> + <double>0.100000000000000</double> </property> <property name="maximum"> - <number>200</number> + <double>65535.000000000000000</double> </property> <property name="value"> - <number>45</number> + <double>1.000000000000000</double> </property> </widget> </item> - <item row="2" column="1"> - <widget class="QDoubleSpinBox" name="rotation_alpha"> + <item row="1" column="0"> + <widget class="QLabel" name="label_3"> <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <sizepolicy hsizetype="Fixed" vsizetype="Expanding"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> - <property name="alignment"> - <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> + <property name="text"> + <string>Translation</string> </property> - <property name="correctionMode"> - <enum>QAbstractSpinBox::CorrectToPreviousValue</enum> + </widget> + </item> + <item row="1" column="1"> + <widget class="QDoubleSpinBox" name="translation_alpha"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Minimum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="alignment"> + <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set> </property> <property name="decimals"> <number>3</number> @@ -174,7 +175,7 @@ <item row="2" column="0"> <widget class="QLabel" name="lblSensYaw_5"> <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <sizepolicy hsizetype="Fixed" vsizetype="Expanding"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> @@ -200,141 +201,92 @@ background:none;</string> </property> </widget> </item> - <item row="0" column="0"> - <widget class="QLabel" name="label_3"> + <item row="2" column="1"> + <widget class="QSpinBox" name="spinZoom"> <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <sizepolicy hsizetype="Expanding" vsizetype="Minimum"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> - <property name="text"> - <string>Translation</string> + <property name="minimumSize"> + <size> + <width>96</width> + <height>22</height> + </size> + </property> + <property name="styleSheet"> + <string notr="true">background:none;</string> + </property> + <property name="alignment"> + <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set> + </property> + <property name="readOnly"> + <bool>false</bool> + </property> + <property name="suffix"> + <string>%</string> + </property> + <property name="minimum"> + <number>0</number> + </property> + <property name="maximum"> + <number>200</number> + </property> + <property name="singleStep"> + <number>1</number> + </property> + <property name="value"> + <number>45</number> </property> </widget> </item> - <item row="0" column="1"> - <widget class="QDoubleSpinBox" name="translation_alpha"> + <item row="3" column="1"> + <widget class="QLabel" name="label_9"> <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> - <property name="decimals"> - <number>3</number> + <property name="font"> + <font> + <pointsize>8</pointsize> + </font> </property> - <property name="minimum"> - <double>0.100000000000000</double> + <property name="frameShape"> + <enum>QFrame::NoFrame</enum> </property> - <property name="maximum"> - <double>65535.000000000000000</double> + <property name="text"> + <string><html><head/><body><p align="justify">Accela filter by Stanisław Halik<br/>With kind help from Donovan Baarda</p><p align="right">2012-2013</p></body></html></string> </property> - <property name="value"> - <double>1.000000000000000</double> + <property name="textFormat"> + <enum>Qt::RichText</enum> + </property> + <property name="scaledContents"> + <bool>false</bool> + </property> + <property name="alignment"> + <set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set> + </property> + <property name="wordWrap"> + <bool>true</bool> + </property> + <property name="margin"> + <number>0</number> + </property> + <property name="textInteractionFlags"> + <set>Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::TextBrowserInteraction|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set> </property> </widget> </item> </layout> </widget> </item> - <item row="1" column="1"> - <layout class="QHBoxLayout" name="horizontalLayout"> - <property name="spacing"> - <number>-1</number> - </property> - <property name="sizeConstraint"> - <enum>QLayout::SetMaximumSize</enum> - </property> - <property name="leftMargin"> - <number>0</number> - </property> - <property name="topMargin"> - <number>0</number> - </property> - <item> - <widget class="QPushButton" name="btnOK"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>32</height> - </size> - </property> - <property name="text"> - <string>OK</string> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="btnCancel"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>32</height> - </size> - </property> - <property name="text"> - <string>Cancel</string> - </property> - </widget> - </item> - </layout> - </item> - <item row="1" column="0"> - <widget class="QLabel" name="label_9"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>8</pointsize> - </font> - </property> - <property name="frameShape"> - <enum>QFrame::NoFrame</enum> - </property> - <property name="text"> - <string><html><head/><body><p align="justify">Accela filter by Stanisław Halik<br/>With kind help from Donovan Baarda</p><p align="right">2012-2013</p></body></html></string> - </property> - <property name="textFormat"> - <enum>Qt::RichText</enum> - </property> - <property name="scaledContents"> - <bool>false</bool> - </property> - <property name="alignment"> - <set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set> - </property> - <property name="wordWrap"> - <bool>true</bool> - </property> - <property name="margin"> - <number>0</number> - </property> - <property name="textInteractionFlags"> - <set>Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::TextBrowserInteraction|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set> - </property> - </widget> - </item> <item row="0" column="1"> <widget class="QGroupBox" name="groupBox"> <property name="sizePolicy"> - <sizepolicy hsizetype="Maximum" vsizetype="Maximum"> + <sizepolicy hsizetype="Maximum" vsizetype="Fixed"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> @@ -356,7 +308,7 @@ background:none;</string> <number>5</number> </property> <property name="topMargin"> - <number>7</number> + <number>0</number> </property> <property name="rightMargin"> <number>10</number> @@ -604,6 +556,13 @@ background:none;</string> </layout> </widget> </item> + <item row="1" column="0" colspan="2"> + <widget class="QDialogButtonBox" name="buttonBox"> + <property name="standardButtons"> + <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> + </property> + </widget> + </item> </layout> </widget> <resources/> diff --git a/ftnoir_filter_accela/ftnoir_filter_accela_dialog.cpp b/ftnoir_filter_accela/ftnoir_filter_accela_dialog.cpp index 0c04a32a..b0999070 100644 --- a/ftnoir_filter_accela/ftnoir_filter_accela_dialog.cpp +++ b/ftnoir_filter_accela/ftnoir_filter_accela_dialog.cpp @@ -42,8 +42,8 @@ FilterControls::FilterControls() : // Load the settings from the current .INI-file loadSettings(); - connect(ui.btnOK, SIGNAL(clicked()), this, SLOT(doOK())); - connect(ui.btnCancel, SIGNAL(clicked()), this, SLOT(doCancel())); + connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(doOK())); + connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(doCancel())); connect(ui.rotation_alpha, SIGNAL(valueChanged(double)), this, SLOT(settingChanged(double))); connect(ui.translation_alpha, SIGNAL(valueChanged(double)), this, SLOT(settingChanged(double))); diff --git a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp index 099c1f85..4daffe5e 100644 --- a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp +++ b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp @@ -193,7 +193,7 @@ void Tracker::run() color_.copyTo(color); cv::cvtColor(color, grayscale2, cv::COLOR_BGR2GRAY); const int kernel = grayscale2.cols > 480 ? 7 : 5; - int kernel2 = kernel * grayscale2.rows / grayscale2.cols; + int kernel2 = kernel * grayscale2.rows / grayscale2.cols - 1; if ((kernel2 % 2) == 0) kernel2++; cv::GaussianBlur(grayscale2, grayscale, cv::Size(kernel, kernel2), 0, 0); |