-
- // Camera submenu -> Reset
- aPixmap = resMgr->loadPixmap( "ParaView", tr("ICON_RESET_CAMERA"), false );
- anAction = createAction( ResetCameraId, tr("TOP_RESET_CAMERA"), QIcon(aPixmap),
- tr("MEN_RESET_CAMERA"), tr("STB_RESET_CAMERA"),
- 0, desk, false, &Implementation->Core, SLOT( resetCamera() ) );
- connect( &Implementation->Core, SIGNAL( enableFileSaveScreenshot(bool) ),
- anAction, SLOT( setEnabled(bool) ) );
-
- // Camera submenu -> +X
- aPixmap = resMgr->loadPixmap( "ParaView", tr("ICON_+X"), false );
- anAction = createAction( PositiveXId, tr("TOP_+X"), QIcon(aPixmap),
- tr("MEN_+X"), tr("STB_+X"),
- 0, desk, false, &Implementation->Core, SLOT( resetViewDirectionPosX() ) );
- connect( &Implementation->Core, SIGNAL( enableFileSaveScreenshot(bool) ),
- anAction, SLOT( setEnabled(bool) ) );
-
- // Camera submenu -> -X
- aPixmap = resMgr->loadPixmap( "ParaView", tr("ICON_-X"), false );
- anAction = createAction( NegativeXId, tr("TOP_-X"), QIcon(aPixmap),
- tr("MEN_-X"), tr("STB_-X"),
- 0, desk, false, &Implementation->Core, SLOT( resetViewDirectionNegX() ) );
- connect( &Implementation->Core, SIGNAL( enableFileSaveScreenshot(bool) ),
- anAction, SLOT( setEnabled(bool) ) );
-
- // Camera submenu -> +Y
- aPixmap = resMgr->loadPixmap( "ParaView", tr("ICON_+Y"), false );
- anAction = createAction( PositiveYId, tr("TOP_+Y"), QIcon(aPixmap),
- tr("MEN_+Y"), tr("STB_+Y"),
- 0, desk, false, &Implementation->Core, SLOT( resetViewDirectionPosY() ) );
- connect( &Implementation->Core, SIGNAL( enableFileSaveScreenshot(bool) ),
- anAction, SLOT( setEnabled(bool) ) );
-
- // Camera submenu -> -Y
- aPixmap = resMgr->loadPixmap( "ParaView", tr("ICON_-Y"), false );
- anAction = createAction( NegativeYId, tr("TOP_-Y"), QIcon(aPixmap),
- tr("MEN_-Y"), tr("STB_-Y"),
- 0, desk, false, &Implementation->Core, SLOT( resetViewDirectionNegY() ) );
- connect( &Implementation->Core, SIGNAL( enableFileSaveScreenshot(bool) ),
- anAction, SLOT( setEnabled(bool) ) );
-
- // Camera submenu -> +Z
- aPixmap = resMgr->loadPixmap( "ParaView", tr("ICON_+Z"), false );
- anAction = createAction( PositiveZId, tr("TOP_+Z"), QIcon(aPixmap),
- tr("MEN_+Z"), tr("STB_+Z"),
- 0, desk, false, &Implementation->Core, SLOT( resetViewDirectionPosZ() ) );
- connect( &Implementation->Core, SIGNAL( enableFileSaveScreenshot(bool) ),
- anAction, SLOT( setEnabled(bool) ) );
-
- // Camera submenu -> -Z
- aPixmap = resMgr->loadPixmap( "ParaView", tr("ICON_-Z"), false );
- anAction = createAction( NegativeZId, tr("TOP_-Z"), QIcon(aPixmap),
- tr("MEN_-Z"), tr("STB_-Z"),
- 0, desk, false, &Implementation->Core, SLOT( resetViewDirectionNegZ() ) );
- connect( &Implementation->Core, SIGNAL( enableFileSaveScreenshot(bool) ),
- anAction, SLOT( setEnabled(bool) ) );
-
- // Show Center
- aPixmap = resMgr->loadPixmap( "ParaView", tr("ICON_SHOW_CENTER"), false );
- aQtxAction = new QtxAction( tr("TOP_SHOW_CENTER"), QIcon(aPixmap),
- tr("MEN_SHOW_CENTER"), 0, desk );
- aQtxAction->setStatusTip( tr( "PRP_APP_SHOW_CENTER" ) );
- aQtxAction->setCheckable( true );
- registerAction( ShowCenterId, aQtxAction );
- connect( aQtxAction, SIGNAL( toggled(bool) ),
- &Implementation->Core, SLOT( setCenterAxesVisibility(bool) ) );
- connect( &Implementation->Core, SIGNAL( enableShowCenterAxis(bool) ),
- this, SLOT( onShowCenterAxisChanged(bool) ), Qt::QueuedConnection );
-
- // Reset Center
- aPixmap = resMgr->loadPixmap( "ParaView", tr("ICON_RESET_CENTER"), false );
- anAction = createAction( ResetCenterId, tr("TOP_RESET_CENTER"), QIcon(aPixmap),
- tr("MEN_RESET_CENTER"), tr("STB_RESET_CENTER"), 0, desk, false,
- &Implementation->Core, SLOT( resetCenterOfRotationToCenterOfCurrentData() ) );
- connect( &Implementation->Core, SIGNAL( enableResetCenter(bool) ),
- anAction, SLOT( setEnabled(bool) ) );
-
- // Pick Center
- aPixmap = resMgr->loadPixmap( "ParaView", tr("ICON_PICK_CENTER"), false );
- aQtxAction = new QtxAction( tr("TOP_PICK_CENTER"), QIcon(aPixmap),
- tr("MEN_PICK_CENTER"), 0, desk );
- aQtxAction->setStatusTip( tr( "PRP_APP_PICK_CENTER" ) );
- aQtxAction->setCheckable( true );
- registerAction( PickCenterId, aQtxAction );
- connect( aQtxAction, SIGNAL( toggled(bool) ),
- &Implementation->Core, SLOT( pickCenterOfRotation(bool) ) );
- connect( &Implementation->Core, SIGNAL( enablePickCenter(bool) ),
- aQtxAction, SLOT( setEnabled(bool) ) );
- connect( &Implementation->Core, SIGNAL( pickingCenter(bool) ),
- aQtxAction, SLOT( setChecked(bool) ) );
-
- // Show Color Legend
- aPixmap = resMgr->loadPixmap( "ParaView", tr("ICON_SHOW_COLOR_LEGEND"), false );
- aQtxAction = new QtxAction( tr("TOP_SHOW_COLOR_LEGEND"), QIcon(aPixmap),
- tr("MEN_SHOW_COLOR_LEGEND"), 0, desk );
- aQtxAction->setStatusTip( tr( "PRP_APP_SHOW_COLOR_LEGEND" ) );
- aQtxAction->setCheckable( true );
- aQtxAction->setEnabled(false);
- registerAction( ShowColorLegendId, aQtxAction );
- pqScalarBarVisibilityAdaptor* sbva = new pqScalarBarVisibilityAdaptor( aQtxAction );
- connect( Implementation->Core.getObjectInspectorDriver(),
- SIGNAL( representationChanged(pqDataRepresentation*, pqView*) ),
- sbva,
- SLOT( setActiveRepresentation(pqDataRepresentation*) ) );
-
- // --- Menu "Sources" and "Filters"
- // As ParaView is responsible for updating "Sources" and "Filters" menus,
- // actions for these menus are created inside the pqMainWindowCore.
- // So, the creation of corresponding QMenu object is in the PVGUI_Module::pvCreateMenus().
-
- // --- Menu "Animation"
-
- pqVCRController* vcrcontroller = &Implementation->Core.VCRController();
-
- // First Frame
- aPixmap = resMgr->loadPixmap( "ParaView", tr("ICON_FIRST_FRAME"), false );
- anAction = createAction( FirstFrameId, tr("TOP_FIRST_FRAME"), QIcon(aPixmap),
- tr("MEN_FIRST_FRAME"), tr("STB_FIRST_FRAME"),
- 0, desk, false, vcrcontroller, SLOT( onFirstFrame() ) );
- connect( vcrcontroller, SIGNAL( enabled(bool) ), anAction, SLOT( setEnabled(bool) ) );
-
- // Previous Frame
- aPixmap = resMgr->loadPixmap( "ParaView", tr("ICON_PREVIOUS_FRAME"), false );
- anAction = createAction( PreviousFrameId, tr("TOP_PREVIOUS_FRAME"), QIcon(aPixmap),
- tr("MEN_PREVIOUS_FRAME"), tr("STB_PREVIOUS_FRAME"),
- 0, desk, false, vcrcontroller, SLOT( onPreviousFrame() ) );
- connect( vcrcontroller, SIGNAL( enabled(bool) ), anAction, SLOT( setEnabled(bool) ) );
-
- // Play
- aPixmap = resMgr->loadPixmap( "ParaView", tr("ICON_PLAY"), false );
- anAction = createAction( PlayId, tr("TOP_PLAY"), QIcon(aPixmap),
- tr("MEN_PLAY"), tr("STB_PLAY"),
- 0, desk, false, vcrcontroller, SLOT( onPlay() ) );
- connect( vcrcontroller, SIGNAL( enabled(bool) ), anAction, SLOT( setEnabled(bool) ) );
-
- // Next Frame
- aPixmap = resMgr->loadPixmap( "ParaView", tr("ICON_NEXT_FRAME"), false );
- anAction = createAction( NextFrameId, tr("TOP_NEXT_FRAME"), QIcon(aPixmap),
- tr("MEN_NEXT_FRAME"), tr("STB_NEXT_FRAME"),
- 0, desk, false, vcrcontroller, SLOT( onNextFrame() ) );
- connect( vcrcontroller, SIGNAL( enabled(bool) ), anAction, SLOT( setEnabled(bool) ) );
-
- // Last Frame
- aPixmap = resMgr->loadPixmap( "ParaView", tr("ICON_LAST_FRAME"), false );
- anAction = createAction( LastFrameId, tr("TOP_LAST_FRAME"), QIcon(aPixmap),
- tr("MEN_LAST_FRAME"), tr("STB_LAST_FRAME"),
- 0, desk, false, vcrcontroller, SLOT( onLastFrame() ) );
- connect( vcrcontroller, SIGNAL( enabled(bool) ), anAction, SLOT( setEnabled(bool) ) );
-
- // Loop
- aPixmap = resMgr->loadPixmap( "ParaView", tr("ICON_LOOP"), false );
- aQtxAction = new QtxAction( tr("TOP_LOOP"), QIcon(aPixmap),
- tr("MEN_LOOP"), 0, desk );
- aQtxAction->setStatusTip( tr( "PRP_APP_LOOP" ) );
- aQtxAction->setCheckable(true);
- registerAction( LoopId, aQtxAction );
- connect( aQtxAction, SIGNAL( toggled(bool) ), vcrcontroller, SLOT( onLoop(bool) ) );
- connect( vcrcontroller, SIGNAL( enabled(bool) ), aQtxAction, SLOT( setEnabled(bool) ) );
- connect( vcrcontroller, SIGNAL( loop(bool) ), aQtxAction, SLOT( setChecked(bool) ) );
-
- connect( vcrcontroller, SIGNAL( playing(bool) ), this, SLOT( onPlaying(bool) ) );
- connect( vcrcontroller, SIGNAL( timeRanges(double, double) ),
- this, SLOT( setTimeRanges(double, double) ) );