Commit graph

9 commits

Author SHA1 Message Date
Tomaz Canabrava
5bba84e57f Fix colors on the new profile.
This patch fixes the colors on the new profile, the init of the colors map
was not being done. This fixes it.

A few problems were spotted on the new profile dealing with the ruler
graph and a newly added dive, when using the dive add dialog.

I'll be on it later.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-07 20:37:17 -08:00
Dirk Hohndel
76e6420f6b Massive automated whitespace cleanup
I know everyone will hate it.
Go ahead. Complain. Call me names.
At least now things are consistent and reproducible.
If you want changes, have your complaint come with a patch to
scripts/whitespace.pl so that we can automate it.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-27 20:09:57 -08:00
Dirk Hohndel
b5a02e50aa New profile: create new class for DiveHeartrateItem
This allows us to give it a different color (red) and make it a smaller
size.

While implementing this I also fixed the size of the temperature text in
the new profile.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-23 15:28:31 -08:00
Boris Barbulovski
ccb1c33d02 Put include guard to every header
* ensure include guard to every header
* comment endif guard block

Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-11 12:37:01 -08:00
Tomaz Canabrava
fcc17c717d Move the 'getSacColor' out of old profile and use it.
This patch makes the color of the cylinder pressure use the sac colors.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-27 13:00:29 -08:00
Tomaz Canabrava
35979537d9 Plot the Temperature Text.
I Moved the 'plot text' method of the Old Graphics to the new
layout - this one was mostly unchanged as it was already good
as is.

And used the TemperatureProfileItem to also display texts.
This was the first implementation of the new system that uses
*less* code than the original one, wich makes me happy.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-17 14:04:47 -08:00
Tomaz Canabrava
7d5cf32501 Added a Model that should handle the Dive Profile
This model encapsulates the plot_info struct and provides
a consistent way to show it using the Qt Model view system
in the C++ and QML way. For a QGraphicsItem that should show
a Profile, this is the start.

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
493f366765 Use the same line dimensions as the profile, on the planner.
The Planner should be 'almost' like the profile, with the possibility
to use the mouse and keyboard to input a new plan, so this is a bit
of 'getting there.' I don't like too much code duplication but since
the current Profile Graphics is a crude cut-and-paste from the old
Cairo backend, it's easyer to start from scratch and have it well
organized as Qt code.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-09-16 19:21:13 -03:00
Tomaz Canabrava
2df0b398f3 Added 2 new files to handle the common stuff for graphics.
Added 2 new files, graphicsview-common.h/cpp, that should have
the common stuff shared between the dive profile viewer and
the dive planner. the amount of duplicated code would be huge
if we go the road of two different classes for each one, but
since the planner took a more 'Qtish' way of behavior, in
comparisson to the profile - that's most a Cairo-To-Qt literal
translation, we cant easily merge the code without a complete
( and unwanted ) reestruturation of the profile code, thus,
this new files will serve as a bridge between them. Initially
I put there only the colors - since that's wat most easilyy
shareable.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-07-02 10:08:16 -03:00