void DivePlannerPointsModel::removeDeco() { bool oldrec = setRecalc(false); QVector<int> computedPoints; for (int i = 0; i < rowCount(); i++) if (!at(i).entered) computedPoints.push_back(i); removeSelectedPoints(computedPoints); setRecalc(oldrec); }
/*! */ void Monofin::setConnections() { // TOOLBAR connect(_actionUndo, SIGNAL(triggered()), this, SLOT(undo())); connect(_actionRedo, SIGNAL(triggered()), this, SLOT(redo())); connect(_actionCreatePolygon, SIGNAL(toggled(bool)), this, SLOT(beginLine(bool))); connect(_actionCleanPolygon, SIGNAL(triggered()), this, SLOT(clean())); connect(_actionAddControl, SIGNAL(toggled(bool)), this, SLOT(activeAddControl(bool))); connect(_actionRemoveControl, SIGNAL(toggled(bool)), this, SLOT(activateRemoveControl(bool))); connect(_actionAddPoint, SIGNAL(toggled(bool)), this, SLOT(activeAddPoint(bool))); connect(_actionRemovePoints, SIGNAL(triggered()), this, SLOT(removeSelectedPoints())); connect(_actionIncreaseWindowSize, SIGNAL(triggered()), this, SLOT(increaseWindowSize())); connect(_actionDecreaseWindowSize, SIGNAL(triggered()), this, SLOT(decreaseWindowSize())); connect(_actionMagnet, SIGNAL(toggled(bool)), this, SLOT(activateMagnet(bool))); connect(_actionSimplifyView, SIGNAL(toggled(bool)), this, SLOT(simplifyView(bool))); connect(_actionAddBackgroundPicture, SIGNAL(triggered()), this, SLOT(addBackgroundPicture())); connect(_actionTransformBackgroundPicture, SIGNAL(toggled(bool)), this, SLOT(activateModifyBackgroundPicture(bool))); connect(_actionTransformBackgroundPicture, SIGNAL(toggled(bool)), this, SLOT(activeModifyBackgroundPicture(bool))); connect(_actionRemoveBackgroundPicture, SIGNAL(triggered()), this, SLOT(removeBackgroundPicture())); //connect(_actionRemoveBackgroundPicture, SIGNAL(triggered()), this, SLOT(removeABackgroundPicture())); connect(_actionSwitchToBlack, SIGNAL(triggered()), this, SLOT(switchToBlack())); connect(_actionSwitchToRed, SIGNAL(triggered()), this, SLOT(switchToRed())); connect(_actionSwitchToWhite, SIGNAL(triggered()), this, SLOT(switchToWhite())); connect(_enlargeBackgroundPictureSize, SIGNAL(triggered()), this, SLOT(zoomInOnBackgroundPicture())); connect(_reduceBackgroundPictureSize, SIGNAL(triggered()), this, SLOT(zoomOutOnBackgroundPicture())); connect(_increaseGridUnitSize, SIGNAL(triggered()), this, SLOT(increaseGridUnitSize())); connect(_decreaseGridUnitSize, SIGNAL(triggered()), this, SLOT(decreaseGridUnitSize())); // SCENE connect(_scene.data(), SIGNAL(lineFinished(bool)), _actionCreatePolygon, SLOT(toggle())); connect(_scene.data(), SIGNAL(lineFinished(bool)), this, SLOT(finishedLine(bool))); connect(_scene.data(), SIGNAL(pointsOnScene(bool)), this, SLOT(finishedLine(bool))); connect(_scene.data(), SIGNAL(somethingChanged(int)), this, SLOT(monofinWasModified())); QMetaObject::connectSlotsByName(this); }