1 #include "SUIT_Desktop.h"
3 #include "SUIT_Tools.h"
4 #include "SUIT_ViewWindow.h"
6 #include <QtxActionMenuMgr.h>
7 #include <QtxActionToolMgr.h>
11 #include <qdockarea.h>
12 #include <qstatusbar.h>
13 #include <qapplication.h>
15 /*!\class SUIT_Desktop
16 * Provide desktop management:\n
25 SUIT_Desktop::SUIT_Desktop()
28 myMenuMgr = new QtxActionMenuMgr( this );
29 myToolMgr = new QtxActionToolMgr( this );
35 SUIT_Desktop::~SUIT_Desktop()
42 bool SUIT_Desktop::event( QEvent* e )
49 case QEvent::WindowActivate:
52 case QEvent::WindowDeactivate:
57 return QMainWindow::event( e );
63 void SUIT_Desktop::closeEvent( QCloseEvent* e )
65 emit closing( this, e );
72 void SUIT_Desktop::childEvent( QChildEvent* e )
74 if ( e->type() == QEvent::ChildInserted && parentArea() &&
75 e->child()->isWidgetType() && e->child()->inherits( "SUIT_ViewWindow" ) )
76 ((QWidget*)e->child())->reparent( parentArea(), QPoint( 0, 0 ), true );
78 QtxMainWindow::childEvent( e );
84 QtxActionMenuMgr* SUIT_Desktop::menuMgr() const
92 QtxActionToolMgr* SUIT_Desktop::toolMgr() const