A PC Line representing a Line on the PCSystem. It is a Line over all attributes, so geometrically speaken is a poly line with multiple segments.
More...
#include <PCLine.h>
A PC Line representing a Line on the PCSystem. It is a Line over all attributes, so geometrically speaken is a poly line with multiple segments.
- Author
- Depner, Gamsjaeger
- Date
- 05.06.2021
◆ PCLine() [1/2]
PCLine::PCLine |
( |
QVector3D |
color, |
|
|
float |
thickness = 1.0 , |
|
|
float |
alpha = 1.0 |
|
) |
| |
Constructor.
creates a PC Line without any points and a color. Thickness and alpha can also be specified if needed.
- Parameters
-
color | of the Line |
thickness | of the Line |
alpha | or opacity of the Line |
- Author
- Depner, Gamsjaeger
- Date
- 05.06.2021
- Parameters
-
color | The color. |
thickness | The thickness. |
alpha | The alpha. |
◆ PCLine() [2/2]
PCLine::PCLine |
( |
std::vector< QVector2D > |
points, |
|
|
QVector3D |
color, |
|
|
float |
thickness = 1.0 , |
|
|
float |
alpha = 1.0 |
|
) |
| |
Constructor.
creates a PC Line with points and a color. Thickness and alpha can also be specified if needed.
- Parameters
-
points | of the Line |
color | of the Line |
thickness | of the Line |
alpha | or opacity of the Line |
- Author
- Depner, Gamsjaeger
- Date
- 05.06.2021
- Parameters
-
points | The points. |
color | The color. |
thickness | The thickness. |
alpha | The alpha. |
◆ ~PCLine()
Destructor.
- Author
- Depner, Gamsjaeger
- Date
- 05.06.2021
◆ addPoint()
void PCLine::addPoint |
( |
QVector2D |
p | ) |
|
Adds a point.
adds a point to the Line
- Parameters
-
- Author
- Depner, Gamsjaeger
- Date
- 05.06.2021
- Parameters
-
◆ clearPoints()
void PCLine::clearPoints |
( |
| ) |
|
Clears the points.
deletes all points of the Line
- Author
- Depner, Gamsjaeger
- Date
- 05.06.2021
◆ draw()
void PCLine::draw |
( |
Painter2D * |
painter2D, |
|
|
QPainter * |
qPainter, |
|
|
int |
indexStep, |
|
|
std::vector< PCAxis * > |
notDrawn |
|
) |
| |
Draws.
draws the Line
- Parameters
-
painter2D | our own painter |
qPainter | Qt's painter |
indexStep | defines how many points shall be skipped when drawing the line |
defines | between which axes the Line shall not be drawn |
- Author
- Depner, Gamsjaeger
- Date
- 05.06.2021
- Parameters
-
[in,out] | painter2D | If non-null, the painter 2D. |
[in,out] | qPainter | If non-null, the painter. |
| indexStep | The index step. |
| notDrawn | The not drawn. |
◆ highlight()
bool PCLine::highlight |
( |
QVector2D |
pos | ) |
|
Highlights the given position.
highlights the line dependent on the mouse position (if the mouse hovers the line)
- Parameters
-
pos | is the position of the mouse |
- Author
- Depner, Gamsjaeger
- Date
- 05.06.2021
- Parameters
-
- Returns
- True if it succeeds, false if it fails.
◆ name
The documentation for this class was generated from the following files: