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

QWidget Class Reference

Common super class for all widgets. Here is also the basic implementation of event passing and dragging. More...

#include <QWidget.h>

Inheritance diagram for QWidget:

Inheritance graph
[legend]
Collaboration diagram for QWidget:

Collaboration graph
[legend]

Public Methods

virtual void add (QWidget *widget)
 adds given widget to the children

virtual void remove (QWidget *widget)
 removes given widget from the children

virtual void freeWidget (QWidget *widget)
 sends request for freeing a widget to parent

void clearFocusPath ()
 clears the focus path by setting it to 0 recursively

bool getFocused ()
 returns true if widget has keyboard focus

void free ()
 frees the widget and all resources. This method must be used insted of explicit delete

bool event (QEvent *e)
 primary event receiver method. Returns true, if event was handled. In this case the event won't be passed to next child

virtual void redraw ()
 post request for redisplay

bool eventToChildren (QEvent *e)
 sends the event to each child. Returns true if event was handled

bool eventToChildrenReversed (QEvent *e)
 sends the event to each child in reversed order. Returns true if event was handled

virtual void bringToFront (QWidget *widget)
 brings the given widget to the front. Must be a child widget

bool isInFront (QWidget *widget)
 Returns true if a given widget is in front.

bool handleKeyboardEvent (QEvent *e)
 handles the keyboard event

bool handleMouseEvent (QEvent *e)
 handles the mouse event for this widget

void handleDragging (QEvent *e)
 handles the dragging

void doFocus (QEvent *e)
 tries to set focus to the current widget

virtual void requestFocus (QWidget *Sender, QWidget *FocusedWidget)
 called if Sender wants to announce new focused control

void changeContext ()
 changes the global drawing context

void restoreContext ()
 restores the global drawing context

void freeChildren ()
 calls delete for every child widget

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 int getWidth ()
 getter method for Width

virtual void setWidth (int newValue)
 setter method for Width

virtual int getHeight ()
 getter method for Height

virtual void setHeight (int newValue)
 setter method for Height

virtual int getTop ()
 getter method for Top

virtual void setTop (int newValue)
 setter method for Top

virtual int getLeft ()
 getter method for Left

virtual void setLeft (int newValue)
 setter method for Left

virtual int getMinWidth ()
 getter method for MinWidth

virtual void setMinWidth (int newValue)
 setter method for MinWidth

virtual int getMinHeight ()
 getter method for MinHeight

virtual void setMinHeight (int newValue)
 setter method for MinHeight

virtual int getClientBorderLeft ()
 getter method for ClientBorderLeft

virtual void setClientBorderLeft (int newValue)
 setter method for ClientBorderLeft

virtual int getClientBorderRight ()
 getter method for ClientBorderRight

virtual void setClientBorderRight (int newValue)
 setter method for ClientBorderRight

virtual int getClientBorderTop ()
 getter method for ClientBorderTop

virtual void setClientBorderTop (int newValue)
 setter method for ClientBorderTop

virtual int getClientBorderBottom ()
 getter method for ClientBorderBottom

virtual void setClientBorderBottom (int newValue)
 setter method for ClientBorderBottom

virtual bool getEnabled ()
 getter method for Enabled

virtual void setEnabled (bool newValue)
 setter method for Enabled

virtual bool getVisible ()
 getter method for Visible

virtual void setVisible (bool newValue)
 setter method for Visible

virtual QLookAndFeelgetLookAndFeel ()
 getter method for LookAndFeel

virtual void setLookAndFeel (QLookAndFeel *newValue)
 setter method for LookAndFeel

virtual QWidget * getOwner ()
 getter method for Owner

virtual void setOwner (QWidget *newValue)
 setter method for Owner

virtual QWidget * getFocusPath ()
 getter method for FocusPath

virtual void setFocusPath (QWidget *newValue)
 setter method for FocusPath

void print ()
 prints itself to the cout

 QWidget (QWidget *aOwner)
 Constructor.

virtual ~QWidget ()
 Destructor.

virtual void add (QWidget *widget)
 adds given widget to the children

virtual void remove (QWidget *widget)
 removes given widget from the children

virtual void freeWidget (QWidget *widget)
 sends request for freeing a widget to parent

void clearFocusPath ()
 clears the focus path by setting it to 0 recursively

bool getFocused ()
 returns true if widget has keyboard focus

void free ()
 frees the widget and all resources. This method must be used insted of explicit delete

bool event (QEvent *e)
 primary event receiver method. Returns true, if event was handled. In this case the event won't be passed to next child

virtual void redraw ()
 post request for redisplay

bool eventToChildren (QEvent *e)
 sends the event to each child. Returns true if event was handled

bool eventToChildrenReversed (QEvent *e)
 sends the event to each child in reversed order. Returns true if event was handled

virtual void bringToFront (QWidget *widget)
 brings the given widget to the front. Must be a child widget

bool isInFront (QWidget *widget)
 Returns true if a given widget is in front.

bool handleKeyboardEvent (QEvent *e)
 handles the keyboard event

bool handleMouseEvent (QEvent *e)
 handles the mouse event for this widget

void handleDragging (QEvent *e)
 handles the dragging

void doFocus (QEvent *e)
 tries to set focus to the current widget

virtual void requestFocus (QWidget *Sender, QWidget *FocusedWidget)
 called if Sender wants to announce new focused control

void changeContext ()
 changes the global drawing context

void restoreContext ()
 restores the global drawing context

void freeChildren ()
 calls delete for every child widget

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 int getWidth ()
 getter method for Width

virtual void setWidth (int newValue)
 setter method for Width

virtual int getHeight ()
 getter method for Height

virtual void setHeight (int newValue)
 setter method for Height

virtual int getTop ()
 getter method for Top

virtual void setTop (int newValue)
 setter method for Top

virtual int getLeft ()
 getter method for Left

virtual void setLeft (int newValue)
 setter method for Left

virtual int getMinWidth ()
 getter method for MinWidth

virtual void setMinWidth (int newValue)
 setter method for MinWidth

virtual int getMinHeight ()
 getter method for MinHeight

virtual void setMinHeight (int newValue)
 setter method for MinHeight

virtual int getClientBorderLeft ()
 getter method for ClientBorderLeft

virtual void setClientBorderLeft (int newValue)
 setter method for ClientBorderLeft

virtual int getClientBorderRight ()
 getter method for ClientBorderRight

virtual void setClientBorderRight (int newValue)
 setter method for ClientBorderRight

virtual int getClientBorderTop ()
 getter method for ClientBorderTop

virtual void setClientBorderTop (int newValue)
 setter method for ClientBorderTop

virtual int getClientBorderBottom ()
 getter method for ClientBorderBottom

virtual void setClientBorderBottom (int newValue)
 setter method for ClientBorderBottom

virtual bool getEnabled ()
 getter method for Enabled

virtual void setEnabled (bool newValue)
 setter method for Enabled

virtual bool getVisible ()
 getter method for Visible

virtual void setVisible (bool newValue)
 setter method for Visible

virtual QLookAndFeelgetLookAndFeel ()
 getter method for LookAndFeel

virtual void setLookAndFeel (QLookAndFeel *newValue)
 setter method for LookAndFeel

virtual QWidget * getOwner ()
 getter method for Owner

virtual void setOwner (QWidget *newValue)
 setter method for Owner

virtual QWidget * getFocusPath ()
 getter method for FocusPath

virtual void setFocusPath (QWidget *newValue)
 setter method for FocusPath

void print ()
 prints itself to the cout

 QWidget (QWidget *aOwner)
 Constructor.

virtual ~QWidget ()
 Destructor.


Data Fields

void(* onClick )(QWidget *, QEvent *)
 event handler for mouse click

void(* onMouseDown )(QWidget *, QEvent *)
 event handler for mouse down

void(* onMouseUp )(QWidget *, QEvent *)
 event handler for mouse up

void(* onMouseMove )(QWidget *, QEvent *)
 event handler for mouse up

void(* onKey )(QWidget *, QEvent *)
 event handler for keyboard

void(* onCustomDraw )(QWidget *, QEvent *)
 event handler for custom drawings

void(* onResize )(QWidget *)
 event handler for handling the changes of position and size


Protected Attributes

int Width
 width of widget

int Height
 height of widget

int Top
 top offset

int Left
 left offset

int MinWidth
 minimum width of widget

int MinHeight
 minimum height of widget

int ClientBorderLeft
 left border to client region

int ClientBorderRight
 right border to client region

int ClientBorderTop
 top border to client region

int ClientBorderBottom
 botom border to client region

bool Enabled
 enabled status

bool Visible
 visible status

bool Dragging
 dragging status

QLookAndFeelLookAndFeel
 Look and Feel.

QWidget * Owner
 Owner of this widget.

QWidget * FocusPath
 Defines the child widget to which keyboard events should be passed.

list< QWidget * > Children
 list of children widgets

QLookAndFeelLookAndFeel
 Look and Feel.

QWidget * Owner
 Owner of this widget.

QWidget * FocusPath
 Defines the child widget to which keyboard events should be passed.

list< QWidget * > Children
 list of children widgets


Private Attributes

int DragStartX
 dragging position x

int DragStartY
 dragging position y


Detailed Description

Common super class for all widgets. Here is also the basic implementation of event passing and dragging.

Definition at line 20 of file QWidget.h.


Constructor & Destructor Documentation

QWidget::QWidget QWidget *    aOwner
 

Constructor.

Definition at line 607 of file QWidget.cpp.

References getClientBorderTop().

QWidget::~QWidget   [virtual]
 

Destructor.

Definition at line 641 of file QWidget.cpp.

QWidget::QWidget QWidget *    aOwner
 

Constructor.

virtual QWidget::~QWidget   [virtual]
 

Destructor.


Member Function Documentation

virtual void QWidget::add QWidget *    widget [virtual]
 

adds given widget to the children

void QWidget::add QWidget *    widget [virtual]
 

adds given widget to the children

Definition at line 14 of file QWidget.cpp.

References Children, and childrenChanged().

virtual void QWidget::bringToFront QWidget *    widget [virtual]
 

brings the given widget to the front. Must be a child widget

Reimplemented in QToolBar, and QToolBar.

void QWidget::bringToFront QWidget *    widget [virtual]
 

brings the given widget to the front. Must be a child widget

Reimplemented in QToolBar, and QToolBar.

Definition at line 143 of file QWidget.cpp.

References Children.

Referenced by doFocus().

virtual bool QWidget::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 in QButton, QCaptionButton, QCheckBox, QRadioButton, QScreen, QTextEdit, QToolBar, QWindow, QButton, QCaptionButton, QCheckBox, QRadioButton, QScreen, QTextEdit, QToolBar, and QWindow.

bool QWidget::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 in QButton, QCaptionButton, QCheckBox, QRadioButton, QScreen, QTextEdit, QToolBar, QWindow, QButton, QCaptionButton, QCheckBox, QRadioButton, QScreen, QTextEdit, QToolBar, and QWindow.

Definition at line 349 of file QWidget.cpp.

Referenced by handleMouseEvent().

virtual bool QWidget::canFocus QEvent   e [virtual]
 

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

Reimplemented in QButton, QCaptionButton, QCheckBox, QRadioButton, QScreen, QTextEdit, QToolBar, QWindow, QButton, QCaptionButton, QCheckBox, QRadioButton, QScreen, QTextEdit, QToolBar, and QWindow.

bool QWidget::canFocus QEvent   e [virtual]
 

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

Reimplemented in QButton, QCaptionButton, QCheckBox, QRadioButton, QScreen, QTextEdit, QToolBar, QWindow, QButton, QCaptionButton, QCheckBox, QRadioButton, QScreen, QTextEdit, QToolBar, and QWindow.

Definition at line 372 of file QWidget.cpp.

Referenced by doFocus().

void QWidget::changeContext  
 

changes the global drawing context

void QWidget::changeContext  
 

changes the global drawing context

Definition at line 314 of file QWidget.cpp.

References Left, and Top.

Referenced by event().

virtual void QWidget::childrenChanged   [virtual]
 

called if a child is added/removed

Reimplemented in QButton, QCaptionButton, QCheckBox, QRadioButton, QScreen, QTextEdit, QToolBar, QWindow, QButton, QCaptionButton, QCheckBox, QRadioButton, QScreen, QTextEdit, QToolBar, and QWindow.

void QWidget::childrenChanged   [virtual]
 

called if a child is added/removed

Reimplemented in QButton, QCaptionButton, QCheckBox, QRadioButton, QScreen, QTextEdit, QToolBar, QWindow, QButton, QCaptionButton, QCheckBox, QRadioButton, QScreen, QTextEdit, QToolBar, and QWindow.

Definition at line 367 of file QWidget.cpp.

Referenced by add(), and remove().

virtual void QWidget::CleanUp   [virtual]
 

clean up code

Reimplemented in QButton, QCaptionButton, QCheckBox, QRadioButton, QScreen, QTextEdit, QToolBar, QWindow, QButton, QCaptionButton, QCheckBox, QRadioButton, QScreen, QTextEdit, QToolBar, and QWindow.

void QWidget::CleanUp   [virtual]
 

clean up code

Reimplemented in QButton, QCaptionButton, QCheckBox, QRadioButton, QScreen, QTextEdit, QToolBar, QWindow, QButton, QCaptionButton, QCheckBox, QRadioButton, QScreen, QTextEdit, QToolBar, and QWindow.

Definition at line 384 of file QWidget.cpp.

void QWidget::clearFocusPath  
 

clears the focus path by setting it to 0 recursively

void QWidget::clearFocusPath  
 

clears the focus path by setting it to 0 recursively

Definition at line 35 of file QWidget.cpp.

References FocusPath.

Referenced by requestFocus(), and QScreen::requestFocus().

void QWidget::doFocus QEvent   e
 

tries to set focus to the current widget

void QWidget::doFocus QEvent   e
 

tries to set focus to the current widget

Definition at line 293 of file QWidget.cpp.

References bringToFront(), canFocus(), Owner, and requestFocus().

Referenced by handleMouseEvent().

virtual void QWidget::draw QEvent   e [virtual]
 

draws itself with OpenGL. Here is the OpenGL drawing code

Reimplemented in QButton, QCaptionButton, QCheckBox, QRadioButton, QScreen, QTextEdit, QToolBar, QWindow, QButton, QCaptionButton, QCheckBox, QRadioButton, QScreen, QTextEdit, QToolBar, and QWindow.

void QWidget::draw QEvent   e [virtual]
 

draws itself with OpenGL. Here is the OpenGL drawing code

Reimplemented in QButton, QCaptionButton, QCheckBox, QRadioButton, QScreen, QTextEdit, QToolBar, QWindow, QButton, QCaptionButton, QCheckBox, QRadioButton, QScreen, QTextEdit, QToolBar, and QWindow.

Definition at line 337 of file QWidget.cpp.

Referenced by event().

bool QWidget::event QEvent   e
 

primary event receiver method. Returns true, if event was handled. In this case the event won't be passed to next child

bool QWidget::event QEvent   e
 

primary event receiver method. Returns true, if event was handled. In this case the event won't be passed to next child

Definition at line 57 of file QWidget.cpp.

References changeContext(), draw(), Enabled, eventToChildrenReversed(), QEvent::getType(), handleKeyboardEvent(), handleMouseEvent(), onCustomDraw, restoreContext(), and Visible.

Referenced by handleKeyboardEvent(), and QScreen::sendEvent().

bool QWidget::eventToChildren QEvent   e
 

sends the event to each child. Returns true if event was handled

bool QWidget::eventToChildren QEvent   e
 

sends the event to each child. Returns true if event was handled

Definition at line 117 of file QWidget.cpp.

References Children.

Referenced by handleMouseEvent().

bool QWidget::eventToChildrenReversed QEvent   e
 

sends the event to each child in reversed order. Returns true if event was handled

bool QWidget::eventToChildrenReversed QEvent   e
 

sends the event to each child in reversed order. Returns true if event was handled

Definition at line 130 of file QWidget.cpp.

References Children.

Referenced by event().

void QWidget::free  
 

frees the widget and all resources. This method must be used insted of explicit delete

void QWidget::free  
 

frees the widget and all resources. This method must be used insted of explicit delete

Definition at line 51 of file QWidget.cpp.

References freeWidget(), and Owner.

Referenced by CloseButtonHandler().

void QWidget::freeChildren  
 

calls delete for every child widget

void QWidget::freeChildren  
 

calls delete for every child widget

Definition at line 327 of file QWidget.cpp.

References Children.

virtual void QWidget::freeWidget QWidget *    widget [virtual]
 

sends request for freeing a widget to parent

Reimplemented in QScreen, and QScreen.

void QWidget::freeWidget QWidget *    widget [virtual]
 

sends request for freeing a widget to parent

Reimplemented in QScreen, and QScreen.

Definition at line 29 of file QWidget.cpp.

References Owner.

Referenced by free().

virtual int QWidget::getClientBorderBottom   [virtual]
 

getter method for ClientBorderBottom

int QWidget::getClientBorderBottom   [virtual]
 

getter method for ClientBorderBottom

Definition at line 516 of file QWidget.cpp.

References ClientBorderBottom.

Referenced by handleDragging(), and QWindow::maximize().

virtual int QWidget::getClientBorderLeft   [virtual]
 

getter method for ClientBorderLeft

int QWidget::getClientBorderLeft   [virtual]
 

getter method for ClientBorderLeft

Definition at line 480 of file QWidget.cpp.

References ClientBorderLeft.

Referenced by handleDragging(), and QWindow::maximize().

virtual int QWidget::getClientBorderRight   [virtual]
 

getter method for ClientBorderRight

int QWidget::getClientBorderRight   [virtual]
 

getter method for ClientBorderRight

Definition at line 492 of file QWidget.cpp.

References ClientBorderRight.

Referenced by handleDragging(), and QWindow::maximize().

virtual int QWidget::getClientBorderTop   [virtual]
 

getter method for ClientBorderTop

int QWidget::getClientBorderTop   [virtual]
 

getter method for ClientBorderTop

Definition at line 504 of file QWidget.cpp.

References ClientBorderTop.

Referenced by handleDragging(), QWindow::maximize(), and QWidget().

virtual bool QWidget::getEnabled   [virtual]
 

getter method for Enabled

bool QWidget::getEnabled   [virtual]
 

getter method for Enabled

Definition at line 528 of file QWidget.cpp.

References Enabled.

bool QWidget::getFocused  
 

returns true if widget has keyboard focus

bool QWidget::getFocused  
 

returns true if widget has keyboard focus

Definition at line 45 of file QWidget.cpp.

References getFocusPath(), and Owner.

Referenced by QTextEdit::draw(), and QCaptionButton::draw().

virtual QWidget* QWidget::getFocusPath   [virtual]
 

getter method for FocusPath

QWidget * QWidget::getFocusPath   [virtual]
 

getter method for FocusPath

Definition at line 576 of file QWidget.cpp.

References FocusPath.

Referenced by QTextEdit::draw(), QWindow::drawFrame(), and getFocused().

virtual int QWidget::getHeight   [virtual]
 

getter method for Height

int QWidget::getHeight   [virtual]
 

getter method for Height

Definition at line 408 of file QWidget.cpp.

References Height.

Referenced by QWindow::drawCloseButton(), QWindow::drawMaximizeButton(), handleDragging(), QWindow::Init(), QWindow::maximize(), and QWindow::processMouseOwner().

virtual int QWidget::getLeft   [virtual]
 

getter method for Left

int QWidget::getLeft   [virtual]
 

getter method for Left

Definition at line 441 of file QWidget.cpp.

References Left.

Referenced by QWindow::drawFrame(), and QWindow::layout().

virtual QLookAndFeel* QWidget::getLookAndFeel   [virtual]
 

getter method for LookAndFeel

QLookAndFeel * QWidget::getLookAndFeel   [virtual]
 

getter method for LookAndFeel

Definition at line 552 of file QWidget.cpp.

References LookAndFeel.

virtual int QWidget::getMinHeight   [virtual]
 

getter method for MinHeight

int QWidget::getMinHeight   [virtual]
 

getter method for MinHeight

Definition at line 468 of file QWidget.cpp.

References MinHeight.

virtual int QWidget::getMinWidth   [virtual]
 

getter method for MinWidth

int QWidget::getMinWidth   [virtual]
 

getter method for MinWidth

Definition at line 456 of file QWidget.cpp.

References MinWidth.

virtual QWidget* QWidget::getOwner   [virtual]
 

getter method for Owner

QWidget * QWidget::getOwner   [virtual]
 

getter method for Owner

Definition at line 564 of file QWidget.cpp.

References Owner.

Referenced by CloseButtonHandler(), drawCloseButtonHandler(), drawMaximizeButtonHandler(), MaximizeButtonHandler(), myMethod1(), and QScreen::sendEvent().

virtual int QWidget::getTop   [virtual]
 

getter method for Top

int QWidget::getTop   [virtual]
 

getter method for Top

Definition at line 426 of file QWidget.cpp.

References Top.

Referenced by QWindow::Init().

virtual bool QWidget::getVisible   [virtual]
 

getter method for Visible

bool QWidget::getVisible   [virtual]
 

getter method for Visible

Definition at line 540 of file QWidget.cpp.

References Visible.

virtual int QWidget::getWidth   [virtual]
 

getter method for Width

int QWidget::getWidth   [virtual]
 

getter method for Width

Definition at line 390 of file QWidget.cpp.

References Width.

Referenced by QWindow::drawCloseButton(), QWindow::drawMaximizeButton(), handleDragging(), QWindow::Init(), QWindow::layout(), QWindow::maximize(), and QWindow::processMouseOwner().

void QWidget::handleDragging QEvent   e
 

handles the dragging

void QWidget::handleDragging QEvent   e
 

handles the dragging

Definition at line 266 of file QWidget.cpp.

References DragStartX, DragStartY, getClientBorderBottom(), getClientBorderLeft(), getClientBorderRight(), getClientBorderTop(), getHeight(), getWidth(), QEvent::getX(), QEvent::getY(), Height, Owner, setLeft(), setTop(), and Width.

Referenced by handleMouseEvent().

bool QWidget::handleKeyboardEvent QEvent   e
 

handles the keyboard event

bool QWidget::handleKeyboardEvent QEvent   e
 

handles the keyboard event

Definition at line 157 of file QWidget.cpp.

References event(), FocusPath, onKey, and processEvent().

Referenced by event().

bool QWidget::handleMouseEvent QEvent   e
 

handles the mouse event for this widget

bool QWidget::handleMouseEvent QEvent   e
 

handles the mouse event for this widget

Definition at line 166 of file QWidget.cpp.

References canDrag(), doFocus(), Dragging, DragStartX, DragStartY, eventToChildren(), QEvent::getType(), QEvent::getX(), QEvent::getY(), handleDragging(), Height, Left, onClick, onMouseDown, onMouseMove, onMouseUp, processEvent(), processMouseOwner(), QEvent::setX(), QEvent::setY(), Top, and Width.

Referenced by event().

virtual void QWidget::Init   [virtual]
 

initialization code

Reimplemented in QButton, QCaptionButton, QCheckBox, QRadioButton, QScreen, QTextEdit, QToolBar, QWindow, QButton, QCaptionButton, QCheckBox, QRadioButton, QScreen, QTextEdit, QToolBar, and QWindow.

void QWidget::Init   [virtual]
 

initialization code

Reimplemented in QButton, QCaptionButton, QCheckBox, QRadioButton, QScreen, QTextEdit, QToolBar, QWindow, QButton, QCaptionButton, QCheckBox, QRadioButton, QScreen, QTextEdit, QToolBar, and QWindow.

Definition at line 378 of file QWidget.cpp.

Referenced by QCheckBox::Init().

bool QWidget::isInFront QWidget *    widget
 

Returns true if a given widget is in front.

bool QWidget::isInFront QWidget *    widget
 

Returns true if a given widget is in front.

Definition at line 151 of file QWidget.cpp.

References Children.

virtual void QWidget::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 in MyWindow, QButton, QCaptionButton, QCheckBox, QRadioButton, QScreen, QTextEdit, QToolBar, QWindow, MyWindow, QButton, QCaptionButton, QCheckBox, QRadioButton, QScreen, QTextEdit, QToolBar, and QWindow.

void QWidget::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 in MyWindow, QButton, QCaptionButton, QCheckBox, QRadioButton, QScreen, QTextEdit, QToolBar, QWindow, MyWindow, QButton, QCaptionButton, QCheckBox, QRadioButton, QScreen, QTextEdit, QToolBar, and QWindow.

Definition at line 343 of file QWidget.cpp.

Referenced by setHeight(), and setWidth().

void QWidget::print  
 

prints itself to the cout

Reimplemented in QButton, QCaptionButton, QCheckBox, QRadioButton, QScreen, QTextEdit, QToolBar, QWindow, QButton, QCaptionButton, QCheckBox, QRadioButton, QScreen, QTextEdit, QToolBar, and QWindow.

void QWidget::print  
 

prints itself to the cout

Reimplemented in QButton, QCaptionButton, QCheckBox, QRadioButton, QScreen, QTextEdit, QToolBar, QWindow, QButton, QCaptionButton, QCheckBox, QRadioButton, QScreen, QTextEdit, QToolBar, and QWindow.

Definition at line 590 of file QWidget.cpp.

virtual bool QWidget::processEvent QEvent   e [virtual]
 

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

Reimplemented in QButton, QCaptionButton, QCheckBox, QRadioButton, QScreen, QTextEdit, QToolBar, QWindow, QButton, QCaptionButton, QCheckBox, QRadioButton, QScreen, QTextEdit, QToolBar, and QWindow.

bool QWidget::processEvent QEvent   e [virtual]
 

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

Reimplemented in QButton, QCaptionButton, QCheckBox, QRadioButton, QScreen, QTextEdit, QToolBar, QWindow, QButton, QCaptionButton, QCheckBox, QRadioButton, QScreen, QTextEdit, QToolBar, and QWindow.

Definition at line 355 of file QWidget.cpp.

Referenced by handleKeyboardEvent(), and handleMouseEvent().

virtual bool QWidget::processMouseOwner QEvent   e [virtual]
 

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

Reimplemented in QButton, QCaptionButton, QCheckBox, QRadioButton, QScreen, QTextEdit, QToolBar, QWindow, QButton, QCaptionButton, QCheckBox, QRadioButton, QScreen, QTextEdit, QToolBar, and QWindow.

bool QWidget::processMouseOwner QEvent   e [virtual]
 

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

Reimplemented in QButton, QCaptionButton, QCheckBox, QRadioButton, QScreen, QTextEdit, QToolBar, QWindow, QButton, QCaptionButton, QCheckBox, QRadioButton, QScreen, QTextEdit, QToolBar, and QWindow.

Definition at line 361 of file QWidget.cpp.

Referenced by handleMouseEvent().

virtual void QWidget::redraw   [virtual]
 

post request for redisplay

Reimplemented in QScreen, and QScreen.

void QWidget::redraw   [virtual]
 

post request for redisplay

Reimplemented in QScreen, and QScreen.

Definition at line 111 of file QWidget.cpp.

References Owner.

virtual void QWidget::remove QWidget *    widget [virtual]
 

removes given widget from the children

Reimplemented in QScreen, and QScreen.

void QWidget::remove QWidget *    widget [virtual]
 

removes given widget from the children

Reimplemented in QScreen, and QScreen.

Definition at line 21 of file QWidget.cpp.

References Children, childrenChanged(), and FocusPath.

Referenced by QScreen::remove(), and QScreen::sendEvent().

virtual void QWidget::requestFocus QWidget *    Sender,
QWidget *    FocusedWidget
[virtual]
 

called if Sender wants to announce new focused control

Reimplemented in QScreen, and QScreen.

void QWidget::requestFocus QWidget *    Sender,
QWidget *    FocusedWidget
[virtual]
 

called if Sender wants to announce new focused control

Reimplemented in QScreen, and QScreen.

Definition at line 303 of file QWidget.cpp.

References clearFocusPath(), FocusPath, and Owner.

Referenced by doFocus().

void QWidget::restoreContext  
 

restores the global drawing context

void QWidget::restoreContext  
 

restores the global drawing context

Definition at line 321 of file QWidget.cpp.

Referenced by event().

virtual void QWidget::setClientBorderBottom int    newValue [virtual]
 

setter method for ClientBorderBottom

void QWidget::setClientBorderBottom int    newValue [virtual]
 

setter method for ClientBorderBottom

Definition at line 522 of file QWidget.cpp.

References ClientBorderBottom.

virtual void QWidget::setClientBorderLeft int    newValue [virtual]
 

setter method for ClientBorderLeft

void QWidget::setClientBorderLeft int    newValue [virtual]
 

setter method for ClientBorderLeft

Definition at line 486 of file QWidget.cpp.

References ClientBorderLeft.

virtual void QWidget::setClientBorderRight int    newValue [virtual]
 

setter method for ClientBorderRight

void QWidget::setClientBorderRight int    newValue [virtual]
 

setter method for ClientBorderRight

Definition at line 498 of file QWidget.cpp.

References ClientBorderRight.

virtual void QWidget::setClientBorderTop int    newValue [virtual]
 

setter method for ClientBorderTop

void QWidget::setClientBorderTop int    newValue [virtual]
 

setter method for ClientBorderTop

Definition at line 510 of file QWidget.cpp.

References ClientBorderTop.

virtual void QWidget::setEnabled bool    newValue [virtual]
 

setter method for Enabled

void QWidget::setEnabled bool    newValue [virtual]
 

setter method for Enabled

Definition at line 534 of file QWidget.cpp.

References Enabled.

virtual void QWidget::setFocusPath QWidget *    newValue [virtual]
 

setter method for FocusPath

void QWidget::setFocusPath QWidget *    newValue [virtual]
 

setter method for FocusPath

Definition at line 582 of file QWidget.cpp.

References FocusPath.

virtual void QWidget::setHeight int    newValue [virtual]
 

setter method for Height

void QWidget::setHeight int    newValue [virtual]
 

setter method for Height

Definition at line 414 of file QWidget.cpp.

References Height, layout(), MinHeight, and onResize.

Referenced by glutResize(), QWindow::Init(), QWindow::maximize(), mySubWindow(), MyWindow::MyWindow(), and QWindow::processMouseOwner().

virtual void QWidget::setLeft int    newValue [virtual]
 

setter method for Left

void QWidget::setLeft int    newValue [virtual]
 

setter method for Left

Definition at line 447 of file QWidget.cpp.

References Left.

Referenced by handleDragging(), QWindow::layout(), QWindow::maximize(), and MyWindow::MyWindow().

virtual void QWidget::setLookAndFeel QLookAndFeel   newValue [virtual]
 

setter method for LookAndFeel

void QWidget::setLookAndFeel QLookAndFeel   newValue [virtual]
 

setter method for LookAndFeel

Definition at line 558 of file QWidget.cpp.

References LookAndFeel.

virtual void QWidget::setMinHeight int    newValue [virtual]
 

setter method for MinHeight

void QWidget::setMinHeight int    newValue [virtual]
 

setter method for MinHeight

Definition at line 474 of file QWidget.cpp.

References MinHeight.

virtual void QWidget::setMinWidth int    newValue [virtual]
 

setter method for MinWidth

void QWidget::setMinWidth int    newValue [virtual]
 

setter method for MinWidth

Definition at line 462 of file QWidget.cpp.

References MinWidth.

virtual void QWidget::setOwner QWidget *    newValue [virtual]
 

setter method for Owner

void QWidget::setOwner QWidget *    newValue [virtual]
 

setter method for Owner

Definition at line 570 of file QWidget.cpp.

References Owner.

virtual void QWidget::setTop int    newValue [virtual]
 

setter method for Top

void QWidget::setTop int    newValue [virtual]
 

setter method for Top

Definition at line 432 of file QWidget.cpp.

References Top.

Referenced by handleDragging(), QWindow::Init(), QWindow::maximize(), and MyWindow::MyWindow().

virtual void QWidget::setVisible bool    newValue [virtual]
 

setter method for Visible

void QWidget::setVisible bool    newValue [virtual]
 

setter method for Visible

Definition at line 546 of file QWidget.cpp.

References Visible.

virtual void QWidget::setWidth int    newValue [virtual]
 

setter method for Width

void QWidget::setWidth int    newValue [virtual]
 

setter method for Width

Definition at line 396 of file QWidget.cpp.

References layout(), MinWidth, onResize, and Width.

Referenced by glutResize(), QWindow::Init(), main(), QWindow::maximize(), mySubWindow(), MyWindow::MyWindow(), QWindow::processMouseOwner(), and QCheckBox::setCaption().


Field Documentation

list<QWidget*> QWidget::Children [protected]
 

list of children widgets

Definition at line 80 of file QWidget.h.

list<QWidget*> QWidget::Children [protected]
 

list of children widgets

Definition at line 79 of file QWidget.h.

Referenced by add(), bringToFront(), eventToChildren(), eventToChildrenReversed(), freeChildren(), isInFront(), QToolBar::layout(), and remove().

int QWidget::ClientBorderBottom [protected]
 

botom border to client region

Definition at line 59 of file QWidget.h.

Referenced by getClientBorderBottom(), QWindow::Init(), and setClientBorderBottom().

int QWidget::ClientBorderLeft [protected]
 

left border to client region

Definition at line 50 of file QWidget.h.

Referenced by getClientBorderLeft(), QWindow::Init(), and setClientBorderLeft().

int QWidget::ClientBorderRight [protected]
 

right border to client region

Definition at line 53 of file QWidget.h.

Referenced by getClientBorderRight(), QWindow::Init(), and setClientBorderRight().

int QWidget::ClientBorderTop [protected]
 

top border to client region

Definition at line 56 of file QWidget.h.

Referenced by getClientBorderTop(), QWindow::Init(), and setClientBorderTop().

bool QWidget::Dragging [protected]
 

dragging status

Definition at line 68 of file QWidget.h.

Referenced by handleMouseEvent().

int QWidget::DragStartX [private]
 

dragging position x

Definition at line 25 of file QWidget.h.

Referenced by handleDragging(), and handleMouseEvent().

int QWidget::DragStartY [private]
 

dragging position y

Definition at line 28 of file QWidget.h.

Referenced by handleDragging(), and handleMouseEvent().

bool QWidget::Enabled [protected]
 

enabled status

Definition at line 62 of file QWidget.h.

Referenced by event(), getEnabled(), and setEnabled().

QWidget* QWidget::FocusPath [protected]
 

Defines the child widget to which keyboard events should be passed.

Definition at line 77 of file QWidget.h.

QWidget* QWidget::FocusPath [protected]
 

Defines the child widget to which keyboard events should be passed.

Definition at line 76 of file QWidget.h.

Referenced by clearFocusPath(), getFocusPath(), handleKeyboardEvent(), remove(), QScreen::remove(), requestFocus(), QScreen::requestFocus(), and setFocusPath().

int QWidget::Height [protected]
 

height of widget

Definition at line 35 of file QWidget.h.

Referenced by QToolBar::draw(), QTextEdit::draw(), QScreen::draw(), QCaptionButton::draw(), QWindow::drawFrame(), getHeight(), handleDragging(), handleMouseEvent(), QToolBar::Init(), QTextEdit::Init(), QCaptionButton::Init(), QToolBar::layout(), QCheckBox::layout(), QWindow::maximize(), QWindow::processEvent(), QButton::processMouseOwner(), and setHeight().

int QWidget::Left [protected]
 

left offset

Definition at line 41 of file QWidget.h.

Referenced by QToolBar::canDrag(), changeContext(), QWindow::drawFrame(), getLeft(), handleMouseEvent(), QWindow::maximize(), QWindow::processEvent(), QWindow::processMouseOwner(), QButton::processMouseOwner(), and setLeft().

QLookAndFeel* QWidget::LookAndFeel [protected]
 

Look and Feel.

Definition at line 71 of file QWidget.h.

QLookAndFeel* QWidget::LookAndFeel [protected]
 

Look and Feel.

Definition at line 70 of file QWidget.h.

Referenced by QScreen::CleanUp(), QToolBar::draw(), QTextEdit::draw(), QScreen::draw(), QRadioButton::draw(), QCheckBox::draw(), QCaptionButton::draw(), QWindow::drawCloseButton(), QWindow::drawCoordInfos(), QWindow::drawFrame(), QWindow::drawMaximizeButton(), getLookAndFeel(), QTextEdit::Init(), QScreen::Init(), QCheckBox::Init(), QCaptionButton::Init(), and setLookAndFeel().

int QWidget::MinHeight [protected]
 

minimum height of widget

Definition at line 47 of file QWidget.h.

Referenced by getMinHeight(), QWindow::Init(), setHeight(), and setMinHeight().

int QWidget::MinWidth [protected]
 

minimum width of widget

Definition at line 44 of file QWidget.h.

Referenced by getMinWidth(), QWindow::Init(), setMinWidth(), and setWidth().

void(* QWidget::onClick)(QWidget *, QEvent *)
 

event handler for mouse click

Referenced by handleMouseEvent(), QWindow::Init(), and MyWindow::MyWindow().

void(* QWidget::onCustomDraw)(QWidget *, QEvent *)
 

event handler for custom drawings

Referenced by event(), and QWindow::Init().

void(* QWidget::onKey)(QWidget *, QEvent *)
 

event handler for keyboard

Referenced by handleKeyboardEvent().

void(* QWidget::onMouseDown)(QWidget *, QEvent *)
 

event handler for mouse down

Referenced by handleMouseEvent().

void(* QWidget::onMouseMove)(QWidget *, QEvent *)
 

event handler for mouse up

Referenced by handleMouseEvent().

void(* QWidget::onMouseUp)(QWidget *, QEvent *)
 

event handler for mouse up

Referenced by handleMouseEvent().

void(* QWidget::onResize)(QWidget *)
 

event handler for handling the changes of position and size

Referenced by setHeight(), and setWidth().

QWidget* QWidget::Owner [protected]
 

Owner of this widget.

Definition at line 74 of file QWidget.h.

QWidget* QWidget::Owner [protected]
 

Owner of this widget.

Definition at line 73 of file QWidget.h.

Referenced by doFocus(), QTextEdit::draw(), QWindow::drawFrame(), free(), freeWidget(), getFocused(), getOwner(), handleDragging(), QWindow::maximize(), MyWindow::MyWindow(), QWindow::processMouseOwner(), redraw(), requestFocus(), and setOwner().

int QWidget::Top [protected]
 

top offset

Definition at line 38 of file QWidget.h.

Referenced by QWindow::canDrag(), changeContext(), QWindow::drawFrame(), getTop(), handleMouseEvent(), QWindow::maximize(), QWindow::processEvent(), QWindow::processMouseOwner(), QButton::processMouseOwner(), and setTop().

bool QWidget::Visible [protected]
 

visible status

Definition at line 65 of file QWidget.h.

Referenced by event(), getVisible(), and setVisible().

int QWidget::Width [protected]
 

width of widget

Definition at line 32 of file QWidget.h.

Referenced by QToolBar::draw(), QTextEdit::draw(), QScreen::draw(), QCaptionButton::draw(), QWindow::drawFrame(), getWidth(), handleDragging(), handleMouseEvent(), QToolBar::Init(), QTextEdit::Init(), QWindow::layout(), QToolBar::layout(), QWindow::maximize(), QWindow::processEvent(), QButton::processMouseOwner(), QTextEdit::setText(), setWidth(), and QCaptionButton::updateCaptionPosition().


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