Commit graph

11 commits

Author SHA1 Message Date
Dirk Hohndel
980737221d New Profile: make axis labels smaller
Previously all text in the new profile was deawn in the same font. With
this change the labels on all axes are smaller.
It might be even better to allow per-axis configuration of the label size
as along the time axis the bigger size looked better. But especially for
partial pressures this looks much better.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-15 07:06:09 -08:00
Boris Barbulovski
9b84f82160 DiveTextItem improvements
* Add colorIndex to initialize list.
* Reorder initialize to correct order.

Note: colorIndex initialize value is set too SAC_DEFAULT. I do not know
what is the rigth value since this variable member is not used anywhere.

Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-09 14:42:06 -08:00
Tomaz Canabrava
042c34df09 Fix positioning of many text items.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-29 09:35:16 -08:00
Tomaz Canabrava
9f6ebf96a7 Use the same behavior as the old time markers
This commit adds the same behavior for the old time markers on the new
ones.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-28 11:31:18 -08:00
Tomaz Canabrava
2e2a87e619 Add a MeanDepthItem that has 2 strings.
Dirk's implementation of the MeanDepth item was correct, but in order to
add the 2 strings to it ( one at the begin, one at the end ) I had to put
more stuff inside the ProfileWidget that's already packed with graphics
items.

So I created a new class MeanDepthItem that contains these 2 strings and
will get updated whenever the value changes.

I also fixed a math inconsistency where I changed RIGHT to LEFT.
(wich fixed a few text-placements, and broke others.)

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-22 12:29:41 -08:00
Tomaz Canabrava
caba6500d6 Add the dive computer text.
Added the dive computer text on the bottom left side of the new Profile.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-21 09:38:46 -08:00
Tomaz Canabrava
9d2344d01b Fix the positioning of the Labels using the new DiveTextItem
This uses a combination of items on the canvas which makes it easier to
position it where I want.

This also broke the other texts because I forgot about them. I will
fix that on the next commit.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-19 21:36:55 -08:00
Tomaz Canabrava
72b5bbce6e Remove the plotText function, standardize with the TextItem.
Removed the plotText function and replaced it with the
DiveTextItem class - this way there's just one way to add
text on screen, and it also makes it easy to fix positioning
of stuff there. Which is what I'll try to fix on the next commit.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-19 21:36:08 -08:00
Dirk Hohndel
a27f67c026 Whitespace and coding style updates
Another futile attempt to cleanup the code and make coding style and
whitespace consistent. I tried to add a file that describes the key points
of our coding style. I have no illusions that this will help the least
bit...

This commit should ONLY change whitespace

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-16 11:50:56 +07:00
Tomaz Canabrava
ca07f45561 Added a new Namespace to deal with Animations and related functions.
Since the animation methods are fairly the same for any QGraphicsItem,
I created a new namespace named 'Animations' that should handle all
of the specific Animation Functions there, and the programmer has to
call those functions from the objects. Good thing is that this reduces
boilerplate code.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-16 10:12:29 +07:00
Tomaz Canabrava
408b7dd5e5 Add a class based on QGraphicsSimpleTextItem that handles animations.
This commit adds a class based on QGraphicsSimpleTextItem that
handls animations via animatedHide() animatedMoveTo() and a few
other QPropertyes. This is to be used in conjunction with the
DiveLineItem added in the past commit on the Coordinate Axis.

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