summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--facetracknoir/facetracknoir.cpp28
-rw-r--r--facetracknoir/facetracknoir.h13
-rw-r--r--facetracknoir/facetracknoir.ui74
-rw-r--r--facetracknoir/main-facetracknoir.qrc1
-rw-r--r--facetracknoir/uielements/no-feed.pngbin0 -> 20196 bytes
5 files changed, 72 insertions, 44 deletions
diff --git a/facetracknoir/facetracknoir.cpp b/facetracknoir/facetracknoir.cpp
index 5f4a4e11..3f6d641e 100644
--- a/facetracknoir/facetracknoir.cpp
+++ b/facetracknoir/facetracknoir.cpp
@@ -94,10 +94,14 @@ FaceTrackNoIR::FaceTrackNoIR(QWidget *parent) :
pProtocolDialog(NULL),
pFilterDialog(NULL),
kbd_quit(QKeySequence("Ctrl+Q"), this),
- looping(0)
+ looping(0),
+ video_frame_layout(new QVBoxLayout()),
+ no_feed_pixmap(":/uielements/no-feed.png")
{
ui.setupUi(this);
setFixedSize(size());
+ ui.video_frame_label->setPixmap(no_feed_pixmap);
+ updateButtonState(false);
_keyboard_shortcuts = 0;
_curve_config = 0;
@@ -163,6 +167,7 @@ FaceTrackNoIR::~FaceTrackNoIR() {
save();
if (Libraries)
delete Libraries;
+ delete video_frame_layout;
}
QFrame* FaceTrackNoIR::get_video_widget() {
@@ -275,20 +280,17 @@ void FaceTrackNoIR::loadSettings() {
void FaceTrackNoIR::updateButtonState(bool running)
{
- bool e = !running;
- ui.iconcomboProfile->setEnabled ( e );
- ui.btnLoad->setEnabled ( e );
- ui.btnSaveAs->setEnabled ( e );
- ui.btnStartTracker->setEnabled ( e );
+ bool not_running = !running;
+ ui.iconcomboProfile->setEnabled ( not_running );
+ ui.btnStartTracker->setEnabled ( not_running );
ui.btnStopTracker->setEnabled ( running );
- ui.iconcomboProtocol->setEnabled ( e );
- ui.btnShowServerControls->setEnabled ( e );
- ui.iconcomboFilter->setEnabled ( e );
- ui.iconcomboTrackerSource->setEnabled(e);
- ui.cbxSecondTrackerSource->setEnabled(e);
-
- ui.btnStartTracker->setEnabled(e);
+ ui.iconcomboProtocol->setEnabled ( not_running );
+ ui.iconcomboFilter->setEnabled ( not_running );
+ ui.iconcomboTrackerSource->setEnabled(not_running);
+ ui.cbxSecondTrackerSource->setEnabled(not_running);
+ ui.btnStartTracker->setEnabled(not_running);
ui.btnStopTracker->setEnabled(running);
+ ui.video_frame_label->setVisible(not_running);
}
void FaceTrackNoIR::startTracker( ) {
diff --git a/facetracknoir/facetracknoir.h b/facetracknoir/facetracknoir.h
index 22a4363e..f005a9c1 100644
--- a/facetracknoir/facetracknoir.h
+++ b/facetracknoir/facetracknoir.h
@@ -32,13 +32,14 @@
#include <QList>
#include <QKeySequence>
#include <QShortcut>
+#include <QLayout>
+#include <QPixmap>
+#include <QLabel>
#if !defined(_WIN32)
# include "qxt-mini/QxtGlobalShortcut"
#else
# include <windows.h>
#endif
-#include <QThread>
-#include <QDebug>
#include "ui_facetracknoir.h"
@@ -117,18 +118,20 @@ private:
void createIconGroupBox();
void loadSettings();
- void updateButtonState(bool);
+ void updateButtonState(bool running);
QList<DynamicLibrary*> dlopen_filters;
QList<DynamicLibrary*> dlopen_trackers;
QList<DynamicLibrary*> dlopen_protocols;
QShortcut kbd_quit;
-
+ int looping;
+
+ QLayout* video_frame_layout;
+ QPixmap no_feed_pixmap;
#ifndef _WIN32
void bind_keyboard_shortcut(QxtGlobalShortcut&, key_opts& k);
#endif
void fill_profile_cbx();
- int looping;
private slots:
void open();
diff --git a/facetracknoir/facetracknoir.ui b/facetracknoir/facetracknoir.ui
index ab332288..d2c78461 100644
--- a/facetracknoir/facetracknoir.ui
+++ b/facetracknoir/facetracknoir.ui
@@ -25,9 +25,9 @@
<widget class="QPushButton" name="btnShortcuts">
<property name="geometry">
<rect>
- <x>715</x>
- <y>110</y>
- <width>151</width>
+ <x>760</x>
+ <y>280</y>
+ <width>96</width>
<height>38</height>
</rect>
</property>
@@ -54,7 +54,7 @@
<widget class="QGroupBox" name="box_mapped_headpose">
<property name="geometry">
<rect>
- <x>90</x>
+ <x>120</x>
<y>20</y>
<width>169</width>
<height>137</height>
@@ -298,8 +298,8 @@
<property name="geometry">
<rect>
<x>345</x>
- <y>260</y>
- <width>256</width>
+ <y>255</y>
+ <width>246</width>
<height>65</height>
</rect>
</property>
@@ -343,7 +343,7 @@
<rect>
<x>345</x>
<y>175</y>
- <width>256</width>
+ <width>246</width>
<height>65</height>
</rect>
</property>
@@ -385,9 +385,9 @@
<widget class="QGroupBox" name="groupFilter">
<property name="geometry">
<rect>
- <x>630</x>
- <y>175</y>
- <width>221</width>
+ <x>345</x>
+ <y>335</y>
+ <width>246</width>
<height>65</height>
</rect>
</property>
@@ -429,8 +429,8 @@
<widget class="QGroupBox" name="groupBox_3">
<property name="geometry">
<rect>
- <x>630</x>
- <y>260</y>
+ <x>625</x>
+ <y>180</y>
<width>221</width>
<height>65</height>
</rect>
@@ -485,16 +485,38 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="lineWidth">
- <number>0</number>
- </property>
+ <widget class="QLabel" name="video_frame_label">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>320</width>
+ <height>240</height>
+ </rect>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="font">
+ <font>
+ <stylestrategy>NoAntialias</stylestrategy>
+ <kerning>false</kerning>
+ </font>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
</widget>
<widget class="QGroupBox" name="groupProfile">
<property name="geometry">
<rect>
- <x>450</x>
+ <x>525</x>
<y>40</y>
- <width>256</width>
+ <width>311</width>
<height>111</height>
</rect>
</property>
@@ -565,9 +587,9 @@
<widget class="QPushButton" name="btnEditCurves">
<property name="geometry">
<rect>
- <x>715</x>
- <y>60</y>
- <width>151</width>
+ <x>615</x>
+ <y>280</y>
+ <width>141</width>
<height>38</height>
</rect>
</property>
@@ -586,8 +608,8 @@
</property>
<property name="iconSize">
<size>
- <width>80</width>
- <height>22</height>
+ <width>60</width>
+ <height>37</height>
</size>
</property>
</widget>
@@ -610,9 +632,9 @@
<widget class="QGroupBox" name="groupStartStop">
<property name="geometry">
<rect>
- <x>520</x>
- <y>340</y>
- <width>190</width>
+ <x>635</x>
+ <y>335</y>
+ <width>201</width>
<height>65</height>
</rect>
</property>
@@ -685,7 +707,7 @@
<widget class="QGroupBox" name="box_raw_headpose">
<property name="geometry">
<rect>
- <x>270</x>
+ <x>320</x>
<y>20</y>
<width>169</width>
<height>137</height>
diff --git a/facetracknoir/main-facetracknoir.qrc b/facetracknoir/main-facetracknoir.qrc
index 6cb2e300..e37c2529 100644
--- a/facetracknoir/main-facetracknoir.qrc
+++ b/facetracknoir/main-facetracknoir.qrc
@@ -4,5 +4,6 @@
<file>images/settings16.png</file>
<file>uielements/curves.png</file>
<file>images/facetracknoir.png</file>
+ <file>uielements/no-feed.png</file>
</qresource>
</RCC>
diff --git a/facetracknoir/uielements/no-feed.png b/facetracknoir/uielements/no-feed.png
new file mode 100644
index 00000000..7c2f52bf
--- /dev/null
+++ b/facetracknoir/uielements/no-feed.png
Binary files differ