mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
02e3021333
commit
0703706600
1 changed files with 18 additions and 0 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Reference in a new issue