MAK Data Logger API Documentation for DIS
 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
bool myPressed
Definition: sliderBox.h:98
float width() const
Definition: sliderBox.h:55
DtBoost::weak_ptr< DtSliderBar > DtSliderBarWP
Definition: sliderBox.h:24
float myHeight
Definition: sliderBox.h:95
DtBoost::shared_ptr< DtSliderBar > DtSliderBarSP
Definition: sliderBox.h:22
Used to manage a bar between a start and an end of a slider bar.
Definition: sliderBar.h:25
const DtSliderBar * bar() const
Definition: sliderBox.h:61
float myWidth
Definition: sliderBox.h:94
BoxOrientation
Definition: sliderBox.h:33
Represents a box within a slider.
Definition: sliderBox.h:27
bool selected() const
Definition: sliderBox.h:58
Definition: sliderBox.h:35
Definition: sliderBox.h:36
bool pressed() const
Definition: sliderBox.h:59
bool mySelected
Definition: sliderBox.h:97
float height() const
Definition: sliderBox.h:56
DtSliderBar * bar()
Definition: sliderBox.h:60
BoxOrientation myOrientation
Definition: sliderBox.h:100
#define DT_DLL_LGRGUI
Definition: lgrGui.h:19
float position() const
Definition: sliderBox.h:53
Defines INPORT/EXPORT macros for lgrGui library.
float myPosition
Definition: sliderBox.h:92
BoxOrientation orientation() const
Definition: sliderBox.h:62
float savedPosition() const
Definition: sliderBox.h:54
DtSliderBar * myBar
Definition: sliderBox.h:99
float mySavedPosition
Definition: sliderBox.h:93

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)