30 #ifndef CALIBRATIONPOINTS_H
31 #define CALIBRATIONPOINTS_H
35 #include <QFontMetrics>
37 namespace cavapa_gui {
70 void draw(QPainter& painter)
const;
76 unsigned int size()
const {
return points.size(); }
92 QPointF
at (
const int pos) {
return points.at(pos); }
99 QPointF&
operator[] (
const int pos) {
return points[pos]; }
132 void drawSinglePoint(QPainter& painter,
unsigned int i,
135 std::vector<QPointF> points;
136 unsigned int highlightedIndex;
140 #endif // CALIBRATIONPOINTS_H
void draw(QPainter &painter) const
Draws all the points on a QPainter.
Definition: calibrationpoints.cpp:43
QPointF at(const int pos)
Returns the calibration point at specified location.
Definition: calibrationpoints.h:92
QPointF & operator[](const int pos)
Returns the calibration point at specified location.
Definition: calibrationpoints.h:99
static QColor getComplementaryColor(const QColor color)
Returns the complementary color of the specified color.
Definition: calibrationpoints.cpp:79
CalibrationPoints stores a collection of calibration points that can be drawn on a QPainter...
Definition: calibrationpoints.h:52
void removeHighlighted()
Removes the highlighted calibration point.
Definition: calibrationpoints.cpp:116
void push_back(QPointF newPoint)
Adds a new calibration point.
Definition: calibrationpoints.cpp:38
unsigned int size() const
Returns the number of control points in CalibrationPoints.
Definition: calibrationpoints.h:76
void clear()
Removes all the calibration points.
Definition: calibrationpoints.h:104
void setHighlightedPoint(const int i)
Sets the highlighted calibration point.
Definition: calibrationpoints.h:85