cleanup: turn protected into private members

Some profilewidget classes hat protected members which can
be made private as there is no subclassing.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2020-04-13 19:41:30 +02:00 committed by Dirk Hohndel
parent fc697538fa
commit ebb342c969
4 changed files with 8 additions and 14 deletions

View file

@ -81,7 +81,7 @@ class DepthAxis : public DiveCartesianAxis {
Q_OBJECT
public:
DepthAxis(ProfileWidget2 *widget);
protected:
private:
QString textForValue(double value);
QColor colorForValue(double value);
private
@ -94,8 +94,7 @@ class TimeAxis : public DiveCartesianAxis {
public:
TimeAxis(ProfileWidget2 *widget);
void updateTicks(color_index_t color = TIME_GRID);
protected:
private:
QString textForValue(double value);
QColor colorForValue(double value);
};
@ -104,7 +103,7 @@ class TemperatureAxis : public DiveCartesianAxis {
Q_OBJECT
public:
TemperatureAxis(ProfileWidget2 *widget);
protected:
private:
QString textForValue(double value);
};
@ -116,7 +115,6 @@ public:
public
slots:
void settingsChanged();
private:
DivePlotDataModel *model;
};

View file

@ -19,11 +19,11 @@ class CloseButtonItem : public DivePixmapItem {
Q_OBJECT
public:
CloseButtonItem(QGraphicsItem *parent = 0);
protected:
void mousePressEvent(QGraphicsSceneMouseEvent *event) override;
public slots:
void hide();
void show();
private:
void mousePressEvent(QGraphicsSceneMouseEvent *event) override;
};
class DivePictureItem : public DivePixmapItem {
@ -37,11 +37,10 @@ public slots:
void settingsChanged();
void removePicture();
void setFileUrl(const QString& s);
protected:
private:
void hoverEnterEvent(QGraphicsSceneHoverEvent *event);
void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);
void mousePressEvent(QGraphicsSceneMouseEvent *event);
private:
QString fileUrl;
QGraphicsRectItem *canvas;
QGraphicsRectItem *shadow;

View file

@ -183,10 +183,8 @@ public
slots:
void recalc();
protected:
ProfileWidget2 *profileWidget;
private:
ProfileWidget2 *profileWidget;
bool is3mIncrement;
};

View file

@ -21,9 +21,8 @@ public:
void setPlotInfo(const struct plot_info &info);
void recalculate();
protected:
void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override;
private:
void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override;
struct plot_info pInfo;
int idx;
RulerItem2 *ruler;