MAK Data Logger API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
lgrTimeBarZoomBox.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 1992-2025 MAK Technologies, Inc
3 ** All rights reserved.
4 ******************************************************************************/
5 
8 
9 #pragma once
10 
11 #include <lgrGui/lgrGui.h>
12 #include <QPainter>
13 #include <QRect>
14 #include <QWidget>
15 #include <lgrGui/dragComponent.h>
17 
18 class QBoxLayout;
19 
20 namespace MAKLogger
21 {
22  class DtBoundsSlider;
23  class DtVectorButton;
24  class DtLgrTimeBarWidget;
25  class DtTimelineBar;
28  {
29  Q_OBJECT
30  Q_PROPERTY(QColor ZoomBoxColor MEMBER myZoomBoxColor USER true)
31  Q_PROPERTY(QColor DarkBorderColor MEMBER myDarkBorderColor USER true)
32  Q_PROPERTY(QColor MidBorderColor MEMBER myMidBorderColor USER true)
33  public:
34  //CTOR
36 
37  //DTOR
39 
41  virtual QRect zoomBox();
42 
44  virtual void init();
45 
47  virtual void setPressed(bool pressed);
48 
49  virtual bool pressed();
50 
52  virtual void drawZoomBox(QPainter& painter);
53 
55  virtual void setZoomBoxColor( QColor zoomBoxColor );
56 
58  virtual void setZoomBoxBorderColors( QColor darkBorder, QColor midBorder, QColor lightBorder );
59 
61  virtual void setHidden(bool);
62 
63  virtual bool hidden();
64 
66  virtual float start();
67 
69  virtual float stop();
70 
72  virtual void setStartAndEnd(float, float);
73 
74  virtual void setStartAndEndPercent(float, float);
75 
76  virtual void setLeftEdge(float);
77 
78  virtual void setRightEdge(float);
79 
81  virtual void resizeWindowEvent();
82 
84  virtual bool cursorOnEdge(QMouseEvent* e);
85 
87  virtual void dragZoomBox();
88 
90  virtual void dragZoomBoxRightEdge();
91 
93  virtual void dragZoomBoxLeftEdge();
94 
96  virtual bool edgesAreValid(float newLeftEdge, float newRightEdge);
97 
99  {
102  RIGHT_EDGE
103  };
104 
105  public slots:
107  virtual void adjustZoomBoxSize(int delta);
108 
109  virtual void setDrawnTimes(float);
110 
111  virtual void followModeChanged(bool enableFollow);
112 
113  protected:
114  virtual void mouseReleaseEvent(QMouseEvent*);
115  virtual void mouseMoveEvent( QMouseEvent* );
116  virtual void mousePressEvent( QMouseEvent* );
117  virtual void mouseDoubleClickEvent( QMouseEvent* );
118 
119 signals:
120  void pressedChanged(float);
121  void positionChanged(float);
122  void startAndEndChanged(float,float);
123 
124 
125  protected:
128 
133 
134  float myStart; //Percentage value of where the right edge is on the timebar
135  float myStop; //Percentage value of where the left edge is on the timebar
136  float myLeftEdge; //Value of X position of left edge
137  float myRightEdge; //Value of X position of right edge
138  float myLeftMostEdge; //left edge of timebar parent
139  float myRightMostEdge; //right edge of timebar parent
140  float myEdgeToPercentFactor; // 100.0 / right most edge
141  float myPercentToEdgeFactor; // right most edge / 100.0
142  float myMargin; //Width of the margin on the side of the timebar
143  float myVisualDuration; //Amount of seconds currently visible in the visibleTimebarLine
144  int myWheelClickResolution; //A smaller value will zoom faster, a larger value will zoom slower.
145  int myCurrentEdge; //Used to keep track of which edge is clicked
146 
147  //Bool to keep track whether the zoomBox is pressed or not
148  bool myPressed;
149  //Bool to track whether the box is hidden or not
150  bool myHidden;
151  //Bool to track if the zoomBox is at its minimum size.
153  };
154 
155 }
QRect * myDrawableBox
Definition: lgrTimeBarZoomBox.h:127
float myRightEdge
Definition: lgrTimeBarZoomBox.h:137
Definition: lgrTimeBarZoomBox.h:100
A widget which can be zoomed.
Definition: lgrZoomableWidget.h:26
float myStart
Definition: lgrTimeBarZoomBox.h:134
QColor myDarkBorderColor
Definition: lgrTimeBarZoomBox.h:130
A time line bar which is zoom able and drawable current time marker.
Definition: timeBar.h:28
int myWheelClickResolution
Definition: lgrTimeBarZoomBox.h:144
DtTimelineBar * myTimeBar
Definition: lgrTimeBarZoomBox.h:126
QColor myMidBorderColor
Definition: lgrTimeBarZoomBox.h:131
bool myPressed
Definition: lgrTimeBarZoomBox.h:148
QColor myZoomBoxColor
Definition: lgrTimeBarZoomBox.h:129
bool myHidden
Definition: lgrTimeBarZoomBox.h:150
float myVisualDuration
Definition: lgrTimeBarZoomBox.h:143
float myMargin
Definition: lgrTimeBarZoomBox.h:142
Contains MAKLogger::DtLgrZoomableWidget class.
QColor myLightBorderColor
Definition: lgrTimeBarZoomBox.h:132
DtLgrZoomBoxEdge
Definition: lgrTimeBarZoomBox.h:98
float myLeftMostEdge
Definition: lgrTimeBarZoomBox.h:138
float myPercentToEdgeFactor
Definition: lgrTimeBarZoomBox.h:141
float myRightMostEdge
Definition: lgrTimeBarZoomBox.h:139
Contains MAKLogger::DtDragComponent class.
#define DT_DLL_LGRGUI
Definition: lgrGui.h:19
Definition: lgrTimeBarZoomBox.h:101
float myStop
Definition: lgrTimeBarZoomBox.h:135
float myEdgeToPercentFactor
Definition: lgrTimeBarZoomBox.h:140
Defines INPORT/EXPORT macros for lgrGui library.
bool myAtMinimumSize
Definition: lgrTimeBarZoomBox.h:152
A Zoom widget. Highlights the visible timeline duration on the fulltimeline bar.
Definition: lgrTimeBarZoomBox.h:27
Classes used to track mouse drags.
Definition: dragComponent.h:21
int myCurrentEdge
Definition: lgrTimeBarZoomBox.h:145
float myLeftEdge
Definition: lgrTimeBarZoomBox.h:136

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)