17 #ifndef qclickablelabelhincluded
18 #define qclickablelabelhincluded
40 QClickableLabel(
const QString &text, QWidget *parent, Qt::WindowFlags f =
nullptr);
43 void AddHotspot(
const QString &name,
const QRect position);
45 void RemoveHotspot(
const QString &name);
46 void RemoveHotspot(
unsigned int hotspotIndex);
47 void RemoveAllHotspots();
51 void mousePressed(
const QString &hotspotName);
52 void mousePressed(
unsigned int hotspotIndex);
53 void mouseReleased(
const QString &hotspotName);
54 void mouseReleased(
unsigned int hotspotIndex);
57 virtual void mousePressEvent(QMouseEvent *e)
override;
58 virtual void mouseReleaseEvent(QMouseEvent *e)
override;
61 unsigned int matchingRect(
const QPoint &p);
std::vector< QRect > RectVectorType
std::map< unsigned int, QString > IndexToNameMapType
RectVectorType m_Hotspots
A QLabel with multiple hotspots, that can be clicked.
IndexToNameMapType m_HotspotNameForIndex
NameToIndexMapType m_HotspotIndexForName
std::map< QString, unsigned int > NameToIndexMapType