48 QStringList
colors()
const {
return mColors; }
49 QStringList
labels()
const {
return mLabels; }
55 mNeedsPaletteUpdate=
true;
setPalette(mCurrentType, val, mMaxValue); mMinValue = val; }
57 mNeedsPaletteUpdate=
true;
setPalette(mCurrentType, mMinValue, val); mMaxValue = val; }
60 void setAutoScale(
bool value) {
if (value==mAutoScale)
return; mAutoScale=value; mNeedsPaletteUpdate=
true;
setPalette(mCurrentType, mMinValue, mMaxValue);}
61 QString
caption()
const {
return mCaption; }
73 void setScale(
double meter_per_pixel) {
if(mMeterPerPixel==meter_per_pixel)
return;
76 static QColor
colorFromValue(
const float value,
const float min_value=0.f,
const float max_value=1.f,
const bool reverse=
false,
const bool black_white=
false);
77 static QColor
colorFromValue(
const float value,
const GridViewType view_type,
const float min_value=0.f,
const float max_value=1.f);
79 static QColor
shadeColor(
const QColor col,
const QPointF &coordinates,
const DEM *dem);
81 void setupFixedPalettes();
82 static QVector<QColor> mBrewerDiv;
83 static QVector<QColor> mBrewerQual;
84 static QVector<QColor> mTerrainCol;
85 static QVector<QColor> mCustomColors;
86 static QVector<QColor> mTurboColors;
89 QStringList mFactorLabels;
95 bool mNeedsPaletteUpdate;
98 double mMeterPerPixel;
bool autoScale
Definition: colors.h:37
void setScale(double meter_per_pixel)
Definition: colors.h:73
double maxValue() const
Definition: colors.h:53
QString caption
Definition: colors.h:39
double minValue() const
Definition: colors.h:52
void setMaxValue(double val)
Definition: colors.h:56
Colors(QWidget *parent=0)
Definition: colors.cpp:97
bool autoScale() const
Definition: colors.h:59
QString description() const
Definition: colors.h:62
bool hasFactors() const
Definition: colors.h:58
double maxValue
Definition: colors.h:36
static QColor colorFromValue(const float value, const float min_value=0.f, const float max_value=1.f, const bool reverse=false, const bool black_white=false)
Definition: colors.cpp:172
double meterPerPixel
Definition: colors.h:41
void setPalette(const GridViewType type, const float min_val, const float max_val)
Definition: colors.cpp:39
static QColor colorFromPalette(const int value, const GridViewType view_type)
Definition: colors.cpp:111
int count
Definition: colors.h:34
void setCaption(QString caption, QString description=QString())
Definition: colors.h:67
void setMinValue(double val)
Definition: colors.h:54
void setAutoScale(bool value)
Definition: colors.h:60
QStringList factorLabels
Definition: colors.h:33
double meterPerPixel() const
Definition: colors.h:72
QString description
Definition: colors.h:40
QStringList labels() const
Definition: colors.h:49
void setFactorLabels(QStringList labels)
Definition: colors.cpp:82
void setFactorColors(QStringList colors)
Definition: colors.cpp:88
QStringList factorLabels() const
Definition: colors.h:50
QString caption() const
Definition: colors.h:61
double minValue
Definition: colors.h:35
QStringList colors
Definition: colors.h:31
QStringList colors() const
Definition: colors.h:48
bool hasFactors
Definition: colors.h:38
static QColor shadeColor(const QColor col, const QPointF &coordinates, const DEM *dem)
Definition: colors.cpp:135
QStringList labels
Definition: colors.h:32
int colorCount() const
Definition: colors.h:51
DEM is a digital elevation model class.
Definition: dem.h:40
GridViewType
Definition: grid.h:193