13 #ifndef qclickablelabelhincluded
14 #define qclickablelabelhincluded
39 void AddHotspot(
const QString &name,
const QRect position);
A QLabel with multiple hotspots, that can be clicked.
void mouseReleaseEvent(QMouseEvent *e) override
IndexToNameMapType m_HotspotNameForIndex
std::vector< QRect > RectVectorType
std::map< unsigned int, QString > IndexToNameMapType
void RemoveHotspot(const QString &name)
QClickableLabel(QWidget *parent, Qt::WindowFlags f={})
QClickableLabel(const QString &text, QWidget *parent, Qt::WindowFlags f={})
std::map< QString, unsigned int > NameToIndexMapType
NameToIndexMapType m_HotspotIndexForName
void mousePressed(const QString &hotspotName)
void mousePressEvent(QMouseEvent *e) override
void mousePressed(unsigned int hotspotIndex)
~QClickableLabel() override
void mouseReleased(const QString &hotspotName)
RectVectorType m_Hotspots
void RemoveHotspot(unsigned int hotspotIndex)
void AddHotspot(const QString &name, const QRect position)
unsigned int matchingRect(const QPoint &p)
returns index == m_Hotspots.size() if nothing is hit
void mouseReleased(unsigned int hotspotIndex)