From 69cc802722c8264c0fd8b138a298d4820c11f1d8 Mon Sep 17 00:00:00 2001 From: Xavier Hallade Date: Wed, 27 Apr 2016 13:21:08 +0200 Subject: gui: show tracking hasn't started in preview area instead of "no video" "no video" wasn't clearly indicating that no tracking was done. Some first time users had hard times figuring out tracking had to be started. @sthalik: I've put an image mimicking what you did for "no video", feel free to change it or switch to plain text instead. --- gui/images/tracking-not-started.png | Bin 0 -> 11112 bytes gui/main.ui | 66 +++++++++++++++++++++++++++++++++++- gui/ui-res.qrc | 1 + gui/ui.cpp | 8 ++++- 4 files changed, 73 insertions(+), 2 deletions(-) create mode 100644 gui/images/tracking-not-started.png (limited to 'gui') diff --git a/gui/images/tracking-not-started.png b/gui/images/tracking-not-started.png new file mode 100644 index 00000000..5069e268 Binary files /dev/null and b/gui/images/tracking-not-started.png differ diff --git a/gui/main.ui b/gui/main.ui index 3a034ab0..ca189a62 100644 --- a/gui/main.ui +++ b/gui/main.ui @@ -152,15 +152,67 @@ 240 + + + + + + + 104 + 104 + 104 + + + + + + + + + 104 + 104 + 104 + + + + + + + + + 120 + 120 + 120 + + + + + + + + + Candara + 37 + 50 + false + true + + - :/images/no-feed.png + :/images/tracking-not-started.png false + + Qt::AlignCenter + + + true + @@ -1008,6 +1060,12 @@ 0 + + + 75 + true + + Start @@ -1024,6 +1082,12 @@ 0 + + + 75 + true + + Stop diff --git a/gui/ui-res.qrc b/gui/ui-res.qrc index 030a6153..7b7fee54 100644 --- a/gui/ui-res.qrc +++ b/gui/ui-res.qrc @@ -6,5 +6,6 @@ images/facetracknoir.png images/no-feed.png images/filter-16.png + images/tracking-not-started.png diff --git a/gui/ui.cpp b/gui/ui.cpp index ffdbf867..a136f2aa 100755 --- a/gui/ui.cpp +++ b/gui/ui.cpp @@ -280,8 +280,14 @@ void MainWindow::updateButtonState(bool running, bool inertialp) ui.iconcomboProtocol->setEnabled ( not_running ); ui.iconcomboFilter->setEnabled ( not_running ); ui.iconcomboTrackerSource->setEnabled(not_running); - ui.video_frame_label->setVisible(not_running || inertialp); ui.profile_button->setEnabled(not_running); + ui.video_frame_label->setVisible(not_running || inertialp); + if(not_running) { + ui.video_frame_label->setPixmap(QPixmap(":/images/tracking-not-started.png")); + } + else { + ui.video_frame_label->setPixmap(QPixmap(":/images/no-feed.png")); + } } void MainWindow::reload_options() -- cgit v1.2.3