CalibrationPoints stores a collection of calibration points that can be drawn on a QPainter.
More...
#include <calibrationpoints.h>
CalibrationPoints stores a collection of calibration points that can be drawn on a QPainter.
A point can be highlighted and the highlighted point or all points can be removed.
The points are stored as relative values so that the coordinates are values between 0 and 1.
- Author
- Oskari Leppäaho
QPointF cavapa_gui::CalibrationPoints::at |
( |
const int |
pos | ) |
|
|
inline |
Returns the calibration point at specified location.
- Parameters
-
pos | Position of the calibration point to return. |
- Returns
- The calibration point at specified location.
void cavapa_gui::CalibrationPoints::draw |
( |
QPainter & |
painter | ) |
const |
Draws all the points on a QPainter.
Draws the points as filled circles and the index (+1) of the point next to the point
- Parameters
-
painter | The QPainter to draw on. |
QColor cavapa_gui::CalibrationPoints::getComplementaryColor |
( |
const QColor |
color | ) |
|
|
static |
Returns the complementary color of the specified color.
- Parameters
-
color | The color whose complementary color is to be returned. |
- Returns
- The complementary color.
QPointF& cavapa_gui::CalibrationPoints::operator[] |
( |
const int |
pos | ) |
|
|
inline |
Returns the calibration point at specified location.
- Parameters
-
pos | Position of the calibration point to return. |
- Returns
- The calibration point at specified location.
void cavapa_gui::CalibrationPoints::push_back |
( |
QPointF |
newPoint | ) |
|
Adds a new calibration point.
- Parameters
-
newPoint | The new point. The values of the coordinates should be between 0 and 1. |
void cavapa_gui::CalibrationPoints::removeHighlighted |
( |
| ) |
|
Removes the highlighted calibration point.
Points with an index bigger than the highlighted index will have their index reduced by one. The point next to the removed point will be the new highlighted point. If the last calibration point was removed, the point before that will be the new highlighted point.
void cavapa_gui::CalibrationPoints::setHighlightedPoint |
( |
const int |
i | ) |
|
|
inline |
Sets the highlighted calibration point.
The highlighted calibration point will be drawn with the complementary color of the current drawing color.
- Parameters
-
i | The index of the point that will be highlighted. |
unsigned int cavapa_gui::CalibrationPoints::size |
( |
| ) |
const |
|
inline |
Returns the number of control points in CalibrationPoints.
- Returns
- Number of control points.
The documentation for this class was generated from the following files: