KINECT STATS GENERATOR FOR SPORTS VISUALISATION  1.0
ExtendedQMdiSubWindow Class Reference

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>

+ Collaboration diagram for ExtendedQMdiSubWindow:

List of all members.

Public Member Functions

 ExtendedQMdiSubWindow (MainWindow *_parent=0)
 Constructor for ExtendedQMdiSubWindow.

Protected Member Functions

void closeEvent (QCloseEvent *closeEvent)
 virtual function close event

Private Attributes

MainWindowm_ptrToMainWindow
 instance to the main window thorugh which corresponding close functions of the subwindows are called

Detailed Description

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.


Constructor & Destructor Documentation

Constructor for ExtendedQMdiSubWindow.

Parameters:
[in]_parentthe parent window to create the GL context in

Definition at line 15 of file ExtendedQMdiSubWindow.cpp.

References m_ptrToMainWindow.

{
    m_ptrToMainWindow = _parent;
}

Member Function Documentation

void ExtendedQMdiSubWindow::closeEvent ( QCloseEvent *  closeEvent) [protected]

virtual function close event

Parameters:
[in]closeEventthe 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();
}

+ Here is the call graph for this function:


Member Data Documentation

instance to the main window thorugh which corresponding close functions of the subwindows are called

Definition at line 44 of file ExtendedQMdiSubWindow.h.


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Enumerations Enumerator