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

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