aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/profile
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2014-05-21 13:50:26 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-05-22 09:03:51 +0900
commit6aab69b2989e7f61b6adc2f0bcff69ca2bd5c7df (patch)
tree802aa420de6a9a1369f64d881c1009e5fc141321 /qt-ui/profile
parent3c7a6ab7506ac311fdf9bfdf5fe70082bf2f7689 (diff)
downloadsubsurface-6aab69b2989e7f61b6adc2f0bcff69ca2bd5c7df.tar.gz
PreferencesChanged -> settingsChanged.
We used both preferencesChanged and settingsChanged in different methods and classes to mean the same thing, this adds consistency. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profile')
-rw-r--r--qt-ui/profile/divecartesianaxis.cpp8
-rw-r--r--qt-ui/profile/divecartesianaxis.h2
-rw-r--r--qt-ui/profile/diveprofileitem.cpp20
-rw-r--r--qt-ui/profile/diveprofileitem.h14
-rw-r--r--qt-ui/profile/profilewidget2.cpp4
5 files changed, 24 insertions, 24 deletions
diff --git a/qt-ui/profile/divecartesianaxis.cpp b/qt-ui/profile/divecartesianaxis.cpp
index c1e93faa7..f5feea519 100644
--- a/qt-ui/profile/divecartesianaxis.cpp
+++ b/qt-ui/profile/divecartesianaxis.cpp
@@ -411,17 +411,17 @@ QString TemperatureAxis::textForValue(double value)
PartialGasPressureAxis::PartialGasPressureAxis()
{
- connect(PreferencesDialog::instance(), SIGNAL(settingsChanged()), this, SLOT(preferencesChanged()));
+ connect(PreferencesDialog::instance(), SIGNAL(settingsChanged()), this, SLOT(settingsChanged()));
}
void PartialGasPressureAxis::setModel(DivePlotDataModel *m)
{
model = m;
- connect(model, SIGNAL(dataChanged(QModelIndex, QModelIndex)), this, SLOT(preferencesChanged()));
- preferencesChanged();
+ connect(model, SIGNAL(dataChanged(QModelIndex, QModelIndex)), this, SLOT(settingsChanged()));
+ settingsChanged();
}
-void PartialGasPressureAxis::preferencesChanged()
+void PartialGasPressureAxis::settingsChanged()
{
bool showPhe = prefs.pp_graphs.phe;
bool showPn2 = prefs.pp_graphs.pn2;
diff --git a/qt-ui/profile/divecartesianaxis.h b/qt-ui/profile/divecartesianaxis.h
index e5b9b7b0e..34089e614 100644
--- a/qt-ui/profile/divecartesianaxis.h
+++ b/qt-ui/profile/divecartesianaxis.h
@@ -110,7 +110,7 @@ public:
void setModel(DivePlotDataModel *model);
public
slots:
- void preferencesChanged();
+ void settingsChanged();
private:
DivePlotDataModel *model;
diff --git a/qt-ui/profile/diveprofileitem.cpp b/qt-ui/profile/diveprofileitem.cpp
index 58c4a868b..954eb60e1 100644
--- a/qt-ui/profile/diveprofileitem.cpp
+++ b/qt-ui/profile/diveprofileitem.cpp
@@ -18,10 +18,10 @@
AbstractProfilePolygonItem::AbstractProfilePolygonItem() : QObject(), QGraphicsPolygonItem(), hAxis(NULL), vAxis(NULL), dataModel(NULL), hDataColumn(-1), vDataColumn(-1)
{
- connect(PreferencesDialog::instance(), SIGNAL(settingsChanged()), this, SLOT(preferencesChanged()));
+ connect(PreferencesDialog::instance(), SIGNAL(settingsChanged()), this, SLOT(settingsChanged()));
}
-void AbstractProfilePolygonItem::preferencesChanged()
+void AbstractProfilePolygonItem::settingsChanged()
{
}
@@ -192,7 +192,7 @@ void DiveProfileItem::modelDataChanged(const QModelIndex &topLeft, const QModelI
}
}
-void DiveProfileItem::preferencesChanged()
+void DiveProfileItem::settingsChanged()
{
//TODO: Only modelDataChanged() here if we need to rebuild the graph ( for instance,
// if the prefs.dcceiling are enabled, but prefs.redceiling is disabled
@@ -296,7 +296,7 @@ void DiveHeartrateItem::paint(QPainter *painter, const QStyleOptionGraphicsItem
painter->drawPolyline(polygon());
}
-void DiveHeartrateItem::preferencesChanged()
+void DiveHeartrateItem::settingsChanged()
{
QSettings s;
s.beginGroup("TecDetails");
@@ -503,7 +503,7 @@ DiveCalculatedCeiling::DiveCalculatedCeiling() : is3mIncrement(false), gradientF
gradientFactor->setY(0);
gradientFactor->setBrush(getColor(PRESSURE_TEXT));
gradientFactor->setAlignment(Qt::AlignHCenter | Qt::AlignBottom);
- preferencesChanged();
+ settingsChanged();
}
void DiveCalculatedCeiling::modelDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)
@@ -542,10 +542,10 @@ void DiveCalculatedCeiling::paint(QPainter *painter, const QStyleOptionGraphicsI
DiveCalculatedTissue::DiveCalculatedTissue()
{
- preferencesChanged();
+ settingsChanged();
}
-void DiveCalculatedTissue::preferencesChanged()
+void DiveCalculatedTissue::settingsChanged()
{
setVisible(prefs.calcalltissues && prefs.calcceiling);
}
@@ -579,7 +579,7 @@ void DiveReportedCeiling::modelDataChanged(const QModelIndex &topLeft, const QMo
setBrush(pat);
}
-void DiveCalculatedCeiling::preferencesChanged()
+void DiveCalculatedCeiling::settingsChanged()
{
if (dataModel && is3mIncrement != prefs.calcceiling3m) {
// recalculate that part.
@@ -589,7 +589,7 @@ void DiveCalculatedCeiling::preferencesChanged()
setVisible(prefs.calcceiling);
}
-void DiveReportedCeiling::preferencesChanged()
+void DiveReportedCeiling::settingsChanged()
{
setVisible(prefs.dcceiling);
}
@@ -696,7 +696,7 @@ PartialPressureGasItem::PartialPressureGasItem()
{
}
-void PartialPressureGasItem::preferencesChanged()
+void PartialPressureGasItem::settingsChanged()
{
QSettings s;
s.beginGroup("TecDetails");
diff --git a/qt-ui/profile/diveprofileitem.h b/qt-ui/profile/diveprofileitem.h
index c7fa59841..de0c6f0c9 100644
--- a/qt-ui/profile/diveprofileitem.h
+++ b/qt-ui/profile/diveprofileitem.h
@@ -46,7 +46,7 @@ public:
}
public
slots:
- virtual void preferencesChanged();
+ virtual void settingsChanged();
virtual void modelDataChanged(const QModelIndex &topLeft = QModelIndex(), const QModelIndex &bottomRight = QModelIndex());
virtual void modelDataRemoved(const QModelIndex &parent, int from, int to);
@@ -75,7 +75,7 @@ public:
DiveProfileItem();
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
virtual void modelDataChanged(const QModelIndex &topLeft = QModelIndex(), const QModelIndex &bottomRight = QModelIndex());
- virtual void preferencesChanged();
+ virtual void settingsChanged();
void plot_depth_sample(struct plot_data *entry, QFlags<Qt::AlignmentFlag> flags, const QColor &color);
private:
@@ -100,7 +100,7 @@ public:
DiveHeartrateItem();
virtual void modelDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight);
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
- virtual void preferencesChanged();
+ virtual void settingsChanged();
void setVisibilitySettingsKey(const QString &setVisibilitySettingsKey);
bool isVisible();
@@ -130,7 +130,7 @@ public:
DiveCalculatedCeiling();
virtual void modelDataChanged(const QModelIndex &topLeft = QModelIndex(), const QModelIndex &bottomRight = QModelIndex());
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
- virtual void preferencesChanged();
+ virtual void settingsChanged();
private:
bool is3mIncrement;
@@ -143,14 +143,14 @@ class DiveReportedCeiling : public AbstractProfilePolygonItem {
public:
virtual void modelDataChanged(const QModelIndex &topLeft = QModelIndex(), const QModelIndex &bottomRight = QModelIndex());
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
- virtual void preferencesChanged();
+ virtual void settingsChanged();
};
class DiveCalculatedTissue : public DiveCalculatedCeiling {
Q_OBJECT
public:
DiveCalculatedTissue();
- virtual void preferencesChanged();
+ virtual void settingsChanged();
};
class MeanDepthLine : public DiveLineItem {
@@ -176,7 +176,7 @@ public:
PartialPressureGasItem();
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
virtual void modelDataChanged(const QModelIndex &topLeft = QModelIndex(), const QModelIndex &bottomRight = QModelIndex());
- virtual void preferencesChanged();
+ virtual void settingsChanged();
void setThreshouldSettingsKey(const QString &threshouldSettingsKey);
void setVisibilitySettingsKey(const QString &setVisibilitySettingsKey);
void setColors(const QColor &normalColor, const QColor &alertColor);
diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp
index fbbf3df19..3104406cf 100644
--- a/qt-ui/profile/profilewidget2.cpp
+++ b/qt-ui/profile/profilewidget2.cpp
@@ -203,7 +203,7 @@ void ProfileWidget2::setupItemOnScene()
setupItem(temperatureItem, timeAxis, temperatureAxis, dataModel, DivePlotDataModel::TEMPERATURE, DivePlotDataModel::TIME, 1);
setupItem(heartBeatItem, timeAxis, heartBeatAxis, dataModel, DivePlotDataModel::HEARTBEAT, DivePlotDataModel::TIME, 1);
heartBeatItem->setVisibilitySettingsKey("hrgraph");
- heartBeatItem->preferencesChanged();
+ heartBeatItem->settingsChanged();
setupItem(diveProfileItem, timeAxis, profileYAxis, dataModel, DivePlotDataModel::DEPTH, DivePlotDataModel::TIME, 0);
#define CREATE_PP_GAS(ITEM, VERTICAL_COLUMN, COLOR, COLOR_ALERT, THRESHOULD_SETTINGS, VISIBILITY_SETTINGS) \
@@ -211,7 +211,7 @@ void ProfileWidget2::setupItemOnScene()
ITEM->setThreshouldSettingsKey(THRESHOULD_SETTINGS); \
ITEM->setVisibilitySettingsKey(VISIBILITY_SETTINGS); \
ITEM->setColors(getColor(COLOR, isGrayscale), getColor(COLOR_ALERT, isGrayscale)); \
- ITEM->preferencesChanged(); \
+ ITEM->settingsChanged(); \
ITEM->setZValue(99);
CREATE_PP_GAS(pn2GasItem, PN2, PN2, PN2_ALERT, "pn2threshold", "pn2graph");