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 <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2021-04-25 17:53:39 +02:00 committed by Dirk Hohndel
parent bd6b714be1
commit 159dc15f99
2 changed files with 7 additions and 7 deletions

View file

@ -189,7 +189,7 @@ void ToolTipItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
}
}
void ToolTipItem::persistPos()
void ToolTipItem::persistPos() const
{
qPrefDisplay::set_tooltip_position(pos());
}

View file

@ -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<QGraphicsItem*> 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