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
class WindowData { }
enum
Metric { TitleHeight, LeftBorder, RightBorder, TopBorder, BottomBorder, OKWidth, CloseWidth, HelpWidth, MaximizeWidth, CornerGrabSize }
virtual int
metric ( Metric m, const WindowData * wd ) const
enum
Area { Border, Title, TitleText }
virtual void
drawArea ( Area area, QPainter * p, const WindowData * wd ) const
enum
Button { OK, Close, Help, Maximize }
virtual void
drawButton ( Button b, QPainter * p, const WindowData * wd, int x, int y, int w, int h, QWSButton::State state ) const
virtual QRegion
mask ( const WindowData * wd ) const
virtual QString
name () const = 0
virtual QPixmap
icon () const = 0
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::Border - defines the entire decoration area, excluding the title bar.
- WindowDecorationInterface::Title - defines the area at the top of the window that contains the
buttons and captions. It must extend the full width of the window.
- WindowDecorationInterface::TitleText - defines the window caption.
WindowDecorationInterface::Button
- WindowDecorationInterface::OK - the OK button.
- WindowDecorationInterface::Close - the close button.
- WindowDecorationInterface::Help - the help button.
- WindowDecorationInterface::Maximize - the maximize/restore button.
WindowDecorationInterface::Metric
- WindowDecorationInterface::TitleHeight - the height of the title.
- WindowDecorationInterface::LeftBorder - the width of the border on the left of the window.
- WindowDecorationInterface::RightBorder - the width of the border on the right of the window.
- WindowDecorationInterface::TopBorder - the width of the border on the top of the window, above
the title bar.
- WindowDecorationInterface::BottomBorder - the width of the border on the bottom of the window.
- WindowDecorationInterface::OKWidth - the width of the OK button.
- WindowDecorationInterface::CloseWidth - the width of the Close (X) button.
- WindowDecorationInterface::HelpWidth - the width of the Help (?) button.
- WindowDecorationInterface::MaximizeWidth - the width of the maximize/restore button.
- WindowDecorationInterface::CornerGrabSize - the size of the area allowing diagonal resize at
each corner of the window.
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 Trolltech | Trademarks
| Qtopia version 1.7.1
|