KINECT STATS GENERATOR FOR SPORTS VISUALISATION
1.0
|
We are extending from qmdiwindow as we need to detect which mdi window is closed by the user in order to try and zero out the corresponding widget contained in it. Without extending we CANNOT detect on closed event on a QMdiSubWindow. So we override it. More...
#include <ExtendedQMdiSubWindow.h>
Public Member Functions | |
ExtendedQMdiSubWindow (MainWindow *_parent=0) | |
Constructor for ExtendedQMdiSubWindow. | |
Protected Member Functions | |
void | closeEvent (QCloseEvent *closeEvent) |
virtual function close event | |
Private Attributes | |
MainWindow * | m_ptrToMainWindow |
instance to the main window thorugh which corresponding close functions of the subwindows are called |
We are extending from qmdiwindow as we need to detect which mdi window is closed by the user in order to try and zero out the corresponding widget contained in it. Without extending we CANNOT detect on closed event on a QMdiSubWindow. So we override it.
Definition at line 25 of file ExtendedQMdiSubWindow.h.
ExtendedQMdiSubWindow::ExtendedQMdiSubWindow | ( | MainWindow * | _parent = 0 | ) |
Constructor for ExtendedQMdiSubWindow.
[in] | _parent | the parent window to create the GL context in |
Definition at line 15 of file ExtendedQMdiSubWindow.cpp.
References m_ptrToMainWindow.
{ m_ptrToMainWindow = _parent; }
void ExtendedQMdiSubWindow::closeEvent | ( | QCloseEvent * | closeEvent | ) | [protected] |
virtual function close event
[in] | closeEvent | the QCloseEvent event pointer passed from the mdisubwindow |
Definition at line 20 of file ExtendedQMdiSubWindow.cpp.
References MainWindow::deleteCurrentDepthvz(), MainWindow::deleteCurrentRGBvz(), MainWindow::deleteCurrentStatsvz(), MainWindow::deleteCurrentTrackingvz(), depthWindowName, m_ptrToMainWindow, rgbWindowName, statsWindowName, and trackingWindowName.
{ std::cout<<"closing.."; std::cout<<this->accessibleName().toStdString(); if(this->accessibleName().toStdString() == statsWindowName) { m_ptrToMainWindow->deleteCurrentStatsvz(); std::cout<<"statsclosed"; } if(this->accessibleName().toStdString() == trackingWindowName) { m_ptrToMainWindow->deleteCurrentTrackingvz(); std::cout<<"trakingvzclosed"; } if(this->accessibleName().toStdString() == rgbWindowName) { m_ptrToMainWindow->deleteCurrentRGBvz(); std::cout<<"rgbclosed"; } if(this->accessibleName().toStdString() == depthWindowName) { m_ptrToMainWindow->deleteCurrentDepthvz(); std::cout<<"depthclosed"; } //emit closed( this->objectName() ); closeEvent->accept(); }
instance to the main window thorugh which corresponding close functions of the subwindows are called
Definition at line 44 of file ExtendedQMdiSubWindow.h.