MAK Data Logger API Documentation for HLA
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
timeBar.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 1992-2026 MAK Technologies, Inc
3 ** All rights reserved.
4 ******************************************************************************/
5 
10 
11 #pragma once
12 
13 #include <lgrGui/lgrGui.h>
15 #include <lgrGui/overlapSlider.h>
17 
18 #include <lgrUtil/absoluteTime.h>
19 #include <QElapsedTimer>
20 
21 namespace MAKLogger
22 {
23  class DtValueSmoother;
24  class DtLgrGuiModel;
25  class DtLgrTimelineWindowSliderBar;
26 
30  {
31  Q_OBJECT
32  Q_PROPERTY(QColor InitialFill MEMBER myInitialFill USER true)
33  Q_PROPERTY(QColor OuterColor MEMBER myOuterColor USER true)
34  Q_PROPERTY(QColor InnerColor MEMBER myInnerColor USER true)
35  Q_PROPERTY(QColor TickColor MEMBER myTickColor USER true)
36 
37  public:
39  DtTimelineBar(DtLgrGuiModel& model,QWidget* parent);
40 
42  virtual ~DtTimelineBar();
43 
44  virtual void reverseTicks(bool reverse);
45 
46  virtual DtAbsoluteTime firstTime() const;
47  virtual DtAbsoluteTime lastTime() const;
48  virtual DtAbsoluteTime currentTime() const;
49  virtual DtAbsoluteTime startTime() const;
50  virtual DtAbsoluteTime stopTime() const;
51 
52  virtual DtRelativeTime duration() const;
53  virtual DtRelativeTime playDuration() const;
54 
55  virtual int verticalMargin() const;
56 
57  virtual DtSliderBar* addTimelineWindowSlider();
58  virtual DtSliderBar* windowSlider();
59 
60  virtual DtLgrTimeBarZoomBox* timeBarZoomBox();
61  virtual void enableZoomBox(bool enable);
62 
63  virtual DtLgrGuiModel* model();
64 
65  virtual void setEmptyText(const QString& emptyText);
66 
67  public slots:
68 
69  virtual void setStartStopTimePercentages(float,float);
70 
72  virtual void testForUpdate();
73 
74  virtual void drawZoomBox();
75 
76  virtual void resizeZoomBox(int delta);
77 
78  virtual void resizeEvent(QResizeEvent *qre);
79 
80  signals:
81 
82  void wheelMoved(int);
83 
84  void drawnTimesChanged(float);
85 
86  protected:
87 
88  static DtRelativeTime textTickSize(DtRelativeTime duration);
89 
90  virtual void paintEvent( QPaintEvent* );
91  virtual void mouseReleaseEvent(QMouseEvent*);
92  virtual void mouseMoveEvent( QMouseEvent* );
93  virtual void mousePressEvent( QMouseEvent* );
94  virtual void keyPressEvent( QKeyEvent* );
95  virtual void wheelEvent(QWheelEvent *event);
96  virtual void contextMenuEvent(QContextMenuEvent * );
97  virtual void updateCurrentTime(QPoint);
98 
99  virtual void draw(QPainter& painter,const QRect& boundingRect);
100  virtual void drawBox(QPainter& painter,DtSliderBox* box) const;
101  virtual void drawTicks(QPainter& painter,double,double);
102  virtual void drawBackground(QPainter& painter,double ,double );
103 
104  protected:
105 
106  double myDrawnCurrentTime;
107  double myDrawnStartTime;
108  double myDrawnStopTime;
109  double myDrawnFirstVisibleTime;
110  double myDrawnLastVisibleTime;
111  int myHorizontalMargin;
112  int myVerticalMargin;
113  bool myReverseTicks;
114 
115  bool myUpdateTimeFlag;
116  bool mySelectingArea;
117  DtAbsoluteTime myLastSentSelectionTime;
118  DtAbsoluteTime myPendingSelectionTime;
119  bool myPendingTimeUpdate;
120  QElapsedTimer myJumpThrottle;
121  DtValueSmoother* myValueSmoother;
122 
123  DtLgrTimelineWindowSliderBar* myTimelineWindowSlider;
124  DtLgrTimeBarZoomBox* myTimeBarZoomBox;
125 
126  DtLgrGuiModel* myModel;
127 
128  float myLeftViewableOffset;
129  float myRightViewableOffset;
130 
131  QString myEmptyText;
132 
133  QColor myInitialFill;
134  QColor myOuterColor;
135  QColor myInnerColor;
136  QColor myTickColor;
137  };
138 }
139 
A slider which allows multiple boxes that can overlap.
Definition: overlapSlider.h:27
Class responsible for smoothing multiple input values and calculating an interpolated &#39;next&#39; value...
Definition: qtFloatMath.h:27
Used to manage a bar between a start and an end of a slider bar.
Definition: sliderBar.h:25
Represents a slider bar on the full time line to indicate the time window displayed in the partial ti...
Definition: lgrTimelineWindowSliderBar.h:22
Relative Time, an elapsed duration of time, no implied measurement, could be seconds/cycles or ticks ...
Definition: absoluteTime.h:28
A time line bar which is zoom able and drawable current time marker.
Definition: timeBar.h:29
Represents a box within a slider.
Definition: sliderBox.h:27
The logger GUI&#39;s model.
Definition: lgrGuiModel.h:56
Contains MAKLogger::DtOverlapSlider subclass of MAKLogger::DtZoomComponent and MAKLogger::DtMultiBoxS...
Contains MAKLogger::DtAbsoluteTime and MAKLogger::DtRelativeTime classes.
Contains MAKLogger::DtLgrZoomableWidget class.
#define DT_DLL_LGRGUI
Definition: lgrGui.h:19
Defines INPORT/EXPORT macros for lgrGui library.
A Zoom widget. Highlights the visible timeline duration on the fulltimeline bar.
Definition: lgrTimeBarZoomBox.h:27
Absolute Time, a particular measured instance in time, could be thought of as a set of relative times...
Definition: absoluteTime.h:82

Document ID: Generated on Tue Nov 17 15:25:07 EST 2026 from SVN revision 298446
Copyright © 2026 MAK Technologies. All Rights Reserved (www.mak.com)