From 159dc15f99ce2235b194da627a3a4edaf2bb5ea8 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sun, 25 Apr 2021 17:53:39 +0200 Subject: cleanup: make a few ToolTipItem member functions private They were not used outside the class. Moreover, mark ToolTipItem::persistPos() as const. Signed-off-by: Berthold Stoeger --- profile-widget/divetooltipitem.cpp | 2 +- profile-widget/divetooltipitem.h | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'profile-widget') diff --git a/profile-widget/divetooltipitem.cpp b/profile-widget/divetooltipitem.cpp index 46e825bcd..a66d56c3c 100644 --- a/profile-widget/divetooltipitem.cpp +++ b/profile-widget/divetooltipitem.cpp @@ -189,7 +189,7 @@ void ToolTipItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) } } -void ToolTipItem::persistPos() +void ToolTipItem::persistPos() const { qPrefDisplay::set_tooltip_position(pos()); } diff --git a/profile-widget/divetooltipitem.h b/profile-widget/divetooltipitem.h index b9a3e4bff..9a1cdb8bf 100644 --- a/profile-widget/divetooltipitem.h +++ b/profile-widget/divetooltipitem.h @@ -20,7 +20,6 @@ class QGraphicsPixmapItem; */ class ToolTipItem : public QObject, public RoundRectItem { Q_OBJECT - void updateTitlePosition(); Q_PROPERTY(QRectF rect READ rect WRITE setRect) public: @@ -32,12 +31,7 @@ public: explicit ToolTipItem(QGraphicsItem *parent = 0); ~ToolTipItem(); - void collapse(); - void expand(); - void clear(); void refresh(const dive *d, const QPointF &pos, bool inPlanner); - bool isExpanded() const; - void persistPos(); void readPos(); void mousePressEvent(QGraphicsSceneMouseEvent *event); void mouseReleaseEvent(QGraphicsSceneMouseEvent *event); @@ -63,6 +57,12 @@ private: QList oldSelection; void addToolTip(const QString &toolTip, const QPixmap &pixmap); + void collapse(); + void expand(); + void clear(); + bool isExpanded() const; + void persistPos() const; + void updateTitlePosition(); }; #endif // DIVETOOLTIPITEM_H -- cgit v1.2.3-70-g09d2