Main Page   Namespace List   Class Hierarchy   Alphabetical List   Data Structures   File List   Data Fields   Globals  

QButton Class Reference

Generic Button. Generates OnPress event if clicked or space bar pressed. More...

#include <QButton.h>

Inheritance diagram for QButton:

Inheritance graph
[legend]
Collaboration diagram for QButton:

Collaboration graph
[legend]

Public Methods

virtual void draw (QEvent *e)
 draws itself with OpenGL. Here is the OpenGL drawing code

virtual void layout ()
 layout the children widgets. This method is called every time the size is changed. Have to be overwritten for respond on size changes

virtual bool canDrag (QEvent *e)
 have to return true if widget should be dragged with mouse. This method is overwritten in sub classes. If returns true, widget will be dragged

virtual bool processEvent (QEvent *e)
 processing mouse/keyboard events which are in widgets region. Mouse coordinates are relative to Owner

virtual bool processMouseOwner (QEvent *e)
 processing mouse events which are in Owner widget region. Mouse coordinates are relative to Owner

virtual void childrenChanged ()
 called if a child is added/removed

virtual bool canFocus (QEvent *e)
 defines whether control can have keyboard focus. Should return true if Widget wants to get keyboard focus

virtual void Init ()
 initialization code

virtual void CleanUp ()
 clean up code

virtual QBevelState getState ()
 getter method for State

virtual void setState (QBevelState newValue)
 setter method for State

void print ()
 prints itself to the cout

 QButton (QWidget *aOwner)
 Constructor.

virtual ~QButton ()
 Destructor.

virtual void draw (QEvent *e)
 draws itself with OpenGL. Here is the OpenGL drawing code

virtual void layout ()
 layout the children widgets. This method is called every time the size is changed. Have to be overwritten for respond on size changes

virtual bool canDrag (QEvent *e)
 have to return true if widget should be dragged with mouse. This method is overwritten in sub classes. If returns true, widget will be dragged

virtual bool processEvent (QEvent *e)
 processing mouse/keyboard events which are in widgets region. Mouse coordinates are relative to Owner

virtual bool processMouseOwner (QEvent *e)
 processing mouse events which are in Owner widget region. Mouse coordinates are relative to Owner

virtual void childrenChanged ()
 called if a child is added/removed

virtual bool canFocus (QEvent *e)
 defines whether control can have keyboard focus. Should return true if Widget wants to get keyboard focus

virtual void Init ()
 initialization code

virtual void CleanUp ()
 clean up code

virtual QBevelState getState ()
 getter method for State

virtual void setState (QBevelState newValue)
 setter method for State

void print ()
 prints itself to the cout

 QButton (QWidget *aOwner)
 Constructor.

virtual ~QButton ()
 Destructor.


Data Fields

void(* onPress )(QWidget *, QEvent *)
 event handler for press (either mouse click or spacebar or return


Protected Attributes

QBevelState State
 bevel state


Detailed Description

Generic Button. Generates OnPress event if clicked or space bar pressed.

Definition at line 16 of file QButton.h.


Constructor & Destructor Documentation

QButton::QButton QWidget   aOwner
 

Constructor.

Definition at line 125 of file QButton.cpp.

QButton::~QButton   [virtual]
 

Destructor.

Definition at line 136 of file QButton.cpp.

QButton::QButton QWidget   aOwner
 

Constructor.

virtual QButton::~QButton   [virtual]
 

Destructor.


Member Function Documentation

virtual bool QButton::canDrag QEvent   e [virtual]
 

have to return true if widget should be dragged with mouse. This method is overwritten in sub classes. If returns true, widget will be dragged

Reimplemented from QWidget.

Reimplemented in QCaptionButton, and QCaptionButton.

bool QButton::canDrag QEvent   e [virtual]
 

have to return true if widget should be dragged with mouse. This method is overwritten in sub classes. If returns true, widget will be dragged

Reimplemented from QWidget.

Reimplemented in QCaptionButton, and QCaptionButton.

Definition at line 25 of file QButton.cpp.

virtual bool QButton::canFocus QEvent   e [virtual]
 

defines whether control can have keyboard focus. Should return true if Widget wants to get keyboard focus

Reimplemented from QWidget.

Reimplemented in QCaptionButton, and QCaptionButton.

bool QButton::canFocus QEvent   e [virtual]
 

defines whether control can have keyboard focus. Should return true if Widget wants to get keyboard focus

Reimplemented from QWidget.

Reimplemented in QCaptionButton, and QCaptionButton.

Definition at line 86 of file QButton.cpp.

virtual void QButton::childrenChanged   [virtual]
 

called if a child is added/removed

Reimplemented from QWidget.

Reimplemented in QCaptionButton, and QCaptionButton.

void QButton::childrenChanged   [virtual]
 

called if a child is added/removed

Reimplemented from QWidget.

Reimplemented in QCaptionButton, and QCaptionButton.

Definition at line 81 of file QButton.cpp.

virtual void QButton::CleanUp   [virtual]
 

clean up code

Reimplemented from QWidget.

Reimplemented in QCaptionButton, and QCaptionButton.

void QButton::CleanUp   [virtual]
 

clean up code

Reimplemented from QWidget.

Reimplemented in QCaptionButton, and QCaptionButton.

Definition at line 97 of file QButton.cpp.

Referenced by QCaptionButton::CleanUp().

virtual void QButton::draw QEvent   e [virtual]
 

draws itself with OpenGL. Here is the OpenGL drawing code

Reimplemented from QWidget.

Reimplemented in QCaptionButton, and QCaptionButton.

void QButton::draw QEvent   e [virtual]
 

draws itself with OpenGL. Here is the OpenGL drawing code

Reimplemented from QWidget.

Reimplemented in QCaptionButton, and QCaptionButton.

Definition at line 14 of file QButton.cpp.

virtual QBevelState QButton::getState   [virtual]
 

getter method for State

QBevelState QButton::getState   [virtual]
 

getter method for State

Definition at line 102 of file QButton.cpp.

References State.

Referenced by QWindow::drawCloseButton(), and QWindow::drawMaximizeButton().

virtual void QButton::Init   [virtual]
 

initialization code

Reimplemented from QWidget.

Reimplemented in QCaptionButton, and QCaptionButton.

void QButton::Init   [virtual]
 

initialization code

Reimplemented from QWidget.

Reimplemented in QCaptionButton, and QCaptionButton.

Definition at line 92 of file QButton.cpp.

Referenced by QCaptionButton::Init().

virtual void QButton::layout   [virtual]
 

layout the children widgets. This method is called every time the size is changed. Have to be overwritten for respond on size changes

Reimplemented from QWidget.

Reimplemented in QCaptionButton, and QCaptionButton.

void QButton::layout   [virtual]
 

layout the children widgets. This method is called every time the size is changed. Have to be overwritten for respond on size changes

Reimplemented from QWidget.

Reimplemented in QCaptionButton, and QCaptionButton.

Definition at line 20 of file QButton.cpp.

Referenced by QCaptionButton::layout().

void QButton::print  
 

prints itself to the cout

Reimplemented from QWidget.

Reimplemented in QCaptionButton, and QCaptionButton.

void QButton::print  
 

prints itself to the cout

Reimplemented from QWidget.

Reimplemented in QCaptionButton, and QCaptionButton.

Definition at line 116 of file QButton.cpp.

virtual bool QButton::processEvent QEvent   e [virtual]
 

processing mouse/keyboard events which are in widgets region. Mouse coordinates are relative to Owner

Reimplemented from QWidget.

Reimplemented in QCaptionButton, and QCaptionButton.

bool QButton::processEvent QEvent   e [virtual]
 

processing mouse/keyboard events which are in widgets region. Mouse coordinates are relative to Owner

Reimplemented from QWidget.

Reimplemented in QCaptionButton, and QCaptionButton.

Definition at line 31 of file QButton.cpp.

References QEvent::getButton(), QEvent::getKey(), QEvent::getType(), and State.

Referenced by QCaptionButton::processEvent().

virtual bool QButton::processMouseOwner QEvent   e [virtual]
 

processing mouse events which are in Owner widget region. Mouse coordinates are relative to Owner

Reimplemented from QWidget.

Reimplemented in QCaptionButton, and QCaptionButton.

bool QButton::processMouseOwner QEvent   e [virtual]
 

processing mouse events which are in Owner widget region. Mouse coordinates are relative to Owner

Reimplemented from QWidget.

Reimplemented in QCaptionButton, and QCaptionButton.

Definition at line 69 of file QButton.cpp.

References QEvent::getX(), QEvent::getY(), QWidget::Height, QWidget::Left, State, QWidget::Top, and QWidget::Width.

Referenced by QCaptionButton::processMouseOwner().

virtual void QButton::setState QBevelState    newValue [virtual]
 

setter method for State

void QButton::setState QBevelState    newValue [virtual]
 

setter method for State

Definition at line 108 of file QButton.cpp.

References State.


Field Documentation

void(* QButton::onPress)(QWidget *, QEvent *)
 

event handler for press (either mouse click or spacebar or return

Referenced by main(), and MyWindow::MyWindow().

QBevelState QButton::State [protected]
 

bevel state

Definition at line 21 of file QButton.h.

Referenced by QCaptionButton::draw(), getState(), processEvent(), processMouseOwner(), and setState().


The documentation for this class was generated from the following files:
Generated on Thu Mar 18 18:34:27 2004 for miniQT by doxygen1.2.18