2013-07-02 13:02:00 +00:00
|
|
|
#ifndef GRAPHICSVIEW_COMMON_H
|
|
|
|
#define GRAPHICSVIEW_COMMON_H
|
|
|
|
|
|
|
|
#include "../color.h"
|
|
|
|
#include <QMap>
|
|
|
|
#include <QVector>
|
|
|
|
#include <QColor>
|
|
|
|
|
|
|
|
#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. */
|
2014-02-28 04:09:57 +00:00
|
|
|
SAC_1,
|
|
|
|
SAC_2,
|
|
|
|
SAC_3,
|
|
|
|
SAC_4,
|
|
|
|
SAC_5,
|
|
|
|
SAC_6,
|
|
|
|
SAC_7,
|
|
|
|
SAC_8,
|
|
|
|
SAC_9,
|
2013-07-02 13:02:00 +00:00
|
|
|
|
|
|
|
/* Velocity colors. Order is still important, ref VELOCITY_COLORS_START_IDX. */
|
2014-02-28 04:09:57 +00:00
|
|
|
VELO_STABLE,
|
|
|
|
VELO_SLOW,
|
|
|
|
VELO_MODERATE,
|
|
|
|
VELO_FAST,
|
|
|
|
VELO_CRAZY,
|
2013-07-02 13:02:00 +00:00
|
|
|
|
|
|
|
/* gas colors */
|
2014-02-28 04:09:57 +00:00
|
|
|
PO2,
|
|
|
|
PO2_ALERT,
|
|
|
|
PN2,
|
|
|
|
PN2_ALERT,
|
|
|
|
PHE,
|
|
|
|
PHE_ALERT,
|
|
|
|
PP_LINES,
|
2013-07-02 13:02:00 +00:00
|
|
|
|
|
|
|
/* Other colors */
|
2014-02-28 04:09:57 +00:00
|
|
|
TEXT_BACKGROUND,
|
|
|
|
ALERT_BG,
|
|
|
|
ALERT_FG,
|
|
|
|
EVENTS,
|
|
|
|
SAMPLE_DEEP,
|
|
|
|
SAMPLE_SHALLOW,
|
|
|
|
SMOOTHED,
|
|
|
|
MINUTE,
|
|
|
|
TIME_GRID,
|
|
|
|
TIME_TEXT,
|
|
|
|
DEPTH_GRID,
|
|
|
|
MEAN_DEPTH,
|
|
|
|
HR_TEXT,
|
|
|
|
HR_PLOT,
|
2014-04-28 19:45:42 +00:00
|
|
|
HR_AXIS,
|
2014-02-28 04:09:57 +00:00
|
|
|
DEPTH_TOP,
|
|
|
|
DEPTH_BOTTOM,
|
|
|
|
TEMP_TEXT,
|
|
|
|
TEMP_PLOT,
|
|
|
|
SAC_DEFAULT,
|
|
|
|
BOUNDING_BOX,
|
|
|
|
PRESSURE_TEXT,
|
|
|
|
BACKGROUND,
|
2014-04-15 05:52:22 +00:00
|
|
|
BACKGROUND_TRANS,
|
2014-02-28 04:09:57 +00:00
|
|
|
CEILING_SHALLOW,
|
|
|
|
CEILING_DEEP,
|
|
|
|
CALC_CEILING_SHALLOW,
|
|
|
|
CALC_CEILING_DEEP
|
2013-07-02 13:02:00 +00:00
|
|
|
} color_indice_t;
|
|
|
|
|
|
|
|
|
|
|
|
/* profile_color[color indice] = COLOR(screen color, b/w printer color, color printer}} printer & screen colours could be different */
|
|
|
|
|
|
|
|
extern QMap<color_indice_t, QVector<QColor> > profile_color;
|
|
|
|
void fill_profile_color();
|
2014-03-08 03:38:00 +00:00
|
|
|
QColor getColor(const color_indice_t i, bool isGrayscale = false);
|
2014-01-27 18:17:08 +00:00
|
|
|
QColor getSacColor(int sac, int diveSac);
|
2014-01-17 19:54:47 +00:00
|
|
|
struct text_render_options {
|
|
|
|
double size;
|
|
|
|
color_indice_t color;
|
|
|
|
double hpos, vpos;
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef text_render_options text_render_options_t;
|
2014-02-11 18:14:46 +00:00
|
|
|
#endif // GRAPHICSVIEW_COMMON_H
|