Qt API | Qtopia API Qtopia Documentation

WindowDecorationInterface Class Reference

The WindowDecorationInterface class provides an interface for Qtopia window decoration styles. More...

#include <qtopia/windowdecorationinterface.h>

List of all member functions.

Public Members


Detailed Description

The WindowDecorationInterface class provides an interface for Qtopia window decoration styles.

Window decoration styles may be added to Qtopia via plugins. In order to write a style plugin you must create an interface to your QStyle derived class by deriving from the WindowDecorationInterface class and implementing the pure virtual functions.

The window being decorated is defined by the WindowDecorationInterface::WindowData struct:

struct WindowData {
    QRect rect;
    QPalette palette;
    QString caption;
    enum Flags { Maximized=0x01, Dialog=0x02, Active=0x04 };
    Q_UINT32 flags;
    Q_UINT32 reserved;
};

Member Type Documentation

WindowDecorationInterface::Area

WindowDecorationInterface::Button

WindowDecorationInterface::Metric


Member Function Documentation

WindowDecorationInterface::~WindowDecorationInterface () [virtual]

Deconstructor.

void WindowDecorationInterface::drawArea ( Area area, QPainter * p, const WindowData * wd ) const [virtual]

Draw the specified area using QPainter p for window wd.

void WindowDecorationInterface::drawButton ( Button b, QPainter * p, const WindowData * wd, int x, int y, int w, int h, QWSButton::State state ) const [virtual]

Draw button b with QPainter p for window wd within the bounds supplied by x, y, w, h in the state specified by state.

QPixmap WindowDecorationInterface::icon () const [pure virtual]

The icon() function returns the icon of the decoration. This may be displayed in the appearance settings dialog.

QRegion WindowDecorationInterface::mask ( const WindowData * wd ) const [virtual]

Returns the mask of the decoration including all borders and the title for window wd as a QRegion. The window decorations do not necessarily need to be rectangular, however the title bar \em must be rectangular and must be the width of the window. This ensures the title is drawn correctly for maximized windows.

int WindowDecorationInterface::metric ( Metric m, const WindowData * wd ) const [virtual]

returns the metric m for the window wd.

QString WindowDecorationInterface::name () const [pure virtual]

The name() function returns the name of the decoration. This will be displayed in the appearance settings dialog.


This file is part of the Qtopia , copyright © 1995-2002 Trolltech, all rights reserved.


Copyright © 2001-2002 TrolltechTrademarks
Qtopia version 1.7.0