OpendTect-6_4  6.4
uimathexpression.h
Go to the documentation of this file.
1 #ifndef uimathexpression_h
2 #define uimathexpression_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Bert
9  Date: Sep 2011
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include "uitoolsmod.h"
16 #include "uigroup.h"
17 #include "uistrings.h"
18 class uiLineEdit;
19 class uiComboBox;
20 class uiPushButton;
21 class uiButton;
22 class uiToolButtonSetup;
23 namespace Math { class SpecVarSet; }
24 
25 
28 public:
29 
30  mExpClass(uiTools) Setup
31  {
32  public:
34  : label_(lbl)
35  , withsetbut_(false)
36  , withfns_(true)
37  , fnsbelow_(true)
38  , specvars_(0) {}
39 
40  mDefSetupMemb(bool,withfns);
41  mDefSetupMemb(bool,fnsbelow);
42  mDefSetupMemb(bool,withsetbut);
43  mDefSetupMemb(uiString,label);
44  mDefSetupMemb(const Math::SpecVarSet*,specvars);
45  mDefSetupMemb(CallBack,setcb);
46  // if withsetbut and not set, will do returnpress
47  };
48 
49  uiMathExpression(uiParent*,const Setup&);
50 
51  void setText(const char*);
52  void insertText(const char*);
53 
54  const char* text();
55  uiLineEdit* textField() { return txtfld_; }
56  uiButton* addButton(const uiToolButtonSetup&);
58 
60  void extFormSet() { retPressCB(0); }
61 
62 protected:
63 
68  uiButton* lastbut_;
69  Setup setup_;
70 
71  void grpSel(CallBacker*);
72  void doIns(CallBacker*);
73  void setButCB(CallBacker*);
74  void retPressCB(CallBacker*);
75 
76 };
77 
78 
79 #endif
Definition: uigroup.h:54
#define mExpClass(module)
Definition: commondefs.h:160
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
is the base class for all buttons.
Definition: uibutton.h:83
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
Setup(const uiString &lbl=uiStrings::sEmptyString())
Definition: uimathexpression.h:33
uiButton * lastbut_
Definition: uimathexpression.h:68
Combo box.
Definition: uicombobox.h:32
Definition: uistring.h:89
Definition: uiparent.h:26
uiComboBox * grpfld_
Definition: uimathexpression.h:65
Set of special variables for Math Formulae/Expressions.
Definition: mathspecvars.h:47
uiLineEdit * txtfld_
Definition: uimathexpression.h:64
Notifier< uiMathExpression > formSet
Definition: uimathexpression.h:59
Definition: uitoolbutton.h:76
void extFormSet()
Definition: uimathexpression.h:60
#define mDefSetupMemb(typ, memb)
Definition: commondefs.h:137
uiComboBox * fnfld_
Definition: uimathexpression.h:66
Definition: math2.h:29
uiLineEdit * textField()
Definition: uimathexpression.h:55
Definition: uilineedit.h:51
Definition: uimathexpression.h:26
static uiString sEmptyString()
Definition: uistrings.h:286
Setup setup_
Definition: uimathexpression.h:69
CallBacks object-oriented (object + method).
Definition: callback.h:57
Definition: uimathexpression.h:30
uiPushButton * setbut_
Definition: uimathexpression.h:67

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