]> SALOME platform Git repositories - modules/gui.git/blob - src/SUIT/SUIT_ViewWindow.cxx
Salome HOME
4eb47e3ef6706bef2dfbbaba7600eff1bd926413
[modules/gui.git] / src / SUIT / SUIT_ViewWindow.cxx
1 // SUIT_ViewWindow.cxx: implementation of the SUIT_ViewWindow class.
2 //
3 //////////////////////////////////////////////////////////////////////
4
5 #include "SUIT_ViewWindow.h"
6 #include "SUIT_Desktop.h"
7 #include "qhbox.h"
8 #include "qpopupmenu.h"
9 //////////////////////////////////////////////////////////////////////
10 // Construction/Destruction
11 //////////////////////////////////////////////////////////////////////
12
13 SUIT_ViewWindow::SUIT_ViewWindow(SUIT_Desktop* theDesktop)
14 : QMainWindow( theDesktop, "SUIT_ViewWindow", Qt::WDestructiveClose )
15 {
16   myDesktop = theDesktop;
17 }
18
19 SUIT_ViewWindow::~SUIT_ViewWindow()
20 {
21 }
22
23 //***************************************************************
24 void SUIT_ViewWindow::closeEvent(QCloseEvent* theEvent)
25 {
26   QMainWindow::closeEvent( theEvent );
27   emit closing( this );
28 }
29
30 //****************************************************************
31 void SUIT_ViewWindow::contextMenuEvent ( QContextMenuEvent * e )
32 {
33   if ( e->reason() != QContextMenuEvent::Mouse )
34     emit contextMenuRequested( e );
35 }