26 #ifndef QCP_ITEM_RECT_H
27 #define QCP_ITEM_RECT_H
29 #include "../global.h"
39 Q_PROPERTY(QPen pen READ pen WRITE setPen)
40 Q_PROPERTY(QPen selectedPen READ selectedPen WRITE setSelectedPen)
41 Q_PROPERTY(QBrush brush READ brush WRITE setBrush)
42 Q_PROPERTY(QBrush selectedBrush READ selectedBrush WRITE setSelectedBrush)
49 QPen pen()
const {
return mPen; }
50 QPen selectedPen()
const {
return mSelectedPen; }
51 QBrush brush()
const {
return mBrush; }
52 QBrush selectedBrush()
const {
return mSelectedBrush; }
55 void setPen(
const QPen &pen);
56 void setSelectedPen(
const QPen &pen);
57 void setBrush(
const QBrush &brush);
58 void setSelectedBrush(
const QBrush &brush);
61 virtual double selectTest(
const QPointF &pos,
bool onlySelectable, QVariant *details=0)
const;
73 enum AnchorIndex {aiTop, aiTopRight, aiRight, aiBottom, aiBottomLeft, aiLeft};
76 QPen mPen, mSelectedPen;
77 QBrush mBrush, mSelectedBrush;
85 QBrush mainBrush()
const;
88 #endif // QCP_ITEM_RECT_H
virtual QPointF anchorPixelPoint(int anchorId) const
Definition: item.cpp:1253
Manages the position of an item.
Definition: item.h:76
A rectangle.
Definition: item-rect.h:35
The central class of the library. This is the QWidget which displays the plot and interacts with the ...
Definition: core.h:42
QPainter subclass used internally.
Definition: painter.h:111
An anchor of an item to which positions can be attached to.
Definition: item.h:39
The abstract base class for all items in a plot.
Definition: item.h:143
virtual void draw(QCPPainter *painter)=0
virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const =0