CopperSpice API  1.7.2
QGraphicsScale Class Reference

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

Inheritance diagram for QGraphicsScale:
QGraphicsTransform QObject

Public Signals

void originChanged ()
 
void scaleChanged ()
 
void xScaleChanged ()
 
void yScaleChanged ()
 
void zScaleChanged ()
 
- Public Signals inherited from QObject
void destroyed (QObject *obj=nullptr)
 
void objectNameChanged (const QString &objectName)
 

Public Methods

 QGraphicsScale (QObject *parent=nullptr)
 
 ~QGraphicsScale ()
 
void applyTo (QMatrix4x4 *matrix) const override
 
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
 
- Public Methods inherited from QGraphicsTransform
 QGraphicsTransform (QObject *parent=nullptr)
 
 ~QGraphicsTransform ()
 
- Public Methods inherited from QObject
 QObject (QObject *parent=nullptr)
 
 ~QObject ()
 
bool blockSignals (bool block)
 
const QList< QObject * > & children () const
 
bool connect (const QObject *sender, const QString &signalMethod, const QString &location, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
bool connect (const QObject *sender, const QString &signalMethod, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
bool disconnect (const QObject *receiver, const QString &slotMethod=QString ()) const
 
bool disconnect (const QString &signalMethod, const QString &location, const QObject *receiver=nullptr, const QString &slotMethod=QString ()) const
 
bool disconnect (const QString &signalMethod=QString (), const QObject *receiver=nullptr, const QString &slotMethod=QString ()) const
 
void dumpObjectInfo ()
 
void dumpObjectTree ()
 
QList< QStringdynamicPropertyNames () const
 
virtual bool event (QEvent *event)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
template<typename T >
findChild (const QString &childName=QString ()) const
 
template<class T >
QList< T > findChildren (const QRegularExpression &regExp, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 
template<class T >
QList< T > findChildren (const QString &objName=QString (), Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 
bool inherits (const QString &className) const
 
void installEventFilter (QObject *filterObj)
 
bool isWidgetType () const
 
bool isWindowType () const
 
void killTimer (int id)
 
const QMetaObjectmetaObject () const
 
void moveToThread (QThread *targetThread)
 
QString objectName () const
 
QObject * parent () const
 
template<class T = QVariant>
property (const QString &name) const
 
void removeEventFilter (QObject *obj)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const QString &name, const QVariant &value)
 
bool signalsBlocked () const
 
int startTimer (int interval, Qt::TimerType timerType=Qt::CoarseTimer)
 
QThreadthread () const
 

Properties

 origin
 
 xScale
 
 yScale
 
 zScale
 
- Properties inherited from QObject
 objectName
 

Additional Inherited Members

- Public Slots inherited from QObject
void deleteLater ()
 
- Static Public Methods inherited from QObject
static bool connect (const QObject *sender, const QMetaMethod &signalMethod, const QObject *receiver, const QMetaMethod &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
static bool connect (const QObject *sender, const QString &signalMethod, const QObject *receiver, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection, const QString &location=QString ())
 
static bool connect (const QObject *sender, const QString &signalMethod, const QString &location, const QObject *receiver, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class SlotClass , class... SlotArgs, class SlotReturn >
static bool connect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, SlotReturn (SlotClass::*slotMethod)(SlotArgs...), Qt::ConnectionType type=Qt::AutoConnection)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class T >
static bool connect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, T slotLambda, Qt::ConnectionType type=Qt::AutoConnection)
 
static bool disconnect (const QObject *sender, const QMetaMethod &signalMethod, const QObject *receiver, const QMetaMethod &slotMethod)
 
static bool disconnect (const QObject *sender, const QString &signalMethod, const QObject *receiver, const QString &slotMethod)
 
static bool disconnect (const QObject *sender, const QString &signalMethod, const QString &location, const QObject *receiver, const QString &slotMethod)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class SlotClass , class... SlotArgs, class SlotReturn >
static bool disconnect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, SlotReturn (SlotClass::*slotMethod)(SlotArgs...))
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver >
static bool disconnect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, std::nullptr_t slotMethod=nullptr)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class T >
static bool disconnect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, T slotMethod)
 
static QMetaObjectstaticMetaObject ()
 
static QString tr (const char *text, const char *comment=nullptr, std::optional< int > numArg=std::optional< int >())
 
- Protected Slots inherited from QGraphicsTransform
void update ()
 
- Protected Methods inherited from QObject
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const QMetaMethod &signalMethod) const
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const QMetaMethod &signalMethod) const
 
bool isSignalConnected (const QMetaMethod &signalMethod) const
 
int receivers (const QString &signal) const
 
QObject * sender () const
 
int senderSignalIndex () const
 
virtual void timerEvent (QTimerEvent *event)
 

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(), QTransform::scale()

Constructor & Destructor Documentation

QGraphicsScale::QGraphicsScale ( QObject parent = nullptr)

Constructs an empty QGraphicsScale object with the given parent.

QGraphicsScale::~QGraphicsScale ( )

Destroys the graphics scale.

Method Documentation

void QGraphicsScale::applyTo ( QMatrix4x4 matrix) const
overridevirtual

Reimplemented from QGraphicsTransform::applyTo().

Implements QGraphicsTransform.

QVector3D QGraphicsScale::origin ( ) const

Property documentation pending.

void QGraphicsScale::originChanged ( )
signal

QGraphicsScale emits this signal when its origin changes.

See also
QGraphicsScale::origin
void QGraphicsScale::scaleChanged ( )
signal

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

See also
QGraphicsScale::xScale, QGraphicsScale::yScale, QGraphicsScale::zScale
void QGraphicsScale::setOrigin ( const QVector3D point)

Property documentation pending.

void QGraphicsScale::setXScale ( qreal  )

Property documentation pending.

void QGraphicsScale::setYScale ( qreal  )

Property documentation pending.

void QGraphicsScale::setZScale ( qreal  )

Property documentation pending.

qreal QGraphicsScale::xScale ( ) const

Property documentation pending.

void QGraphicsScale::xScaleChanged ( )
signal

This signal is emitted whenever the xScale property changes.

qreal QGraphicsScale::yScale ( ) const

Property documentation pending.

void QGraphicsScale::yScaleChanged ( )
signal

This signal is emitted whenever the yScale property changes.

qreal QGraphicsScale::zScale ( ) const

Property documentation pending.

void QGraphicsScale::zScaleChanged ( )
signal

This signal is emitted whenever the zScale property changes.

Property Documentation

QGraphicsScale::origin

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).

See also
xScale, yScale, zScale
PropertiesClass Methods
read origin
write setOrigin
notify originChanged
QGraphicsScale::xScale

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.

See also
yScale, zScale, origin
PropertiesClass Methods
read xScale
write setXScale
notify xScaleChanged
QGraphicsScale::yScale

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.

See also
xScale, zScale, origin
PropertiesClass Methods
read yScale
write setYScale
notify yScaleChanged
QGraphicsScale::zScale

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.

See also
xScale, yScale, origin
PropertiesClass Methods
read zScale
write setZScale
notify zScaleChanged