return res;
}
-//! Join range of sections to one section (join all sections if -1 is passed in one of arguments)
+//! Join range of sections to one section (join all sections if -1 is passed in theISectionFrom argument)
bool CurveCreator_Curve::join( const int theISectionTo,
const int theISectionFrom )
{
+ //TODO
bool res = false;
- if (mySections.size() >= 2 &&
- ( theISectionTo != theISectionFrom || (theISectionTo == -1 && theISectionFrom == -1) )) {
+ if ( theISectionTo != theISectionFrom ) {
startOperation();
- int aISectionTo = getNbSections()-1;
- int aISectionFrom = 0;
if (addEmptyDiff())
- myListDiffs.back().init(this, CurveCreator_Operation::Join, aISectionTo, aISectionFrom);
+ myListDiffs.back().init(this, CurveCreator_Operation::Join, theISectionTo, theISectionFrom);
- res = joinInternal( aISectionTo, aISectionFrom );
+ res = joinInternal( theISectionTo, theISectionFrom );
finishOperation();
}
QKeySequence(Qt::ControlModifier|Qt::Key_Delete ) );
connect(anAct, SIGNAL(triggered()), this, SLOT(onRemove()) );
aTB->addAction(anAct);
- aTB->addSeparator();
+ // 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);
- 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()) );
+ // 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 );
int aSectCnt = myCurve->getNbSections();
if( aSectCnt > 0 )
anEnabledAct << CLEAR_ALL_ID;
- if( aSectCnt > 1 )
- anEnabledAct << JOIN_ALL_ID;
- if( aSelSections.size() > 1 ){
- anEnabledAct << JOIN_ID;
- }
+ // TODO
+ //if( aSectCnt > 1 )
+ // anEnabledAct << JOIN_ALL_ID;
+ //if( aSelSections.size() > 1 ){
+ // anEnabledAct << JOIN_ID;
+ //}
}
break;
case DetectionMode: {
if( (myCurve->getNbSections() + myCurve->getNbPoints()) > 0 ){
anEnabledAct << REMOVE_ALL_ID;
}*/
- if( myCurve->getNbSections() > 1 ){
- anEnabledAct << JOIN_ALL_ID;
- }
+ // TODO
+ //if( myCurve->getNbSections() > 1 ){
+ // anEnabledAct << JOIN_ALL_ID;
+ //}
}
QList<ActionId> anIds = myActionMap.keys();
for( int i = 0 ; i < anIds.size() ; i++ ){