OpendTect-6_4  6.4
uidial.h
Go to the documentation of this file.
1 #ifndef uidial_h
2 #define uidial_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Nanne Hemstra
9  Date: January 2010
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include "uibasemod.h"
16 #include "uigroup.h"
17 #include "uiobj.h"
18 
19 class uiDialBody;
20 
21 class uiLabel;
22 class uiLineEdit;
23 
24 mExpClass(uiBase) uiDial : public uiObject
25 {
26 public:
27 
28  uiDial(uiParent*,const char* nm="Dial");
29  ~uiDial();
30 
31  void setValue(int);
32  int getValue() const;
33 
34  void setMinValue(int);
35  int minValue() const;
36  void setMaxValue(int);
37  int maxValue() const;
38  void setStep(int);
39  int step() const;
40 
41  void setInterval(const StepInterval<int>&);
42  void getInterval(StepInterval<int>&) const;
43 
44  void setOrientation(OD::Orientation);
45  OD::Orientation getOrientation() const;
46 
47  void setInverted(bool);
48  bool isInverted() const;
49  void setInvertedControls(bool);
50  bool hasInvertedControls() const;
51  void setWrapping(bool);
52  bool hasWrapping() const;
53  void setStartAtTop(bool);
54  bool hasStartAtTop() const;
55 
60 
61 private:
62 
63  uiDialBody* body_;
64  uiDialBody& mkbody(uiParent*,const char*);
65 
67  // true - numbering starts at the top
68 };
69 
71 mExpClass(uiBase) uiDialExtra : public uiGroup
72 {
73 public:
74 
75  mExpClass(uiBase) Setup
76  {
77  public:
78  Setup(const uiString& l)
79  : lbl_(l)
80  , withedit_(false)
81  , isvertical_(false)
82  , dialsize_(60)
83  {}
84 
85  mDefSetupMemb(bool,withedit)
86  mDefSetupMemb(bool,isvertical)
87  mDefSetupMemb(int,dialsize)
89  };
90 
91  uiDialExtra(uiParent*,const Setup&, const char* nm);
92 
93  uiDial* dial() { return dial_; }
94  uiLabel* label() { return lbl_; }
95 
96  void processInput();
97  float editValue() const;
99 
100 protected:
101 
105 
106  void init(const Setup&,const char*);
107  void editRetPress(CallBacker*);
108  void sliderMove(CallBacker*);
109 };
110 
111 #endif
Definition: uigroup.h:54
#define mExpClass(module)
Definition: commondefs.h:160
uiLineEditBody & mkbody(uiParent *, const char *)
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
bool init()
uiLineEdit * editfld_
Definition: uidial.h:104
The base class for most UI elements.
Definition: uiobj.h:38
Definition: uistring.h:89
Definition: uiparent.h:26
Definition: uidial.h:71
uiLabel * lbl_
Definition: uidial.h:103
Notifier< uiDial > valueChanged
Definition: uidial.h:56
uiLabel * label()
Definition: uidial.h:94
#define mDefSetupMemb(typ, memb)
Definition: commondefs.h:137
Notifier< uiDial > sliderPressed
Definition: uidial.h:58
uiDial * dial_
Definition: uidial.h:102
uiDial * dial()
Definition: uidial.h:93
bool startAtTop_
Definition: uidial.h:66
Notifier< uiDial > sliderReleased
Definition: uidial.h:59
Definition: uilabel.h:24
Notifier< uiDial > sliderMoved
Definition: uidial.h:57
Definition: uidial.h:24
Definition: uidial.h:75
Definition: uilineedit.h:51
virtual void setValue(const char *s)
Definition: userinputobj.h:100
uiDialBody * body_
Definition: uidial.h:63
Orientation
Fundamental orientation in 2D UIs.
Definition: oduicommon.h:23
Setup(const uiString &l)
Definition: uidial.h:78

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2019