#include <vclicklabel.h>
Signals | |
void | clicked () |
Public Member Functions | |
VClickLabel (QWidget *parent=0) | |
virtual QSize | sizeHint () const |
virtual QSize | minimumSizeHint () const |
void | setText (const QString &text) |
void | setPixmap (const QPixmap &img) |
Protected Member Functions | |
virtual void | paintEvent (QPaintEvent *e) |
virtual void | mouseReleaseEvent (QMouseEvent *e) |
Private Attributes | |
QString | _text |
QPixmap | _pixmap |
Definition at line 26 of file vclicklabel.h.
VClickLabel::VClickLabel | ( | QWidget * | parent = 0 |
) |
Default constructor.
Definition at line 24 of file vclicklabel.cpp.
QSize VClickLabel::sizeHint | ( | ) | const [virtual] |
Returns the current size hint for this widget's current contents.
Definition at line 32 of file vclicklabel.cpp.
References _pixmap, and _text.
Referenced by minimumSizeHint().
QSize VClickLabel::minimumSizeHint | ( | ) | const [virtual] |
Returns the minimum size hint for this widget's current contents.
Definition at line 41 of file vclicklabel.cpp.
References sizeHint().
void VClickLabel::setText | ( | const QString & | text | ) |
void VClickLabel::setPixmap | ( | const QPixmap & | pixmap | ) |
void VClickLabel::clicked | ( | ) | [signal] |
Emitted when the widget is left-clicked.
Referenced by mouseReleaseEvent().
void VClickLabel::paintEvent | ( | QPaintEvent * | e | ) | [protected, virtual] |
void VClickLabel::mouseReleaseEvent | ( | QMouseEvent * | e | ) | [protected, virtual] |
Overloaded mouse event to catch left mouse button clicks.
Definition at line 73 of file vclicklabel.cpp.
References clicked().
QString VClickLabel::_text [private] |
Text label to display in the widget.
Definition at line 55 of file vclicklabel.h.
Referenced by paintEvent(), setText(), and sizeHint().
QPixmap VClickLabel::_pixmap [private] |
Image to display in the widget.
Definition at line 56 of file vclicklabel.h.
Referenced by paintEvent(), setPixmap(), and sizeHint().