Plasma Engine  2.0
Loading...
Searching...
No Matches
TimeWidget.moc.h
1#pragma once
2
3#include <Foundation/Basics.h>
4#include <Foundation/Containers/Deque.h>
5#include <Foundation/Containers/Map.h>
6#include <Foundation/Strings/String.h>
7#include <Foundation/Time/Time.h>
8#include <Inspector/ui_TimeWidget.h>
9#include <QGraphicsView>
10#include <QListWidgetItem>
11#include <ads/DockWidget.h>
12
13class plQtTimeWidget : public ads::CDockWidget, public Ui_TimeWidget
14{
15public:
16 Q_OBJECT
17
18public:
19 static const plUInt8 s_uiMaxColors = 9;
20
21 plQtTimeWidget(QWidget* pParent = 0);
22
23 static plQtTimeWidget* s_pWidget;
24
25private Q_SLOTS:
26
27 void on_ListClocks_itemChanged(QListWidgetItem* item);
28 void on_ComboTimeframe_currentIndexChanged(int index);
29
30public:
31 static void ProcessTelemetry(void* pUnuseed);
32
33 void ResetStats();
34 void UpdateStats();
35
36private:
37 QGraphicsPathItem* m_pPath[s_uiMaxColors];
38 QGraphicsPathItem* m_pPathMax;
39 QGraphicsScene m_Scene;
40
41 plUInt32 m_uiMaxSamples;
42
43 plUInt8 m_uiColorsUsed;
44 bool m_bClocksChanged;
45
46 plTime m_MaxGlobalTime;
47 plTime m_DisplayInterval;
48 plTime m_LastUpdatedClockList;
49
50 struct TimeSample
51 {
52 plTime m_AtGlobalTime;
53 plTime m_Timestep;
54 };
55
56 struct ClockData
57 {
58 plDeque<TimeSample> m_TimeSamples;
59
60 bool m_bDisplay = true;
61 plUInt8 m_uiColor = 0xFF;
62 plTime m_MinTimestep = plTime::Seconds(60.0);
63 plTime m_MaxTimestep;
64 QListWidgetItem* m_pListItem = nullptr;
65 };
66
68};
69
Definition Deque.h:270
Definition Map.h:408
Definition TimeWidget.moc.h:14
The time class encapsulates a double value storing the time in seconds.
Definition Time.h:12