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-2025 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 
20 namespace MAKLogger
21 {
22  class DtValueSmoother;
23  class DtLgrGuiModel;
24  class DtLgrTimelineWindowSliderBar;
25 
29  {
30  Q_OBJECT
31  Q_PROPERTY(QColor InitialFill MEMBER myInitialFill USER true)
32  Q_PROPERTY(QColor OuterColor MEMBER myOuterColor USER true)
33  Q_PROPERTY(QColor InnerColor MEMBER myInnerColor USER true)
34  Q_PROPERTY(QColor TickColor MEMBER myTickColor USER true)
35 
36  public:
38  DtTimelineBar(DtLgrGuiModel& model,QWidget* parent);
39 
41  virtual ~DtTimelineBar();
42 
43  virtual void reverseTicks(bool reverse);
44 
45  virtual DtAbsoluteTime firstTime() const;
46  virtual DtAbsoluteTime lastTime() const;
47  virtual DtAbsoluteTime currentTime() const;
48  virtual DtAbsoluteTime startTime() const;
49  virtual DtAbsoluteTime stopTime() const;
50 
51  virtual DtRelativeTime duration() const;
52  virtual DtRelativeTime playDuration() const;
53 
54  virtual int verticalMargin() const;
55 
56  virtual DtSliderBar* addTimelineWindowSlider();
57  virtual DtSliderBar* windowSlider();
58 
59  virtual DtLgrTimeBarZoomBox* timeBarZoomBox();
60  virtual void enableZoomBox(bool enable);
61 
62  virtual DtLgrGuiModel* model();
63 
64  virtual void setEmptyText(const QString& emptyText);
65 
66  public slots:
67 
68  virtual void setStartStopTimePercentages(float,float);
69 
71  virtual void testForUpdate();
72 
73  virtual void drawZoomBox();
74 
75  virtual void resizeZoomBox(int delta);
76 
77  virtual void resizeEvent(QResizeEvent *qre);
78 
79  signals:
80 
81  void wheelMoved(int);
82 
83  void drawnTimesChanged(float);
84 
85  protected:
86 
87  static DtRelativeTime textTickSize(DtRelativeTime duration);
88 
89  virtual void paintEvent( QPaintEvent* );
90  virtual void mouseReleaseEvent(QMouseEvent*);
91  virtual void mouseMoveEvent( QMouseEvent* );
92  virtual void mousePressEvent( QMouseEvent* );
93  virtual void keyPressEvent( QKeyEvent* );
94  virtual void wheelEvent(QWheelEvent *event);
95  virtual void contextMenuEvent(QContextMenuEvent * );
96  virtual void updateCurrentTime(QPoint);
97 
98  virtual void draw(QPainter& painter,const QRect& boundingRect);
99  virtual void drawBox(QPainter& painter,DtSliderBox* box);
100  virtual void drawTicks(QPainter& painter,double,double);
101  virtual void drawBackground(QPainter& painter,double ,double );
102 
103  protected:
104 
105  double myDrawnCurrentTime;
106  double myDrawnStartTime;
107  double myDrawnStopTime;
108  double myDrawnFirstVisibleTime;
109  double myDrawnLastVisibleTime;
110  int myHorizontalMargin;
111  int myVerticalMargin;
112  bool myReverseTicks;
113 
114  bool myUpdateTimeFlag;
115  bool mySelectingArea;
116  DtValueSmoother* myValueSmoother;
117 
118  DtLgrTimelineWindowSliderBar* myTimelineWindowSlider;
119  DtLgrTimeBarZoomBox* myTimeBarZoomBox;
120 
121  DtLgrGuiModel* myModel;
122 
123  float myLeftViewableOffset;
124  float myRightViewableOffset;
125 
126  QString myEmptyText;
127 
128  QColor myInitialFill;
129  QColor myOuterColor;
130  QColor myInnerColor;
131  QColor myTickColor;
132  };
133 }
134 
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:28
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 Thu Dec 18 15:35:09 EST 2025 from SVN revision 282494
Copyright © 2024 MAK Technologies. All Rights Reserved (www.mak.com)