summaryrefslogtreecommitdiffstats
path: root/qt-ui/profile/profilewidget2.h
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/profile/profilewidget2.h')
-rw-r--r--qt-ui/profile/profilewidget2.h44
1 files changed, 31 insertions, 13 deletions
diff --git a/qt-ui/profile/profilewidget2.h b/qt-ui/profile/profilewidget2.h
index e8246980d..9393f4f03 100644
--- a/qt-ui/profile/profilewidget2.h
+++ b/qt-ui/profile/profilewidget2.h
@@ -44,32 +44,50 @@ class AbstractProfilePolygonItem;
class ProfileWidget2 : public QGraphicsView {
Q_OBJECT
public:
- enum State{ EMPTY, PROFILE, EDIT, ADD, PLAN, INVALID };
- enum Items{BACKGROUND, PROFILE_Y_AXIS, GAS_Y_AXIS, TIME_AXIS, DEPTH_CONTROLLER, TIME_CONTROLLER, COLUMNS};
+ enum State {
+ EMPTY,
+ PROFILE,
+ EDIT,
+ ADD,
+ PLAN,
+ INVALID
+ };
+ enum Items {
+ BACKGROUND,
+ PROFILE_Y_AXIS,
+ GAS_Y_AXIS,
+ TIME_AXIS,
+ DEPTH_CONTROLLER,
+ TIME_CONTROLLER,
+ COLUMNS
+ };
ProfileWidget2(QWidget *parent);
- void plotDives(QList<dive*> dives);
- virtual bool eventFilter(QObject*, QEvent*);
- void setupItem( AbstractProfilePolygonItem *item, DiveCartesianAxis *hAxis, DiveCartesianAxis *vAxis, DivePlotDataModel *model, int vData, int hData, int zValue);
+ void plotDives(QList<dive *> dives);
+ virtual bool eventFilter(QObject *, QEvent *);
+ void setupItem(AbstractProfilePolygonItem *item, DiveCartesianAxis *hAxis, DiveCartesianAxis *vAxis, DivePlotDataModel *model, int vData, int hData, int zValue);
-public slots: // Necessary to call from QAction's signals.
+public
+slots: // Necessary to call from QAction's signals.
void settingsChanged();
void setEmptyState();
void setProfileState();
void changeGas();
+
protected:
- virtual void resizeEvent(QResizeEvent* event);
- virtual void wheelEvent(QWheelEvent* event);
- virtual void mouseMoveEvent(QMouseEvent* event);
- virtual void contextMenuEvent(QContextMenuEvent* event);
+ virtual void resizeEvent(QResizeEvent *event);
+ virtual void wheelEvent(QWheelEvent *event);
+ virtual void mouseMoveEvent(QMouseEvent *event);
+ virtual void contextMenuEvent(QContextMenuEvent *event);
private: /*methods*/
void fixBackgroundPos();
- void scrollViewTo(const QPoint& pos);
+ void scrollViewTo(const QPoint &pos);
void setupSceneAndFlags();
void setupItemSizes();
void addItemsToScene();
void setupItemOnScene();
+
private:
DivePlotDataModel *dataModel;
State currentState;
@@ -92,10 +110,10 @@ private:
DiveCartesianAxis *cylinderPressureAxis;
DiveGasPressureItem *gasPressureItem;
MeanDepthLine *meanDepth;
- QList<DiveEventItem*> eventItems;
+ QList<DiveEventItem *> eventItems;
DiveTextItem *diveComputerText;
DiveCalculatedCeiling *diveCeiling;
- QList<DiveCalculatedTissue*> allTissues;
+ QList<DiveCalculatedTissue *> allTissues;
DiveReportedCeiling *reportedCeiling;
PartialPressureGasItem *pn2GasItem;
PartialPressureGasItem *pheGasItem;