diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2014-09-21 21:22:39 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2014-09-21 21:41:36 +0200 |
commit | 0fa42ce4822c7b7cdfde6d0fe93abb2d722bc230 (patch) | |
tree | d6475ba6d06a4a7cfd0eb12ff040080fd081bc5a /facetracknoir/facetracknoir.cpp | |
parent | de2c98a213c32db99b63754fb8520271501eee43 (diff) |
indicate UI contains a "video feed" element
Diffstat (limited to 'facetracknoir/facetracknoir.cpp')
-rw-r--r-- | facetracknoir/facetracknoir.cpp | 28 |
1 files changed, 15 insertions, 13 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( ) { |