Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions |
The QWindowDecorationInterface class provides an interface for Qt Extended window decoration styles. More...
#include <QWindowDecorationInterface>
The QWindowDecorationInterface class provides an interface for Qt Extended window decoration styles.
Window decoration styles may be added to Qt Extended via plug-ins. In order to write a style plug-in you must derive from the QWindowDecorationInterface class and implement the virtual functions.
The window being decorated is defined by the QWindowDecorationPlugin::WindowData struct:
struct WindowData { const QWidget *window; QRect rect; QPalette palette; QString caption; enum Flags { Maximized=0x01, Dialog=0x02, Active=0x04 }; Q_UINT32 flags; Q_UINT32 reserved; };
Window decorations are loaded by setting the Decoration setting in the Appearance group of Trolltech/qpe, for example:
[Appearance] Decoration=mydecoration
To allow a QWindowDecorationInterface class to be created a plug-in class derived from QWindowDecorationPlugin should be implemented.
Note that Qt Extended includes a decoration plugin that allows basic theming, and this should be used in preference to custom decoration plugins.
See also QWindowDecorationPlugin.
Constant | Value | Description |
---|---|---|
QWindowDecorationInterface::Border | 0 | defines the entire decoration area, excluding the title bar. |
QWindowDecorationInterface::Title | 1 | defines the area at the top of the window that contains the buttons and captions. It must extend the full width of the window. |
QWindowDecorationInterface::TitleText | 2 | defines the window caption. |
Constant | Value | Description |
---|---|---|
QWindowDecorationInterface::OK | 0 | the OK button. |
QWindowDecorationInterface::Close | 1 | the close button. |
QWindowDecorationInterface::Help | 2 | the help button. |
QWindowDecorationInterface::Maximize | 3 | the maximize/restore button. |
Constant | Value | Description |
---|---|---|
QWindowDecorationInterface::TitleHeight | 0 | the height of the title. |
QWindowDecorationInterface::LeftBorder | 1 | the width of the border on the left of the window. |
QWindowDecorationInterface::RightBorder | 2 | the width of the border on the right of the window. |
QWindowDecorationInterface::TopBorder | 3 | the width of the border on the top of the window, above the title bar. |
QWindowDecorationInterface::BottomBorder | 4 | the width of the border on the bottom of the window. |
QWindowDecorationInterface::OKWidth | 5 | the width of the OK button. |
QWindowDecorationInterface::CloseWidth | 6 | the width of the Close (X) button. |
QWindowDecorationInterface::HelpWidth | 7 | the width of the Help (?) button. |
QWindowDecorationInterface::MaximizeWidth | 8 | the width of the maximize/restore button. |
QWindowDecorationInterface::CornerGrabSize | 9 | the size of the area allowing diagonal resize at each corner of the window. |
Draw the specified area using QPainter p for the window defined by wd.
Draw button with QPainter painter for the window defined by wd within the bounds supplied by x, y, w, h in the specified state.
Returns the icon of the decoration. This may be displayed in the appearance settings dialog.
Returns the mask of the decoration including all borders and the title for the window defined by wd as a QRegion. The window decorations do not necessarily need to be rectangular, however the title bar must be rectangular and must be the width of the window. This ensures the title is drawn correctly for maximized windows.
Returns the metric for the window defined by wd.
Returns the name of the decoration. This will be displayed in the appearance settings dialog.
Copyright © 2009 Trolltech | Trademarks | Qt Extended 4.4.3 |