}
/*!
- *
+ \fn bool SalomePyQt::activateManagerAndView( const int id );
+ \brief Activate view manager and view: useful for a view embedded in a module main Window
+ \param id window identifier
+ \return \c true if operation is completed successfully and \c false otherwise
*/
class TActivateViewManagerAndView: public SALOME_Event
if ( wnd )
{
LightApp_Application* app = getApplication();
- app->setActiveViewManager(wnd->getViewManager());
+ app->desktop()->windowActivated(wnd); // equivalent to app->setActiveViewManager(wnd->getViewManager())
wnd->setFocus();
myResult = true;
}
bool myVisible;
int myWidth;
int myHeight;
- TCreateView( const QString& theType, bool visible, const int width, const int height )
+ bool myDetached;
+ TCreateView( const QString& theType, bool visible, const int width, const int height, bool detached )
: myResult( -1 ),
myType( theType ),
myVisible(visible),
myWidth(width),
- myHeight(height) {}
+ myHeight(height),
+ myDetached(detached) {}
virtual void Execute()
{
LightApp_Application* app = getApplication();
if ( app ) {
- SUIT_ViewManager* viewMgr = app->createViewManager( myType );
+ SUIT_ViewManager* viewMgr = app->createViewManager( myType, myDetached );
if ( viewMgr ) {
QWidget* wnd = viewMgr->getActiveView();
myResult = viewMgr->getActiveView()->getId();
}
}
};
-int SalomePyQt::createView( const QString& type, bool visible, const int width, const int height )
+int SalomePyQt::createView( const QString& type, bool visible, const int width, const int height, bool detached )
{
- int ret = ProcessEvent( new TCreateView( type, visible, width, height ) );
+ int ret = ProcessEvent( new TCreateView( type, visible, width, height, detached ) );
QCoreApplication::processEvents();
return ret;
}