- SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr();
- QPixmap anUndoPixmap(aResMgr->loadPixmap("GEOM", tr("ICON_CC_UNDO")));
- QPixmap aRedoPixmap(aResMgr->loadPixmap("GEOM", tr("ICON_CC_REDO")));
- QPixmap aNewSectionPixmap(aResMgr->loadPixmap("GEOM", tr("ICON_CC_NEW_SECTION")));
- QPixmap aNewPointPixmap(aResMgr->loadPixmap("GEOM", tr("ICON_CC_NEW_POINT")));
- QPixmap anEditPointsPixmap(aResMgr->loadPixmap("GEOM", tr("ICON_CC_EDIT_POINTS")));
- QPixmap aDetectPointsPixmap(aResMgr->loadPixmap("GEOM", tr("ICON_CC_EDIT_POINTS")));
- QPixmap aPolylinePixmap(aResMgr->loadPixmap("GEOM", tr("ICON_CC_POLYLINE")));
- QPixmap aSplinePixmap(aResMgr->loadPixmap("GEOM", tr("ICON_CC_SPLINE")));
- QPixmap aRemovePixmap(aResMgr->loadPixmap("GEOM", tr("ICON_CC_DELETE")));
- QPixmap aJoinPixmap(aResMgr->loadPixmap("GEOM", tr("ICON_CC_JOIN")));
- QPixmap aStepUpPixmap(aResMgr->loadPixmap("GEOM", tr("ICON_CC_ARROW_UP")));
- QPixmap aStepDownPixmap(aResMgr->loadPixmap("GEOM", tr("ICON_CC_ARROW_DOWN")));
-
- QAction* anAct = createAction( UNDO_ID, tr("UNDO"), anUndoPixmap, tr("UNDO_TLT"),
- QKeySequence(Qt::ControlModifier|Qt::Key_Z) );
- connect(anAct, SIGNAL(triggered()), this, SLOT(onUndo()) );
- aTB->addAction(anAct);
-
- anAct = createAction( REDO_ID, tr("REDO"), aRedoPixmap, tr("REDO_TLT"),
- QKeySequence(Qt::ControlModifier|Qt::Key_Y) );
- connect(anAct, SIGNAL(triggered()), this, SLOT(onRedo()) );
- aTB->addAction(anAct);
-
- aTB->addSeparator();
-
- anAct = createAction( NEW_SECTION_ID, tr("NEW_SECTION"), aNewSectionPixmap, tr("NEW_SECTION_TLT"),
- QKeySequence(Qt::ControlModifier|Qt::Key_N) );
- connect(anAct, SIGNAL(triggered()), this, SLOT(onNewSection()) );
- aTB->addAction(anAct);
- aTB->addSeparator();
-
- anAct = createAction( ADDITION_MODE_ID, tr("ADDITION_MODE"), aNewPointPixmap, tr("ADDITION_MODE_TLT"),
- QKeySequence() );
- anAct->setCheckable(true);
- connect(anAct, SIGNAL(triggered(bool)), this, SLOT(onAdditionMode(bool)) );
- connect(anAct, SIGNAL(toggled(bool)), this, SLOT(onModeChanged(bool)) );
- aTB->addAction(anAct);
-
- anAct = createAction( MODIFICATION_MODE_ID, tr("MODIFICATION_MODE"), anEditPointsPixmap, tr("MODIFICATION_MODE_TLT"),
- QKeySequence() );
- anAct->setCheckable(true);
- connect(anAct, SIGNAL(triggered(bool)), this, SLOT(onModificationMode(bool)) );
- connect(anAct, SIGNAL(toggled(bool)), this, SLOT(onModeChanged(bool)) );
- aTB->addAction(anAct);
-
- anAct = createAction( DETECTION_MODE_ID, tr("DETECTION_MODE"), aDetectPointsPixmap, tr("DETECTION_MODE_TLT"),
- QKeySequence() );
- anAct->setCheckable(true);
- connect(anAct, SIGNAL(triggered(bool)), this, SLOT(onDetectionMode(bool)) );
- connect(anAct, SIGNAL(toggled(bool)), this, SLOT(onModeChanged(bool)) );
- aTB->addAction(anAct);
-
- anAct = createAction( CLOSE_SECTIONS_ID, tr("CLOSE_SECTIONS"), QPixmap(), tr("CLOSE_SECTIONS_TLT"),
- QKeySequence(Qt::ControlModifier|Qt::Key_W) );
- connect(anAct, SIGNAL(triggered()), this, SLOT(onCloseSections()) );
-
- anAct = createAction( UNCLOSE_SECTIONS_ID, tr("UNCLOSE_SECTIONS"), QPixmap(),
- tr("UNCLOSE_SECTIONS_TLT"), QKeySequence(Qt::ControlModifier|Qt::Key_S) );
- connect(anAct, SIGNAL(triggered()), this, SLOT(onUncloseSections()) );
-
- anAct = createAction( SET_SECTIONS_POLYLINE_ID, tr("SET_SECTIONS_POLYLINE"),
- aPolylinePixmap, tr("SET_POLYLINE_TLT"),
- QKeySequence(Qt::ControlModifier|Qt::Key_E) );
- connect(anAct, SIGNAL(triggered()), this, SLOT(onSetPolyline()) );
-
- anAct = createAction( SET_SECTIONS_SPLINE_ID, tr("SET_SECTIONS_SPLINE"), aSplinePixmap,
- tr("SET_SPLINE_TLT"), QKeySequence(Qt::ControlModifier|Qt::Key_R) );
- connect(anAct, SIGNAL(triggered()), this, SLOT(onSetSpline()) );
-
- anAct = createAction( REMOVE_ID, tr("REMOVE"), aRemovePixmap, tr("REMOVE_TLT"),
- QKeySequence(Qt::ControlModifier|Qt::Key_Delete ) );
- connect(anAct, SIGNAL(triggered()), this, SLOT(onRemove()) );
- aTB->addAction(anAct);
- aTB->addSeparator();
-
- anAct = createAction( JOIN_ID, tr("JOIN"), aJoinPixmap, tr("JOIN_TLT"),
- QKeySequence(Qt::ControlModifier|Qt::Key_Plus ) );
- connect( anAct, SIGNAL(triggered()), this, SLOT(onJoin()) );
- aTB->addAction(anAct);
- aTB->addSeparator();
-
- anAct = createAction( CLEAR_ALL_ID, tr("CLEAR_ALL"), QPixmap(), tr("CLEAR_ALL_TLT"),
- QKeySequence(Qt::ControlModifier | Qt::ShiftModifier | Qt::Key_Delete ) );
- connect( anAct, SIGNAL(triggered()), this, SLOT( onClearAll()) );
-
- anAct = createAction( JOIN_ALL_ID, tr("JOIN_ALL"), QPixmap(), tr("JOIN_ALL_TLT"),
- QKeySequence(Qt::ControlModifier | Qt::ShiftModifier | Qt::Key_Plus ) );
- connect( anAct, SIGNAL(triggered()), this, SLOT(onJoinAll()) );
-
- QVBoxLayout* aSectLayout = new QVBoxLayout();
- aSectLayout->setMargin( 5 );
- aSectLayout->setSpacing( 5 );
- aSectLayout->addWidget(aTB);
- aSectLayout->addWidget(mySectionView);
- aSectLayout->addWidget( myLocalPointView );
- aSectionGroup->setLayout(aSectLayout);
- QVBoxLayout* aLay = new QVBoxLayout();
- aLay->setMargin( 0 );
- aLay->setSpacing( 5 );
+ SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr();
+ QPixmap anUndoPixmap(aResMgr->loadPixmap("GEOM", tr("ICON_CC_UNDO")));
+ QPixmap aRedoPixmap(aResMgr->loadPixmap("GEOM", tr("ICON_CC_REDO")));
+ QPixmap aNewSectionPixmap(aResMgr->loadPixmap("GEOM", tr("ICON_CC_NEW_SECTION")));
+ QPixmap aNewPointPixmap(aResMgr->loadPixmap("GEOM", tr("ICON_CC_NEW_POINT")));
+ QPixmap anEditPointsPixmap(aResMgr->loadPixmap("GEOM", tr("ICON_CC_EDIT_POINTS")));
+ QPixmap aDetectPointsPixmap(aResMgr->loadPixmap("GEOM", tr("ICON_CC_EDIT_POINTS")));
+ QPixmap aPolylinePixmap(aResMgr->loadPixmap("GEOM", tr("ICON_CC_POLYLINE")));
+ QPixmap aSplinePixmap(aResMgr->loadPixmap("GEOM", tr("ICON_CC_SPLINE")));
+ QPixmap aRemovePixmap(aResMgr->loadPixmap("GEOM", tr("ICON_CC_DELETE")));
+ QPixmap aJoinPixmap(aResMgr->loadPixmap("GEOM", tr("ICON_CC_JOIN")));
+ QPixmap aStepUpPixmap(aResMgr->loadPixmap("GEOM", tr("ICON_CC_ARROW_UP")));
+ QPixmap aStepDownPixmap(aResMgr->loadPixmap("GEOM", tr("ICON_CC_ARROW_DOWN")));
+
+ QAction* anAct = createAction( UNDO_ID, tr("UNDO"), anUndoPixmap, tr("UNDO_TLT"),
+ QKeySequence(Qt::ControlModifier|Qt::Key_Z) );
+ connect(anAct, SIGNAL(triggered()), this, SLOT(onUndo()) );
+ aTB->addAction(anAct);
+
+ anAct = createAction( REDO_ID, tr("REDO"), aRedoPixmap, tr("REDO_TLT"),
+ QKeySequence(Qt::ControlModifier|Qt::Key_Y) );
+ connect(anAct, SIGNAL(triggered()), this, SLOT(onRedo()) );
+ aTB->addAction(anAct);
+
+ aTB->addSeparator();
+
+ anAct = createAction( NEW_SECTION_ID, tr("NEW_SECTION"), aNewSectionPixmap, tr("NEW_SECTION_TLT"),
+ QKeySequence(Qt::ControlModifier|Qt::Key_N) );
+ connect(anAct, SIGNAL(triggered()), this, SLOT(onNewSection()) );
+ aTB->addAction(anAct);
+ aTB->addSeparator();
+
+ anAct = createAction( ADDITION_MODE_ID, tr("ADDITION_MODE"), aNewPointPixmap, tr("ADDITION_MODE_TLT"),
+ QKeySequence() );
+ anAct->setCheckable(true);
+ connect(anAct, SIGNAL(triggered(bool)), this, SLOT(onAdditionMode(bool)) );
+ connect(anAct, SIGNAL(toggled(bool)), this, SLOT(onModeChanged(bool)) );
+ aTB->addAction(anAct);
+
+ anAct = createAction( MODIFICATION_MODE_ID, tr("MODIFICATION_MODE"), anEditPointsPixmap, tr("MODIFICATION_MODE_TLT"),
+ QKeySequence() );
+ anAct->setCheckable(true);
+ connect(anAct, SIGNAL(triggered(bool)), this, SLOT(onModificationMode(bool)) );
+ connect(anAct, SIGNAL(toggled(bool)), this, SLOT(onModeChanged(bool)) );
+ aTB->addAction(anAct);
+
+ anAct = createAction( DETECTION_MODE_ID, tr("DETECTION_MODE"), aDetectPointsPixmap, tr("DETECTION_MODE_TLT"),
+ QKeySequence() );
+ anAct->setCheckable(true);
+ connect(anAct, SIGNAL(triggered(bool)), this, SLOT(onDetectionMode(bool)) );
+ connect(anAct, SIGNAL(toggled(bool)), this, SLOT(onModeChanged(bool)) );
+ aTB->addAction(anAct);
+
+ anAct = createAction( CLOSE_SECTIONS_ID, tr("CLOSE_SECTIONS"), QPixmap(), tr("CLOSE_SECTIONS_TLT"),
+ QKeySequence(Qt::ControlModifier|Qt::Key_W) );
+ connect(anAct, SIGNAL(triggered()), this, SLOT(onCloseSections()) );
+
+ anAct = createAction( UNCLOSE_SECTIONS_ID, tr("UNCLOSE_SECTIONS"), QPixmap(),
+ tr("UNCLOSE_SECTIONS_TLT"), QKeySequence(Qt::ControlModifier|Qt::Key_S) );
+ connect(anAct, SIGNAL(triggered()), this, SLOT(onUncloseSections()) );
+
+ anAct = createAction( SET_SECTIONS_POLYLINE_ID, tr("SET_SECTIONS_POLYLINE"),
+ aPolylinePixmap, tr("SET_POLYLINE_TLT"),
+ QKeySequence(Qt::ControlModifier|Qt::Key_E) );
+ connect(anAct, SIGNAL(triggered()), this, SLOT(onSetPolyline()) );
+
+ anAct = createAction( SET_SECTIONS_SPLINE_ID, tr("SET_SECTIONS_SPLINE"), aSplinePixmap,
+ tr("SET_SPLINE_TLT"), QKeySequence(Qt::ControlModifier|Qt::Key_R) );
+ connect(anAct, SIGNAL(triggered()), this, SLOT(onSetSpline()) );
+
+ anAct = createAction( REMOVE_ID, tr("REMOVE"), aRemovePixmap, tr("REMOVE_TLT"),
+ QKeySequence(Qt::ControlModifier|Qt::Key_Delete ) );
+ connect(anAct, SIGNAL(triggered()), this, SLOT(onRemove()) );
+ aTB->addAction(anAct);
+ // TODO join
+ //aTB->addSeparator();
+
+ //anAct = createAction( JOIN_ID, tr("JOIN"), aJoinPixmap, tr("JOIN_TLT"),
+ // QKeySequence(Qt::ControlModifier|Qt::Key_Plus ) );
+ //connect( anAct, SIGNAL(triggered()), this, SLOT(onJoin()) );
+ //aTB->addAction(anAct);
+
+ anAct = createAction( CLEAR_ALL_ID, tr("CLEAR_ALL"), QPixmap(), tr("CLEAR_ALL_TLT"),
+ QKeySequence(Qt::ControlModifier | Qt::ShiftModifier | Qt::Key_Delete ) );
+ connect( anAct, SIGNAL(triggered()), this, SLOT( onClearAll()) );
+
+ // TODO join
+ //anAct = createAction( JOIN_ALL_ID, tr("JOIN_ALL"), QPixmap(), tr("JOIN_ALL_TLT"),
+ // QKeySequence(Qt::ControlModifier | Qt::ShiftModifier | Qt::Key_Plus ) );
+ //connect( anAct, SIGNAL(triggered()), this, SLOT(onJoinAll()) );
+
+ QVBoxLayout* aSectLayout = new QVBoxLayout();
+ aSectLayout->setMargin( 5 );
+ aSectLayout->setSpacing( 5 );
+ aSectLayout->addWidget(aTB);
+ aSectLayout->addWidget(mySectionView);
+ aSectLayout->addWidget( myLocalPointView );
+ aSectionGroup->setLayout(aSectLayout);
+ QVBoxLayout* aLay = new QVBoxLayout();
+ aLay->setMargin( 0 );
+ aLay->setSpacing( 5 );