}
-
//----------------------------------------------------------------------------
VVTK_MainWindow2
::VVTK_MainWindow2(QWidget* theParent,
SUIT_ResourceMgr* theResourceMgr,
VISU_PickingSettings* thePickingSettings,
QtxAction* theStyleSwitchAction):
- VVTK_MainWindow(theParent,theName,theResourceMgr)
+ VVTK_MainWindow(theParent,theName,theResourceMgr),
+ myStyleSwitchAction(theStyleSwitchAction)
{
myInteractorStyle->SetPickingSettings(thePickingSettings);
-
- connect(theStyleSwitchAction, SIGNAL(toggled(bool)), this, SLOT(OnInteractorStyleSwitch(bool)));
}
VVTK_MainWindow2
::~VVTK_MainWindow2()
{}
+
+//----------------------------------------------------------------------------
+void
+VVTK_MainWindow2
+::Initialize(SVTK_RenderWindowInteractor* theInteractor)
+{
+ VVTK_MainWindow::Initialize(theInteractor);
+
+ if( myStyleSwitchAction->isOn() )
+ PushInteractorStyle(myInteractorStyle.GetPointer());
+ connect(myStyleSwitchAction, SIGNAL(toggled(bool)), this, SLOT(OnInteractorStyleSwitch(bool)));
+}
+
//! Destroy instance of the class
virtual
~VVTK_MainWindow2();
+
+ //! Reimplement SVTK_MainWindow::Initialize
+ virtual
+ void
+ Initialize(SVTK_RenderWindowInteractor* theInteractor);
+
+ protected:
+ // Refer to the VVTK_MainWindow1::myStyleSwitchAction instance
+ QtxAction* myStyleSwitchAction;
+
};