Parallel Coordinate System with Time Series Data
PCSystem.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "PCAxis.h"
4 #include "PCLine.h"
5 #include "VP_Widget.h"
6 #include "Multilist.h"
7 
17 class PCSystem
18 {
19 private:
23  Calendar* calendarData;
24 
28  float height_of_axis = 400.0f, distance_between_axes = 200.0f;
29 
33  QVector2D offset;
34 
38  std::vector<PCAxis*> vp_main_axes;
39 
43  std::vector<PCAxis> pcAxes;
44 
48  std::vector<PCLine> pcLines;
49 
53  std::unordered_map<std::string, PCLine> entity_line_map;
54 
58  std::unordered_map<std::string, VP_Widget> vp_widgets;
59 public:
60  PCSystem(Calendar* calendarData, QVector2D offset);
61  ~PCSystem();
62 
68  void update(int days);
69 
73  void draw(Painter2D* painter2D, QPainter* qPainter);
74 
75  void handleMouseMoveEvent(QVector2D mousePos);
76  void handleMousePressEvent(QVector2D mousePos);
78 
79  void updateVPWidgets(float timeLimit, float ratio);
81 
82  std::vector<QLabel*> vp_labels;
83  std::vector<QSlider*> vp_sliders;
84  std::vector<MultiList*> vp_comboBox_innerAxes;
85  std::vector<MultiList*> vp_comboBox_outerAxes;
86 };
87 
A Calendar from which you can access the whole data.
Definition: Calendar.h:83
A PC system. Representing all parts of the Parallel Coordinate System including VP_Widgets,...
Definition: PCSystem.h:18
std::vector< QSlider * > vp_sliders
Definition: PCSystem.h:83
void update(int days)
Updates the given days.
Definition: PCSystem.cpp:75
void updateVPWidgetsVanishingPoint()
Updates the vp widgets vanishing point.
Definition: PCSystem.cpp:385
void draw(Painter2D *painter2D, QPainter *qPainter)
Draws.
Definition: PCSystem.cpp:158
std::vector< QLabel * > vp_labels
Definition: PCSystem.h:82
void updateVPWidgets(float timeLimit, float ratio)
Definition: PCSystem.cpp:321
void handleMouseReleaseEvent()
Handles the mouse release event.
Definition: PCSystem.cpp:305
void handleMouseMoveEvent(QVector2D mousePos)
Handles the mouse move event described by mousePos.
Definition: PCSystem.cpp:267
std::vector< MultiList * > vp_comboBox_outerAxes
Definition: PCSystem.h:85
~PCSystem()
Destructor.
Definition: PCSystem.cpp:60
PCSystem(Calendar *calendarData, QVector2D offset)
Constructor.
Definition: PCSystem.cpp:16
void handleMousePressEvent(QVector2D mousePos)
Handles the mouse press event described by mousePos.
Definition: PCSystem.cpp:289
std::vector< MultiList * > vp_comboBox_innerAxes
Definition: PCSystem.h:84
A 2D painter.
Definition: Painter2D.h:15