QDecorationDefault Class

The QDecorationDefault class is a base class providing default window decorations. 更多...

头: #include <QDecorationDefault>
Since: Qt 4.4
继承: QDecoration

公共函数

QDecorationDefault ()
virtual ~QDecorationDefault ()

重实现公共函数

virtual bool paint (QPainter * painter , const QWidget * widget , int decorationRegion = All, DecorationState state = Normal)
virtual QRegion region (const QWidget * widget , const QRect & rect , int decorationRegion = All)

保护函数

virtual void paintButton (QPainter * painter , const QWidget * widget , int buttonRegion , DecorationState state , const QPalette & palette )
virtual QPixmap pixmapFor (const QWidget * widget , int decorationRegion , int & xoff , int & yoff )
virtual int titleBarHeight (const QWidget * widget )
virtual const char ** xpmForRegion (int region )

额外继承成员

详细描述

The QDecorationDefault class is a base class providing default window decorations.

See the documentation for class QDecoration for a detailed description. This subclass of QDecoration provides standard icons for the decoration regions.

Note that this class is non-portable and only available in Qt for Embedded Linux .

成员函数文档编制

QDecorationDefault:: QDecorationDefault ()

默认构造函数。

[虚拟] QDecorationDefault:: ~QDecorationDefault ()

The constructor deletes the static pixmaps.

[虚拟] bool QDecorationDefault:: paint ( QPainter * painter , const QWidget * widget , int decorationRegion = All, DecorationState state = Normal)

重实现自 QDecoration::paint ().

Paints the border and title decoration for the top-level widget 使用 painter provided and the decoration state . The value of decorationRegion is a combination of the bitmask values of enum DecorationRegion .

Note that Qt for Embedded Linux expects this function to return true if any of the widget's decorations are repainted; otherwise it returns false.

[virtual protected] void QDecorationDefault:: paintButton ( QPainter * painter , const QWidget * widget , int buttonRegion , DecorationState state , const QPalette & palette )

Paints a region of the top-level widget . The region is painted in the specified decoration state 使用 painter and palette provided. The region to be painted is specified by buttonRegion , which is a combination of the bitmask values of DecorationRegion . If the value of buttonRegion 是某一 帮助 , Menu , Close , Minimize , Maximize ,和 Normalize , the button pixmap for that region is painted.

另请参阅 pixmapFor ().

[virtual protected] QPixmap QDecorationDefault:: pixmapFor (const QWidget * widget , int decorationRegion , int & xoff , int & yoff )

返回指针指向 QPixmap for the widget specified by widget and decorationRegion . The returned QPixmap is constructed from the default X pixmap obtained from xpmForRegion ().

xoff and yoff specify the offset for the pixmap.

decorationRegion must be one of a subset of the values of enum DecorationRegion . The supported values are 帮助 , Menu , Close , Minimize , Maximize ,和 Normalize . Other values of decorationRegion return 0.

另请参阅 QDecoration::DecorationRegion .

[虚拟] QRegion QDecorationDefault:: region (const QWidget * widget , const QRect & rect , int decorationRegion = All)

重实现自 QDecoration::region ().

Returns the region specified by decorationRegion for the top-level widget . rect specifies the rectangle the decoration wraps. The value of decorationRegion is a combination of the bitmask values of enum DecorationRegion .

[virtual protected] int QDecorationDefault:: titleBarHeight (const QWidget * widget )

Returns the title bar height in pixels for the given widget . It is the greater of 20, or the sum of the application font's line spacing value plus a border width fudge factor.

[virtual protected] const char ** QDecorationDefault:: xpmForRegion ( int region )

Returns a pointer to the X pixmap for the icon specified by region . An X pixmap is an ASCII-text-based image. The value of region must be one of a subset of the values of enum DecorationRegion . The supported values are 帮助 , Menu , Close , Minimize , Maximize ,和 Normalize . Other values of region cause zero to be returned.

另请参阅 QDecoration::DecorationRegion .