The comments: Exclude reparent event for ViewWindow.
/*!
Child event.
*/
-void SUIT_Desktop::childEvent( QChildEvent* e )
+/*void SUIT_Desktop::childEvent( QChildEvent* e )
{
if ( e->type() == QEvent::ChildAdded && e->child()->isWidgetType() )
QApplication::postEvent( this, new ReparentEvent( QEvent::Type( Reparent ), e->child() ) );
else
QtxMainWindow::childEvent( e );
-}
+}*/
-void SUIT_Desktop::customEvent( QEvent* e )
+/*void SUIT_Desktop::customEvent( QEvent* e )
{
if ( (int)e->type() != Reparent )
return;
addWindow( wid );
wid->setShown( !invis );
}
-}
+}*/
/*!
Gets menu manager.
void emitActivated();
void emitMessage( const QString& );
+ virtual void addWindow( QWidget* ) = 0;
+
signals:
void activated();
void deactivated();
protected:
virtual bool event( QEvent* );
- virtual void customEvent( QEvent* );
+ //virtual void customEvent( QEvent* );
virtual void closeEvent( QCloseEvent* );
- virtual void childEvent( QChildEvent* );
+ //virtual void childEvent( QChildEvent* );
- virtual void addWindow( QWidget* ) = 0;
private:
QtxActionMenuMgr* myMenuMgr;
#include "SUIT_Desktop.h"
#include "SUIT_ViewModel.h"
-#include <SUIT_ViewWindow.h>
+#include "SUIT_ViewWindow.h"
#include "SUIT_Study.h"
#include <QMap>
setViewName( aView );
aView->setWindowIcon( QIcon( myIcon ) );
- //myDesktop->addViewWindow( aView );
+ myDesktop->addWindow( aView );
//it is done automatically during creation of view
aView->setViewManager( this );
// Special treatment for the case when <aView> is the first one in this view manager
// -> call onWindowActivated() directly, because somebody may always want
// to use getActiveView()
+ aView->show();
if ( !myActiveView )
onWindowActivated( aView );