diff options
author | Tomaz Canabrava <tcanabrava@kde.org> | 2014-01-15 12:36:09 -0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-01-16 10:12:30 +0700 |
commit | 07037066006af9704b33e960322aaaab98f22eef (patch) | |
tree | d003a09bf0cc13e032e30e975e9d015069024cf2 /qt-ui/profile | |
parent | 02e302133358687b7f50127a053ae9e315bbeba5 (diff) | |
download | subsurface-07037066006af9704b33e960322aaaab98f22eef.tar.gz |
Added Constants to the code, to ease the setup of the transitions.
Those constants will be used later on to setup all transitions of
the Graphics Items on the canvas. They are the correct positions
of each item inside and outside of the scene, in a way that the
state machine can animate them smootly.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profile')
-rw-r--r-- | qt-ui/profile/profilewidget2.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp index 21caef50b..c25e3925b 100644 --- a/qt-ui/profile/profilewidget2.cpp +++ b/qt-ui/profile/profilewidget2.cpp @@ -108,6 +108,24 @@ ProfileWidget2::ProfileWidget2(QWidget *parent) : QSignalTransition *tEditToPlan = editState->addTransition(this, SIGNAL(startPlanState()), planState); QSignalTransition *tEditToProfile = editState->addTransition(this, SIGNAL(startProfileState()), profileState); QSignalTransition *tEditToAdd = editState->addTransition(this, SIGNAL(startAddState()), addState); + + // Constants: + const int backgroundOnCanvas = 0; + const int backgroundOffCanvas = 110; + const int profileYAxisOnCanvas = 3; + const int profileYAxisOffCanvas = profileYAxis->boundingRect().width() - 10; + const int gasYAxisOnCanvas = gasYAxis->boundingRect().width(); + const int depthControllerOnCanvas = sceneRect().height() - depthController->boundingRect().height(); + const int timeControllerOnCanvas = sceneRect().height() - timeController->boundingRect().height(); + const int gasYAxisOffCanvas = gasYAxis->boundingRect().width() - 10; + const int timeAxisOnCanvas = sceneRect().height() - timeAxis->boundingRect().height() - 4; + const int timeAxisOffCanvas = sceneRect().height() + timeAxis->boundingRect().height(); + const int timeAxisEditMode = sceneRect().height() - timeAxis->boundingRect().height() - depthController->boundingRect().height(); + const int depthControllerOffCanvas = sceneRect().height() + depthController->boundingRect().height(); + const int timeControllerOffCanvas = sceneRect().height() + timeController->boundingRect().height(); + const QLineF profileYAxisExpanded = QLineF(0,0,0,timeAxisOnCanvas); + const QLineF timeAxisLine = QLineF(0, 0, 96, 0); + } // Currently just one dive, but the plan is to enable All of the selected dives. |