Vidalia  0.2.17
Signals | Public Member Functions | Protected Member Functions | Properties | Private Attributes
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)
const QString & text () const
const QPixmap & pixmap () const

Protected Member Functions

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

Properties

QString text
QPixmap pixmap

Private Attributes

QString _text
QPixmap _pixmap

Detailed Description

Definition at line 25 of file VClickLabel.h.


Constructor & Destructor Documentation

VClickLabel::VClickLabel ( QWidget *  parent = 0)

Default constructor.

Definition at line 23 of file VClickLabel.cpp.


Member Function Documentation

void VClickLabel::clicked ( ) [signal]

Emitted when the widget is left-clicked.

Referenced by mouseReleaseEvent().

QSize VClickLabel::minimumSizeHint ( ) const [virtual]

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

Definition at line 40 of file VClickLabel.cpp.

References sizeHint().

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

Overloaded mouse event to catch left mouse button clicks.

Definition at line 72 of file VClickLabel.cpp.

References clicked().

void VClickLabel::paintEvent ( QPaintEvent *  e) [protected, virtual]

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

Definition at line 47 of file VClickLabel.cpp.

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

const QPixmap& VClickLabel::pixmap ( ) const [inline]

Definition at line 44 of file VClickLabel.h.

References _pixmap.

Referenced by setPixmap().

void VClickLabel::setPixmap ( const QPixmap &  pixmap)

Sets the widget's image to img.

Definition at line 90 of file VClickLabel.cpp.

References _pixmap, and pixmap().

void VClickLabel::setText ( const QString &  text)

Sets the label text to text.

Definition at line 82 of file VClickLabel.cpp.

References _text, and text().

QSize VClickLabel::sizeHint ( ) const [virtual]

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

Definition at line 31 of file VClickLabel.cpp.

References _pixmap, and _text.

Referenced by minimumSizeHint().

const QString& VClickLabel::text ( ) const [inline]

Definition at line 43 of file VClickLabel.h.

References _text.

Referenced by setText().


Member Data Documentation

QPixmap VClickLabel::_pixmap [private]

Image to display in the widget.

Definition at line 61 of file VClickLabel.h.

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

QString VClickLabel::_text [private]

Text label to display in the widget.

Definition at line 60 of file VClickLabel.h.

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


Property Documentation

QPixmap VClickLabel::pixmap [read, write]

Definition at line 46 of file VClickLabel.h.

QString VClickLabel::text [read, write]

Definition at line 46 of file VClickLabel.h.


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