|
SETestKCL
1.0.
|
#include <qcustomplot.h>


Public Member Functions | |
| QCPItemAnchor (QCustomPlot *parentPlot, QCPAbstractItem *parentItem, const QString name, int anchorId=-1) | |
| virtual | ~QCPItemAnchor () |
| QString | name () const |
| virtual QPointF | pixelPoint () const |
Protected Member Functions | |
| virtual QCPItemPosition * | toQCPItemPosition () |
| void | addChildX (QCPItemPosition *pos) |
| void | removeChildX (QCPItemPosition *pos) |
| void | addChildY (QCPItemPosition *pos) |
| void | removeChildY (QCPItemPosition *pos) |
Protected Attributes | |
| QString | mName |
| QCustomPlot * | mParentPlot |
| QCPAbstractItem * | mParentItem |
| int | mAnchorId |
| QSet< QCPItemPosition * > | mChildrenX |
| QSet< QCPItemPosition * > | mChildrenY |
Friends | |
| class | QCPItemPosition |
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.
Definition at line 1503 of file qcustomplot.h.
| 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.
Definition at line 7452 of file qcustomplot.cpp.
|
virtual |
Definition at line 7460 of file qcustomplot.cpp.
References mChildrenX, mChildrenY, QCPItemPosition::parentAnchorX(), QCPItemPosition::parentAnchorY(), QCPItemPosition::setParentAnchorX(), and QCPItemPosition::setParentAnchorY().
|
protected |
Definition at line 7508 of file qcustomplot.cpp.
References mChildrenX.
Referenced by QCPItemPosition::setParentAnchorX().
|
protected |
Definition at line 7536 of file qcustomplot.cpp.
References mChildrenY.
Referenced by QCPItemPosition::setParentAnchorY().
|
inline |
Definition at line 1510 of file qcustomplot.h.
|
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.
Reimplemented in QCPItemPosition.
Definition at line 7481 of file qcustomplot.cpp.
References QCPAbstractItem::anchorPixelPoint(), mAnchorId, and mParentItem.
Referenced by QCPItemPosition::pixelPoint(), and QCPItemPosition::setPixelPoint().
|
protected |
Definition at line 7522 of file qcustomplot.cpp.
References mChildrenX.
Referenced by QCPItemPosition::setParentAnchorX(), and QCPItemPosition::~QCPItemPosition().
|
protected |
Definition at line 7550 of file qcustomplot.cpp.
References mChildrenY.
Referenced by QCPItemPosition::setParentAnchorY(), and QCPItemPosition::~QCPItemPosition().
|
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).
Reimplemented in QCPItemPosition.
Definition at line 1524 of file qcustomplot.h.
Referenced by QCPItemPosition::setParentAnchorX(), and QCPItemPosition::setParentAnchorY().
|
friend |
Definition at line 1535 of file qcustomplot.h.
|
protected |
Definition at line 1520 of file qcustomplot.h.
Referenced by pixelPoint().
|
protected |
Definition at line 1521 of file qcustomplot.h.
Referenced by addChildX(), removeChildX(), ~QCPItemAnchor(), and QCPItemPosition::~QCPItemPosition().
|
protected |
Definition at line 1521 of file qcustomplot.h.
Referenced by addChildY(), removeChildY(), ~QCPItemAnchor(), and QCPItemPosition::~QCPItemPosition().
|
protected |
Definition at line 1515 of file qcustomplot.h.
|
protected |
Definition at line 1519 of file qcustomplot.h.
Referenced by pixelPoint(), QCPItemPosition::setParentAnchorX(), and QCPItemPosition::setParentAnchorY().
|
protected |
Definition at line 1518 of file qcustomplot.h.
Referenced by QCPItemPosition::pixelPoint(), and QCPItemPosition::setPixelPoint().
1.8.5