Parallel Coordinate System with Time Series Data
PCLine.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <qvector2d.h>
4 #include <qvector3d.h>
5 #include <cstdlib>
6 #include <qpainter.h>
7 #include "Painter2D.h"
8 #include "PCAxis.h"
9 
20 class PCLine
21 {
22 private:
26  QVector3D color;
27 
31  float thickness;
32 
36  float alpha;
37 
41  std::vector<QVector2D> points;
42 
47  int selected = -1;
48 
52  bool showInfo = false;
53 
57  QVector2D mousePos;
58 public:
62  std::string name;
63 
71  PCLine(QVector3D color, float thickness = 1.0, float alpha = 1.0);
72 
81  PCLine(std::vector<QVector2D> points, QVector3D color, float thickness = 1.0, float alpha = 1.0);
82  ~PCLine();
83 
87  void clearPoints();
88 
94  void addPoint(QVector2D p);
95 
101  bool highlight(QVector2D pos);
102 
111  void draw(Painter2D* painter2D, QPainter* qPainter, int indexStep, std::vector<PCAxis*> notDrawn);
112 };
113 
A PC Line representing a Line on the PCSystem. It is a Line over all attributes, so geometrically spe...
Definition: PCLine.h:21
void clearPoints()
Clears the points.
Definition: PCLine.cpp:70
void addPoint(QVector2D p)
Adds a point.
Definition: PCLine.cpp:86
void draw(Painter2D *painter2D, QPainter *qPainter, int indexStep, std::vector< PCAxis * > notDrawn)
Draws.
Definition: PCLine.cpp:162
PCLine(QVector3D color, float thickness=1.0, float alpha=1.0)
Constructor.
Definition: PCLine.cpp:17
std::string name
Definition: PCLine.h:62
bool highlight(QVector2D pos)
Highlights the given position.
Definition: PCLine.cpp:104
~PCLine()
Destructor.
Definition: PCLine.cpp:59
A 2D painter.
Definition: Painter2D.h:15