QWSDecoration(3qt)

NAME
QWSDecoration - Allows the appearance of the Qt/Embedded Window Manager to be customized

#include <qwsdecoration_qws.h>

  Public Members
QWSDecoration ()
virtual ~QWSDecoration ()
enum Region { None=0, All=1, Title=2, Top=3, Bottom=4, Left=5, Right=6, TopLeft=7, TopRight=8, BottomLeft=9, BottomRight=10, Close=11, Minimize=12, Maximize=13, Normalize=14, Menu=15, LastRegion=Menu }
virtual QRegion region ( const QWidget *, const QRect & rect, Region r=All )
virtual void close ( QWidget * )
virtual void minimize ( QWidget * )
virtual void maximize ( QWidget * )
virtual QPopupMenu* menu ( const QWidget *, const QPoint & )
virtual void paint ( QPainter *, const QWidget * )
virtual void paintButton ( QPainter *, const QWidget *, Region, int state )

DESCRIPTION
The QWSDecoration class allows the appearance of the Qt/Embedded Window Manager to be customized.

Qt/Embedded provides window management to top level windows. The appearance of the borders and buttons (the decoration) around the managed windows can be customized by creating your own class derived from QWSDecoration and overriding a few methods.

This class is non-portable. It is available only in Qt/Embedded.

See also QApplication::qwsSetDecoration().

  Member Type Documentation

QWSDecoration::Region
This enum describes the regions in the window decorations.

None - used internally.

All - the entire region used by the window decoration.

Title - Displays the window title and allows the window to be moved by dragging.

Top - allows the top of the window to be resized.

Bottom - allows the bottom of the window to be resized.

Left - allows the left edge of the window to be resized.

Right - allows the right edge of the window to be resized.

TopLeft - allows the top-left of the window to be resized.

TopRight - allows the top-right of the window to be resized.

BottomLeft - allows the bottom-left of the window to be resized.

BottomRight - allows the bottom-right of the window to be resized.

Close - clicking in this region closes the window.

Minimize - clicking in this region minimizes the window.

Maximize - clicking in this region maximizes the window.

Normalize - returns a maximized window to previous size.

Menu - clicking in this region opens the window operations menu.

MEMBER FUNCTION DOCUMENTATION

QWSDecoration::QWSDecoration ()
Constructs a decorator.

QWSDecoration::~QWSDecoration () [virtual]
Destructs a decorator.

void QWSDecoration::close ( QWidget * widget ) [virtual]
Called when the user clicks in the Close region.

widget is the QWidget to be closed.

The default behaviour is to close the widget.

void QWSDecoration::maximize ( QWidget * widget ) [virtual]
Called when the user clicks in the Maximize region.

widget is the QWidget to be maximized.

The default behaviour is to resize the widget to be full-screen. This method can be overridden to, e.g. avoid launch panels.

QPopupMenu * QWSDecoration::menu ( const QWidget *, const QPoint & ) [virtual]
Called to create a QPopupMenu containing the valid menu operations.

The default implementation adds all possible window operations.

void QWSDecoration::minimize ( QWidget * ) [virtual]
Called when the user clicks in the Minimize region.

widget is the QWidget to be minimized.

The default behaviour is to ignore this action.

void QWSDecoration::paint ( QPainter * painter, const QWidget * widget ) [virtual]
Override to paint the border and title decoration around widget using painter.

void QWSDecoration::paintButton ( QPainter * painter, const QWidget * widget, Region type, int state )
Override to paint a button type using painter.

widget is the widget whose button is to be drawn. state is the state of the button. It can be a combination of the following ORed together:

QWSButton::MouseOver

QWSButton::Clicked

QWSButton::On

QRegion QWSDecoration::region ( const QWidget * widget, const QRect & rect, Region type=All )
Returns the requested region type which will contain widget with geometry rect.

SEE ALSO
http://doc.trolltech.com/qwsdecoration.html http://www.trolltech.com/faq/tech.html

COPYRIGHT
Copyright 1992-2001 Trolltech AS, http://www.trolltech.com. See the license file included in the distribution for a complete license statement.

AUTHOR
Generated automatically from the source code.

BUGS
If you find a bug in Qt, please report it as described in http://doc.trolltech.com/bughowto.html. Good bug reports make our job much simpler. Thank you.

In case of content or formattting problems with this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (qwsdecoration.3qt) and the Qt version (2.3.5).