1 #include "STD_SDIDesktop.h"
3 #include <SUIT_ViewWindow.h>
7 #include <qobjectlist.h>
9 STD_SDIDesktop::STD_SDIDesktop()
12 myMainWidget = new QVBox( this );
13 myMainWidget->setFrameStyle( QFrame::Panel | QFrame::Sunken );
15 setCentralWidget( myMainWidget );
18 STD_SDIDesktop::~STD_SDIDesktop()
22 SUIT_ViewWindow* STD_SDIDesktop::activeWindow() const
24 const QObjectList* children = myMainWidget->children();
28 QPtrList<SUIT_ViewWindow> winList;
29 for ( QObjectListIt it( *children ); it.current(); ++it )
31 if ( it.current()->inherits( "SUIT_ViewWindow" ) )
32 winList.append( (SUIT_ViewWindow*)it.current() );
35 SUIT_ViewWindow* win = 0;
36 for ( QPtrListIterator<SUIT_ViewWindow> itr( winList ); itr.current() && !win; ++itr )
38 if ( itr.current()->isActiveWindow() )
42 if ( !win && !winList.isEmpty() )
43 win = winList.getFirst();
48 QPtrList<SUIT_ViewWindow> STD_SDIDesktop::windows() const
50 QPtrList<SUIT_ViewWindow> winList;
51 winList.append( activeWindow() );
55 QWidget* STD_SDIDesktop::parentArea() const