Parallel Coordinate System with Time Series Data
PCAxis.h
Go to the documentation of this file.
1 #pragma once
2 
3 //#include <qvector2d.h>
4 #include "Calendar.h"
5 #include "Painter2D.h"
6 
17 class PCAxis {
18 private:
22  Calendar* calendarData;
23 
24 public:
33  PCAxis(Calendar* calendarData, std::string attr_name, QVector2D pos, float height);
34  ~PCAxis();
35 
41  void update(int days);
42 
46  void draw(Painter2D* painter2D, QPainter* qPainter);
47 
51  void drawAtDrawPos(Painter2D* painter2D, QPainter* qPainter);
52 
56  std::unordered_map<std::string, float> values;
57 
61  QVector2D pos;
62 
66  float height, minVal, maxVal;
67 
71  float days = 0;
72 
76  std::string attr_name;
77 
81  QVector2D drawPos;
82 
86  float drawHeight;
87 
88  std::string toString();
89 };
A Calendar from which you can access the whole data.
Definition: Calendar.h:83
A PC Axis, which represents one axis in the PC System. It holds its positional values on the plane an...
Definition: PCAxis.h:17
std::unordered_map< std::string, float > values
Definition: PCAxis.h:56
std::string toString()
Convert this object into a string representation.
Definition: PCAxis.cpp:149
float drawHeight
Definition: PCAxis.h:86
~PCAxis()
Destructor.
Definition: PCAxis.cpp:37
void update(int days)
Updates the given days.
Definition: PCAxis.cpp:52
float minVal
Definition: PCAxis.h:66
void drawAtDrawPos(Painter2D *painter2D, QPainter *qPainter)
Draw at draw position.
Definition: PCAxis.cpp:122
float maxVal
Definition: PCAxis.h:66
float days
Definition: PCAxis.h:71
void draw(Painter2D *painter2D, QPainter *qPainter)
Draws.
Definition: PCAxis.cpp:94
QVector2D pos
Definition: PCAxis.h:61
PCAxis(Calendar *calendarData, std::string attr_name, QVector2D pos, float height)
Constructor.
Definition: PCAxis.cpp:18
QVector2D drawPos
Definition: PCAxis.h:81
float height
Definition: PCAxis.h:66
std::string attr_name
Definition: PCAxis.h:76
A 2D painter.
Definition: Painter2D.h:15