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  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Fonctions  · 

QWSDecoration Class Reference

The QWSDecoration class allows the appearance of the Qt/Embedded Window Manager to be customized. More...

#include <qwsdecoration_qws.h>

List of all member functions.

Public Members

  • QWSDecoration ()
  • virtual ~QWSDecoration ()
  • enum Region { None = 0, All = 1, Title = 2, Top = 3, Bottom = 4, Left = 5, Right = 6, TopLeft = 7, TopRight = 8, BottomLeft = 9, BottomRight = 10, Close = 11, Minimize = 12, Maximize = 13, Normalize = 14, Menu = 15, LastRegion = Menu }
  • virtual QRegion region ( const QWidget * widget, const QRect & rect, Region type = All ) = 0
  • virtual void close ( QWidget * widget )
  • virtual void minimize ( QWidget * widget )
  • virtual void maximize ( QWidget * widget )
  • virtual QPopupMenu * menu ( const QWidget *, const QPoint & )
  • virtual void paint ( QPainter * painter, const QWidget * widget ) = 0
  • virtual void paintButton ( QPainter * painter, const QWidget * widget, Region type, int state ) = 0

Detailed Description

The QWSDecoration class allows the appearance of the Qt/Embedded Window Manager to be customized.

Qt/Embedded provides window management to top level windows. The appearance of the borders and buttons (the decoration) around the managed windows can be customized by creating your own class derived from QWSDecoration and overriding a few methods.

This class is non-portable. It is available only in Qt/Embedded.

See also QApplication::qwsSetDecoration() and Qt/Embedded.


Member Type Documentation

QWSDecoration::Region

This enum describes the regions in the window decorations.

  • QWSDecoration::None - used internally.
  • QWSDecoration::All - the entire region used by the window decoration.
  • QWSDecoration::Title - Displays the window title and allows the window to be moved by dragging.
  • QWSDecoration::Top - allows the top of the window to be resized.
  • QWSDecoration::Bottom - allows the bottom of the window to be resized.
  • QWSDecoration::Left - allows the left edge of the window to be resized.
  • QWSDecoration::Right - allows the right edge of the window to be resized.
  • QWSDecoration::TopLeft - allows the top-left of the window to be resized.
  • QWSDecoration::TopRight - allows the top-right of the window to be resized.
  • QWSDecoration::BottomLeft - allows the bottom-left of the window to be resized.
  • QWSDecoration::BottomRight - allows the bottom-right of the window to be resized.
  • QWSDecoration::Close - clicking in this region closes the window.
  • QWSDecoration::Minimize - clicking in this region minimizes the window.
  • QWSDecoration::Maximize - clicking in this region maximizes the window.
  • QWSDecoration::Normalize - returns a maximized window to its previous size.
  • QWSDecoration::Menu - clicking in this region opens the window operations (system) menu.

Member Function Documentation

QWSDecoration::QWSDecoration ()

Constructs a decorator.

QWSDecoration::~QWSDecoration () [virtual]

Destroys a decorator.

void QWSDecoration::close ( QWidget * widget ) [virtual]

Called when the user clicks in the Close region.

widget is the widget to be closed.

The default behaviour is to close the widget.

void QWSDecoration::maximize ( QWidget * widget ) [virtual]

Called when the user clicks in the Maximize region.

widget is the widget to be maximized.

The default behaviour is to resize the widget to be full-screen. This method can be overridden e.g. to allow room for launch panels.

QPopupMenu * QWSDecoration::menu ( const QWidget *, const QPoint & ) [virtual]

Called to create a QPopupMenu containing the valid menu operations.

The default implementation adds all possible window operations.

void QWSDecoration::minimize ( QWidget * widget ) [virtual]

Called when the user clicks in the Minimize region.

widget is the widget to be minimized.

The default behaviour is to ignore this action.

void QWSDecoration::paint ( QPainter * painter, const QWidget * widget ) [pure virtual]

Override to paint the border and title decoration around widget using painter.

void QWSDecoration::paintButton ( QPainter * painter, const QWidget * widget, Region type, int state ) [pure virtual]

Override to paint a button of type type using painter.

widget is the widget whose button is to be drawn. state is the state of the button. It can be a combination of the following OR-ed together:

  • QWSButton::MouseOver
  • QWSButton::Clicked
  • QWSButton::On

QRegion QWSDecoration::region ( const QWidget * widget, const QRect & rect, Region type = All ) [pure virtual]

Returns the requested region type which will contain widget with geometry rect.


This file is part of the Qt toolkit. Copyright © 1995-2005 Trolltech. All Rights Reserved.

Publicité

Best Of

Actualités les plus lues

Semaine
Mois
Année
  1. « Quelque chose ne va vraiment pas avec les développeurs "modernes" », un développeur à "l'ancienne" critique la multiplication des bibliothèques 88
  2. Apercevoir la troisième dimension ou l'utilisation multithreadée d'OpenGL dans Qt, un article des Qt Quarterly traduit par Guillaume Belz 0
  3. Les développeurs ignorent-ils trop les failles découvertes dans leur code ? Prenez-vous en compte les remarques des autres ? 17
  4. Pourquoi les programmeurs sont-ils moins payés que les gestionnaires de programmes ? Manquent-ils de pouvoir de négociation ? 39
  5. Quelles nouveautés de C++11 Visual C++ doit-il rapidement intégrer ? Donnez-nous votre avis 10
  6. Adieu qmake, bienvenue qbs : Qt Building Suite, un outil déclaratif et extensible pour la compilation de projets Qt 17
  7. 2017 : un quinquennat pour une nouvelle version du C++ ? Possible, selon Herb Sutter 6
Page suivante

Le blog Digia au hasard

Logo

Créer des applications avec un style Metro avec Qt, exemples en QML et C++, un article de Digia Qt traduit par Thibaut Cuvelier

Le blog Digia est l'endroit privilégié pour la communication sur l'édition commerciale de Qt, où des réponses publiques sont apportées aux questions les plus posées au support. Lire l'article.

Communauté

Ressources

Liens utiles

Contact

  • Vous souhaitez rejoindre la rédaction ou proposer un tutoriel, une traduction, une question... ? Postez dans le forum Contribuez ou contactez-nous par MP ou par email (voir en bas de page).

Qt dans le magazine

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 3.3
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