|
Medical Imaging Interaction Toolkit
2018.4.99-389bf124
Medical Imaging Interaction Toolkit
|
A QLabel with multiple hotspots, that can be clicked. More...
#include <qclickablelabel.h>


Signals | |
| void | mousePressed (const QString &hotspotName) |
| void | mousePressed (unsigned int hotspotIndex) |
| void | mouseReleased (const QString &hotspotName) |
| void | mouseReleased (unsigned int hotspotIndex) |
Public Member Functions | |
| QClickableLabel (QWidget *parent, Qt::WindowFlags f=nullptr) | |
| QClickableLabel (const QString &text, QWidget *parent, Qt::WindowFlags f=nullptr) | |
| ~QClickableLabel () override | |
| void | AddHotspot (const QString &name, const QRect position) |
| void | RemoveHotspot (const QString &name) |
| void | RemoveHotspot (unsigned int hotspotIndex) |
| void | RemoveAllHotspots () |
Protected Types | |
| typedef std::vector< QRect > | RectVectorType |
| typedef std::map< QString, unsigned int > | NameToIndexMapType |
| typedef std::map< unsigned int, QString > | IndexToNameMapType |
Protected Member Functions | |
| void | mousePressEvent (QMouseEvent *e) override |
| void | mouseReleaseEvent (QMouseEvent *e) override |
| unsigned int | matchingRect (const QPoint &p) |
| returns index == m_Hotspots.size() if nothing is hit More... | |
Protected Attributes | |
| RectVectorType | m_Hotspots |
| NameToIndexMapType | m_HotspotIndexForName |
| IndexToNameMapType | m_HotspotNameForIndex |
A QLabel with multiple hotspots, that can be clicked.
Specially useful in connection with a pixmap. Stretched images should be avoided, because the hotspots will not be adjusted in any way.
Definition at line 30 of file qclickablelabel.h.
|
protected |
Definition at line 63 of file qclickablelabel.h.
|
protected |
Definition at line 62 of file qclickablelabel.h.
|
protected |
Definition at line 59 of file qclickablelabel.h.
| QClickableLabel::QClickableLabel | ( | QWidget * | parent, |
| Qt::WindowFlags | f = nullptr |
||
| ) |
Definition at line 19 of file qclickablelabel.cpp.
| QClickableLabel::QClickableLabel | ( | const QString & | text, |
| QWidget * | parent, | ||
| Qt::WindowFlags | f = nullptr |
||
| ) |
Definition at line 23 of file qclickablelabel.cpp.
|
override |
Definition at line 27 of file qclickablelabel.cpp.
| void QClickableLabel::AddHotspot | ( | const QString & | name, |
| const QRect | position | ||
| ) |
Definition at line 31 of file qclickablelabel.cpp.
References m_HotspotIndexForName, m_HotspotNameForIndex, and m_Hotspots.
Referenced by QmitkStandardViews::QmitkStandardViews().
|
protected |
returns index == m_Hotspots.size() if nothing is hit
Definition at line 86 of file qclickablelabel.cpp.
References m_Hotspots.
Referenced by mousePressEvent(), and mouseReleaseEvent().
|
signal |
Referenced by mouseReleaseEvent().
|
signal |
|
overrideprotected |
Definition at line 66 of file qclickablelabel.cpp.
References m_HotspotNameForIndex, m_Hotspots, matchingRect(), and mouseReleased().
|
signal |
Referenced by mousePressEvent().
|
signal |
|
overrideprotected |
Definition at line 76 of file qclickablelabel.cpp.
References m_HotspotNameForIndex, m_Hotspots, matchingRect(), and mousePressed().
| void QClickableLabel::RemoveAllHotspots | ( | ) |
Definition at line 59 of file qclickablelabel.cpp.
References m_HotspotIndexForName, m_HotspotNameForIndex, and m_Hotspots.
| void QClickableLabel::RemoveHotspot | ( | const QString & | name | ) |
Definition at line 38 of file qclickablelabel.cpp.
References m_HotspotIndexForName.
| void QClickableLabel::RemoveHotspot | ( | unsigned int | hotspotIndex | ) |
Definition at line 48 of file qclickablelabel.cpp.
References m_HotspotIndexForName, m_HotspotNameForIndex, and m_Hotspots.
|
protected |
Definition at line 64 of file qclickablelabel.h.
Referenced by AddHotspot(), RemoveAllHotspots(), and RemoveHotspot().
|
protected |
Definition at line 65 of file qclickablelabel.h.
Referenced by AddHotspot(), mousePressEvent(), mouseReleaseEvent(), RemoveAllHotspots(), and RemoveHotspot().
|
protected |
Definition at line 60 of file qclickablelabel.h.
Referenced by AddHotspot(), matchingRect(), mousePressEvent(), mouseReleaseEvent(), RemoveAllHotspots(), and RemoveHotspot().