MAK Data Logger API Documentation for HLA
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
boundsSlider.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 #ifndef boundsSlider_H_
10 #define boundsSlider_H_
11 
12 #include <lgrGui/lgrGui.h>
13 #include <lgrGui/dragComponent.h>
14 #include <lgrGui/multiBoxSlider.h>
16 
17 #include <list>
18 
19 #include <QMatrix>
20 #include <QWidget>
21 
22 namespace MAKLogger
23 {
24 
28  public DtMultiBoxSlider, public DtDragComponent
29  {
30  Q_OBJECT
31 
32  Q_PROPERTY(float start READ start WRITE setStart)
33  Q_PROPERTY(float end READ end WRITE setEnd)
34 
35  public:
36  DtBoundsSlider(float start = 0.0f, float end = 0.0f, QWidget* p = 0);
37 
38  float start() const;
39  float end() const;
40 
41  inline bool leftSelected() const;
42  inline bool rightSelected() const;
43 
44  void setBarColors(QColor top,QColor bottom);
45 
46  virtual float minimumDistance() const;
47  virtual void setMinimumDistance(float);
48  virtual void saveMinimumDistance();
49  virtual void restoreMinimumDistance();
50 
51  public slots:
52 
55  void setStart(float startPosition);
56 
59  void setEnd(float endPosition);
60 
64  void setStartAndEnd(float startPosition,float endPosition);
65  void setStartAndEndNoEmit(float,float);
66 
67  void setLeftSelection(bool);
68  void setRightSelection(bool);
69 
71  void resetStart();
73  void resetEnd();
74 
75  protected slots:
76 
79  void startBoxMoved(float startPosition);
80 
83  void endBoxMoved(float endPosition);
84 
85 signals:
86  void startAndEndChanged(float,float);
87  void leftSelectionChanged(bool);
88  void rightSelectionChanged(bool);
89 
90  protected:
91 
92  virtual void paintEvent( QPaintEvent* );
93  virtual void mouseDoubleClickEvent(QMouseEvent* e);
94  virtual void mouseReleaseEvent(QMouseEvent*);
95  virtual void mouseMoveEvent( QMouseEvent* );
96  virtual void mousePressEvent( QMouseEvent* );
97 
98  virtual void draw(QPainter& painter);
99 
100  virtual void drawBar(QPainter& painter,DtSliderBar* bar) const;
101  virtual void drawBox(QPainter& painter,DtSliderBox* box) const;
102 
103  float myStart;
104  float myEnd;
105 
106  DtSliderBox* myLeftBox;
107  DtSliderBox* myRightBox;
108 
109  QMatrix myDrawnMatrix;
110  QColor myTopColor;
111  QColor myBottomColor;
112  };
113 
114 }
115 
116 #endif
A Widget which contains two slider boxes which define a bounding area.
Definition: boundsSlider.h:27
Contains MAKLogger::DtMultiBoxSlider class.
Used to manage a bar between a start and an end of a slider bar.
Definition: sliderBar.h:25
A widget which can be zoomed.
Definition: lgrZoomableWidget.h:26
Represents a box within a slider.
Definition: sliderBox.h:27
Contains MAKLogger::DtLgrZoomableWidget class.
Contains MAKLogger::DtDragComponent class.
#define DT_DLL_LGRGUI
Definition: lgrGui.h:19
Defines INPORT/EXPORT macros for lgrGui library.
Classes used to track mouse drags.
Definition: dragComponent.h:21
A slider bar which supports multiple boxes.
Definition: multiBoxSlider.h:32

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)