summaryrefslogtreecommitdiffstats
path: root/qt-ui/profile/profilewidget2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/profile/profilewidget2.cpp')
-rw-r--r--qt-ui/profile/profilewidget2.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp
index 6fc5dd565..34b87ad78 100644
--- a/qt-ui/profile/profilewidget2.cpp
+++ b/qt-ui/profile/profilewidget2.cpp
@@ -7,7 +7,7 @@
#include "helpers.h"
#include "profile.h"
#include "diveeventitem.h"
-
+#include "divetextitem.h"
#include <QStateMachine>
#include <QSignalTransition>
#include <QPropertyAnimation>
@@ -37,7 +37,8 @@ ProfileWidget2::ProfileWidget2(QWidget *parent) :
temperatureItem(NULL),
gasPressureItem(NULL),
cartesianPlane(new DiveCartesianPlane()),
- meanDepth(new DiveLineItem())
+ meanDepth(new DiveLineItem()),
+ diveComputerText(new DiveTextItem())
{
setScene(new QGraphicsScene());
scene()->setSceneRect(0, 0, 100, 100);
@@ -92,10 +93,13 @@ ProfileWidget2::ProfileWidget2(QWidget *parent) :
cartesianPlane->setLeftAxis(profileYAxis);
scene()->addItem(cartesianPlane);
+ diveComputerText->setAlignment(Qt::AlignLeft | Qt::AlignTop);
+ diveComputerText->setBrush(getColor(TIME_TEXT));
+
// 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 << cylinderPressureAxis <<
+ temperatureAxis << cylinderPressureAxis << diveComputerText <<
meanDepth;
Q_FOREACH(QGraphicsItem *item, stateItems) {
scene()->addItem(item);
@@ -354,6 +358,9 @@ void ProfileWidget2::plotDives(QList<dive*> dives)
gasPressureItem->setHorizontalDataColumn(DivePlotDataModel::TIME);
scene()->addItem(gasPressureItem);
+ diveComputerText->setText(currentdc->model);
+ diveComputerText->setPos(1 , sceneRect().height());
+
emit startProfileState();
}