summaryrefslogtreecommitdiffstats
path: root/qt-ui/profile/divecartesianaxis.cpp
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2014-02-15 21:46:14 -0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-02-15 17:16:02 -0800
commitfc55b2abfea6079c730688566bd2452e903cec30 (patch)
treefa2405efdfb1b768c5ad23189c9124eecdec76e2 /qt-ui/profile/divecartesianaxis.cpp
parent87d528992052ccc6204a25642b503a15ab45f9f9 (diff)
downloadsubsurface-fc55b2abfea6079c730688566bd2452e903cec30.tar.gz
Remove the class 'CartesianPlane'
This class was pratically a re-do of the axis, I'll do the axis to plot the lines when it feels like it. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profile/divecartesianaxis.cpp')
-rw-r--r--qt-ui/profile/divecartesianaxis.cpp85
1 files changed, 0 insertions, 85 deletions
diff --git a/qt-ui/profile/divecartesianaxis.cpp b/qt-ui/profile/divecartesianaxis.cpp
index cc8901dc5..dbcd82306 100644
--- a/qt-ui/profile/divecartesianaxis.cpp
+++ b/qt-ui/profile/divecartesianaxis.cpp
@@ -347,91 +347,6 @@ QString TemperatureAxis::textForValue(double value)
return QString::number(mkelvin_to_C( (int) value));
}
-
-void DiveCartesianPlane::setLeftAxis(DiveCartesianAxis* axis)
-{
- leftAxis = axis;
- connect(leftAxis, SIGNAL(maxChanged()), this, SLOT(setup()));
- if (bottomAxis)
- setup();
-}
-
-void DiveCartesianPlane::setBottomAxis(DiveCartesianAxis* axis)
-{
- bottomAxis = axis;
- connect(bottomAxis, SIGNAL(maxChanged()), this, SLOT(setup()));
- if (leftAxis)
- setup();
-}
-
-QLineF DiveCartesianPlane::horizontalLine() const
-{
- return (bottomAxis) ? bottomAxis->line() : QLineF();
-}
-
-void DiveCartesianPlane::setHorizontalLine(QLineF line)
-{
- if (IS_FP_SAME(horizontalSize, line.length()))
- return;
- horizontalSize = line.length();
- setup();
-}
-
-void DiveCartesianPlane::setVerticalLine(QLineF line)
-{
- if (IS_FP_SAME(verticalSize, line.length()))
- return;
- verticalSize = line.length();
- setup();
-}
-
-QLineF DiveCartesianPlane::verticalLine() const
-{
- return (leftAxis) ? leftAxis->line() : QLineF();
-}
-
-void DiveCartesianPlane::setup()
-{
- if (!leftAxis || !bottomAxis || !scene())
- return;
-
- setPen(gridPen());
-// This creates a Grid around the axis, creating the cartesian plane.
- const int top = leftAxis->posAtValue(leftAxis->minimum());
- // unused for now:
- // const int bottom = leftAxis->posAtValue(leftAxis->maximum());
- const int left = bottomAxis->posAtValue(bottomAxis->minimum());
- // unused for now:
- // const int right = bottomAxis->posAtValue(bottomAxis->maximum());
-
- setRect(0, 0, horizontalSize, verticalSize);
- setPos(left, top);
-
- qDeleteAll(horizontalLines);
- qDeleteAll(verticalLines);
- horizontalLines.clear();
- verticalLines.clear();
-
- // DEPTH is M_OR_FEET(10,30), Minutes are 600, per line.
- for (int i = leftAxis->minimum(), max = leftAxis->maximum(); i < max; i += M_OR_FT(10,30)) {
- DiveLineItem *line = new DiveLineItem(this);
- line->setLine(0, 0, horizontalSize, 0);
- line->setPos(0,leftAxis->posAtValue(i)-top);
- line->setZValue(-1);
- line->setPen(gridPen());
- horizontalLines.push_back(line);
- }
-
- for (int i = bottomAxis->minimum(), max = bottomAxis->maximum(); i < max; i += 600) { // increments by 10 minutes.
- DiveLineItem *line = new DiveLineItem(this);
- line->setLine(0, 0, 0, verticalSize);
- line->setPos(bottomAxis->posAtValue(i)-left, 0);
- line->setZValue(-1);
- line->setPen(gridPen());
- verticalLines.push_back(line);
- }
-}
-
PartialGasPressureAxis::PartialGasPressureAxis()
{
connect(PreferencesDialog::instance(), SIGNAL(settingsChanged()), this, SLOT(preferencesChanged()));