mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Typo: indice -> index
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
d9ac716162
commit
85ac3106e6
7 changed files with 14 additions and 14 deletions
|
@ -1,7 +1,7 @@
|
||||||
// SPDX-License-Identifier: GPL-2.0
|
// SPDX-License-Identifier: GPL-2.0
|
||||||
#include "color.h"
|
#include "color.h"
|
||||||
|
|
||||||
QMap<color_indice_t, QVector<QColor> > profile_color;
|
QMap<color_index_t, QVector<QColor> > profile_color;
|
||||||
|
|
||||||
void fill_profile_color()
|
void fill_profile_color()
|
||||||
{
|
{
|
||||||
|
@ -68,7 +68,7 @@ void fill_profile_color()
|
||||||
#undef COLOR
|
#undef COLOR
|
||||||
}
|
}
|
||||||
|
|
||||||
QColor getColor(const color_indice_t i, bool isGrayscale)
|
QColor getColor(const color_index_t i, bool isGrayscale)
|
||||||
{
|
{
|
||||||
if (profile_color.count() > i && i >= 0)
|
if (profile_color.count() > i && i >= 0)
|
||||||
return profile_color[i].at((isGrayscale) ? 1 : 0);
|
return profile_color[i].at((isGrayscale) ? 1 : 0);
|
||||||
|
@ -85,7 +85,7 @@ QColor getSacColor(int sac, int avg_sac)
|
||||||
sac_index = 0;
|
sac_index = 0;
|
||||||
if (sac_index > SAC_COLORS - 1)
|
if (sac_index > SAC_COLORS - 1)
|
||||||
sac_index = SAC_COLORS - 1;
|
sac_index = SAC_COLORS - 1;
|
||||||
return getColor((color_indice_t)(SAC_COLORS_START_IDX + sac_index), false);
|
return getColor((color_index_t)(SAC_COLORS_START_IDX + sac_index), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
QColor getPressureColor(double density)
|
QColor getPressureColor(double density)
|
||||||
|
|
|
@ -136,16 +136,16 @@ typedef enum {
|
||||||
TISSUE_PERCENTAGE,
|
TISSUE_PERCENTAGE,
|
||||||
GF_LINE,
|
GF_LINE,
|
||||||
AMB_PRESSURE_LINE
|
AMB_PRESSURE_LINE
|
||||||
} color_indice_t;
|
} color_index_t;
|
||||||
|
|
||||||
extern QMap<color_indice_t, QVector<QColor> > profile_color;
|
extern QMap<color_index_t, QVector<QColor> > profile_color;
|
||||||
void fill_profile_color();
|
void fill_profile_color();
|
||||||
QColor getColor(const color_indice_t i, bool isGrayscale = false);
|
QColor getColor(const color_index_t i, bool isGrayscale = false);
|
||||||
QColor getSacColor(int sac, int diveSac);
|
QColor getSacColor(int sac, int diveSac);
|
||||||
QColor getPressureColor(double density);
|
QColor getPressureColor(double density);
|
||||||
struct text_render_options {
|
struct text_render_options {
|
||||||
double size;
|
double size;
|
||||||
color_indice_t color;
|
color_index_t color;
|
||||||
double hpos, vpos;
|
double hpos, vpos;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -137,7 +137,7 @@ void emptyList(QList<T *> &list, double steps)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DiveCartesianAxis::updateTicks(color_indice_t color)
|
void DiveCartesianAxis::updateTicks(color_index_t color)
|
||||||
{
|
{
|
||||||
if (!scene() || (!changed && !profileWidget->getPrintMode()))
|
if (!scene() || (!changed && !profileWidget->getPrintMode()))
|
||||||
return;
|
return;
|
||||||
|
@ -398,7 +398,7 @@ QString TimeAxis::textForValue(double value)
|
||||||
return QString::number(nr);
|
return QString::number(nr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TimeAxis::updateTicks(color_indice_t color)
|
void TimeAxis::updateTicks(color_index_t color)
|
||||||
{
|
{
|
||||||
DiveCartesianAxis::updateTicks(color);
|
DiveCartesianAxis::updateTicks(color);
|
||||||
if (maximum() > 600) {
|
if (maximum() > 600) {
|
||||||
|
|
|
@ -52,7 +52,7 @@ public:
|
||||||
int unitSystem;
|
int unitSystem;
|
||||||
public
|
public
|
||||||
slots:
|
slots:
|
||||||
virtual void updateTicks(color_indice_t color = TIME_GRID);
|
virtual void updateTicks(color_index_t color = TIME_GRID);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void sizeChanged();
|
void sizeChanged();
|
||||||
|
@ -93,7 +93,7 @@ class TimeAxis : public DiveCartesianAxis {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
TimeAxis(ProfileWidget2 *widget);
|
TimeAxis(ProfileWidget2 *widget);
|
||||||
void updateTicks(color_indice_t color = TIME_GRID);
|
void updateTicks(color_index_t color = TIME_GRID);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
QString textForValue(double value);
|
QString textForValue(double value);
|
||||||
|
|
|
@ -355,7 +355,7 @@ void ProfileWidget2::replot(struct dive *d)
|
||||||
plotDive(d, true);
|
plotDive(d, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ProfileWidget2::createPPGas(PartialPressureGasItem *item, int verticalColumn, color_indice_t color, color_indice_t colorAlert,
|
void ProfileWidget2::createPPGas(PartialPressureGasItem *item, int verticalColumn, color_index_t color, color_index_t colorAlert,
|
||||||
double *thresholdSettingsMin, double *thresholdSettingsMax)
|
double *thresholdSettingsMin, double *thresholdSettingsMax)
|
||||||
{
|
{
|
||||||
setupItem(item, gasYAxis, verticalColumn, DivePlotDataModel::TIME, 0);
|
setupItem(item, gasYAxis, verticalColumn, DivePlotDataModel::TIME, 0);
|
||||||
|
|
|
@ -162,7 +162,7 @@ private: /*methods*/
|
||||||
void disconnectTemporaryConnections();
|
void disconnectTemporaryConnections();
|
||||||
struct plot_data *getEntryFromPos(QPointF pos);
|
struct plot_data *getEntryFromPos(QPointF pos);
|
||||||
void addActionShortcut(const Qt::Key shortcut, void (ProfileWidget2::*slot)());
|
void addActionShortcut(const Qt::Key shortcut, void (ProfileWidget2::*slot)());
|
||||||
void createPPGas(PartialPressureGasItem *item, int verticalColumn, color_indice_t color, color_indice_t colorAlert,
|
void createPPGas(PartialPressureGasItem *item, int verticalColumn, color_index_t color, color_index_t colorAlert,
|
||||||
double *thresholdSettingsMin, double *thresholdSettingsMax);
|
double *thresholdSettingsMin, double *thresholdSettingsMax);
|
||||||
private:
|
private:
|
||||||
DivePlotDataModel *dataModel;
|
DivePlotDataModel *dataModel;
|
||||||
|
|
|
@ -85,7 +85,7 @@ QVariant DivePlotDataModel::data(const QModelIndex &index, int role) const
|
||||||
if (role == Qt::BackgroundRole) {
|
if (role == Qt::BackgroundRole) {
|
||||||
switch (index.column()) {
|
switch (index.column()) {
|
||||||
case COLOR:
|
case COLOR:
|
||||||
return getColor((color_indice_t)(VELOCITY_COLORS_START_IDX + item.velocity));
|
return getColor((color_index_t)(VELOCITY_COLORS_START_IDX + item.velocity));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return QVariant();
|
return QVariant();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue