msgstr "Gauss"
msgid "VisuGUI_Module::MEN_GAUSS_NEW_VIEWER"
-msgstr "GAUSS Viewer"
+msgstr "Points view"
msgid "VisuGUI_Module::VISU_GAUSS_PREF_TAB_TLT"
msgstr "Gauss Points"
msgid "VVTK_ViewManager::VTK_VIEW_TITLE"
msgstr "VISU scene:%1 - viewer:%2"
-msgid "VVTK_ViewWindow::MNU_VVTK_SWITCH"
-msgstr "GAUSS/VTK Viewer"
+msgid "VVTK_ViewWindow::MNU_VVTK_INTERACTOR_STYLE_SWITCH"
+msgstr "Interaction Style Switch"
-msgid "VVTK_ViewWindow::DSC_VVTK_SWITCH"
-msgstr "Switch to GAUSS/VTK viewer"
-
-msgid "VVTK_ViewWindow::LBL_TOOLBAR_LABEL"
-msgstr "GAUSS viewer tools"
+msgid "VVTK_ViewWindow::DSC_VVTK_INTERACTOR_STYLE_SWITCH"
+msgstr "Interaction Style Switch"
+msgid "VVTK_ViewWindow::MNU_VVTK_SELECTION_MODE_SWITCH"
+msgstr "Selection Mode Switch"
+msgid "VVTK_ViewWindow::DSC_VVTK_SELECTION_MODE_SWITCH"
+msgstr "Selection Mode Switch"
+msgid "VVTK_ViewWindow::LBL_TOOLBAR_LABEL"
+msgstr "GAUSS viewer tools"
\ No newline at end of file
myToolBar->setCloseMode(QDockWindow::Undocked);
myToolBar->setLabel(tr("LBL_TOOLBAR_LABEL"));
- // SVTK / VVTK switcher action
- QtxAction* aAction = new QtxAction(tr("MNU_VVTK_SWITCH"),
- aResourceMgr->loadPixmap( "VISU", tr( "ICON_VVTK_SWITCH" ) ),
- tr( "MNU_VVTK_SWITCH" ), 0, this, "vvtk/svtk", true);
- aAction->setToggleAction(true); // pressed by default
- aAction->toggle();
- aAction->setStatusTip(tr("DSC_VVTK_SWITCH"));
- connect(aAction, SIGNAL(toggled(bool)), this, SLOT(onSwitchIS(bool)));
- aAction->addTo( myToolBar );
+ QPixmap aPixmap;
+ QtxAction* anAction;
+ aPixmap = aResourceMgr->loadPixmap( "VISU", tr( "ICON_VVTK_INTERACTOR_STYLE_SWITCH" ) );
+ anAction = new QtxAction(tr("MNU_VVTK_INTERACTOR_STYLE_SWITCH"),
+ aPixmap,
+ tr( "MNU_VVTK_INTERACTOR_STYLE_SWITCH" ),
+ 0,
+ this,
+ "VVTK/SVTK StyleSwitch",
+ true);
+ anAction->toggle();
+ anAction->setToggleAction(true);
+ anAction->setStatusTip(tr("DSC_VVTK_INTERACTOR_STYLE_SWITCH"));
+ connect(anAction, SIGNAL(toggled(bool)), this, SLOT(OnInteractorStyleSwitch(bool)));
+ anAction->addTo( myToolBar );
+
+ aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_VVTK_SELECTION_MODE_SWITCH"));
+ anAction = new QtxAction(tr("MNU_VVTK_SELECTION_MODE_SWITCH"),
+ aPixmap,
+ tr( "MNU_VVTK_SELECTION_MODE_SWITCH" ),
+ 0,
+ this,
+ "VVTK/SVTK SelectionSwitch",
+ true);
+ anAction->setToggleAction(true);
+ anAction->setStatusTip(tr("DSC_VVTK_SELECTION_MODE_SWITCH"));
+ connect(anAction, SIGNAL(toggled(bool)), this, SLOT(OnSelectionModeSwitch(bool)));
+ anAction->addTo( myToolBar );
SVTK_ViewWindow::Initialize(myView,theModel);
}
//----------------------------------------------------------------------------
VVTK_ViewWindow
::~VVTK_ViewWindow()
-{
-}
+{}
//----------------------------------------------------------------------------
void
VVTK_ViewWindow
-::onSwitchIS(bool isVVTK)
+::OnInteractorStyleSwitch(bool theIsVVTKStyle)
{
// default interactor style which is pushed in this view window constructor
// is VVTK. If it is a current interactor style -- push SVTK "above" it.
// if SVTK is a current one - pop it (remove from stack), below it there MUST BE
// (logically) a VVTK interactor style.
- if ( isVVTK )
+ if ( theIsVVTKStyle )
getView()->PopInteractorStyle();
else
getView()->PushInteractorStyle( SVTK_InteractorStyle::New() );
}
+
+void
+VVTK_ViewWindow
+::OnSelectionModeSwitch(bool theIsSelectionOn)
+{
+ Selection_Mode aMode = theIsSelectionOn? NodeSelection: ActorSelection;
+ getView()->SetSelectionMode(aMode);
+}