Commit graph

9 commits

Author SHA1 Message Date
Tomaz Canabrava
74cb7d6b2a Aparrently there's no need for a showEvent here.
Just removed some code that I tougth to use, but it looks
like it's just a waste of lines.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-16 10:12:30 +07:00
Tomaz Canabrava
ff49cb1929 Fix the size of the scene on screen and Background improvements.
It seems that I forgot to add the background pixmap, but this is being
done right now by luisa. This patch fixes the size of the scene by
scaling everything to the size of the viewport as soon as a resize is
done, and it also fixes the size of the - to be included - background
pixmap.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-16 10:12:30 +07:00
Tomaz Canabrava
816f6db356 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>
2014-01-16 10:12:30 +07:00
Tomaz Canabrava
0703706600 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>
2014-01-16 10:12:30 +07:00
Tomaz Canabrava
02e3021333 Started the work on the States for the Profile.
This is a start of the work on the States for the Profile.  All setup is
done, all connections are done.  Maybe there's something missing because I
never worked with QStateMachine before, but it seems to work correctly.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-16 10:12:30 +07:00
Tomaz Canabrava
cdb447434d Added the flag to ignore item transformations on the background.
The background should be a Pixmap and thus it cannot zoom in or
out; this keeps it the same size always, the full height of the
scene.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-16 10:12:30 +07:00
Tomaz Canabrava
93d464fcb7 Setup the default icon sizes and locations.
Setup the default item sizes and locations inside of the QGraphicsScene.
Also added every item to the scene so that it's correctly displayed on
screen.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-16 10:12:30 +07:00
Tomaz Canabrava
b50ae87007 Initializing the new Profile Class.
Beginning of the code for the constructor, just constructing
some of the items and preparing for the State Machine to come.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-16 10:12:30 +07:00
Tomaz Canabrava
946e3855b2 Add the skeleton for the New Profile System.
The idea of this widget is to display and edit the profile.

It has:
 1 - ToolTip / Legend item, displays every information of the current
     mouse position on it, plus the legend for the maps.
 2 - ToolBox, displays the QActions that are used to do special stuff
     on the profile ( like activating the plugins. )
 3 - Cartesian Axis for depth ( y )
 4 - Cartesian Axis for Gases ( y )
 5 - Cartesian Axis for Time  ( x )

It needs to be dynamic, things should *flow* on it, not just appear / disappear.
It's the last attempt to create a QGraphicsView based Profile System,
as the next will most probably be written in QML.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-16 09:45:42 +07:00