Vidalia
0.2.21
|
#include <VClickLabel.h>
Public Slots | |
void | enableFlashing () |
void | disableFlashing () |
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 | mousePressEvent (QMouseEvent *e) |
virtual void | mouseReleaseEvent (QMouseEvent *e) |
Properties | |
QString | text |
QPixmap | pixmap |
Private Attributes | |
QString | _text |
QPixmap | _pixmap |
bool | _flashToggle |
bool | _isPressed |
Definition at line 25 of file VClickLabel.h.
VClickLabel::VClickLabel | ( | QWidget * | parent = 0 | ) |
Default constructor.
Definition at line 23 of file VClickLabel.cpp.
References _flashToggle, and _isPressed.
|
signal |
Emitted when the widget is left-clicked.
Referenced by mouseReleaseEvent().
|
slot |
Disables the background color modification
Definition at line 134 of file VClickLabel.cpp.
References _flashToggle.
|
slot |
Enables painting a different background color for this label
Definition at line 127 of file VClickLabel.cpp.
References _flashToggle.
|
virtual |
Returns the minimum size hint for this widget's current contents.
Definition at line 42 of file VClickLabel.cpp.
References sizeHint().
|
protectedvirtual |
Overloaded mouse event to remember click state.
Definition at line 89 of file VClickLabel.cpp.
References _isPressed.
|
protectedvirtual |
Overloaded mouse event to catch left mouse button clicks.
Definition at line 100 of file VClickLabel.cpp.
References _isPressed, and clicked().
|
protectedvirtual |
Overloaded paint event to draw a pixmap and a text label.
Definition at line 49 of file VClickLabel.cpp.
References _flashToggle, _isPressed, _pixmap, _text, p(), and vApp.
|
inline |
void VClickLabel::setPixmap | ( | const QPixmap & | pixmap | ) |
Sets the widget's image to img.
Definition at line 120 of file VClickLabel.cpp.
void VClickLabel::setText | ( | const QString & | text | ) |
Sets the label text to text.
Definition at line 112 of file VClickLabel.cpp.
|
virtual |
Returns the current size hint for this widget's current contents.
Definition at line 33 of file VClickLabel.cpp.
References _pixmap, and _text.
Referenced by minimumSizeHint().
|
inline |
|
private |
Bool toggle for flashing the button.
Definition at line 70 of file VClickLabel.h.
Referenced by disableFlashing(), enableFlashing(), paintEvent(), and VClickLabel().
|
private |
Remember if label is currently pressed.
Definition at line 71 of file VClickLabel.h.
Referenced by mousePressEvent(), mouseReleaseEvent(), paintEvent(), and VClickLabel().
|
private |
Image to display in the widget.
Definition at line 69 of file VClickLabel.h.
Referenced by paintEvent(), pixmap(), setPixmap(), and sizeHint().
|
private |
Text label to display in the widget.
Definition at line 68 of file VClickLabel.h.
Referenced by paintEvent(), setText(), sizeHint(), and text().
|
readwrite |
Definition at line 46 of file VClickLabel.h.
|
readwrite |
Definition at line 46 of file VClickLabel.h.