MAK Data Logger API Documentation for HLA
boundsSlider.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 1992-2010 VT MAK
3 ** All rights reserved.
4 ******************************************************************************/
5 
8 
9 #ifndef boundsSlider_H_
10 #define boundsSlider_H_
11 
12 #include "lgrGui.h"
13 #include "dragComponent.h"
14 #include "multiBoxSlider.h"
15 #include "lgrZoomableWidget.h"
16 
17 #include <list>
18 
19 #include <QtGui/QMatrix>
20 #include <QtGui/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

Document ID: Generated on Thu Apr 10 18:53:01 EDT 2014 from SVN revision 138105
Copyright © 2005-2012 VT MÄK. All Rights Reserved (www.mak.com)