#include <q3button.h>
Inheritance diagram for Q3Button:


{In new code, use QAbstractButton.}
To subclass Q3Button, you must reimplement at least drawButton() (to draw the button's outline) and drawButtonLabel() (to draw its text or pixmap). It is generally advisable to reimplement sizeHint() as well, and sometimes hitButton() (to determine whether a button press is within the button).
Definition at line 33 of file q3button.h.
Public Member Functions | |
| Q3Button (QWidget *parent=0, const char *name=0, Qt::WindowFlags f=0) | |
| ~Q3Button () | |
Protected Member Functions | |
| virtual void | drawButton (QPainter *) |
| virtual void | drawButtonLabel (QPainter *) |
| void | paintEvent (QPaintEvent *) |
| Q3Button::Q3Button | ( | QWidget * | parent = 0, |
|
| const char * | name = 0, |
|||
| Qt::WindowFlags | f = 0 | |||
| ) |
Constructs a standard button called name with parent parent, using the widget flags f.
Definition at line 48 of file q3button.cpp.
00049 : QAbstractButton( parent, name, f ) 00050 { 00051 }
| Q3Button::~Q3Button | ( | ) |
| void Q3Button::drawButton | ( | QPainter * | painter | ) | [protected, virtual] |
Draws the button on the given painter. The default implementation does nothing.
This virtual function is reimplemented by subclasses to draw real buttons. At some point, these reimplementations should call drawButtonLabel().
Definition at line 88 of file q3button.cpp.
Referenced by paintEvent().
| void Q3Button::drawButtonLabel | ( | QPainter * | painter | ) | [protected, virtual] |
Draws the button text or pixmap on the given painter.
This virtual function is reimplemented by subclasses to draw real buttons. It is invoked by drawButton().
Definition at line 103 of file q3button.cpp.
| void Q3Button::paintEvent | ( | QPaintEvent * | event | ) | [protected, virtual] |
Handles paint events, received in event, for buttons. Small and typically complex buttons are painted double-buffered to reduce flicker. The actually drawing is done in the virtual functions drawButton() and drawButtonLabel().
Implements QAbstractButton.
Definition at line 70 of file q3button.cpp.
References drawButton(), and p.
00071 { 00072 QPainter p(this); 00073 drawButton( &p ); 00074 }
Here is the call graph for this function:

1.5.1