#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) |
void | setAnimation (const QPixmap &animPixmap) |
Protected Member Functions | |
virtual void | paintEvent (QPaintEvent *e) |
virtual void | mouseReleaseEvent (QMouseEvent *e) |
Private Slots | |
void | animationFrameChanged (int frameNumber) |
Private Attributes | |
QString | _text |
QPixmap | _pixmap |
AnimatedPixmap | _anim |
Definition at line 28 of file vclicklabel.h.
VClickLabel::VClickLabel | ( | QWidget * | parent = 0 |
) |
Default constructor.
Definition at line 24 of file vclicklabel.cpp.
References _anim, and animationFrameChanged().
QSize VClickLabel::sizeHint | ( | ) | const [virtual] |
Returns the current size hint for this widget's current contents.
Definition at line 34 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 43 of file vclicklabel.cpp.
References sizeHint().
void VClickLabel::setText | ( | const QString & | text | ) |
void VClickLabel::setPixmap | ( | const QPixmap & | pixmap | ) |
Sets the widget's image to img.
Definition at line 110 of file vclicklabel.cpp.
References _anim, _pixmap, and AnimatedPixmap::stop().
void VClickLabel::setAnimation | ( | const QPixmap & | animPixmap | ) |
Sets the widget's image to the animated image file animFile.
Definition at line 75 of file vclicklabel.cpp.
References _anim, AnimatedPixmap::setPixmap(), and AnimatedPixmap::start().
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 92 of file vclicklabel.cpp.
References clicked().
void VClickLabel::animationFrameChanged | ( | int | frameNumber | ) | [private, slot] |
Responds to a frame change on the animation.
Definition at line 83 of file vclicklabel.cpp.
References _anim, _pixmap, and AnimatedPixmap::currentFrame().
Referenced by VClickLabel().
QString VClickLabel::_text [private] |
Text label to display in the widget.
Definition at line 63 of file vclicklabel.h.
Referenced by paintEvent(), setText(), and sizeHint().
QPixmap VClickLabel::_pixmap [private] |
Image to display in the widget.
Definition at line 64 of file vclicklabel.h.
Referenced by animationFrameChanged(), paintEvent(), setPixmap(), and sizeHint().
AnimatedPixmap VClickLabel::_anim [private] |
Animated pixmap to display.
Definition at line 65 of file vclicklabel.h.
Referenced by animationFrameChanged(), setAnimation(), setPixmap(), and VClickLabel().