QtBase
v6.3.1
|
The QGraphicsScale class provides a scale transformation. More...
#include <qgraphicstransform.h>
Signals | |
void | originChanged () |
void | xScaleChanged () |
void | yScaleChanged () |
void | zScaleChanged () |
void | scaleChanged () |
Signals inherited from QObject | |
void | destroyed (QObject *=nullptr) |
void | objectNameChanged (const QString &objectName, QPrivateSignal) |
Properties | |
QVector3D | origin |
the origin of the scale in 3D space. More... | |
qreal | xScale |
the horizontal scale factor. More... | |
qreal | yScale |
the vertical scale factor. More... | |
qreal | zScale |
the depth scale factor. More... | |
Properties inherited from QObject | |
QString | objectName |
the name of this object More... | |
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.
Definition at line 79 of file qgraphicstransform.h.
Constructs an empty QGraphicsScale object with the given parent.
Definition at line 216 of file qgraphicstransform.cpp.
QGraphicsScale::~QGraphicsScale | ( | ) |
Destroys the graphics scale.
Definition at line 224 of file qgraphicstransform.cpp.
|
overridevirtual |
QVector3D QGraphicsScale::origin | ( | ) | const |
Definition at line 237 of file qgraphicstransform.cpp.
|
signal |
QGraphicsScale emits this signal when its origin changes.
|
signal |
This signal is emitted whenever the xScale, yScale, or zScale of the object changes.
qreal QGraphicsScale::xScale | ( | ) | const |
Definition at line 263 of file qgraphicstransform.cpp.
|
signal |
This signal is emitted whenever the \l xScale property changes.
qreal QGraphicsScale::yScale | ( | ) | const |
Definition at line 290 of file qgraphicstransform.cpp.
|
signal |
This signal is emitted whenever the \l yScale property changes.
qreal QGraphicsScale::zScale | ( | ) | const |
Definition at line 317 of file qgraphicstransform.cpp.
|
signal |
This signal is emitted whenever the \l zScale property changes.
|
readwrite |
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).
Definition at line 73 of file qgraphicstransform.h.
|
readwrite |
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.
Definition at line 73 of file qgraphicstransform.h.
|
readwrite |
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.
Definition at line 73 of file qgraphicstransform.h.
|
readwrite |
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.
Definition at line 73 of file qgraphicstransform.h.