MAK Data Logger API Documentation for HLA
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
sliderBox.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 sliderBox_H_
10 #define sliderBox_H_
11 
12 #include <lgrGui/lgrGui.h>
13 
14 #include <QObject>
15 #include <vlutil/vlSmartPointers.h>
16 
17 class QRectF;
18 
19 namespace MAKLogger
20 {
21 
22  class DtSliderBar;
23  typedef DtBoost::shared_ptr<DtSliderBar> DtSliderBarSP;
24  typedef DtBoost::weak_ptr<DtSliderBar> DtSliderBarWP;
25 
28  {
29  Q_OBJECT
30 
31  public:
32 
34  {
37  Right
38  };
39 
41  DtSliderBox(DtSliderBar* bar,float position,float width,float height);
42 
44  virtual ~DtSliderBox();
45 
47  QRectF bounds(QRectF viewport) const;
48 
50  bool leftBox() const;
51  bool rightBox() const;
52 
53  float position() const { return myPosition;}
54  float savedPosition() const { return mySavedPosition;}
55  float width() const { return myWidth; }
56  float height() const { return myHeight; }
57 
58  inline bool selected() const { return mySelected; }
59  inline bool pressed() const { return myPressed;}
60  DtSliderBar* bar() { return myBar; }
61  const DtSliderBar* bar() const { return myBar; }
62  BoxOrientation orientation() const { return myOrientation; }
63 
64  void savePosition();
65  void setRelativePosition( float relPosition);
66  void restorePosition();
67 
69 
70  //float canMove(float position);
71  //float canMoveRelative(float dx);
72 
73  public slots:
74 
75  void setPosition( float position);
76  void setWidth( float width);
77  void setHeight( float height);
78  void setSelected( bool selected);
79  void setPressed( bool selected);
80  void setOrientation( BoxOrientation);
81  void setPositionNoEmit(float position);
82 
83 signals:
84  void positionChanged(float);
85  void widthChanged(float);
86  void heightChanged(float);
87  void selectedChanged(bool);
88  void pressedChanged(bool);
89  void orientationChanged(BoxOrientation);
90  protected:
91 
92  float myPosition;
94  float myWidth;
95  float myHeight;
96  //PointF myLimits;
97  bool mySelected;
98  bool myPressed;
101 
102  };
103 
104 
105 
106 }
107 
108 #endif

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)