diff options
author | Tomaz Canabrava <tcanabrava@kde.org> | 2014-02-07 14:14:36 -0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-02-08 07:14:50 -0800 |
commit | 6de9b329d16275573d2e8f2ea6e712c626553dad (patch) | |
tree | 83f45403f14ecab13bebf5f401149e3e21e296c1 /qt-ui/profile/profilewidget2.h | |
parent | 361f8ede76f451a383550387e29f63173149c887 (diff) | |
download | subsurface-6de9b329d16275573d2e8f2ea6e712c626553dad.tar.gz |
Huge code cleanup.
This patch starts the cleanup that will take a few iterations to finish.
The current profile code uses QStateMachine, and it's much too verbose
for something we can do with less than a third of its lines of code.
I also added on the beginning of the redesign of the profile code for
planner, edit and a few other things that are going to be ported to
the new profile in the future, but not currently - I just lack the time
to make that work for the next release.
This commit basically:
- moves all 'new' calls to the initializer-list
- create a new 'setupItem' private method to concentrate the calls
that any item will do
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profile/profilewidget2.h')
-rw-r--r-- | qt-ui/profile/profilewidget2.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/qt-ui/profile/profilewidget2.h b/qt-ui/profile/profilewidget2.h index 631a80574..237fc21b5 100644 --- a/qt-ui/profile/profilewidget2.h +++ b/qt-ui/profile/profilewidget2.h @@ -40,6 +40,7 @@ struct DiveReportedCeiling; struct DiveCalculatedTissue; struct PartialPressureGasItem; struct PartialGasPressureAxis; +struct AbstractProfilePolygonItem; class ProfileWidget2 : public QGraphicsView { Q_OBJECT @@ -52,6 +53,7 @@ public: 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); public slots: // Necessary to call from QAction's signals. void settingsChanged(); |