Converted the Colors.h code to Qt

The colors on colors.h were done to fill a special
struct by Subsurface - I removed that structure and
replaced the code that generated the map of colors
to a QMap. I know that this changes are not very
'welcomed', but C++ has issues on creating & initializing
complex static members, this was the best way that I could
think of.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
This commit is contained in:
Tomaz Canabrava 2013-05-04 16:41:49 -03:00
parent 243016633d
commit a58412cb31
3 changed files with 125 additions and 122 deletions

80
color.h
View file

@ -4,54 +4,56 @@
/* The colors are named by picking the closest match
from http://chir.ag/projects/name-that-color */
#include <QColor>
// Greens
#define CAMARONE1 { 0.0, 0.4, 0.0, 1 }
#define FUNGREEN1 { 0.0, 0.4, 0.2, 1 }
#define FUNGREEN1_HIGH_TRANS { 0.0, 0.4, 0.2, 0.25 }
#define KILLARNEY1 { 0.2, 0.4, 0.2, 1 }
#define APPLE1 { 0.2, 0.6, 0.2, 1 }
#define APPLE1_MED_TRANS { 0.2, 0.6, 0.2, 0.5 }
#define APPLE1_HIGH_TRANS { 0.2, 0.6, 0.2, 0.25 }
#define LIMENADE1 { 0.4, 0.8, 0.0, 1 }
#define ATLANTIS1 { 0.4, 0.8, 0.2, 1 }
#define ATLANTIS2 { 0.6, 0.8, 0.2, 1 }
#define RIOGRANDE1 { 0.8, 0.8, 0.0, 1 }
#define EARLSGREEN1 { 0.8, 0.8, 0.2, 1 }
#define FORESTGREEN1 { 0.1, 0.5, 0.1, 1 }
#define CAMARONE1 QColor::fromRgbF( 0.0, 0.4, 0.0, 1 )
#define FUNGREEN1 QColor::fromRgbF( 0.0, 0.4, 0.2, 1 )
#define FUNGREEN1_HIGH_TRANS QColor::fromRgbF( 0.0, 0.4, 0.2, 0.25 )
#define KILLARNEY1 QColor::fromRgbF( 0.2, 0.4, 0.2, 1 )
#define APPLE1 QColor::fromRgbF( 0.2, 0.6, 0.2, 1 )
#define APPLE1_MED_TRANS QColor::fromRgbF( 0.2, 0.6, 0.2, 0.5 )
#define APPLE1_HIGH_TRANS QColor::fromRgbF( 0.2, 0.6, 0.2, 0.25 )
#define LIMENADE1 QColor::fromRgbF( 0.4, 0.8, 0.0, 1 )
#define ATLANTIS1 QColor::fromRgbF( 0.4, 0.8, 0.2, 1 )
#define ATLANTIS2 QColor::fromRgbF( 0.6, 0.8, 0.2, 1 )
#define RIOGRANDE1 QColor::fromRgbF( 0.8, 0.8, 0.0, 1 )
#define EARLSGREEN1 QColor::fromRgbF( 0.8, 0.8, 0.2, 1 )
#define FORESTGREEN1 QColor::fromRgbF( 0.1, 0.5, 0.1, 1 )
// Reds
#define PERSIANRED1 { 0.8, 0.2, 0.2, 1 }
#define TUSCANY1 { 0.8, 0.4, 0.2, 1 }
#define PIRATEGOLD1 { 0.8, 0.5, 0.0, 1 }
#define HOKEYPOKEY1 { 0.8, 0.6, 0.2, 1 }
#define CINNABAR1 { 0.9, 0.3, 0.2, 1 }
#define REDORANGE1 { 1.0, 0.2, 0.2, 1 }
#define REDORANGE1_HIGH_TRANS { 1.0, 0.2, 0.2, 0.25 }
#define REDORANGE1_MED_TRANS { 1.0, 0.2, 0.2, 0.5 }
#define RED1_MED_TRANS { 1.0, 0.0, 0.0, 0.5 }
#define RED1 { 1.0, 0.0, 0.0, 1 }
#define PERSIANRED1 QColor::fromRgbF( 0.8, 0.2, 0.2, 1 )
#define TUSCANY1 QColor::fromRgbF( 0.8, 0.4, 0.2, 1 )
#define PIRATEGOLD1 QColor::fromRgbF( 0.8, 0.5, 0.0, 1 )
#define HOKEYPOKEY1 QColor::fromRgbF( 0.8, 0.6, 0.2, 1 )
#define CINNABAR1 QColor::fromRgbF( 0.9, 0.3, 0.2, 1 )
#define REDORANGE1 QColor::fromRgbF( 1.0, 0.2, 0.2, 1 )
#define REDORANGE1_HIGH_TRANS QColor::fromRgbF( 1.0, 0.2, 0.2, 0.25 )
#define REDORANGE1_MED_TRANS QColor::fromRgbF( 1.0, 0.2, 0.2, 0.5 )
#define RED1_MED_TRANS QColor::fromRgbF( 1.0, 0.0, 0.0, 0.5 )
#define RED1 QColor::fromRgbF( 1.0, 0.0, 0.0, 1 )
// Monochromes
#define BLACK1_LOW_TRANS { 0.0, 0.0, 0.0, 0.75 }
#define BLACK1_HIGH_TRANS { 0.0, 0.0, 0.0, 0.25 }
#define TUNDORA1_MED_TRANS { 0.3, 0.3, 0.3, 0.5 }
#define MERCURY1_MED_TRANS { 0.9, 0.9, 0.9, 0.5 }
#define CONCRETE1_LOWER_TRANS { 0.95, 0.95, 0.95, 0.9 }
#define WHITE1_MED_TRANS { 1.0, 1.0, 1.0, 0.5 }
#define WHITE1 { 1.0, 1.0, 1.0, 1 }
#define BLACK1_LOW_TRANS QColor::fromRgbF( 0.0, 0.0, 0.0, 0.75 )
#define BLACK1_HIGH_TRANS QColor::fromRgbF( 0.0, 0.0, 0.0, 0.25 )
#define TUNDORA1_MED_TRANS QColor::fromRgbF( 0.3, 0.3, 0.3, 0.5 )
#define MERCURY1_MED_TRANS QColor::fromRgbF( 0.9, 0.9, 0.9, 0.5 )
#define CONCRETE1_LOWER_TRANS QColor::fromRgbF( 0.95, 0.95, 0.95, 0.9 )
#define WHITE1_MED_TRANS QColor::fromRgbF( 1.0, 1.0, 1.0, 0.5 )
#define WHITE1 QColor::fromRgbF( 1.0, 1.0, 1.0, 1 )
// Blues
#define GOVERNORBAY2 { 0.2, 0.2, 0.7, 1 }
#define GOVERNORBAY1_MED_TRANS { 0.2, 0.2, 0.8, 0.5 }
#define ROYALBLUE2 { 0.2, 0.2, 0.9, 1 }
#define ROYALBLUE2_LOW_TRANS { 0.2, 0.2, 0.9, 0.75 }
#define GOVERNORBAY2 QColor::fromRgbF( 0.2, 0.2, 0.7, 1 )
#define GOVERNORBAY1_MED_TRANS QColor::fromRgbF( 0.2, 0.2, 0.8, 0.5 )
#define ROYALBLUE2 QColor::fromRgbF( 0.2, 0.2, 0.9, 1 )
#define ROYALBLUE2_LOW_TRANS QColor::fromRgbF( 0.2, 0.2, 0.9, 0.75 )
// Yellows / BROWNS
#define SPRINGWOOD1 { 0.95, 0.95, 0.9, 1 }
#define BROOM1_LOWER_TRANS { 1.0, 1.0, 0.1, 0.9 }
#define PEANUT { 0.5, 0.2, 0.1, 1.0 }
#define PEANUT_MED_TRANS { 0.5, 0.2, 0.1, 0.5 }
#define SPRINGWOOD1 QColor::fromRgbF( 0.95, 0.95, 0.9, 1 )
#define BROOM1_LOWER_TRANS QColor::fromRgbF( 1.0, 1.0, 0.1, 0.9 )
#define PEANUT QColor::fromRgbF( 0.5, 0.2, 0.1, 1.0 )
#define PEANUT_MED_TRANS QColor::fromRgbF( 0.5, 0.2, 0.1, 0.5 )
// Magentas
#define MEDIUMREDVIOLET1_HIGHER_TRANS { 0.7, 0.2, 0.7, 0.1 }
#define MEDIUMREDVIOLET1_HIGHER_TRANS QColor::fromRgbF( 0.7, 0.2, 0.7, 0.1 )
#endif

View file

@ -10,7 +10,7 @@
#include "display-gtk.h"
#endif
#include "divelist.h"
#include "color.h"
#include "libdivecomputer/parser.h"
#include "libdivecomputer/version.h"
@ -59,88 +59,6 @@ struct plot_data {
#define INTERPOLATED_PRESSURE(_entry) (_entry)->pressure[INTERPOLATED_PR]
#define GET_PRESSURE(_entry) (SENSOR_PRESSURE(_entry) ? : INTERPOLATED_PRESSURE(_entry))
#define SAC_COLORS_START_IDX SAC_1
#define SAC_COLORS 9
#define VELOCITY_COLORS_START_IDX VELO_STABLE
#define VELOCITY_COLORS 5
typedef enum {
/* SAC colors. Order is important, the SAC_COLORS_START_IDX define above. */
SAC_1, SAC_2, SAC_3, SAC_4, SAC_5, SAC_6, SAC_7, SAC_8, SAC_9,
/* Velocity colors. Order is still important, ref VELOCITY_COLORS_START_IDX. */
VELO_STABLE, VELO_SLOW, VELO_MODERATE, VELO_FAST, VELO_CRAZY,
/* gas colors */
PO2, PO2_ALERT, PN2, PN2_ALERT, PHE, PHE_ALERT, PP_LINES,
/* Other colors */
TEXT_BACKGROUND, ALERT_BG, ALERT_FG, EVENTS, SAMPLE_DEEP, SAMPLE_SHALLOW,
SMOOTHED, MINUTE, TIME_GRID, TIME_TEXT, DEPTH_GRID, MEAN_DEPTH, DEPTH_TOP,
DEPTH_BOTTOM, TEMP_TEXT, TEMP_PLOT, SAC_DEFAULT, BOUNDING_BOX, PRESSURE_TEXT, BACKGROUND,
CEILING_SHALLOW, CEILING_DEEP, CALC_CEILING_SHALLOW, CALC_CEILING_DEEP
} color_indice_t;
typedef struct {
/* media[0] is screen, media[1] is b/w printer media[2] is color printer */
struct rgba {
double r,g,b,a;
} media[3];
} color_t;
/* [color indice] = {{screen color, b/w printer color, color printer}} printer & screen colours could be different */
static const color_t profile_color[] = {
[SAC_1] = {{FUNGREEN1, BLACK1_LOW_TRANS, FUNGREEN1}},
[SAC_2] = {{APPLE1, BLACK1_LOW_TRANS, APPLE1}},
[SAC_3] = {{ATLANTIS1, BLACK1_LOW_TRANS, ATLANTIS1}},
[SAC_4] = {{ATLANTIS2, BLACK1_LOW_TRANS, ATLANTIS2}},
[SAC_5] = {{EARLSGREEN1, BLACK1_LOW_TRANS, EARLSGREEN1}},
[SAC_6] = {{HOKEYPOKEY1, BLACK1_LOW_TRANS, HOKEYPOKEY1}},
[SAC_7] = {{TUSCANY1, BLACK1_LOW_TRANS, TUSCANY1}},
[SAC_8] = {{CINNABAR1, BLACK1_LOW_TRANS, CINNABAR1}},
[SAC_9] = {{REDORANGE1, BLACK1_LOW_TRANS, REDORANGE1}},
[VELO_STABLE] = {{CAMARONE1, BLACK1_LOW_TRANS, CAMARONE1}},
[VELO_SLOW] = {{LIMENADE1, BLACK1_LOW_TRANS, LIMENADE1}},
[VELO_MODERATE] = {{RIOGRANDE1, BLACK1_LOW_TRANS, RIOGRANDE1}},
[VELO_FAST] = {{PIRATEGOLD1, BLACK1_LOW_TRANS, PIRATEGOLD1}},
[VELO_CRAZY] = {{RED1, BLACK1_LOW_TRANS, RED1}},
[PO2] = {{APPLE1, BLACK1_LOW_TRANS, APPLE1}},
[PO2_ALERT] = {{RED1, BLACK1_LOW_TRANS, RED1}},
[PN2] = {{BLACK1_LOW_TRANS, BLACK1_LOW_TRANS, BLACK1_LOW_TRANS}},
[PN2_ALERT] = {{RED1, BLACK1_LOW_TRANS, RED1}},
[PHE] = {{PEANUT, BLACK1_LOW_TRANS, PEANUT}},
[PHE_ALERT] = {{RED1, BLACK1_LOW_TRANS, RED1}},
[PP_LINES] = {{BLACK1_HIGH_TRANS, BLACK1_HIGH_TRANS, BLACK1_HIGH_TRANS}},
[TEXT_BACKGROUND] = {{CONCRETE1_LOWER_TRANS, WHITE1, CONCRETE1_LOWER_TRANS}},
[ALERT_BG] = {{BROOM1_LOWER_TRANS, BLACK1_LOW_TRANS, BROOM1_LOWER_TRANS}},
[ALERT_FG] = {{BLACK1_LOW_TRANS, BLACK1_LOW_TRANS, BLACK1_LOW_TRANS}},
[EVENTS] = {{REDORANGE1, BLACK1_LOW_TRANS, REDORANGE1}},
[SAMPLE_DEEP] = {{PERSIANRED1, BLACK1_LOW_TRANS, PERSIANRED1}},
[SAMPLE_SHALLOW] = {{PERSIANRED1, BLACK1_LOW_TRANS, PERSIANRED1}},
[SMOOTHED] = {{REDORANGE1_HIGH_TRANS, BLACK1_LOW_TRANS, REDORANGE1_HIGH_TRANS}},
[MINUTE] = {{MEDIUMREDVIOLET1_HIGHER_TRANS, BLACK1_LOW_TRANS, MEDIUMREDVIOLET1_HIGHER_TRANS}},
[TIME_GRID] = {{WHITE1, BLACK1_HIGH_TRANS, TUNDORA1_MED_TRANS}},
[TIME_TEXT] = {{FORESTGREEN1, BLACK1_LOW_TRANS, FORESTGREEN1}},
[DEPTH_GRID] = {{WHITE1, BLACK1_HIGH_TRANS, TUNDORA1_MED_TRANS}},
[MEAN_DEPTH] = {{REDORANGE1_MED_TRANS, BLACK1_LOW_TRANS, REDORANGE1_MED_TRANS}},
[DEPTH_BOTTOM] = {{GOVERNORBAY1_MED_TRANS, BLACK1_HIGH_TRANS, GOVERNORBAY1_MED_TRANS}},
[DEPTH_TOP] = {{MERCURY1_MED_TRANS, WHITE1_MED_TRANS, MERCURY1_MED_TRANS}},
[TEMP_TEXT] = {{GOVERNORBAY2, BLACK1_LOW_TRANS, GOVERNORBAY2}},
[TEMP_PLOT] = {{ROYALBLUE2_LOW_TRANS, BLACK1_LOW_TRANS, ROYALBLUE2_LOW_TRANS}},
[SAC_DEFAULT] = {{WHITE1, BLACK1_LOW_TRANS, FORESTGREEN1}},
[BOUNDING_BOX] = {{WHITE1, BLACK1_LOW_TRANS, TUNDORA1_MED_TRANS}},
[PRESSURE_TEXT] = {{KILLARNEY1, BLACK1_LOW_TRANS, KILLARNEY1}},
[BACKGROUND] = {{SPRINGWOOD1, BLACK1_LOW_TRANS, SPRINGWOOD1}},
[CEILING_SHALLOW] = {{REDORANGE1_HIGH_TRANS, BLACK1_HIGH_TRANS, REDORANGE1_HIGH_TRANS}},
[CEILING_DEEP] = {{RED1_MED_TRANS, BLACK1_HIGH_TRANS, RED1_MED_TRANS}},
[CALC_CEILING_SHALLOW] = {{FUNGREEN1_HIGH_TRANS, BLACK1_HIGH_TRANS, FUNGREEN1_HIGH_TRANS}},
[CALC_CEILING_DEEP] = {{APPLE1_HIGH_TRANS, BLACK1_HIGH_TRANS, APPLE1_HIGH_TRANS}},
};
#if USE_GTK_UI
/* Scale to 0,0 -> maxx,maxy */
@ -270,11 +188,13 @@ int get_maxdepth(struct plot_info *pi)
return md;
}
#if 0
typedef struct {
double size;
color_indice_t color;
double hpos, vpos;
} text_render_options_t;
#endif
#define RIGHT (-1.0)
#define CENTER (-0.5)

View file

@ -5,10 +5,91 @@
#include <QDebug>
#include "../color.h"
#define SAC_COLORS_START_IDX SAC_1
#define SAC_COLORS 9
#define VELOCITY_COLORS_START_IDX VELO_STABLE
#define VELOCITY_COLORS 5
typedef enum {
/* SAC colors. Order is important, the SAC_COLORS_START_IDX define above. */
SAC_1, SAC_2, SAC_3, SAC_4, SAC_5, SAC_6, SAC_7, SAC_8, SAC_9,
/* Velocity colors. Order is still important, ref VELOCITY_COLORS_START_IDX. */
VELO_STABLE, VELO_SLOW, VELO_MODERATE, VELO_FAST, VELO_CRAZY,
/* gas colors */
PO2, PO2_ALERT, PN2, PN2_ALERT, PHE, PHE_ALERT, PP_LINES,
/* Other colors */
TEXT_BACKGROUND, ALERT_BG, ALERT_FG, EVENTS, SAMPLE_DEEP, SAMPLE_SHALLOW,
SMOOTHED, MINUTE, TIME_GRID, TIME_TEXT, DEPTH_GRID, MEAN_DEPTH, DEPTH_TOP,
DEPTH_BOTTOM, TEMP_TEXT, TEMP_PLOT, SAC_DEFAULT, BOUNDING_BOX, PRESSURE_TEXT, BACKGROUND,
CEILING_SHALLOW, CEILING_DEEP, CALC_CEILING_SHALLOW, CALC_CEILING_DEEP
} color_indice_t;
/* profile_color[color indice] = COLOR(screen color, b/w printer color, color printer}} printer & screen colours could be different */
QMap<color_indice_t, QVector<QColor> > profile_color;
void fill_profile_color()
{
#define COLOR(x, y, z) QVector<QColor>() << x << y << z;
profile_color[SAC_1] = COLOR(FUNGREEN1, BLACK1_LOW_TRANS, FUNGREEN1);
profile_color[SAC_2] = COLOR(APPLE1, BLACK1_LOW_TRANS, APPLE1);
profile_color[SAC_3] = COLOR(ATLANTIS1, BLACK1_LOW_TRANS, ATLANTIS1);
profile_color[SAC_4] = COLOR(ATLANTIS2, BLACK1_LOW_TRANS, ATLANTIS2);
profile_color[SAC_5] = COLOR(EARLSGREEN1, BLACK1_LOW_TRANS, EARLSGREEN1);
profile_color[SAC_6] = COLOR(HOKEYPOKEY1, BLACK1_LOW_TRANS, HOKEYPOKEY1);
profile_color[SAC_7] = COLOR(TUSCANY1, BLACK1_LOW_TRANS, TUSCANY1);
profile_color[SAC_8] = COLOR(CINNABAR1, BLACK1_LOW_TRANS, CINNABAR1);
profile_color[SAC_9] = COLOR(REDORANGE1, BLACK1_LOW_TRANS, REDORANGE1);
profile_color[VELO_STABLE] = COLOR(CAMARONE1, BLACK1_LOW_TRANS, CAMARONE1);
profile_color[VELO_SLOW] = COLOR(LIMENADE1, BLACK1_LOW_TRANS, LIMENADE1);
profile_color[VELO_MODERATE] = COLOR(RIOGRANDE1, BLACK1_LOW_TRANS, RIOGRANDE1);
profile_color[VELO_FAST] = COLOR(PIRATEGOLD1, BLACK1_LOW_TRANS, PIRATEGOLD1);
profile_color[VELO_CRAZY] = COLOR(RED1, BLACK1_LOW_TRANS, RED1);
profile_color[PO2] = COLOR(APPLE1, BLACK1_LOW_TRANS, APPLE1);
profile_color[PO2_ALERT] = COLOR(RED1, BLACK1_LOW_TRANS, RED1);
profile_color[PN2] = COLOR(BLACK1_LOW_TRANS, BLACK1_LOW_TRANS, BLACK1_LOW_TRANS);
profile_color[PN2_ALERT] = COLOR(RED1, BLACK1_LOW_TRANS, RED1);
profile_color[PHE] = COLOR(PEANUT, BLACK1_LOW_TRANS, PEANUT);
profile_color[PHE_ALERT] = COLOR(RED1, BLACK1_LOW_TRANS, RED1);
profile_color[PP_LINES] = COLOR(BLACK1_HIGH_TRANS, BLACK1_HIGH_TRANS, BLACK1_HIGH_TRANS);
profile_color[TEXT_BACKGROUND] = COLOR(CONCRETE1_LOWER_TRANS, WHITE1, CONCRETE1_LOWER_TRANS);
profile_color[ALERT_BG] = COLOR(BROOM1_LOWER_TRANS, BLACK1_LOW_TRANS, BROOM1_LOWER_TRANS);
profile_color[ALERT_FG] = COLOR(BLACK1_LOW_TRANS, BLACK1_LOW_TRANS, BLACK1_LOW_TRANS);
profile_color[EVENTS] = COLOR(REDORANGE1, BLACK1_LOW_TRANS, REDORANGE1);
profile_color[SAMPLE_DEEP] = COLOR(PERSIANRED1, BLACK1_LOW_TRANS, PERSIANRED1);
profile_color[SAMPLE_SHALLOW] = COLOR(PERSIANRED1, BLACK1_LOW_TRANS, PERSIANRED1);
profile_color[SMOOTHED] = COLOR(REDORANGE1_HIGH_TRANS, BLACK1_LOW_TRANS, REDORANGE1_HIGH_TRANS);
profile_color[MINUTE] = COLOR(MEDIUMREDVIOLET1_HIGHER_TRANS, BLACK1_LOW_TRANS, MEDIUMREDVIOLET1_HIGHER_TRANS);
profile_color[TIME_GRID] = COLOR(WHITE1, BLACK1_HIGH_TRANS, TUNDORA1_MED_TRANS);
profile_color[TIME_TEXT] = COLOR(FORESTGREEN1, BLACK1_LOW_TRANS, FORESTGREEN1);
profile_color[DEPTH_GRID] = COLOR(WHITE1, BLACK1_HIGH_TRANS, TUNDORA1_MED_TRANS);
profile_color[MEAN_DEPTH] = COLOR(REDORANGE1_MED_TRANS, BLACK1_LOW_TRANS, REDORANGE1_MED_TRANS);
profile_color[DEPTH_BOTTOM] = COLOR(GOVERNORBAY1_MED_TRANS, BLACK1_HIGH_TRANS, GOVERNORBAY1_MED_TRANS);
profile_color[DEPTH_TOP] = COLOR(MERCURY1_MED_TRANS, WHITE1_MED_TRANS, MERCURY1_MED_TRANS);
profile_color[TEMP_TEXT] = COLOR(GOVERNORBAY2, BLACK1_LOW_TRANS, GOVERNORBAY2);
profile_color[TEMP_PLOT] = COLOR(ROYALBLUE2_LOW_TRANS, BLACK1_LOW_TRANS, ROYALBLUE2_LOW_TRANS);
profile_color[SAC_DEFAULT] = COLOR(WHITE1, BLACK1_LOW_TRANS, FORESTGREEN1);
profile_color[BOUNDING_BOX] = COLOR(WHITE1, BLACK1_LOW_TRANS, TUNDORA1_MED_TRANS);
profile_color[PRESSURE_TEXT] = COLOR(KILLARNEY1, BLACK1_LOW_TRANS, KILLARNEY1);
profile_color[BACKGROUND] = COLOR(SPRINGWOOD1, BLACK1_LOW_TRANS, SPRINGWOOD1);
profile_color[CEILING_SHALLOW] = COLOR(REDORANGE1_HIGH_TRANS, BLACK1_HIGH_TRANS, REDORANGE1_HIGH_TRANS);
profile_color[CEILING_DEEP] = COLOR(RED1_MED_TRANS, BLACK1_HIGH_TRANS, RED1_MED_TRANS);
profile_color[CALC_CEILING_SHALLOW] = COLOR(FUNGREEN1_HIGH_TRANS, BLACK1_HIGH_TRANS, FUNGREEN1_HIGH_TRANS);
profile_color[CALC_CEILING_DEEP] = COLOR(APPLE1_HIGH_TRANS, BLACK1_HIGH_TRANS, APPLE1_HIGH_TRANS);
#undef COLOR
}
ProfileGraphicsView::ProfileGraphicsView(QWidget* parent) : QGraphicsView(parent)
{
setScene(new QGraphicsScene());
scene()->setSceneRect(0,0,100,100);
fill_profile_color();
}
void ProfileGraphicsView::plot(struct dive *d)