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>
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>
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>
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 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>
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>
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>
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>
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>