QtBase  v6.3.1
Public Member Functions | Properties | Friends | List of all members
QGraphicsAnchor Class Reference

The QGraphicsAnchor class represents an anchor between two items in a QGraphicsAnchorLayout. More...

#include <qgraphicsanchorlayout.h>

Inheritance diagram for QGraphicsAnchor:
Inheritance graph
[legend]
Collaboration diagram for QGraphicsAnchor:
Collaboration graph
[legend]

Public Member Functions

void setSpacing (qreal spacing)
 
void unsetSpacing ()
 
qreal spacing () const
 
void setSizePolicy (QSizePolicy::Policy policy)
 
QSizePolicy::Policy sizePolicy () const
 
 ~QGraphicsAnchor ()
 
- Public Member Functions inherited from QObject
Q_INVOKABLE QObject (QObject *parent=nullptr)
 
virtual ~QObject ()
 
virtual bool event (QEvent *event)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
QString objectName () const
 
void setObjectName (const QString &name)
 
QBindable< QStringbindableObjectName ()
 
bool isWidgetType () const
 
bool isWindowType () const
 
bool signalsBlocked () const noexcept
 
bool blockSignals (bool b) noexcept
 
QThreadthread () const
 
void moveToThread (QThread *thread)
 
int startTimer (int interval, Qt::TimerType timerType=Qt::CoarseTimer)
 
void killTimer (int id)
 
template<typename T >
T findChild (const QString &aName=QString(), Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 
template<typename T >
QList< TfindChildren (const QString &aName, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 
template<typename T >
QList< TfindChildren (Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 
const QObjectListchildren () const
 
void setParent (QObject *parent)
 
void installEventFilter (QObject *filterObj)
 
void removeEventFilter (QObject *obj)
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *member, Qt::ConnectionType type=Qt::AutoConnection) const
 
bool disconnect (const char *signal=nullptr, const QObject *receiver=nullptr, const char *member=nullptr) const
 
bool disconnect (const QObject *receiver, const char *member=nullptr) const
 
void dumpObjectTree () const
 
void dumpObjectInfo () const
 
bool setProperty (const char *name, const QVariant &value)
 
QVariant property (const char *name) const
 
QList< QByteArraydynamicPropertyNames () const
 
QBindingStoragebindingStorage ()
 
const QBindingStoragebindingStorage () const
 
QObjectparent () const
 
bool inherits (const char *classname) const
 

Properties

qreal spacing
 the preferred space between items in the QGraphicsAnchorLayout. More...
 
QSizePolicy::Policy sizePolicy
 the size policy for the QGraphicsAnchor. More...
 
- Properties inherited from QObject
QString objectName
 the name of this object More...
 

Friends

class QGraphicsAnchorLayoutPrivate
 

Additional Inherited Members

- Public Slots inherited from QObject
void deleteLater ()
 
- Signals inherited from QObject
void destroyed (QObject *=nullptr)
 
void objectNameChanged (const QString &objectName, QPrivateSignal)
 
- Static Public Member Functions inherited from QObject
static QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
 
static QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type=Qt::AutoConnection)
 
template<typename Func1 , typename Func2 >
static QMetaObject::Connection connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiver, Func2 slot, Qt::ConnectionType type=Qt::AutoConnection)
 
static QMetaObject::Connection ::type connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, Func2 slot)
 
static QMetaObject::Connection ::type connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const QObject *context, Func2 slot, Qt::ConnectionType type=Qt::AutoConnection)
 
template<typename Func1 , typename Func2 >
static std::enable_if< QtPrivate::FunctionPointer< Func2 >::ArgumentCount==-1 &&!std::is_convertible_v< Func2, const char * >, QMetaObject::Connection >::type connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, Func2 slot)
 
template<typename Func1 , typename Func2 >
static std::enable_if< QtPrivate::FunctionPointer< Func2 >::ArgumentCount==-1 &&!std::is_convertible_v< Func2, const char * >, QMetaObject::Connection >::type connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const QObject *context, Func2 slot, Qt::ConnectionType type=Qt::AutoConnection)
 
static bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *member)
 
static bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &member)
 
static bool disconnect (const QMetaObject::Connection &)
 
template<typename Func1 , typename Func2 >
static bool disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiver, Func2 slot)
 
template<typename Func1 >
static bool disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const QObject *receiver, void **zero)
 
- Protected Member Functions inherited from QObject
QObjectsender () const
 
int senderSignalIndex () const
 
int receivers (const char *signal) const
 
bool isSignalConnected (const QMetaMethod &signal) const
 
virtual void timerEvent (QTimerEvent *event)
 
virtual void childEvent (QChildEvent *event)
 
virtual void customEvent (QEvent *event)
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 
 QObject (QObjectPrivate &dd, QObject *parent=nullptr)
 
- Protected Attributes inherited from QObject
QScopedPointer< QObjectDatad_ptr
 

Detailed Description

The QGraphicsAnchor class represents an anchor between two items in a QGraphicsAnchorLayout.

Since
4.6

\inmodule QtWidgets

The graphics anchor provides an API that enables you to query and manipulate the properties an anchor has. When an anchor is added to the layout with QGraphicsAnchorLayout::addAnchor(), a QGraphicsAnchor instance is returned where the properties are initialized to their default values. The properties can then be further changed, and they will be picked up the next time the layout is activated.

See also
QGraphicsAnchorLayout::anchor()

Definition at line 55 of file qgraphicsanchorlayout.h.

Constructor & Destructor Documentation

◆ ~QGraphicsAnchor()

QGraphicsAnchor::~QGraphicsAnchor ( )

Removes the QGraphicsAnchor object from the layout and destroys it.

Definition at line 152 of file qgraphicsanchorlayout.cpp.

Member Function Documentation

◆ setSizePolicy()

void QGraphicsAnchor::setSizePolicy ( QSizePolicy::Policy  policy)

Definition at line 171 of file qgraphicsanchorlayout.cpp.

◆ setSpacing()

void QGraphicsAnchor::setSpacing ( qreal  spacing)

Definition at line 192 of file qgraphicsanchorlayout.cpp.

Here is the caller graph for this function:

◆ sizePolicy()

QSizePolicy::Policy QGraphicsAnchor::sizePolicy ( ) const

Definition at line 177 of file qgraphicsanchorlayout.cpp.

◆ spacing()

qreal QGraphicsAnchor::spacing ( ) const

Definition at line 198 of file qgraphicsanchorlayout.cpp.

◆ unsetSpacing()

void QGraphicsAnchor::unsetSpacing ( )

Definition at line 204 of file qgraphicsanchorlayout.cpp.

Here is the caller graph for this function:

Friends And Related Function Documentation

◆ QGraphicsAnchorLayoutPrivate

friend class QGraphicsAnchorLayoutPrivate
friend

Definition at line 72 of file qgraphicsanchorlayout.h.

Property Documentation

◆ sizePolicy

QGraphicsAnchor::sizePolicy
readwrite

the size policy for the QGraphicsAnchor.

By setting the size policy on an anchor you can configure how the anchor can resize itself from its preferred spacing. For instance, if the anchor has the size policy QSizePolicy::Minimum, the spacing is the minimum size of the anchor. However, its size can grow up to the anchors maximum size. If the default size policy is QSizePolicy::Fixed, the anchor can neither grow or shrink, which means that the only size the anchor can have is the spacing. QSizePolicy::Fixed is the default size policy. QGraphicsAnchor always has a minimum spacing of 0 and a very large maximum spacing.

See also
QGraphicsAnchor::spacing

Definition at line 115 of file qgraphicsanchorlayout.h.

◆ spacing

QGraphicsAnchor::spacing
readwrite

the preferred space between items in the QGraphicsAnchorLayout.

Depending on the anchor type, the default spacing is either 0 or a value returned from the style.

See also
QGraphicsAnchorLayout::addAnchor()

Definition at line 115 of file qgraphicsanchorlayout.h.


The documentation for this class was generated from the following files: