mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Added all the state transitions for each state.
This code adds all state transitions for the items on screen; they do not animate yet, but already move to the correct location (the location seems wrong on the screen, because I'v not correctly zoomed out the canvas yet). Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
0703706600
commit
816f6db356
1 changed files with 50 additions and 0 deletions
|
@ -126,6 +126,56 @@ ProfileWidget2::ProfileWidget2(QWidget *parent) :
|
|||
const QLineF profileYAxisExpanded = QLineF(0,0,0,timeAxisOnCanvas);
|
||||
const QLineF timeAxisLine = QLineF(0, 0, 96, 0);
|
||||
|
||||
// State Defaults:
|
||||
// Empty State, everything but the background is hidden.
|
||||
emptyState->assignProperty(this, "backgroundBrush", QBrush(Qt::white));
|
||||
emptyState->assignProperty(background, "y", backgroundOnCanvas);
|
||||
emptyState->assignProperty(profileYAxis, "x", profileYAxisOffCanvas);
|
||||
emptyState->assignProperty(gasYAxis, "x", gasYAxisOffCanvas);
|
||||
emptyState->assignProperty(timeAxis, "y", timeAxisOffCanvas);
|
||||
emptyState->assignProperty(depthController, "y", depthControllerOffCanvas);
|
||||
emptyState->assignProperty(timeController, "y", timeControllerOffCanvas);
|
||||
|
||||
// Profile, everything but the background, depthController and timeController are shown.
|
||||
profileState->assignProperty(this, "backgroundBrush", getColor(::BACKGROUND));
|
||||
profileState->assignProperty(background, "y", backgroundOffCanvas);
|
||||
profileState->assignProperty(profileYAxis, "x", profileYAxisOnCanvas);
|
||||
profileState->assignProperty(profileYAxis, "line", profileYAxisExpanded);
|
||||
profileState->assignProperty(gasYAxis, "x", 0);
|
||||
profileState->assignProperty(timeAxis, "y", timeAxisOnCanvas);
|
||||
profileState->assignProperty(depthController, "y", depthControllerOffCanvas);
|
||||
profileState->assignProperty(timeController, "y", timeControllerOffCanvas);
|
||||
|
||||
// Edit, everything but the background and gasYAxis are shown.
|
||||
editState->assignProperty(this, "backgroundBrush", QBrush(Qt::darkGray));
|
||||
editState->assignProperty(background, "y", backgroundOffCanvas);
|
||||
editState->assignProperty(profileYAxis, "x", profileYAxisOnCanvas);
|
||||
editState->assignProperty(profileYAxis, "line", profileYAxisExpanded);
|
||||
editState->assignProperty(gasYAxis, "x", gasYAxisOffCanvas);
|
||||
editState->assignProperty(timeAxis, "y", timeAxisEditMode);
|
||||
editState->assignProperty(depthController, "y", depthControllerOnCanvas);
|
||||
editState->assignProperty(timeController, "y", timeControllerOnCanvas);
|
||||
|
||||
// Add, everything but the background and gasYAxis are shown.
|
||||
addState->assignProperty(this, "backgroundBrush", QBrush(Qt::darkGray));
|
||||
addState->assignProperty(background, "y", backgroundOffCanvas);
|
||||
addState->assignProperty(profileYAxis, "x", profileYAxisOnCanvas);
|
||||
addState->assignProperty(profileYAxis, "rect", profileYAxisExpanded);
|
||||
addState->assignProperty(gasYAxis, "x", gasYAxisOffCanvas);
|
||||
addState->assignProperty(timeAxis, "y", timeAxisEditMode);
|
||||
addState->assignProperty(depthController, "y", depthControllerOnCanvas);
|
||||
addState->assignProperty(timeController, "y", timeControllerOnCanvas);
|
||||
|
||||
// Plan, everything but the background and gasYAxis are shown.
|
||||
planState->assignProperty(this, "backgroundBrush", QBrush(Qt::darkGray));
|
||||
planState->assignProperty(background, "y", backgroundOffCanvas);
|
||||
planState->assignProperty(profileYAxis, "x", profileYAxisOnCanvas);
|
||||
planState->assignProperty(profileYAxis, "line", profileYAxisExpanded);
|
||||
planState->assignProperty(gasYAxis, "x", gasYAxisOffCanvas);
|
||||
planState->assignProperty(timeAxis, "y", timeAxisEditMode);
|
||||
planState->assignProperty(depthController, "y", depthControllerOnCanvas);
|
||||
planState->assignProperty(timeController, "y", timeControllerOnCanvas);
|
||||
|
||||
}
|
||||
|
||||
// Currently just one dive, but the plan is to enable All of the selected dives.
|
||||
|
|
Loading…
Add table
Reference in a new issue