OpendTect-6_4  6.4
uiioobjmanip.h
Go to the documentation of this file.
1 #ifndef uiioobjmanip_h
2 #define uiioobjmanip_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: May 2003
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include "uiiomod.h"
16 #include "uibuttongroup.h"
17 
18 class IOObj;
19 class IOStream;
20 class Translator;
21 class uiToolButton;
22 class IODirEntryList;
23 class BufferStringSet;
24 
25 
28 public:
30  : uiButtonGroup(p,"ManipButtons",OD::Vertical)
31  { altbutdata.allowNull(); }
33  { deepErase(butdata); deepErase(altbutdata); }
34 
35  enum Type { FileLocation, Rename, Remove, ReadOnly };
36 
37  uiToolButton* addButton(Type,const uiString& ttip,const CallBack&);
38  uiToolButton* addButton(const char* iconfnm,const uiString& ttip,
39  const CallBack&);
40  void setAlternative(uiToolButton*,const char* icfnm,
41  const uiString& ttip);
42  void useAlternative(uiToolButton*,bool);
43 
44 protected:
45 
46  mStruct(uiIo) ButData
47  {
48  ButData(uiToolButton*,const char*,const uiString&);
49  uiToolButton* but;
50  BufferString pmnm;
51  uiString tt;
52  };
53 
56 };
57 
58 
59 class uiIOObjManipGroup;
60 
61 
64 public:
66  : obj_(o), grp_(0) {}
67 
68  virtual MultiID currentID() const = 0;
69  virtual void getChosenIDs(TypeSet<MultiID>&) const = 0;
70  virtual void getChosenNames(BufferStringSet&) const = 0;
71  virtual const char* defExt() const = 0;
72  virtual const BufferStringSet& names() const = 0;
73 
74  virtual void chgsOccurred() = 0;
75  virtual void relocStart(const char*) {}
76 
79 };
80 
81 
86 public:
88  bool havereloc,
89  bool haveremove=true);
91 
92  void selChg();
93 
95 
96 protected:
97 
99 
104 
105 
106  void tbPush(CallBacker*);
107  void relocCB(CallBacker*);
108 
109  bool rmEntry(IOObj&);
111  bool renameEntry(IOObj&,Translator*);
112  bool relocEntry(IOObj&,Translator*);
113  bool readonlyEntry(IOObj&, Translator*,bool set2ro);
114 
116 
117 };
118 
119 
120 #endif
#define mExpClass(module)
Definition: commondefs.h:160
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
uiIOObjManipGroupSubj(uiObject *o)
Definition: uiioobjmanip.h:65
~uiManipButGrp()
Definition: uiioobjmanip.h:32
uiIOObjManipGroupSubj & subj_
Definition: uiioobjmanip.h:98
uiToolButton * rembut
Definition: uiioobjmanip.h:103
Definition: ioobj.h:58
Definition: iostrm.h:26
uiToolButton * robut
Definition: uiioobjmanip.h:101
uiIOObjManipGroup * grp_
Definition: uiioobjmanip.h:77
void relocCB(CallBacker *)
#define mStruct(module)
Definition: commondefs.h:165
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
uiToolButton * renbut
Definition: uiioobjmanip.h:102
virtual void relocStart(const char *)
Definition: uiioobjmanip.h:75
uiManipButGrp(uiParent *p)
Definition: uiioobjmanip.h:29
bool rmEntry(IOObj &)
The base class for most UI elements.
Definition: uiobj.h:38
Definition: uistring.h:89
Definition: uiparent.h:26
Type
Definition: uiioobjmanip.h:35
Set of BufferString objects.
Definition: bufstringset.h:28
ObjectSet< ButData > altbutdata
Definition: uiioobjmanip.h:55
Definition: uiioobjmanip.h:62
bool readonlyEntry(IOObj &, Translator *, bool set2ro)
uiToolButton * locbut
Definition: uiioobjmanip.h:100
Buttongroup to manipulate an IODirEntryList.
Definition: uiioobjmanip.h:84
ObjectSet< ButData > butdata
Definition: uiioobjmanip.h:52
Definition: uiioobjmanip.h:26
uiObject * obj_
Definition: uiioobjmanip.h:78
bool renameEntry(IOObj &, Translator *)
Definition: oduicommon.h:26
bool doReloc(Translator *, IOStream &, IOStream &)
Definition: uibuttongroup.h:30
I/O Interpreter class for a certain object type.
Definition: transl.h:123
list of dir entries.
Definition: iodirentry.h:38
bool rmEntries(ObjectSet< IOObj > &)
void tbPush(CallBacker *)
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
Definition: uitoolbutton.h:22
OpendTect.
Definition: commontypes.h:29
Definition: oduicommon.h:75
uiIOObjManipGroup(uiIOObjManipGroupSubj &, bool havereloc, bool haveremove=true)
Definition: oduicommon.h:74
CallBacks object-oriented (object + method).
Definition: callback.h:57
void triggerButton(uiManipButGrp::Type)
Compound key consisting of ints.
Definition: multiid.h:25
bool relocEntry(IOObj &, Translator *)
void deepErase(ObjectSet< T > &os)
empty the ObjectSet deleting all objects pointed to.
Definition: objectset.h:118

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