OpendTect-6_4  6.4
uieditobjectlist.h
Go to the documentation of this file.
1 #ifndef uieditobjectlist_h
2 #define uieditobjectlist_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Bert
9  Date: Sep 2012
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 
16 #include "uitoolsmod.h"
17 #include "uigroup.h"
18 class BufferStringSet;
19 class uiListBox;
20 class uiButton;
21 class uiButtonGroup;
22 
23 
29 public:
30 
31  uiEditObjectList(uiParent*,const char* itmtyp,
32  bool movable,bool compact=false);
33 
34  uiButtonGroup* buttons() { return bgrp_; }
35 
37 
38 protected:
39 
42  uiButton* addbut_;
43  uiButton* edbut_;
44  uiButton* rmbut_;
45  uiButton* upbut_;
46  uiButton* downbut_;
47 
48  virtual void editReq(bool isadd) = 0;
49  virtual void removeReq() = 0;
50  virtual void itemSwitch(bool up) {}
51 
52  int currentItem() const;
53  void setItems(const BufferStringSet&,int newcur=-1);
54  void manButSt();
55 
56  void addCB(CallBacker*) { editReq(true); manButSt(); }
57  void edCB(CallBacker*) { editReq(false); manButSt(); }
58  void rmCB(CallBacker*) { removeReq(); manButSt(); }
59  void upCB(CallBacker*) { itemSwitch(true); manButSt(); }
60  void downCB(CallBacker*) { itemSwitch(false); manButSt(); }
61  void selChgCB(CallBacker*) { selectionChange.trigger();
62  manButSt(); }
63 
64 };
65 
66 
67 #endif
Definition: uigroup.h:54
#define mExpClass(module)
Definition: commondefs.h:160
Notifier< uiEditObjectList > selectionChange
Definition: uieditobjectlist.h:36
uiButton * upbut_
Definition: uieditobjectlist.h:45
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
virtual void itemSwitch(bool up)
Definition: uieditobjectlist.h:50
void downCB(CallBacker *)
Definition: uieditobjectlist.h:60
uiButton * addbut_
Definition: uieditobjectlist.h:42
Definition: uiparent.h:26
mODTextTranslationClass(uiEditObjectList) public uiButtonGroup * buttons()
Definition: uieditobjectlist.h:34
Set of BufferString objects.
Definition: bufstringset.h:28
uiListBox * listfld_
Definition: uieditobjectlist.h:40
void upCB(CallBacker *)
Definition: uieditobjectlist.h:59
Base class for element allowing maintenance of lists of (usually smaller) objects.
Definition: uieditobjectlist.h:27
List Box.
Definition: uilistbox.h:75
void trigger(T &t)
Definition: callback.h:258
void addCB(CallBacker *)
Definition: uieditobjectlist.h:56
uiButton * downbut_
Definition: uieditobjectlist.h:46
Definition: uibuttongroup.h:30
uiButton * rmbut_
Definition: uieditobjectlist.h:44
uiButtonGroup * bgrp_
Definition: uieditobjectlist.h:41
void selChgCB(CallBacker *)
Definition: uieditobjectlist.h:61
void rmCB(CallBacker *)
Definition: uieditobjectlist.h:58
void edCB(CallBacker *)
Definition: uieditobjectlist.h:57
uiButton * edbut_
Definition: uieditobjectlist.h:43

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