diff --git a/app/SandboxSetup/beamerlocationgui.cpp b/app/SandboxSetup/beamerlocationgui.cpp index 1c1940c764f0e6d1602fb29dae45de6714e58e95..ed095b806da6e75fc5d273d69bb01adcf662fcc9 100644 --- a/app/SandboxSetup/beamerlocationgui.cpp +++ b/app/SandboxSetup/beamerlocationgui.cpp @@ -20,6 +20,8 @@ BeamerLocationGui::BeamerLocationGui(SandboxSetup *_setup, MonitorGui *_mg, QWid BeamerLocationGui::~BeamerLocationGui() { + delete timer; + delete winFullScreen; delete ui; } diff --git a/app/SandboxSetup/camerafocus.cpp b/app/SandboxSetup/camerafocus.cpp index e71c0a0ea88c1310a8b5aed04d44ebd6fec4f878..7845814ca601d534f530f291cc64099b91e610f9 100644 --- a/app/SandboxSetup/camerafocus.cpp +++ b/app/SandboxSetup/camerafocus.cpp @@ -16,6 +16,7 @@ CameraFocus::CameraFocus(SandboxSetup *sandbox, QWidget *parent) : CameraFocus::~CameraFocus() { + delete frameTimer; delete ui; } diff --git a/app/SandboxSetup/croppingmask.cpp b/app/SandboxSetup/croppingmask.cpp index b966c66cca6a0d231a5e7b680ca1c64815125ce4..e2c984cd1a4aab33fe45bcf8cc45cff8434d884e 100644 --- a/app/SandboxSetup/croppingmask.cpp +++ b/app/SandboxSetup/croppingmask.cpp @@ -20,6 +20,8 @@ CroppingMask::CroppingMask(SandboxSetup *sandbox, MonitorGui *_mg, QWidget *pare CroppingMask::~CroppingMask() { + delete projBlueScreen; + delete maskEdit; delete ui; } diff --git a/app/SandboxSetup/initcamera.cpp b/app/SandboxSetup/initcamera.cpp index 9b73c0a90c790377ee515fddbbdc2c5ba2c53a66..fc2caa2a0ffc3a5c08b63114f16510cec1d2614b 100644 --- a/app/SandboxSetup/initcamera.cpp +++ b/app/SandboxSetup/initcamera.cpp @@ -31,10 +31,11 @@ InitCamera::InitCamera(SandboxSetup *_setup, QWidget *parent) : } InitCamera::~InitCamera() -{ - delete ui; +{ workerThread->quit(); workerThread->wait(); + delete workerThread; + delete ui; } void InitCamera::showEvent(QShowEvent *event){ diff --git a/app/SandboxSetup/mainwindow.cpp b/app/SandboxSetup/mainwindow.cpp index 4fc220d9bce24e9d50ac59d1876bb8453ad022f3..6036ea71518752827f2ab0dd789196ef9fd187d0 100644 --- a/app/SandboxSetup/mainwindow.cpp +++ b/app/SandboxSetup/mainwindow.cpp @@ -36,6 +36,14 @@ MainWindow::MainWindow(QWidget *parent) : MainWindow::~MainWindow() { + delete scfg; + delete bl; + delete cm; + delete cf; + delete pg; + delete mg; + delete init; + delete setup; delete ui; } diff --git a/app/SandboxSetup/monitorgui.cpp b/app/SandboxSetup/monitorgui.cpp index 594ac117fd921c4610a50efa069de0f45a71bd9e..0c7d2d2634769325e08c717cee52ba5587b3ecd1 100644 --- a/app/SandboxSetup/monitorgui.cpp +++ b/app/SandboxSetup/monitorgui.cpp @@ -22,11 +22,13 @@ MonitorGui::MonitorGui(SandboxSetup *_setup, QWidget *parent) : if(screens.size() > 0){ loadResolutionsOf(screens[0]); + showMonitorsScreenshot(screens[0]); } } MonitorGui::~MonitorGui() { + delete resolution; delete ui; } @@ -73,7 +75,9 @@ QScreen* MonitorGui::getMonitor(){ void MonitorGui::on_cbxOutputs_currentIndexChanged(int index) { QList<QScreen*> screens = QApplication::screens(); - loadResolutionsOf(screens[index]); + QScreen *sc = screens[index]; + loadResolutionsOf(sc); + showMonitorsScreenshot(sc); } @@ -139,3 +143,8 @@ void MonitorGui::loadResolutionsFromFile(std::string path){ } } } + +void MonitorGui::showMonitorsScreenshot(QScreen *screen){ + QPixmap px = screen->grabWindow(0); + ui->lblScreenshot->setPixmap(px); +} diff --git a/app/SandboxSetup/monitorgui.h b/app/SandboxSetup/monitorgui.h index b26d82f2121752f4ebb3f500b10c4fdd9a3fcfca..6d9c0856dc6596c0963478b1a031d96afca7ed68 100644 --- a/app/SandboxSetup/monitorgui.h +++ b/app/SandboxSetup/monitorgui.h @@ -53,6 +53,7 @@ private: bool isResolution(std::string s); void loadResolutionsFromFile(std::string path); void initMonitorMapWithFile(std::string path); + void showMonitorsScreenshot(QScreen *screen); }; #endif // MONITORGUI_H diff --git a/app/SandboxSetup/monitorgui.ui b/app/SandboxSetup/monitorgui.ui index c2ee6eb3b5853166adb42de0698b9c2bcf4a3436..d3c56cbf8a9cf6f2c43293eacd5ab086ca9e0d05 100644 --- a/app/SandboxSetup/monitorgui.ui +++ b/app/SandboxSetup/monitorgui.ui @@ -6,7 +6,7 @@ <rect> <x>0</x> <y>0</y> - <width>400</width> + <width>617</width> <height>300</height> </rect> </property> @@ -59,6 +59,22 @@ </rect> </property> </widget> + <widget class="QLabel" name="lblScreenshot"> + <property name="geometry"> + <rect> + <x>300</x> + <y>50</y> + <width>291</width> + <height>191</height> + </rect> + </property> + <property name="text"> + <string/> + </property> + <property name="scaledContents"> + <bool>true</bool> + </property> + </widget> </widget> <resources/> <connections/> diff --git a/app/SandboxSetup/projectiongui.cpp b/app/SandboxSetup/projectiongui.cpp index d4d7562c28a91d1a5daa88d2652edd0dfb317924..c537ba1d9a532f52d4e7a2eb8211fd5fc7a468ce 100644 --- a/app/SandboxSetup/projectiongui.cpp +++ b/app/SandboxSetup/projectiongui.cpp @@ -23,6 +23,8 @@ void ProjectionGui::closeEvent(QCloseEvent *event){ ProjectionGui::~ProjectionGui() { + delete frameTimer; + delete blueScreen; delete ui; } diff --git a/app/SandboxSetup/qtfullscreen.cpp b/app/SandboxSetup/qtfullscreen.cpp index d6529524a69ff288b24d3d7dc50220ceb4ce164e..d4e20c5410f707cfe23e4ae6de572b714e708488 100644 --- a/app/SandboxSetup/qtfullscreen.cpp +++ b/app/SandboxSetup/qtfullscreen.cpp @@ -14,6 +14,12 @@ QtFullScreen::QtFullScreen(QRect _resolution, bool _isBorderless, QWidget *paren image->setScaledContents(true); } +QtFullScreen::~QtFullScreen() +{ + delete image; + delete win; +} + void QtFullScreen::showEvent(QShowEvent* event){ QWidget::showEvent( event ); diff --git a/app/SandboxSetup/qtfullscreen.h b/app/SandboxSetup/qtfullscreen.h index 1a2a8252c44b3aa99e666b54d154157afbc36cbd..0a31916626cc2a859e7a6542cd993e00c5df402b 100644 --- a/app/SandboxSetup/qtfullscreen.h +++ b/app/SandboxSetup/qtfullscreen.h @@ -12,6 +12,7 @@ class QtFullScreen : public QWidget Q_OBJECT public: explicit QtFullScreen(QRect resolution, bool isBorderless=false, QWidget *parent = nullptr); + ~QtFullScreen(); void imShow(cv::Mat frame); void close(); void setGeometry(QRect resolution);