OpendTect-6_4  6.4
uidlggroup.h
Go to the documentation of this file.
1 #ifndef uidlggroup_h
2 #define uidlggroup_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: A.H. Bril
9  Date: 13/8/2000
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include "uitoolsmod.h"
16 #include "uidialog.h"
17 #include "uigroup.h"
18 #include "uitabstack.h"
19 
20 
26 mExpClass(uiTools) uiDlgGroup : public uiGroup
27 {
28 public:
29  uiDlgGroup(uiParent* p,const uiString& caption )
30  : uiGroup( p, caption.getFullString() )
31  , caption_( caption )
32  {}
33 
34  void setCaption( const uiString& c ) { caption_ = c; }
35  const uiString& getCaption() const { return caption_; }
36 
37  virtual bool acceptOK() { return true; }
39  virtual bool rejectOK() { return true; }
42  virtual bool revertChanges() { return true; }
49  virtual const char* errMsg() const { return 0; }
50 
51  virtual HelpKey helpKey() const { return mNoHelpKey; }
52 
53 protected:
55 
56 };
57 
61 {
62 public:
64  : uiDialog(p,st)
65  , grp_(0) {}
66  void setGroup( uiDlgGroup* grp ) { grp_ = grp; }
67 
68 
69  HelpKey helpKey() const
70  {
71  if ( !grp_->helpKey().isEmpty() )
72  return grp_->helpKey();
73 
74  return uiDialog::helpKey();
75  }
76 
77 protected:
78  bool acceptOK(CallBacker*) { return grp_->acceptOK(); }
79  bool rejectOK(CallBacker*) { return grp_->rejectOK(); }
80 
82 };
83 
84 
86 mExpClass(uiTools) uiTabStackDlg : public uiDialog
87 {
88 public:
90  ~uiTabStackDlg();
91 
92  uiParent* tabParent();
93  uiObject* tabObject() { return (uiObject*)tabstack_; }
94  void addGroup(uiDlgGroup*);
95 
96  int nrGroups() const { return groups_.size(); }
97  uiDlgGroup& getGroup(int idx) { return *groups_[idx]; }
98  const uiDlgGroup& getGroup(int idx) const { return *groups_[idx]; }
99  void showGroup(int idx);
101  { return tabstack_->currentPageId(); }
102 
103  HelpKey helpKey() const;
110 protected:
111 
112  void selChange(CallBacker*);
113 
114  virtual bool acceptOK(CallBacker*);
115  virtual bool rejectOK(CallBacker*);
116 
120 };
121 
122 #endif
Definition: uigroup.h:54
virtual bool rejectOK()
Definition: uidlggroup.h:39
#define mExpClass(module)
Definition: commondefs.h:160
description of properties of dialog.
Definition: uidialog.h:51
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
#define mNoHelpKey
Definition: uidialog.h:39
uiString caption_
Definition: uidlggroup.h:54
uiDlgGroup(uiParent *p, const uiString &caption)
Definition: uidlggroup.h:29
bool rejectOK(CallBacker *)
confirm reject
Definition: uidlggroup.h:79
ObjectSet< uiDlgGroup > groups_
Definition: uidlggroup.h:118
uiObject * tabObject()
Definition: uidlggroup.h:93
The base class for most UI elements.
Definition: uiobj.h:38
Definition: uistring.h:89
Definition: uiparent.h:26
HelpKey helpKey() const
Definition: uidlggroup.h:69
Definition: helpview.h:49
Definition: uidlggroup.h:26
bool canrevert_
Definition: uidlggroup.h:117
bool acceptOK(CallBacker *)
confirm accept
Definition: uidlggroup.h:78
virtual HelpKey helpKey() const
Definition: uidlggroup.h:51
Definition: uidialog.h:42
void setCaption(const uiString &c)
Definition: uidlggroup.h:34
int nrGroups() const
Definition: uidlggroup.h:96
Definition: uidlggroup.h:60
Definition: uitabstack.h:33
const uiDlgGroup & getGroup(int idx) const
Definition: uidlggroup.h:98
uiDlgGroup * grp_
Definition: uidlggroup.h:81
uiDlgGroup & getGroup(int idx)
Definition: uidlggroup.h:97
virtual bool acceptOK()
Definition: uidlggroup.h:37
const uiString & getCaption() const
Definition: uidlggroup.h:35
uiSingleGroupDlg(uiParent *p, const uiDialog::Setup &st)
Definition: uidlggroup.h:63
Definition: uidlggroup.h:86
int currentGroupID()
Definition: uidlggroup.h:100
void setGroup(uiDlgGroup *grp)
Definition: uidlggroup.h:66
virtual const char * errMsg() const
Definition: uidlggroup.h:49
virtual bool revertChanges()
Definition: uidlggroup.h:42
virtual HelpKey helpKey() const
uiTabStack * tabstack_
Definition: uidlggroup.h:119

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