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 
115 signals:
116  void pressedChanged(float);
117  void positionChanged(float);
118  void startAndEndChanged(float,float);
119 
120 
121  protected:
124 
129 
130  float myStart; //Percentage value of where the right edge is on the timebar
131  float myStop; //Percentage value of where the left edge is on the timebar
132  float myLeftEdge; //Value of X position of left edge
133  float myRightEdge; //Value of X position of right edge
134  float myLeftMostEdge; //left edge of timebar parent
135  float myRightMostEdge; //right edge of timebar parent
136  float myEdgeToPercentFactor; // 100.0 / right most edge
137  float myPercentToEdgeFactor; // right most edge / 100.0
138  float myMargin; //Width of the margin on the side of the timebar
139  float myVisualDuration; //Amount of seconds currently visible in the visibleTimebarLine
140  int myWheelClickResolution; //A smaller value will zoom faster, a larger value will zoom slower.
141  int myCurrentEdge; //Used to keep track of which edge is clicked
142 
143  //Bool to keep track whether the zoomBox is pressed or not
144  bool myPressed;
145  //Bool to track whether the box is hidden or not
146  bool myHidden;
147  //Bool to track if the zoomBox is at its minimum size.
149  };
150 
151 }

Document ID: Generated on Tue Aug 1 09:00:26 EDT 2017 from SVN revision 179128
Copyright © 2017 VT MÄK. All Rights Reserved (www.mak.com)