From 22298d17732d76caab3c6582c5fbcb33e5bbb292 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Wed, 22 Oct 2014 18:13:36 +0200 Subject: some ui fiddling --- facetracknoir/facetracknoir.cpp | 30 +- facetracknoir/facetracknoir.ui | 952 +++++++++++++++++++++++----------------- 2 files changed, 561 insertions(+), 421 deletions(-) diff --git a/facetracknoir/facetracknoir.cpp b/facetracknoir/facetracknoir.cpp index 48163a42..13f186e5 100644 --- a/facetracknoir/facetracknoir.cpp +++ b/facetracknoir/facetracknoir.cpp @@ -242,7 +242,7 @@ void FaceTrackNoIR::startTracker( ) { } void FaceTrackNoIR::stopTracker( ) { - ui.game_name->setText("Not connected"); + //ui.game_name->setText("Not connected"); pose_update_timer.stop(); ui.pose_display->rotateBy(0, 0, 0); @@ -290,19 +290,19 @@ void FaceTrackNoIR::display_pose(const double *mapped, const double *raw) raw_[i] = (int) raw[i]; } - ui.lcdNumX->display(raw_[TX]); - ui.lcdNumY->display(raw_[TY]); - ui.lcdNumZ->display(raw_[TZ]); - ui.lcdNumRotX->display(raw_[Yaw]); - ui.lcdNumRotY->display(raw_[Pitch]); - ui.lcdNumRotZ->display(raw_[Roll]); - - ui.lcdNumOutputPosX->display(mapped_[TX]); - ui.lcdNumOutputPosY->display(mapped_[TY]); - ui.lcdNumOutputPosZ->display(mapped_[TZ]); - ui.lcdNumOutputRotX->display(mapped_[Yaw]); - ui.lcdNumOutputRotY->display(mapped_[Pitch]); - ui.lcdNumOutputRotZ->display(mapped_[Roll]); + ui.raw_x->display(raw_[TX]); + ui.raw_y->display(raw_[TY]); + ui.raw_z->display(raw_[TZ]); + ui.raw_yaw->display(raw_[Yaw]); + ui.raw_pitch->display(raw_[Pitch]); + ui.raw_roll->display(raw_[Roll]); + + ui.pose_x->display(mapped_[TX]); + ui.pose_y->display(mapped_[TY]); + ui.pose_z->display(mapped_[TZ]); + ui.pose_yaw->display(mapped_[Yaw]); + ui.pose_pitch->display(mapped_[Pitch]); + ui.pose_roll->display(mapped_[Roll]); } void FaceTrackNoIR::showHeadPose() @@ -313,11 +313,13 @@ void FaceTrackNoIR::showHeadPose() display_pose(mapped, raw); +#if 0 if (libs.pProtocol) { const QString name = libs.pProtocol->game_name(); ui.game_name->setText(name); } +#endif } template diff --git a/facetracknoir/facetracknoir.ui b/facetracknoir/facetracknoir.ui index 5ccdfb46..f4f225f2 100644 --- a/facetracknoir/facetracknoir.ui +++ b/facetracknoir/facetracknoir.ui @@ -7,8 +7,8 @@ 0 0 - 956 - 740 + 640 + 825 @@ -22,66 +22,69 @@ :/images/facetracknoir.png:/images/facetracknoir.png - #headpose, #video_frame_label, #controls, #video_frame { border: 0; } -#video_frame { margin: 0; padding: 0; } + #video_feed, #bottom_controls, #top_display, #video_frame_label, #video_frame, QMainWindow { border: 0; } +QMainWindow, #video_frame { margin: 0; padding: 0; } - - - + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + - + 0 0 - Tracking preview + - - + + + + + 0 + 0 + + - 90 + 100 + 120 + + + + + 100 120 - - - - - - - - - - - 10 - - - 0 - - - 0 - - - 0 - - - 0 - - Raw pose + Raw tracker data - - - + + + true @@ -94,6 +97,15 @@ QFrame::NoFrame + + QFrame::Plain + + + 1 + + + true + 4 @@ -102,78 +114,78 @@ - - - - true - + + - + 0 0 - - QFrame::NoFrame - - - 4 + + QFrame::Raised - - QLCDNumber::Outline + + yaw - - + + 0 0 + + QFrame::Raised + - pitch + roll - - + + + + true + 0 0 + + false + + + QFrame::Raised + - TX + TZ - - - - true - + + - + 0 0 - - QFrame::NoFrame - - - 4 + + QFrame::Raised - - QLCDNumber::Outline + + pitch - - + + true @@ -186,6 +198,15 @@ QFrame::NoFrame + + QFrame::Plain + + + 1 + + + true + 4 @@ -194,46 +215,39 @@ - - + + true - + 0 0 - - false + + QFrame::NoFrame - - TZ + + QFrame::Plain - - - - - - true + + 1 - - - 0 - 0 - + + true - - false + + 4 - - TY + + QLCDNumber::Outline - - + + true @@ -246,6 +260,15 @@ QFrame::NoFrame + + QFrame::Plain + + + 1 + + + true + 4 @@ -254,34 +277,8 @@ - - - - - 0 - 0 - - - - yaw - - - - - - - - 0 - 0 - - - - roll - - - - - + + true @@ -294,6 +291,15 @@ QFrame::NoFrame + + QFrame::Plain + + + 1 + + + true + 4 @@ -302,17 +308,8 @@ - - - - - - - Game data - - - + 0 @@ -327,8 +324,8 @@ - - + + true @@ -341,6 +338,12 @@ QFrame::NoFrame + + QFrame::Plain + + + 1 + true @@ -348,32 +351,60 @@ 4 - QLCDNumber::Flat + QLCDNumber::Outline - - + + true - + 0 0 - - QFrame::NoFrame + + false - + + QFrame::Raised + + + TY + + + + + + + + + + Game data + + + + + true - - 4 + + + 0 + 0 + - - QLCDNumber::Flat + + false + + + QFrame::Raised + + + TY @@ -393,8 +424,8 @@ - - + + true @@ -418,30 +449,62 @@ - - - - true - + + 0 0 - - false - QFrame::Raised - TZ + yaw - - + + + + + 0 + 0 + + + + QFrame::Raised + + + roll + + + + + + + true + + + + 0 + 0 + + + + false + + + QFrame::Raised + + + TZ + + + + + true @@ -465,46 +528,58 @@ - - + + true - + 0 0 - - false + + QFrame::NoFrame - - QFrame::Raised + + true - - TY + + 4 + + + QLCDNumber::Flat - - + + + + true + - + 0 0 - - QFrame::Raised + + QFrame::NoFrame - - yaw + + true + + + 4 + + + QLCDNumber::Flat - + true @@ -528,8 +603,8 @@ - - + + 0 @@ -540,12 +615,12 @@ QFrame::Raised - roll + TX - - + + true @@ -575,18 +650,30 @@ - + + + + 0 + 0 + + + + + 640 + 480 + + + + + 640 + 16777215 + + - Video preview + - - - 0 - - - 0 - + 0 @@ -599,216 +686,235 @@ 0 + + 0 + - + 0 0 - - - 640 - 480 - - - - - 640 - 480 - - - - - - 0 - 0 - 640 - 480 - + + + 0 - - - 0 - 0 - + + 0 - - - 640 - 480 - + + 0 - - - 640 - 480 - + + 0 - - + + 0 - + + + + + 0 + 0 + + + + + 640 + 480 + + + + + 640 + 480 + + + + 0 + + + + + + + - - + + + + + 0 + 0 + + - - Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing - - - - 3 - + - 0 + 2 - 0 + 8 - 0 + 2 - 0 + 8 - - - - Connected game - - - - 6 - - - 6 - - - 3 - - - - - Not connected - - - - - - - - + + 2 + + + - + 0 0 - Profile + Protocol - + + + 4 + - 6 + 0 + + + 4 - 6 + 4 - 3 + 2 - - + + true - + 0 0 - Save + Settings - - + + 0 0 - - Load - - - + + + + + + + + 0 + 0 + + + + Tracker + + + + 4 + + + 0 + + + 4 + + + 4 + + + 2 + + + 0 0 - - 10 - - - + + true - + 0 0 - Save As ... + Settings - - + + - + 0 0 - Tracker + Filter - + + + 4 + - 6 + 0 + + + 4 - 6 + 4 - 3 + 2 - + 0 @@ -818,7 +924,7 @@ - + true @@ -836,110 +942,201 @@ - - + + - + 0 0 + + + 0 + 0 + + + + + 65536 + 65536 + + - Filter + Controls - + + + 4 + - 6 + 0 + + + 4 - 6 + 4 - 3 + 2 - - + + + + false + 0 0 + + Stop + - - - - true - + + - + 0 0 - Settings + Start + + + + Qt::Vertical + + + QSizePolicy::Maximum + + + + 1 + 12 + + + + + + + + Qt::Vertical + + + QSizePolicy::Maximum + + + + 1 + 12 + + + + - - + + - + 0 0 - Protocol + Profile - + + + 4 + - 6 + 0 + + + 4 - 6 + 4 - 3 + 2 - - + + true - + 0 0 - Settings + Save - - + + + + + 0 + 0 + + + + Load + + + + + 0 0 + + 10 + + + + + + + true + + + + 0 + 0 + + + + Save As ... + - + - + 0 0 @@ -948,14 +1145,20 @@ Settings + + 4 + - 6 + 0 + + + 4 - 6 + 4 - 3 + 2 @@ -994,71 +1197,6 @@ - - - - - 0 - 0 - - - - - 0 - 0 - - - - - 65536 - 65536 - - - - Controls - - - - 6 - - - 6 - - - 3 - - - - - false - - - - 0 - 0 - - - - Stop - - - - - - - - 0 - 0 - - - - Start - - - - - - -- cgit v1.2.3