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)

Protected Member Functions

virtual void paintEvent (QPaintEvent *e)
virtual void mouseReleaseEvent (QMouseEvent *e)

Private Attributes

QString _text
QPixmap _pixmap


Detailed Description

Definition at line 26 of file vclicklabel.h.


Constructor & Destructor Documentation

VClickLabel::VClickLabel ( QWidget *  parent = 0  ) 

Default constructor.

Definition at line 24 of file vclicklabel.cpp.


Member Function Documentation

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  ) 

Sets the label text to text.

Definition at line 83 of file vclicklabel.cpp.

References _text.

void VClickLabel::setPixmap ( const QPixmap &  pixmap  ) 

Sets the widget's image to img.

Definition at line 91 of file vclicklabel.cpp.

References _pixmap.

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 48 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 73 of file vclicklabel.cpp.

References clicked().


Member Data Documentation

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


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

Generated on Wed Nov 26 21:04:00 2008 for Vidalia by  doxygen 1.5.6