Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Toutes les fonctions  ·  Vues d'ensemble  · 

QDecorationDefault Class Reference

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

 #include <QDecorationDefault>

Inherits: QDecoration.

This class was introduced in Qt 4.4.

Public Functions

QDecorationDefault ()
virtual ~QDecorationDefault ()

Reimplemented Public Functions

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 )

Protected Functions

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 )

Additional Inherited Members

Detailed Description

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.

Member Function Documentation

QDecorationDefault::QDecorationDefault ()

Default constructor.

QDecorationDefault::~QDecorationDefault () [virtual]

The constructor deletes the static pixmaps.

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

Reimplemented from QDecoration::paint().

Paints the border and title decoration for the top-level widget using the 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.

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

Paints a region of the top-level widget. The region is painted in the specified decoration state using the 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 is one of Help, Menu, Close, Minimize, Maximize, and Normalize, the button pixmap for that region is painted.

See also pixmapFor().

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

Returns a pointer to the 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.

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

See also QDecoration::DecorationRegion.

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

Reimplemented from 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.

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

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.

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

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 Help, Menu, Close, Minimize, Maximize, and Normalize. Other values of region cause zero to be returned.

See also QDecoration::DecorationRegion.

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt 4.8
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web