Gra zręcznościowa „Straszna Epidemia"  V1.2
Projekt Wizualizacja Danych Sensorycznych Kewin Gałuszka rok akademicki 2019/2020
Dokumentacja klasy QCPItemAnchor

An anchor of an item to which positions can be attached to. Więcej...

#include <qcustomplot.h>

Diagram dziedziczenia dla QCPItemAnchor
Diagram współpracy dla QCPItemAnchor:

Metody publiczne

 QCPItemAnchor (QCustomPlot *parentPlot, QCPAbstractItem *parentItem, const QString &name, int anchorId=-1)
 
virtual ~QCPItemAnchor ()
 
QString name () const
 
virtual QPointF pixelPosition () const
 

Metody chronione

virtual QCPItemPositiontoQCPItemPosition ()
 
void addChildX (QCPItemPosition *pos)
 
void removeChildX (QCPItemPosition *pos)
 
void addChildY (QCPItemPosition *pos)
 
void removeChildY (QCPItemPosition *pos)
 

Atrybuty chronione

QString mName
 
QCustomPlotmParentPlot
 
QCPAbstractItemmParentItem
 
int mAnchorId
 
QSet< QCPItemPosition * > mChildrenX
 
QSet< QCPItemPosition * > mChildrenY
 

Przyjaciele

class QCPItemPosition
 

Opis szczegółowy

An anchor of an item to which positions can be attached to.

An item (QCPAbstractItem) may have one or more anchors. Unlike QCPItemPosition, an anchor doesn't control anything on its item, but provides a way to tie other items via their positions to the anchor.

For example, a QCPItemRect is defined by its positions topLeft and bottomRight. Additionally it has various anchors like top, topRight or bottomLeft etc. So you can attach the start (which is a QCPItemPosition) of a QCPItemLine to one of the anchors by calling QCPItemPosition::setParentAnchor on start, passing the wanted anchor of the QCPItemRect. This way the start of the line will now always follow the respective anchor location on the rect item.

Note that QCPItemPosition derives from QCPItemAnchor, so every position can also serve as an anchor to other positions.

To learn how to provide anchors in your own item subclasses, see the subclassing section of the QCPAbstractItem documentation.

Definicja w linii 3405 pliku qcustomplot.h.

Dokumentacja konstruktora i destruktora

◆ QCPItemAnchor()

QCPItemAnchor::QCPItemAnchor ( QCustomPlot parentPlot,
QCPAbstractItem parentItem,
const QString &  name,
int  anchorId = -1 
)

Creates a new QCPItemAnchor. You shouldn't create QCPItemAnchor instances directly, even if you want to make a new item subclass. Use QCPAbstractItem::createAnchor instead, as explained in the subclassing section of the QCPAbstractItem documentation.

Definicja w linii 11326 pliku qcustomplot.cpp.

◆ ~QCPItemAnchor()

QCPItemAnchor::~QCPItemAnchor ( )
virtual

Definicja w linii 11334 pliku qcustomplot.cpp.

Oto graf wywołań dla tej funkcji:

Dokumentacja funkcji składowych

◆ addChildX()

void QCPItemAnchor::addChildX ( QCPItemPosition pos)
protected

Definicja w linii 11382 pliku qcustomplot.cpp.

Oto graf wywoływań tej funkcji:

◆ addChildY()

void QCPItemAnchor::addChildY ( QCPItemPosition pos)
protected

Definicja w linii 11410 pliku qcustomplot.cpp.

Oto graf wywoływań tej funkcji:

◆ name()

QString QCPItemAnchor::name ( ) const
inline

Definicja w linii 3413 pliku qcustomplot.h.

◆ pixelPosition()

QPointF QCPItemAnchor::pixelPosition ( ) const
virtual

Returns the final absolute pixel position of the QCPItemAnchor on the QCustomPlot surface.

The pixel information is internally retrieved via QCPAbstractItem::anchorPixelPosition of the parent item, QCPItemAnchor is just an intermediary.

Reimplementowana w QCPItemPosition.

Definicja w linii 11355 pliku qcustomplot.cpp.

Oto graf wywołań dla tej funkcji:
Oto graf wywoływań tej funkcji:

◆ removeChildX()

void QCPItemAnchor::removeChildX ( QCPItemPosition pos)
protected

Definicja w linii 11396 pliku qcustomplot.cpp.

Oto graf wywoływań tej funkcji:

◆ removeChildY()

void QCPItemAnchor::removeChildY ( QCPItemPosition pos)
protected

Definicja w linii 11424 pliku qcustomplot.cpp.

Oto graf wywoływań tej funkcji:

◆ toQCPItemPosition()

QCPItemPosition * QCPItemAnchor::toQCPItemPosition ( )
inlineprotectedvirtual

Returns 0 if this instance is merely a QCPItemAnchor, and a valid pointer of type QCPItemPosition* if it actually is a QCPItemPosition (which is a subclass of QCPItemAnchor).

This safe downcast functionality could also be achieved with a dynamic_cast. However, QCustomPlot avoids dynamic_cast to work with projects that don't have RTTI support enabled (e.g. -fno-rtti flag with gcc compiler).

Reimplementowana w QCPItemPosition.

Definicja w linii 3427 pliku qcustomplot.h.

Oto graf wywoływań tej funkcji:

Dokumentacja przyjaciół i funkcji związanych

◆ QCPItemPosition

friend class QCPItemPosition
friend

Definicja w linii 3438 pliku qcustomplot.h.

Dokumentacja atrybutów składowych

◆ mAnchorId

int QCPItemAnchor::mAnchorId
protected

Definicja w linii 3423 pliku qcustomplot.h.

◆ mChildrenX

QSet<QCPItemPosition*> QCPItemAnchor::mChildrenX
protected

Definicja w linii 3424 pliku qcustomplot.h.

◆ mChildrenY

QSet<QCPItemPosition*> QCPItemAnchor::mChildrenY
protected

Definicja w linii 3424 pliku qcustomplot.h.

◆ mName

QString QCPItemAnchor::mName
protected

Definicja w linii 3418 pliku qcustomplot.h.

◆ mParentItem

QCPAbstractItem* QCPItemAnchor::mParentItem
protected

Definicja w linii 3422 pliku qcustomplot.h.

◆ mParentPlot

QCustomPlot* QCPItemAnchor::mParentPlot
protected

Definicja w linii 3421 pliku qcustomplot.h.


Dokumentacja dla tej klasy została wygenerowana z plików: