Movatterモバイル変換


[0]ホーム

URL:


We bake cookies in your browser for a better experience. Using this site means that you consent.Read More

Menu

Qt Documentation

QDecorationDefault Class

TheQDecorationDefault class is a base class providing default window decorations.More...

Header:#include <QDecorationDefault>
Since: Qt 4.4
Inherits:QDecoration

Public Functions

Reimplemented Public Functions

virtual boolpaint(QPainter * painter, const QWidget * widget, int decorationRegion = All, DecorationState state = Normal)
virtual QRegionregion(const QWidget * widget, const QRect & rect, int decorationRegion = All)

Protected Functions

virtual voidpaintButton(QPainter * painter, const QWidget * widget, int buttonRegion, DecorationState state, const QPalette & palette)
virtual QPixmappixmapFor(const QWidget * widget, int decorationRegion, int & xoff, int & yoff)
virtual inttitleBarHeight(const QWidget * widget)
virtual const char **xpmForRegion(int region)

Additional Inherited Members

Detailed Description

TheQDecorationDefault class is a base class providing default window decorations.

See the documentation for classQDecoration for a detailed description. This subclass ofQDecoration provides standard icons for the decoration regions.

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

Member Function Documentation

QDecorationDefault::QDecorationDefault()

Default constructor.

[virtual]QDecorationDefault::~QDecorationDefault()

The constructor deletes the static pixmaps.

[virtual]bool QDecorationDefault::paint(QPainter * painter, constQWidget * widget,int decorationRegion = All,DecorationState state = Normal)

Reimplemented fromQDecoration::paint().

Paints the border and title decoration for the top-levelwidget using thepainter provided and the decorationstate. The value ofdecorationRegion is a combination of the bitmask values of enumDecorationRegion.

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, constQWidget * widget,int buttonRegion,DecorationState state, constQPalette & palette)

Paints a region of the top-levelwidget. The region is painted in the specified decorationstate using thepainter andpalette provided. The region to be painted is specified bybuttonRegion, which is a combination of the bitmask values ofDecorationRegion. If the value ofbuttonRegion is one ofHelp,Menu,Close,Minimize,Maximize, andNormalize, the button pixmap for that region is painted.

See alsopixmapFor().

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

Returns a pointer to theQPixmap for the widget specified bywidget anddecorationRegion. The returnedQPixmap is constructed from the default X pixmap obtained fromxpmForRegion().

xoff andyoff specify the offset for the pixmap.

The value ofdecorationRegion must be one of a subset of the values of enumDecorationRegion. The supported values areHelp,Menu,Close,Minimize,Maximize, andNormalize. Other values ofdecorationRegion return 0.

See alsoQDecoration::DecorationRegion.

[virtual]QRegion QDecorationDefault::region(constQWidget * widget, constQRect & rect,int decorationRegion = All)

Reimplemented fromQDecoration::region().

Returns the region specified bydecorationRegion for the top-levelwidget.rect specifies the rectangle the decoration wraps. The value ofdecorationRegion is a combination of the bitmask values of enumDecorationRegion.

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

Returns the title bar height in pixels for the givenwidget. 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]constchar ** QDecorationDefault::xpmForRegion(int region)

Returns a pointer to the X pixmap for the icon specified byregion. An X pixmap is an ASCII-text-based image. The value ofregion must be one of a subset of the values of enumDecorationRegion. The supported values areHelp,Menu,Close,Minimize,Maximize, andNormalize. Other values ofregion cause zero to be returned.

See alsoQDecoration::DecorationRegion.

© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of theGNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.


[8]ページ先頭

©2009-2025 Movatter.jp