int aMenuId = createMenu( tr( "MEN_GAUSS" ), -1, -1, 30 );
//createMenu( GAUSS_CREATE_PRS, aMenuId, 10 );
+ QString aViewerType = VVTK_Viewer::Type();
SUIT_Accel* accel = getApp()->accel();
- accel->setActionKey( SUIT_Accel::PanLeft,Key_Left,VVTK_Viewer::Type() );
- accel->setActionKey( SUIT_Accel::PanRight,Key_Right,VVTK_Viewer::Type() );
- accel->setActionKey( SUIT_Accel::PanUp,Key_Up,VVTK_Viewer::Type() );
- accel->setActionKey( SUIT_Accel::PanDown,Key_Down,VVTK_Viewer::Type() );
- accel->setActionKey( SUIT_Accel::ZoomIn,Key_PageUp,VVTK_Viewer::Type() );
- accel->setActionKey( SUIT_Accel::ZoomOut,Key_PageDown,VVTK_Viewer::Type() );
- accel->setActionKey( SUIT_Accel::RotateLeft,CTRL+Key_Left,VVTK_Viewer::Type() );
- accel->setActionKey( SUIT_Accel::RotateRight,CTRL+Key_Right,VVTK_Viewer::Type() );
- accel->setActionKey( SUIT_Accel::RotateUp,CTRL+Key_Up,VVTK_Viewer::Type() );
- accel->setActionKey( SUIT_Accel::RotateDown,CTRL+Key_Down,VVTK_Viewer::Type() );
- accel->setActionKey( SVTK::PlusSpeedIncrementEvent,Key_Plus,VVTK_Viewer::Type() );
- accel->setActionKey( SVTK::MinusSpeedIncrementEvent,Key_Minus,VVTK_Viewer::Type() );
+ accel->setActionKey( SUIT_Accel::PanLeft, Key_Left, aViewerType );
+ accel->setActionKey( SUIT_Accel::PanRight, Key_Right, aViewerType );
+ accel->setActionKey( SUIT_Accel::PanUp, Key_Up, aViewerType );
+ accel->setActionKey( SUIT_Accel::PanDown, Key_Down, aViewerType );
+ accel->setActionKey( SUIT_Accel::ZoomIn, Key_PageUp, aViewerType );
+ accel->setActionKey( SUIT_Accel::ZoomOut, Key_PageDown, aViewerType );
+ accel->setActionKey( SUIT_Accel::RotateLeft, CTRL+Key_Left, aViewerType );
+ accel->setActionKey( SUIT_Accel::RotateRight, CTRL+Key_Right, aViewerType );
+ accel->setActionKey( SUIT_Accel::RotateUp, CTRL+Key_Up, aViewerType );
+ accel->setActionKey( SUIT_Accel::RotateDown, CTRL+Key_Down, aViewerType );
+ accel->setActionKey( SVTK::PlusSpeedIncrementEvent, Key_Plus, aViewerType );
+ accel->setActionKey( SVTK::MinusSpeedIncrementEvent, Key_Minus, aViewerType );
connect( getApp(), SIGNAL( viewManagerAdded( SUIT_ViewManager* ) ), this, SLOT( OnViewManagerAdded (SUIT_ViewManager*) ) );
class CutLines_i;
//---------------------------------------------------------------
- template<class TPrs3d_i, class TDlg>
+ template<class TPrs3d_i, class TViewer, class TDlg>
+ inline
void
EditPrs3d(VisuGUI* theModule,
VISU::Prs3d_i* thePrs3d)
{
- TPrs3d_i* aPrsObject = dynamic_cast<TPrs3d_i*>(thePrs3d);
- if (aPrsObject) {
+ if(TPrs3d_i* aPrsObject = dynamic_cast<TPrs3d_i*>(thePrs3d)){
TDlg* aDlg = new TDlg (theModule);
aDlg->initFromPrsObject(aPrsObject);
if (aDlg->exec()) {
delete aDlg;
return;
}
- RecreateActor(theModule, aPrsObject);
- if (SVTK_ViewWindow* vw = GetViewWindow(theModule)) {
- vw->getRenderer()->ResetCameraClippingRange();
- vw->Repaint();
+ RecreateActor(theModule,aPrsObject);
+ typedef typename TViewer::TViewWindow TViewWindow;
+ if(TViewWindow* aViewWindow = GetViewWindow<TViewer>(theModule,true)){
+ aViewWindow->getRenderer()->ResetCameraClippingRange();
+ aViewWindow->Repaint();
}
// Optionally, create table and curves for cut lines
QApplication::setOverrideCursor(Qt::waitCursor);
}
}
+ template<class TPrs3d_i, class TDlg>
+ inline
+ void
+ EditPrs3d(VisuGUI* theModule,
+ VISU::Prs3d_i* thePrs3d)
+ {
+ EditPrs3d<TPrs3d_i,SVTK_Viewer,TDlg>(theModule,thePrs3d);
+ }
//---------------------------------------------------------------
template<class TPrs3d_i>
+ inline
TPrs3d_i*
CreatePrs3d(VisuGUI* theModule,
_PTR(SObject) theTimeStamp,
//---------------------------------------------------------------
template<class TPrs3d_i, class TViewer, class TDlg, int IsDlgModal>
+ inline
bool
CreatePrs3d(VisuGUI* theModule,
_PTR(SObject) theTimeStamp,
//---------------------------------------------------------------
template<class TPrs3d_i, class TViewer, class TDlg, int IsDlgModal>
+ inline
void
CreatePrs3d(VisuGUI* theModule,
- const bool theIsCreateView = false)
+ const bool theIsCreateView = true)
{
if (CheckLock(GetCStudy(GetAppStudy(theModule))))
return;
}
template<class TPrs3d_i, class TDlg, int IsDlgModal>
+ inline
void
CreatePrs3d(VisuGUI* theModule,
- const bool theIsCreateView = false)
+ const bool theIsCreateView = true)
{
CreatePrs3d<TPrs3d_i,SVTK_Viewer,TDlg,IsDlgModal>(theModule,theIsCreateView);
}