diff --git a/app/SandboxSetup/beamerlocationgui.ui b/app/SandboxSetup/beamerlocationgui.ui index 027254b69298298e5b245dbaaebf83f5b3e406f2..f1633ff61403ca4aa369b85117f713fa3b333e32 100644 --- a/app/SandboxSetup/beamerlocationgui.ui +++ b/app/SandboxSetup/beamerlocationgui.ui @@ -13,30 +13,55 @@ <property name="windowTitle"> <string>Dialog</string> </property> - <widget class="QLabel" name="lblInstructions"> + <widget class="QPushButton" name="btnLock"> + <property name="geometry"> + <rect> + <x>220</x> + <y>300</y> + <width>89</width> + <height>25</height> + </rect> + </property> + <property name="text"> + <string>Lock</string> + </property> + </widget> + <widget class="QLabel" name="label"> <property name="geometry"> <rect> <x>40</x> <y>40</y> - <width>121</width> + <width>201</width> <height>17</height> </rect> </property> <property name="text"> - <string>Consignes :</string> + <string>Instructions :</string> </property> </widget> - <widget class="QPushButton" name="btnLock"> + <widget class="QTextEdit" name="txtInstructions"> <property name="geometry"> <rect> - <x>220</x> - <y>260</y> - <width>89</width> - <height>25</height> + <x>60</x> + <y>70</y> + <width>421</width> + <height>181</height> </rect> </property> - <property name="text"> - <string>Lock</string> + <property name="readOnly"> + <bool>true</bool> + </property> + <property name="html"> + <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">- A red corss is displayed from the selected output at step 2<br />- Match the position of the cross with your white target</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">- When you are ready, press the button to validate a point</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">- Repeat this process 3 times for each cross you see (there will be 3 different crosses)</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Note :</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">For each point you validate, change the height of your target to not save the same position twice in the process.</p></body></html></string> </property> </widget> </widget> diff --git a/app/SandboxSetup/camerafocus.cpp b/app/SandboxSetup/camerafocus.cpp index 48978fbdfb10dd10afe92efd710627e8fc586dfe..13730390e1f20086ccf31b84634d4446e5a42996 100644 --- a/app/SandboxSetup/camerafocus.cpp +++ b/app/SandboxSetup/camerafocus.cpp @@ -1,12 +1,14 @@ #include "camerafocus.h" #include "ui_camerafocus.h" -CameraFocus::CameraFocus(SandboxSetup *sandbox, QWidget *parent) : +CameraFocus::CameraFocus(SandboxSetup *sandbox, MonitorGui *_mg, QWidget *parent) : SubApp("Camera focus", "Error", parent), ui(new Ui::CameraFocus) { ui->setupUi(this); setup = sandbox; + mg = _mg; + blackScreen = new QtFullScreen(mg->getResolution(), true, this); setup->loadFrameProcessProfil(); initCameraParams(); @@ -17,17 +19,22 @@ CameraFocus::CameraFocus(SandboxSetup *sandbox, QWidget *parent) : CameraFocus::~CameraFocus() { delete frameTimer; + delete blackScreen; delete ui; } void CameraFocus::showEvent(QShowEvent *event){ QWidget::showEvent(event); + cv::Mat black = cv::Mat(1, 1, CV_8UC3, cv::Scalar(0, 0, 0)); + blackScreen->setGeometry(mg->getResolution()); + blackScreen->imShow(black); frameTimer->start(100); } void CameraFocus::closeEvent(QCloseEvent *event){ frameTimer->stop(); + blackScreen->close(); QWidget::closeEvent(event); } diff --git a/app/SandboxSetup/camerafocus.h b/app/SandboxSetup/camerafocus.h index e8937767d712209fbc21ac1cd4b0c5e2e304d643..e7effd2bebb1c2b5b71971595769719a9543749a 100644 --- a/app/SandboxSetup/camerafocus.h +++ b/app/SandboxSetup/camerafocus.h @@ -5,7 +5,8 @@ #include <QTimer> #include <QAbstractButton> #include <sandboxSetup.h> - +#include "monitorgui.h" +#include "qtfullscreen.h" #include "subapp.h" namespace Ui { @@ -17,7 +18,7 @@ class CameraFocus : public SubApp Q_OBJECT public: - explicit CameraFocus(SandboxSetup *sandbox, QWidget *parent = 0); + explicit CameraFocus(SandboxSetup *sandbox, MonitorGui *_mg, QWidget *parent = 0); ~CameraFocus(); void valideRoutine(); @@ -50,7 +51,9 @@ protected: private: Ui::CameraFocus *ui; SandboxSetup *setup; + MonitorGui *mg; QTimer *frameTimer; + QtFullScreen *blackScreen; FrameProcessProfil defaultProfil; bool displayConstrasts = false; diff --git a/app/SandboxSetup/croppingmask.ui b/app/SandboxSetup/croppingmask.ui index 51433397930d765661268c0153b0bfcec77ea784..6ebc1cf07c5f7251cc4233991f8b965a875b8e33 100644 --- a/app/SandboxSetup/croppingmask.ui +++ b/app/SandboxSetup/croppingmask.ui @@ -57,25 +57,8 @@ </layout> </widget> </widget> - <widget class="QLabel" name="label"> - <property name="geometry"> - <rect> - <x>40</x> - <y>350</y> - <width>441</width> - <height>20</height> - </rect> - </property> - <property name="text"> - <string>Note : Set your screens in mirror mode</string> - </property> - <property name="alignment"> - <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set> - </property> - </widget> <zorder>frame</zorder> <zorder>btnTakePicture</zorder> - <zorder>label</zorder> </widget> <resources/> <connections/> diff --git a/app/SandboxSetup/mainwindow.cpp b/app/SandboxSetup/mainwindow.cpp index ba0806672ab7db6befc1c2b6aec9a5a724db36c4..408cfa77bf85684a8939047c0a37f760f84e3d95 100644 --- a/app/SandboxSetup/mainwindow.cpp +++ b/app/SandboxSetup/mainwindow.cpp @@ -15,7 +15,7 @@ MainWindow::MainWindow(QWidget *parent) : init = new InitCamera(setup); mg = new MonitorGui(setup); pg = new ProjectionGui(setup, mg); - cf = new CameraFocus(setup); + cf = new CameraFocus(setup, mg); cm = new CroppingMask(setup, mg); bl = new BeamerLocationGui(setup, mg); scfg = new SaveConfigGui(setup); diff --git a/app/SandboxSetup/projectiongui.ui b/app/SandboxSetup/projectiongui.ui index d1b18a162a937396fb461ab309769e0c0c3f8078..0deee7bc204a83ca880145b52675dd4017aa28e8 100644 --- a/app/SandboxSetup/projectiongui.ui +++ b/app/SandboxSetup/projectiongui.ui @@ -49,7 +49,7 @@ <property name="geometry"> <rect> <x>40</x> - <y>340</y> + <y>440</y> <width>331</width> <height>21</height> </rect> @@ -83,17 +83,17 @@ <widget class="QLabel" name="label"> <property name="geometry"> <rect> - <x>80</x> - <y>420</y> - <width>361</width> + <x>40</x> + <y>360</y> + <width>441</width> <height>61</height> </rect> </property> <property name="text"> - <string>Project a blue screen on the previously selected output to setup your beamer</string> + <string>Project a blue screen on the previously selected output to help you setup your beamer manually</string> </property> <property name="alignment"> - <set>Qt::AlignCenter</set> + <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> </property> <property name="wordWrap"> <bool>true</bool>