int OCCViewer_ViewManager::myMaxId = 0;
-//***************************************************************
+//***************************************************************/
OCCViewer_ViewManager::OCCViewer_ViewManager( SUIT_Study* study, SUIT_Desktop* theDesktop, bool DisplayTrihedron )
: SUIT_ViewManager( study, theDesktop )
{
setViewModel( new OCCViewer_Viewer( DisplayTrihedron ) );
}
-//***************************************************************
+//***************************************************************/
OCCViewer_ViewManager::~OCCViewer_ViewManager()
{
}
-//***************************************************************
+//***************************************************************/
void OCCViewer_ViewManager::setViewName(SUIT_ViewWindow* theView)
{
int aPos = myViews.find(theView);
theView->setCaption( QString( "OCC scene:%1 - viewer:%2" ).arg(myId).arg(aPos+1));
}
-//***************************************************************
-/*bool OCCViewer_ViewManager::insertView(SUIT_ViewWindow* theView)
-{
- bool res = SUIT_ViewManager::insertView( theView );
- if ( res ) {
- OCCViewer_ViewWindow* view = (OCCViewer_ViewWindow*)theView;
- connect( view, SIGNAL(cloneView()), this, SLOT(createView()) );
- }
- return res;
-}*/
-
-//***************************************************************
+//***************************************************************/
void OCCViewer_ViewManager::contextMenuPopup( QPopupMenu* popup )
{
SUIT_ViewManager::contextMenuPopup( popup );
//*********************************************************************
void OCCViewer_Viewer::contextMenuPopup(QPopupMenu* thePopup)
{
- if (thePopup->count() > 0) thePopup->insertSeparator();
- thePopup->insertItem("Change background...", this, SLOT(onChangeBgColor()));
+ thePopup->insertItem( tr( "MEN_DUMP_VIEW" ), this, SLOT( onDumpView() ) );
+ thePopup->insertItem( tr( "MEN_CHANGE_BACKGROUD" ), this, SLOT( onChangeBgColor() ) );
+
+ thePopup->insertSeparator();
OCCViewer_ViewWindow* aView = (OCCViewer_ViewWindow*)(myViewManager->getActiveView());
- if ( aView ) {
- if ( !aView->getToolBar()->isVisible() ) {
- if (thePopup->count() > 0) thePopup->insertSeparator();
- thePopup->insertItem("Show toolbar", this, SLOT(onShowToolbar()));
- }
- }
+ if ( aView && !aView->getToolBar()->isVisible() )
+ thePopup->insertItem( tr( "MEN_SHOW_TOOLBAR" ), this, SLOT( onShowToolbar() ) );
+}
+
+void OCCViewer_Viewer::onDumpView()
+{
+ OCCViewer_ViewWindow* aView = (OCCViewer_ViewWindow*)(myViewManager->getActiveView());
+ if ( aView )
+ aView->onDumpView();
}
//*********************************************************************
void onMouseMove(SUIT_ViewWindow*, QMouseEvent*);
void onMouseRelease(SUIT_ViewWindow*, QMouseEvent*);
- void onChangeBgColor();
+ void onDumpView();
void onShowToolbar();
+ void onChangeBgColor();
private:
Handle(V3d_Viewer) myV3dViewer;
}
-//****************************************************************
+//****************************************************************/
void OCCViewer_ViewWindow::vpMouseMoveEvent(QMouseEvent* theEvent)
{
myCurrX = theEvent->x();
}
}
-//****************************************************************
+//****************************************************************/
void OCCViewer_ViewWindow::vpMouseReleaseEvent(QMouseEvent* theEvent)
{
switch ( myOperation ) {
}
-//****************************************************************
+//****************************************************************/
void OCCViewer_ViewWindow::drawRect()
{
QPainter aPainter(myViewPort);
myRect = aRect;
}
-//****************************************************************
+//****************************************************************/
void OCCViewer_ViewWindow::createActions()
{
if (!myActionsMap.isEmpty()) return;
msgid "DSC_PRESETS_VIEW"
msgstr "Selection of the memorized state of the active view"
-msgid "MNU_DUMP_VIEW"
-msgstr "Dump"
+msgid "OCCViewer_Viewer::MEN_DUMP_VIEW"
+msgstr "Dump view..."
+
+msgid "OCCViewer_Viewer::MEN_SHOW_TOOLBAR"
+msgstr "Show toolbar"
+
+msgid "OCCViewer_Viewer::MEN_CHANGE_BACKGROUD"
+msgstr "Change background..."
msgid "OCC_IMAGE_FILES"
msgstr "Images Files (*.bmp *.png *.jpg *.jpeg)"
msgid "BUT_OK"
msgstr "Ok"
-
}
//==========================================================
-void
-SVTK_Viewer
-::contextMenuPopup(QPopupMenu* thePopup)
+void SVTK_Viewer::contextMenuPopup( QPopupMenu* thePopup )
{
- if (thePopup->count() > 0) thePopup->insertSeparator();
- thePopup->insertItem("Change background...", this, SLOT(onChangeBgColor()));
- if(SUIT_ViewWindow* aViewWindow = myViewManager->getActiveView()){
- if(SVTK_ViewWindow* aView = dynamic_cast<SVTK_ViewWindow*>(aViewWindow)){
- if(!aView->getToolBar()->isVisible()){
- thePopup->insertSeparator();
- thePopup->insertItem("Show toolbar", this, SLOT(onShowToolbar()));
- }
- }
- }
+ thePopup->insertItem( VTKViewer_Viewer::tr( "MEN_DUMP_VIEW" ), this, SLOT( onDumpView() ) );
+ thePopup->insertItem( VTKViewer_Viewer::tr( "MEN_CHANGE_BACKGROUD" ), this, SLOT( onChangeBgColor() ) );
+
+ thePopup->insertSeparator();
+
+ SVTK_ViewWindow* aView = (SVTK_ViewWindow*)(myViewManager->getActiveView());
+ if ( aView && !aView->getToolBar()->isVisible() )
+ thePopup->insertItem( VTKViewer_Viewer::tr( "MEN_SHOW_TOOLBAR" ), this, SLOT( onShowToolbar() ) );
}
//==========================================================
-void
-SVTK_Viewer
-::onMousePress(SUIT_ViewWindow* vw, QMouseEvent* event)
+void SVTK_Viewer::onMousePress(SUIT_ViewWindow* vw, QMouseEvent* event)
{
if(SVTK_ViewWindow* aVW = dynamic_cast<SVTK_ViewWindow*>(vw)){
if(SVTK_RenderWindowInteractor* aRWI = aVW->getRWInteractor()){
//!! To be done for view windows
}
+void SVTK_Viewer::onDumpView()
+{
+ SVTK_ViewWindow* aView = (SVTK_ViewWindow*)(myViewManager->getActiveView());
+ if ( aView )
+ aView->onDumpView();
+}
+
//==========================================================
-void
-SVTK_Viewer
-::onChangeBgColor()
+void SVTK_Viewer::onChangeBgColor()
{
QPtrVector<SUIT_ViewWindow> aViews = myViewManager->getViews();
for(int i = 0, iEnd = aViews.size(); i < iEnd; i++)
void onMouseMove(SUIT_ViewWindow*, QMouseEvent*);
void onMouseRelease(SUIT_ViewWindow*, QMouseEvent*);
- void onChangeBgColor();
+ void onDumpView();
void onShowToolbar();
+ void onChangeBgColor();
private:
bool mySelectionEnabled;
//*********************************************************************
void VTKViewer_Viewer::contextMenuPopup(QPopupMenu* thePopup)
{
- if (thePopup->count() > 0) thePopup->insertSeparator();
- thePopup->insertItem("Change background...", this, SLOT(onChangeBgColor()));
+ thePopup->insertItem( tr( "MEN_DUMP_VIEW" ), this, SLOT( onDumpView() ) );
+ thePopup->insertItem( tr( "MEN_CHANGE_BACKGROUD" ), this, SLOT( onChangeBgColor() ) );
+
+ thePopup->insertSeparator();
VTKViewer_ViewWindow* aView = (VTKViewer_ViewWindow*)(myViewManager->getActiveView());
- if ( aView ) {
- if ( !aView->getToolBar()->isVisible() ) {
- thePopup->insertSeparator();
- thePopup->insertItem("Show toolbar", this, SLOT(onShowToolbar()));
- }
- }
+ if ( aView && !aView->getToolBar()->isVisible() )
+ thePopup->insertItem( tr( "MEN_SHOW_TOOLBAR" ), this, SLOT( onShowToolbar() ) );
}
//*********************************************************************
//!! To be done for view windows
}
+void VTKViewer_Viewer::onDumpView()
+{
+ VTKViewer_ViewWindow* aView = (VTKViewer_ViewWindow*)(myViewManager->getActiveView());
+ if ( aView )
+ aView->onDumpView();
+}
+
//*********************************************************************
void VTKViewer_Viewer::onChangeBgColor()
{
void onMouseMove(SUIT_ViewWindow*, QMouseEvent*);
void onMouseRelease(SUIT_ViewWindow*, QMouseEvent*);
- void onChangeBgColor();
+ void onDumpView();
void onShowToolbar();
+ void onChangeBgColor();
private:
bool mySelectionEnabled;
msgstr ""
"Project-Id-Version: example-Qt-message-extraction\n"
"POT-Creation-Date: 1999-02-23 15:38+0200\n"
-"PO-Revision-Date: 1999-02-23 15:38+0200\n"
+"PO-Revision-Date: 2005-05-31 13:25+0400\n"
"Last-Translator: \n"
"Content-Type: text/plain; charset=iso-8859-1\n"
msgid "BUT_OK"
msgstr "Ok"
+msgid "VTKViewer_Viewer::MEN_DUMP_VIEW"
+msgstr "Dump view..."
+
+msgid "VTKViewer_Viewer::MEN_SHOW_TOOLBAR"
+msgstr "Show toolbar"
+
+msgid "VTKViewer_Viewer::MEN_CHANGE_BACKGROUD"
+msgstr "Change background..."