Home · All Classes · Main Classes · Grouped Classes · Modules · Functions

QDecoration Class Reference
[QtGui module]

The QDecoration class allows the appearance of the Qtopia Core Window Manager to be customized. More...

#include <QDecoration>

Public Types

Public Functions

Static Public Members


Detailed Description

The QDecoration class allows the appearance of the Qtopia Core Window Manager to be customized.

Qtopia Core 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 QDecoration and overriding a few methods.

This class is non-portable. It is available only in Qtopia Core.

See also QApplication::qwsSetDecoration().


Member Type Documentation

enum QDecoration::DecorationRegion

This enum describes the regions in the window decorations.

ConstantValueDescription
QDecoration::All0x7fffffffThe entire region used by the window decoration.
QDecoration::Top0x0000000002The top border is used to vertically resize the window.
QDecoration::Bottom0x0000000040The bottom border is used to vertically resize the window.
QDecoration::Left0x0000000008The left border is used to horizontally resize the window.
QDecoration::Right0x0000000010The right border is used to horizontally resize the window.
QDecoration::TopLeft0x0000000001The top-left corner of the window is used to resize the window both horizontally and vertically.
QDecoration::TopRight0x0000000004The top-right corner of the window is used to resize the window both horizontally and vertically.
QDecoration::BottomLeft0x0000000020The bottom-left corner of the window is used to resize the window both horizontally and vertically.
QDecoration::BottomRight0x0000000080The bottom-right corner of the window is used to resize the window both horizontally and vertically.
QDecoration::Borders0x00000000ffAll of the regions used to describe the window border.
QDecoration::Title0x0000000200The region containing the window title that can be used to move the window by dragging with the mouse cursor.
QDecoration::Close0x0000004000The region occupied by the close button. Clicking in this region closes the window.
QDecoration::Minimize0x0000000800The region occupied by the minimize button. Clicking in this region minimizes the window.
QDecoration::Maximize0x0000001000The region occupied by the maximize button. Clicking in this region maximizes the window.
QDecoration::Normalize0x0000002000The region occupied by a button used to restore a window's normal size. Clicking in this region restores a maximized window to its previous size. This region used for this button is often also the maximize region.
QDecoration::Menu0x0000000100The region occupied by the window's menu button. Clicking in this region opens the window operations (system) menu.
QDecoration::Help0x0000000400The region occupied by the window's help button. Clicking in this region causes the context-sensitive help function to be enabled.
QDecoration::Resize0x0000010000The region that the user can click to resize the window.
QDecoration::Move0x0000008000The region that the user can click to move the window.
QDecoration::None0x0000000000 

enum QDecoration::DecorationState

ConstantValue
QDecoration::Normal0x04
QDecoration::Disabled0x08
QDecoration::Hover0x01
QDecoration::Pressed0x02

Member Function Documentation

QDecoration::QDecoration ()

Constructs a decorator.

QDecoration::~QDecoration ()   [virtual]

Destroys a decorator.

void QDecoration::buildSysMenu ( QWidget * widget, QMenu * menu )   [virtual]

Builds the system menu for the TLW widget.

void QDecoration::menuTriggered ( QWidget * widget, QAction * action )

This function is called whenever an action in a menu is triggered for a top level widget.

bool QDecoration::paint ( QPainter * painter, const QWidget * widget, int decorationRegion = All, DecorationState state = Normal )   [pure virtual]

Override to paint the border and title decoration around widget using painter. decorationRegion is the number of the decoration region. state specifies how to render the region.

QRegion QDecoration::region ( const QWidget * w, const QRect & rect, int decorationRegion = All )   [pure virtual]

QRegion QDecoration::region ( const QWidget * widget, int decorationRegion = All )

This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

Returns the requested region decorationRegion which will contain widget.

int QDecoration::regionAt ( const QWidget * widget, const QPoint & point )   [virtual]

Returns the first region within widget which contains point. If none of the regions contain the point, returns None.

void QDecoration::regionClicked ( QWidget * widget, int reg )   [virtual]

This function is called whenever a region in a top level widget is clicked. The widget and region are specified by widget and reg.

The default implementation performs the action for when a region is clicked, and it is used to handle clicks on items in the system menu.

void QDecoration::regionDoubleClicked ( QWidget * widget, int reg )   [virtual]

This function is called whenever a region in a top level widget is double clicked. The widget and region are specified by widget and reg.

The default implementation responds to a double click on the widget's title, toggling its size between the maximum and its normal size.

void QDecoration::startMove ( QWidget * widget )   [static]

Initiates move mode for the top level widget specified by widget that is TLW handled by QWSManager.

void QDecoration::startResize ( QWidget * widget )   [static]

Initiates resize mode for the top level widget specified by widget that is handled by QWSManager.


Copyright © 2005 Trolltech Trademarks
Qt 4.1.0
Hosted by uCoz