#include <QPaintEvent>
#include <QCoreApplication>
+#include <utilities.h>
namespace
{
/*!
for ( int i = 0, n = vec.size(); i < n; i++ ) {
SUIT_ViewWindow* wnd = vec[ i ];
if ( wnd )
- myResult.append( wnd->getId() );
+ {
+ MESSAGE("SUIT_ViewWindow*: "<< wnd << " id: " << wnd->getId());
+ myResult.append( wnd->getId() );
+ }
}
}
}
virtual void Execute()
{
SUIT_ViewWindow* wnd = getWnd( myWndId );
+ MESSAGE("window id:" << myWndId << " SUIT_ViewWindow*: " << wnd);
if ( wnd ) {
wnd->setFocus();
myResult = true;
return ProcessEvent( new TActivateView( id ) );
}
+/*!
+ *
+ */
+
+class TActivateViewManagerAndView: public SALOME_Event
+{
+public:
+ typedef bool TResult;
+ TResult myResult;
+ int myWndId;
+ TActivateViewManagerAndView( const int id )
+ : myResult( false ),
+ myWndId( id ) {}
+ virtual void Execute()
+ {
+ SUIT_ViewWindow* wnd = getWnd( myWndId );
+ MESSAGE("window id:" << myWndId << " SUIT_ViewWindow*: " << wnd);
+ if ( wnd )
+ {
+ LightApp_Application* app = getApplication();
+ app->setActiveViewManager(wnd->getViewManager());
+ wnd->setFocus();
+ myResult = true;
+ }
+ }
+};
+bool SalomePyQt::activateViewManagerAndView( const int id )
+{
+ return ProcessEvent( new TActivateViewManagerAndView( id ) );
+}
+
/*!
*
*/