VClickLabel Class Reference

#include <vclicklabel.h>

List of all members.

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


Detailed Description

Definition at line 39 of file vclicklabel.h.


Constructor & Destructor Documentation

VClickLabel::VClickLabel ( QWidget *  parent = 0  ) 

Default constructor.

Definition at line 34 of file vclicklabel.cpp.

References _anim, and animationFrameChanged().


Member Function Documentation

QSize VClickLabel::sizeHint (  )  const [virtual]

Returns the current size hint for this widget's current contents.

Definition at line 44 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 53 of file vclicklabel.cpp.

References sizeHint().

void VClickLabel::setText ( const QString &  text  ) 

Sets the label text to text.

Definition at line 100 of file vclicklabel.cpp.

References _text.

void VClickLabel::setPixmap ( const QPixmap &  pixmap  ) 

Sets the widget's image to img.

Definition at line 108 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 73 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]

Overloaded paint event to draw a pixmap and a text label.

Definition at line 60 of file vclicklabel.cpp.

References _pixmap, _text, and p().

void VClickLabel::mouseReleaseEvent ( QMouseEvent *  e  )  [protected, virtual]

Overloaded mouse event to catch left mouse button clicks.

Definition at line 90 of file vclicklabel.cpp.

References clicked().

void VClickLabel::animationFrameChanged ( int  frameNumber  )  [private, slot]

Responds to a frame change on the animation.

Definition at line 81 of file vclicklabel.cpp.

References _anim, _pixmap, and AnimatedPixmap::currentFrame().

Referenced by VClickLabel().


Member Data Documentation

QString VClickLabel::_text [private]

Text label to display in the widget.

Definition at line 74 of file vclicklabel.h.

Referenced by paintEvent(), setText(), and sizeHint().

QPixmap VClickLabel::_pixmap [private]

Image to display in the widget.

Definition at line 75 of file vclicklabel.h.

Referenced by animationFrameChanged(), paintEvent(), setPixmap(), and sizeHint().

AnimatedPixmap VClickLabel::_anim [private]

Animated pixmap to display.

Definition at line 76 of file vclicklabel.h.

Referenced by animationFrameChanged(), setAnimation(), setPixmap(), and VClickLabel().


The documentation for this class was generated from the following files:
Generated on Wed Sep 5 15:49:29 2007 for Vidalia by  doxygen 1.5.3