mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Added the Cylinder Pressure Axis
The cylinder pressure axis is the 'Y' axis for the Cylinder plot. I positioned it in around 20% to 60% of the screen state. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
e23841dd7f
commit
e3ec5ef290
2 changed files with 13 additions and 1 deletions
|
@ -33,6 +33,7 @@ ProfileWidget2::ProfileWidget2(QWidget *parent) :
|
|||
depthController(new DiveRectItem()),
|
||||
timeController(new DiveRectItem()),
|
||||
diveProfileItem(NULL),
|
||||
cylinderPressureAxis(new DiveCartesianAxis()),
|
||||
temperatureItem(NULL),
|
||||
cartesianPlane(new DiveCartesianPlane())
|
||||
{
|
||||
|
@ -69,6 +70,12 @@ ProfileWidget2::ProfileWidget2(QWidget *parent) :
|
|||
temperatureAxis->setTickSize(2);
|
||||
temperatureAxis->setTickInterval(300);
|
||||
|
||||
cylinderPressureAxis->setOrientation(DiveCartesianAxis::TopToBottom);
|
||||
cylinderPressureAxis->setLine(0,20,0,60);
|
||||
cylinderPressureAxis->setX(3);
|
||||
cylinderPressureAxis->setTickSize(2);
|
||||
cylinderPressureAxis->setTickInterval(30000);
|
||||
|
||||
timeAxis->setLine(0,0,96,0);
|
||||
timeAxis->setX(3);
|
||||
timeAxis->setTickSize(1);
|
||||
|
@ -82,7 +89,7 @@ ProfileWidget2::ProfileWidget2(QWidget *parent) :
|
|||
|
||||
// insert in the same way it's declared on the Enum. This is needed so we don't use an map.
|
||||
QList<QGraphicsItem*> stateItems; stateItems << background << profileYAxis << gasYAxis <<
|
||||
timeAxis << depthController << timeController << temperatureAxis;
|
||||
timeAxis << depthController << timeController << temperatureAxis << cylinderPressureAxis;
|
||||
Q_FOREACH(QGraphicsItem *item, stateItems) {
|
||||
scene()->addItem(item);
|
||||
}
|
||||
|
@ -282,6 +289,10 @@ void ProfileWidget2::plotDives(QList<dive*> dives)
|
|||
//temperatureAxis->updateTicks();
|
||||
timeAxis->setMaximum(maxtime);
|
||||
timeAxis->updateTicks();
|
||||
cylinderPressureAxis->setMinimum(pInfo.minpressure);
|
||||
cylinderPressureAxis->setMaximum(pInfo.maxpressure);
|
||||
cylinderPressureAxis->updateTicks();
|
||||
|
||||
dataModel->setDive(current_dive, pInfo);
|
||||
|
||||
if (diveProfileItem) {
|
||||
|
|
|
@ -75,6 +75,7 @@ private:
|
|||
DiveProfileItem *diveProfileItem;
|
||||
DiveCartesianPlane *cartesianPlane;
|
||||
DiveTemperatureItem *temperatureItem;
|
||||
DiveCartesianAxis *cylinderPressureAxis;
|
||||
QList<DiveEventItem*> eventItems;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue