15 #include "generalmod.h" 49 bool isDifferentFrom(
const Level&)
const;
51 ID
id()
const {
return id_; }
55 void setName(
const char*);
57 void setPars(
const IOPar&);
62 static const Level& undef();
83 const char* checkName(
const char*)
const;
109 bool isEmpty()
const {
return lvls_.isEmpty(); }
110 int size()
const {
return lvls_.size(); }
115 {
return gtIdxOf(nm,-1) >= 0; }
117 {
return gtIdxOf(0,
id) >= 0; }
119 {
return gtIdxOf(nm,-1); }
121 {
return gtIdxOf(0,
id); }
123 Level*
get(
const char* nm ) {
return gtLvl(nm,-1); }
124 const Level*
get(
const char* nm )
const {
return gtLvl(nm,-1); }
129 {
return set(lvlnm,c,-1); }
131 {
return set(lvlnm,c,idx); }
133 {
return set(lvlnm,c,-1); }
145 bool readFrom(
const char*);
146 bool writeTo(
const char*)
const;
150 static LevelSet* createStd(
const char*);
157 {
return getLevel(idx).id(); }
159 {
return getLevel(idx).color(); }
172 int gtIdxOf(
const char*,
Level::ID)
const;
175 void getLevelsFrom(
const LevelSet&);
176 void makeMine(
Level&);
179 void lvlChgCB( CallBacker* cb ) { notif(cb,
true); }
180 void lvlRemCB( CallBacker* cb ) { notif(cb,
false); }
181 void notif(CallBacker*,
bool);
183 static bool haveCurSet();
188 friend class LevelSetMgr;
#define mExpClass(module)
Definition: commondefs.h:160
const LevelSet * lvlset_
Definition: stratlevel.h:72
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
Set of Stratigraphic levels.
Definition: stratlevel.h:99
Level * add(const char *lvlnm, const Color &c)
Definition: stratlevel.h:128
bool operator==(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:53
FixedString Level()
Definition: keystrs.h:78
Level * insert(const char *lvlnm, const Color &c, int idx=-1)
Definition: stratlevel.h:130
#define mGlobal(module)
Definition: commondefs.h:163
IOPar & pars_
Definition: stratlevel.h:71
Notifier< Level > toBeRemoved
Definition: stratlevel.h:60
void usePar(const IOPar &iop, ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:188
void lvlChgCB(CallBacker *cb)
Definition: stratlevel.h:179
bool isPresent(const char *nm) const
Definition: stratlevel.h:114
int notiflvlidx_
Definition: stratlevel.h:166
ID id_
Definition: stratlevel.h:69
void lvlRemCB(CallBacker *cb)
Definition: stratlevel.h:180
int size() const
Definition: stratlevel.h:110
Notifier< LevelSet > levelToBeRemoved
Definition: stratlevel.h:141
bool isEmpty() const
Definition: stratlevel.h:109
void setEmpty()
Definition: stratlevel.h:112
Set of BufferString objects.
Definition: bufstringset.h:28
ObjectSet< Level > lvls_
Definition: stratlevel.h:164
const LevelSet & unpushedLVLS()
int notifLvlIdx() const
if < 0 then more than one level have changed
Definition: stratlevel.h:142
Level::ID lastlevelid_
Definition: stratlevel.h:167
Definition: callback.h:254
Set of pointers to objects.
Definition: commontypes.h:32
Color color_
Definition: stratlevel.h:70
Stratigraphic level.
Definition: stratlevel.h:42
int levelID(int idx) const
Definition: stratlevel.h:156
int ID
Definition: stratlevel.h:46
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
const ObjectSet< Level > & levels() const
Definition: stratlevel.h:111
Source
Definition: repos.h:25
Notifier< LevelSet > levelChanged
Definition: stratlevel.h:140
int indexOf(Level::ID id) const
Definition: stratlevel.h:120
const Level & getLevel(int idx) const
Definition: stratlevel.h:154
bool isPresent(Level::ID id) const
Definition: stratlevel.h:116
ID id() const
Definition: stratlevel.h:51
const IOPar & pars() const
Definition: stratlevel.h:53
Notifier< LevelSet > levelAdded
Definition: stratlevel.h:139
void fillPar(IOPar &iop, const ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:175
int indexOf(const char *nm) const
Definition: stratlevel.h:118
OpendTect standard ascii format file reading.
Definition: ascstream.h:83
LevelSet & eLVLS()
Definition: stratlevel.h:195
Stratigraphy.
Definition: stratlevel.h:26
bool needStore() const
Definition: stratlevel.h:147
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
Notifier< Level > changed
Definition: stratlevel.h:59
Object with a name.
Definition: namedobj.h:35
BufferString getStdFileName(const char *inpnm, const char *basenm)
example: getStdFileName("North Sea","Levels")
Color color() const
Definition: stratlevel.h:52
Color is an RGB color object, with a transparancy. The storage is in a 4-byte integer, similar to Qt.
Definition: color.h:26
static const Level & undef()
bool ischanged_
Definition: stratlevel.h:168
Color color(int idx) const
Definition: stratlevel.h:158
void pushLevelSet(LevelSet *)
Compound key consisting of ints.
Definition: multiid.h:25