mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Remove the depth / time increase and decrease functions.
The new profile code handles the resizing of the profile area in order to accomodate the depth and time of the dive much more intuitively - the old manual buttons to do so are no longer needed. This also removes a few other unused methods. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
f67693b2e0
commit
93f35971c6
2 changed files with 0 additions and 88 deletions
|
|
@ -122,10 +122,6 @@ DivePlannerGraphics::DivePlannerGraphics(QWidget *parent) : QGraphicsView(parent
|
||||||
setRenderHint(QPainter::Antialiasing);
|
setRenderHint(QPainter::Antialiasing);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DivePlannerGraphics::settingsChanged()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void DivePlannerGraphics::keyDownAction()
|
void DivePlannerGraphics::keyDownAction()
|
||||||
{
|
{
|
||||||
#if 0
|
#if 0
|
||||||
|
|
@ -266,70 +262,6 @@ void DivePlannerGraphics::keyEscAction()
|
||||||
plannerModel->cancelPlan();
|
plannerModel->cancelPlan();
|
||||||
}
|
}
|
||||||
|
|
||||||
qreal DivePlannerGraphics::fromPercent(qreal percent, Qt::Orientation orientation)
|
|
||||||
{
|
|
||||||
qreal total = orientation == Qt::Horizontal ? sceneRect().width() : sceneRect().height();
|
|
||||||
qreal result = (total * percent) / 100;
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
void DivePlannerGraphics::increaseDepth()
|
|
||||||
{
|
|
||||||
#if 0
|
|
||||||
if (depthLine->maximum() + M_OR_FT(10, 30) > MAX_DEPTH)
|
|
||||||
return;
|
|
||||||
minDepth += M_OR_FT(10, 30);
|
|
||||||
depthLine->setMaximum(minDepth);
|
|
||||||
depthLine->updateTicks();
|
|
||||||
drawProfile();
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
void DivePlannerGraphics::increaseTime()
|
|
||||||
{
|
|
||||||
#if 0
|
|
||||||
minMinutes += 10;
|
|
||||||
timeLine->setMaximum(minMinutes);
|
|
||||||
timeLine->updateTicks();
|
|
||||||
drawProfile();
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
void DivePlannerGraphics::decreaseDepth()
|
|
||||||
{
|
|
||||||
#if 0
|
|
||||||
if (depthLine->maximum() - M_OR_FT(10, 30) < MIN_DEPTH)
|
|
||||||
return;
|
|
||||||
|
|
||||||
Q_FOREACH (DiveHandler *d, handles) {
|
|
||||||
if (depthLine->valueAt(d->pos()) > depthLine->maximum() - M_OR_FT(10, 30)) {
|
|
||||||
QMessageBox::warning(MainWindow::instance(),
|
|
||||||
tr("Handler Position Error"),
|
|
||||||
tr("One or more of your stops will be lost with this operations, \n"
|
|
||||||
"Please, remove them first."));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
minDepth -= M_OR_FT(10, 30);
|
|
||||||
depthLine->setMaximum(minDepth);
|
|
||||||
depthLine->updateTicks();
|
|
||||||
drawProfile();
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
void DivePlannerGraphics::decreaseTime()
|
|
||||||
{
|
|
||||||
#if 0
|
|
||||||
if (timeLine->maximum() - 10 < TIME_INITIAL_MAX || timeLine->maximum() - 10 < dpMaxTime)
|
|
||||||
return;
|
|
||||||
|
|
||||||
minMinutes -= 10;
|
|
||||||
timeLine->setMaximum(timeLine->maximum() - 10);
|
|
||||||
timeLine->updateTicks();
|
|
||||||
drawProfile();
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
void DivePlannerPointsModel::createSimpleDive()
|
void DivePlannerPointsModel::createSimpleDive()
|
||||||
{
|
{
|
||||||
// plannerModel->addStop(0, 0, O2_IN_AIR, 0, 0);
|
// plannerModel->addStop(0, 0, O2_IN_AIR, 0, 0);
|
||||||
|
|
@ -418,18 +350,6 @@ void DivePlannerGraphics::drawProfile()
|
||||||
plannerModel->deleteTemporaryPlan();
|
plannerModel->deleteTemporaryPlan();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DivePlannerGraphics::resizeEvent(QResizeEvent *event)
|
|
||||||
{
|
|
||||||
QGraphicsView::resizeEvent(event);
|
|
||||||
fitInView(sceneRect(), Qt::IgnoreAspectRatio);
|
|
||||||
}
|
|
||||||
|
|
||||||
void DivePlannerGraphics::showEvent(QShowEvent *event)
|
|
||||||
{
|
|
||||||
QGraphicsView::showEvent(event);
|
|
||||||
fitInView(sceneRect(), Qt::IgnoreAspectRatio);
|
|
||||||
}
|
|
||||||
|
|
||||||
DiveHandler::DiveHandler() : QGraphicsEllipseItem()
|
DiveHandler::DiveHandler() : QGraphicsEllipseItem()
|
||||||
{
|
{
|
||||||
setRect(-5, -5, 10, 10);
|
setRect(-5, -5, 10, 10);
|
||||||
|
|
|
||||||
|
|
@ -160,9 +160,6 @@ protected:
|
||||||
virtual void showEvent(QShowEvent *event);
|
virtual void showEvent(QShowEvent *event);
|
||||||
virtual void resizeEvent(QResizeEvent *event);
|
virtual void resizeEvent(QResizeEvent *event);
|
||||||
qreal fromPercent(qreal percent, Qt::Orientation orientation);
|
qreal fromPercent(qreal percent, Qt::Orientation orientation);
|
||||||
public
|
|
||||||
slots:
|
|
||||||
void settingsChanged();
|
|
||||||
private
|
private
|
||||||
slots:
|
slots:
|
||||||
void keyEscAction();
|
void keyEscAction();
|
||||||
|
|
@ -171,11 +168,6 @@ slots:
|
||||||
void keyDownAction();
|
void keyDownAction();
|
||||||
void keyLeftAction();
|
void keyLeftAction();
|
||||||
void keyRightAction();
|
void keyRightAction();
|
||||||
void increaseTime();
|
|
||||||
void increaseDepth();
|
|
||||||
void decreaseTime();
|
|
||||||
void decreaseDepth();
|
|
||||||
void drawProfile();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void moveActiveHandler(const QPointF &MappedPos, const int pos);
|
void moveActiveHandler(const QPointF &MappedPos, const int pos);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue