OpendTect-6_4  6.4
uitabbar.h
Go to the documentation of this file.
1 #ifndef uitabbar_h
2 #define uitabbar_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: A.H. Lammertink
9  Date: 14/02/2003
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include "uibasemod.h"
16 #include "uiobj.h"
17 
18 class uiTabBarBody;
19 class uiGroup;
20 class uiTabBody;
21 class uiTab;
22 
23 
25 mExpClass(uiBase) uiTabBar : public uiObject
26 {
27 friend class i_tabbarMessenger;
28 friend class uiTabStack;
29 public:
30  uiTabBar(uiParent*,const char* nm,
31  const CallBack* cb=0);
32 
33  int addTab(uiTab*);
34  void removeTab(uiTab*);
35  void removeTab(uiGroup*);
36 
37  void setTabEnabled(int idx,bool);
38  bool isTabEnabled(int idx) const;
39 
40  void setCurrentTab(int idx);
41  int currentTabId() const;
42  uiString textOfTab(int idx) const;
43 
44  int size() const;
45 
47 
48  int indexOf(const uiGroup*) const;
49  int indexOf(const uiTab*) const;
50  uiGroup* page(int idx) const;
51 
52 protected:
53  ~uiTabBar();
54 
55  uiTabBarBody* body_;
56  uiTabBarBody& mkbody(uiParent*,const char*);
57 
59 };
60 
61 
63 {
64 friend class uiTabBar;
65 public:
66  uiTab(uiGroup&,const uiString& caption);
67 
68  void setCaption(const uiString&);
69  const uiString& getCaption() const { return caption_; }
70 
71 
72  uiGroup& group() { return grp_; }
73  const uiGroup& group() const { return grp_; }
74 
75 protected:
76 
79 };
80 
81 #endif
Definition: uigroup.h:54
#define mExpClass(module)
Definition: commondefs.h:160
const uiGroup & group() const
Definition: uitabbar.h:73
Notifier< uiTabBar > selected
Definition: uitabbar.h:46
TabBar widget only. Normally you&#39;d want to use the uiTabStack class.
Definition: uitabbar.h:25
ObjectSet< uiTab > tabs_
Definition: uitabbar.h:58
The base class for most UI elements.
Definition: uiobj.h:38
const uiString & getCaption() const
Definition: uitabbar.h:69
Definition: uistring.h:89
uiString caption_
Definition: uitabbar.h:78
Definition: uiparent.h:26
ObjectSet< T >::size_type indexOf(const ObjectSet< T > &os, const S &val)
Locate object in set.
Definition: objectset.h:169
void setCaption(const uiString &)
void setTabEnabled(uiGroup *, bool)
Definition: uitabstack.h:33
uiGroup & group()
Definition: uitabbar.h:72
uiGroup & grp_
Definition: uitabbar.h:77
void addTab(uiGroup *, const uiString &=uiString::emptyString())
bool isTabEnabled(uiGroup *) const
int size() const
Definition: uitabbar.h:62
Helper class for uitabbar to relay Qt&#39;s &#39;currentChanged&#39; messages to uiAction.
Definition: i_qtabbar.h:28
void removeTab(uiGroup *)
CallBacks object-oriented (object + method).
Definition: callback.h:57
uiGroup * page(int idx) const
uiTabBarBody * body_
Definition: uitabbar.h:55

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