- 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 );
+ 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)) );
+ if ( !(theActionFlags & DisableDetectionMode) ) {
+ 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);
+
+ 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 );