26 #ifndef QCP_ITEM_STRAIGHTLINE_H
27 #define QCP_ITEM_STRAIGHTLINE_H
29 #include "../global.h"
39 Q_PROPERTY(QPen pen READ pen WRITE setPen)
40 Q_PROPERTY(QPen selectedPen READ selectedPen WRITE setSelectedPen)
47 QPen pen()
const {
return mPen; }
48 QPen selectedPen()
const {
return mSelectedPen; }
51 void setPen(
const QPen &pen);
52 void setSelectedPen(
const QPen &pen);
55 virtual double selectTest(
const QPointF &pos,
bool onlySelectable, QVariant *details=0)
const;
62 QPen mPen, mSelectedPen;
68 double distToStraightLine(
const QVector2D &point1,
const QVector2D &vec,
const QVector2D &point)
const;
69 QLineF getRectClippedStraightLine(
const QVector2D &point1,
const QVector2D &vec,
const QRect &rect)
const;
73 #endif // QCP_ITEM_STRAIGHTLINE_H
Manages the position of an item.
Definition: item.h:76
A straight line that spans infinitely in both directions.
Definition: item-straightline.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
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