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  ·  Modules  ·  Fonctions  · 

QGraphicsScale Class

The QGraphicsScale class provides a scale transformation. More...

 #include <QGraphicsScale>

Inherits: QGraphicsTransform.

This class was introduced in Qt 4.6.

Properties

  • 1 property inherited from QObject

Public Functions

QGraphicsScale(QObject * parent = 0)
QGraphicsTransform(QObject * parent = 0)
~QGraphicsScale()
~QGraphicsTransform()
virtual void applyTo(QMatrix4x4 * matrix) const = 0
QVector3D origin() const
void setOrigin(const QVector3D & point)
void setXScale(qreal)
void setYScale(qreal)
void setZScale(qreal)
qreal xScale() const
qreal yScale() const
qreal zScale() const

Reimplemented Public Functions

virtual void applyTo(QMatrix4x4 * matrix) const
  • 31 public functions inherited from QObject

Signals

void originChanged()
void scaleChanged()
void xScaleChanged()
void yScaleChanged()
void zScaleChanged()

Protected Slots

void update()

Additional Inherited Members

  • 1 public slot inherited from QObject
  • 11 static public members inherited from QObject
  • 9 protected functions inherited from QObject

Detailed Description

The QGraphicsScale class provides a scale transformation.

QGraphicsScene provides certain parameters to help control how the scale should be applied.

The origin is the point that the item is scaled from (i.e., it stays fixed relative to the parent as the rest of the item grows). By default the origin is QPointF(0, 0).

The parameters xScale, yScale, and zScale describe the scale factors to apply in horizontal, vertical, and depth directions. They can take on any value, including 0 (to collapse the item to a point) or negative value. A negative xScale value will mirror the item horizontally. A negative yScale value will flip the item vertically. A negative zScale will flip the item end for end.

See also QGraphicsTransform, QGraphicsItem::setScale(), and QTransform::scale().

Property Documentation

origin : QVector3D

This property holds the origin of the scale in 3D space.

All scaling will be done relative to this point (i.e., this point will stay fixed, relative to the parent, when the item is scaled).

Access functions:

QVector3D origin() const
void setOrigin(const QVector3D & point)

Notifier signal:

void originChanged()

See also xScale, yScale, and zScale.

xScale : qreal

This property holds the horizontal scale factor.

The scale factor can be any real number; the default value is 1.0. If you set the factor to 0.0, the item will be collapsed to a single point. If you provide a negative value, the item will be mirrored horizontally around its origin.

Access functions:

qreal xScale() const
void setXScale(qreal)

Notifier signal:

void xScaleChanged()

See also yScale, zScale, and origin.

yScale : qreal

This property holds the vertical scale factor.

The scale factor can be any real number; the default value is 1.0. If you set the factor to 0.0, the item will be collapsed to a single point. If you provide a negative value, the item will be flipped vertically around its origin.

Access functions:

qreal yScale() const
void setYScale(qreal)

Notifier signal:

void yScaleChanged()

See also xScale, zScale, and origin.

zScale : qreal

This property holds the depth scale factor.

The scale factor can be any real number; the default value is 1.0. If you set the factor to 0.0, the item will be collapsed to a single point. If you provide a negative value, the item will be flipped end for end around its origin.

Access functions:

qreal zScale() const
void setZScale(qreal)

Notifier signal:

void zScaleChanged()

See also xScale, yScale, and origin.

Member Function Documentation

QGraphicsScale::QGraphicsScale(QObject * parent = 0)

Constructs an empty QGraphicsScale object with the given parent.

QGraphicsScale::~QGraphicsScale()

Destroys the graphics scale.

void QGraphicsScale::applyTo(QMatrix4x4 * matrix) const [virtual]

Reimplemented from QGraphicsTransform::applyTo().

void QGraphicsScale::scaleChanged() [signal]

This signal is emitted whenever the xScale, yScale, or zScale of the object changes.

See also QGraphicsScale::xScale, QGraphicsScale::yScale, and QGraphicsScale::zScale.

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 5.0-snapshot
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