mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
bd6b714be1
commit
159dc15f99
2 changed files with 7 additions and 7 deletions
|
@ -189,7 +189,7 @@ void ToolTipItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ToolTipItem::persistPos()
|
void ToolTipItem::persistPos() const
|
||||||
{
|
{
|
||||||
qPrefDisplay::set_tooltip_position(pos());
|
qPrefDisplay::set_tooltip_position(pos());
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,6 @@ class QGraphicsPixmapItem;
|
||||||
*/
|
*/
|
||||||
class ToolTipItem : public QObject, public RoundRectItem {
|
class ToolTipItem : public QObject, public RoundRectItem {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
void updateTitlePosition();
|
|
||||||
Q_PROPERTY(QRectF rect READ rect WRITE setRect)
|
Q_PROPERTY(QRectF rect READ rect WRITE setRect)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -32,12 +31,7 @@ public:
|
||||||
explicit ToolTipItem(QGraphicsItem *parent = 0);
|
explicit ToolTipItem(QGraphicsItem *parent = 0);
|
||||||
~ToolTipItem();
|
~ToolTipItem();
|
||||||
|
|
||||||
void collapse();
|
|
||||||
void expand();
|
|
||||||
void clear();
|
|
||||||
void refresh(const dive *d, const QPointF &pos, bool inPlanner);
|
void refresh(const dive *d, const QPointF &pos, bool inPlanner);
|
||||||
bool isExpanded() const;
|
|
||||||
void persistPos();
|
|
||||||
void readPos();
|
void readPos();
|
||||||
void mousePressEvent(QGraphicsSceneMouseEvent *event);
|
void mousePressEvent(QGraphicsSceneMouseEvent *event);
|
||||||
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
|
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
|
||||||
|
@ -63,6 +57,12 @@ private:
|
||||||
QList<QGraphicsItem*> oldSelection;
|
QList<QGraphicsItem*> oldSelection;
|
||||||
|
|
||||||
void addToolTip(const QString &toolTip, const QPixmap &pixmap);
|
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
|
#endif // DIVETOOLTIPITEM_H
|
||||||
|
|
Loading…
Add table
Reference in a new issue