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 28 of file vclicklabel.h.


Constructor & Destructor Documentation

VClickLabel::VClickLabel ( QWidget *  parent = 0  ) 

Default constructor.

Definition at line 24 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 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  ) 

Sets the label text to text.

Definition at line 102 of file vclicklabel.cpp.

References _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]

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

Definition at line 50 of file vclicklabel.cpp.

References _pixmap, _text, p(), and vApp.

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().


Member Data Documentation

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().

Animated pixmap to display.

Definition at line 65 of file vclicklabel.h.

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


The documentation for this class was generated from the following files:

Generated on Sat Aug 16 17:31:50 2008 for Vidalia by  doxygen 1.5.6