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-2015 VT MAK
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  public:
31  //CTOR
33 
34  //DTOR
36 
38  virtual QRect zoomBox();
39 
41  virtual void init();
42 
44  virtual void setPressed(bool pressed);
45 
46  virtual bool pressed();
47 
49  virtual void drawZoomBox(QPainter& painter);
50 
52  virtual void setZoomBoxColor( QColor zoomBoxColor );
53 
55  virtual void setZoomBoxBorderColors( QColor darkBorder, QColor midBorder, QColor lightBorder );
56 
58  virtual void setHidden(bool);
59 
60  virtual bool hidden();
61 
63  virtual float start();
64 
66  virtual float stop();
67 
69  virtual void setStartAndEnd(float, float);
70 
71  virtual void setStartAndEndPercent(float, float);
72 
73  virtual void setLeftEdge(float);
74 
75  virtual void setRightEdge(float);
76 
78  virtual void resizeWindowEvent();
79 
81  virtual bool cursorOnEdge(QMouseEvent* e);
82 
84  virtual void dragZoomBox();
85 
87  virtual void dragZoomBoxRightEdge();
88 
90  virtual void dragZoomBoxLeftEdge();
91 
93  virtual bool edgesAreValid(float newLeftEdge, float newRightEdge);
94 
96  {
99  RIGHT_EDGE
100  };
101 
102  public slots:
104  virtual void adjustZoomBoxSize(int delta);
105 
106  virtual void setDrawnTimes(float);
107 
108  virtual void followModeChanged(bool enableFollow);
109 
110  protected:
111  virtual void mouseReleaseEvent(QMouseEvent*);
112  virtual void mouseMoveEvent( QMouseEvent* );
113  virtual void mousePressEvent( QMouseEvent* );
114  virtual void mouseDoubleClickEvent( QMouseEvent* );
115 
116 signals:
117  void pressedChanged(float);
118  void positionChanged(float);
119  void startAndEndChanged(float,float);
120 
121 
122  protected:
125 
130 
131  float myStart; //Percentage value of where the right edge is on the timebar
132  float myStop; //Percentage value of where the left edge is on the timebar
133  float myLeftEdge; //Value of X position of left edge
134  float myRightEdge; //Value of X position of right edge
135  float myLeftMostEdge; //left edge of timebar parent
136  float myRightMostEdge; //right edge of timebar parent
137  float myEdgeToPercentFactor; // 100.0 / right most edge
138  float myPercentToEdgeFactor; // right most edge / 100.0
139  float myMargin; //Width of the margin on the side of the timebar
140  float myVisualDuration; //Amount of seconds currently visible in the visibleTimebarLine
141  int myWheelClickResolution; //A smaller value will zoom faster, a larger value will zoom slower.
142  int myCurrentEdge; //Used to keep track of which edge is clicked
143 
144  //Bool to keep track whether the zoomBox is pressed or not
145  bool myPressed;
146  //Bool to track whether the box is hidden or not
147  bool myHidden;
148  //Bool to track if the zoomBox is at its minimum size.
150  };
151 
152 }
QRect * myDrawableBox
Definition: lgrTimeBarZoomBox.h:124
float myRightEdge
Definition: lgrTimeBarZoomBox.h:134
Definition: lgrTimeBarZoomBox.h:97
A widget which can be zoomed.
Definition: lgrZoomableWidget.h:26
float myStart
Definition: lgrTimeBarZoomBox.h:131
QColor myDarkBorderColor
Definition: lgrTimeBarZoomBox.h:127
A time line bar which is zoom able and drawable current time marker.
Definition: timeBar.h:28
int myWheelClickResolution
Definition: lgrTimeBarZoomBox.h:141
DtTimelineBar * myTimeBar
Definition: lgrTimeBarZoomBox.h:123
QColor myMidBorderColor
Definition: lgrTimeBarZoomBox.h:128
bool myPressed
Definition: lgrTimeBarZoomBox.h:145
QColor myZoomBoxColor
Definition: lgrTimeBarZoomBox.h:126
bool myHidden
Definition: lgrTimeBarZoomBox.h:147
float myVisualDuration
Definition: lgrTimeBarZoomBox.h:140
float myMargin
Definition: lgrTimeBarZoomBox.h:139
Contains MAKLogger::DtLgrZoomableWidget class.
QColor myLightBorderColor
Definition: lgrTimeBarZoomBox.h:129
DtLgrZoomBoxEdge
Definition: lgrTimeBarZoomBox.h:95
float myLeftMostEdge
Definition: lgrTimeBarZoomBox.h:135
float myPercentToEdgeFactor
Definition: lgrTimeBarZoomBox.h:138
float myRightMostEdge
Definition: lgrTimeBarZoomBox.h:136
Contains MAKLogger::DtDragComponent class.
#define DT_DLL_LGRGUI
Definition: lgrGui.h:19
Definition: lgrTimeBarZoomBox.h:98
float myStop
Definition: lgrTimeBarZoomBox.h:132
float myEdgeToPercentFactor
Definition: lgrTimeBarZoomBox.h:137
Defines INPORT/EXPORT macros for lgrGui library.
bool myAtMinimumSize
Definition: lgrTimeBarZoomBox.h:149
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:142
float myLeftEdge
Definition: lgrTimeBarZoomBox.h:133

Document ID: Generated on Mon Mar 22 15:30:17 EDT 2021 from SVN revision 226440
Copyright © 2021 MAK Technologies. All Rights Reserved (www.mak.com)