Home | All Classes | Main Classes | Annotated | Grouped Classes | Functions |

# QDecoration Class Reference

The QDecoration class allows the appearance of the Qt/Embedded Window Manager to be customized. More...

    #include <QDecoration>

- List of all members, including inherited members

### Public Types

- enum DecorationRegion { All, Title, Top, Bottom, Left, ..., Help }
- enum DecorationState { Normal, Disabled, Hover, Pressed }

### Public Functions

- QDecoration ()
- virtual ~QDecoration ()
- virtual void buildSysMenu ( QWidget * widget, QMenu * menu )
- void menuTriggered ( QWidget * widget, QAction * action )
- virtual bool paint ( QPainter * painter, const QWidget * widget, int decorationRegion = All, DecorationState state = Normal ) = 0
- virtual QRegion region ( const QWidget * w, const QRect & rect, int decorationRegion = All ) = 0
- QRegion region ( const QWidget * w, int decorationRegion = All )
- virtual int regionAt ( const QWidget * w, const QPoint & point )
- virtual void regionClicked ( QWidget * widget, int reg )
- virtual void regionDoubleClicked ( QWidget * widget, int region )

### Static Public Members

- void startMove ( QWidget * widget )
- void startResize ( QWidget * widget )

## Detailed Description

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

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

See also QApplication::qwsSetDecoration().

## Member Type Documentation

### enum QDecoration::DecorationRegion

This enum describes the regions in the window decorations.

`QDecoration::All` | the entire region used by the window decoration.
`QDecoration::Title` | displays the window title and allows the window to be moved by dragging.
`QDecoration::Top` | allows the top of the window to be resized.
`QDecoration::Bottom` | allows the bottom of the window to be resized.
`QDecoration::Left` | allows the left edge of the window to be resized.
`QDecoration::Right` | allows the right edge of the window to be resized.
`QDecoration::TopLeft` | allows the top-left of the window to be resized.
`QDecoration::TopRight` | allows the top-right of the window to be resized.
`QDecoration::BottomLeft` | allows the bottom-left of the window to be resized.
`QDecoration::BottomRight` | allows the bottom-right of the window to be resized.
`QDecoration::Close` | clicking in this region closes the window.
`QDecoration::Minimize` | clicking in this region minimizes the window.
`QDecoration::Maximize` | clicking in this region maximizes the window.
`QDecoration::Normalize` | returns a maximized window to its previous size.
`QDecoration::Menu` | clicking in this region opens the window operations (system) menu.
`QDecoration::Help` | clicking in this region provides context-sensitive help.

### enum QDecoration::DecorationState

## 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 )

### 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.

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

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

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

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

Returns first region which contains point. If none of the regions contain the point it returns None.

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

Performs the action for when region is clicked. Also used for items clicked in the system menu.

### void QDecoration::regionDoubleClicked ( QWidget * widget, int region ) `[virtual]`

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

Initiates move mode for the TLW handled by QWSManager.

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

Initiates resize mode for the TLW handled by QWSManager.