OpendTect
7.0
|
Holds data pertinent to a certain enum. It does not know the enum values themselves, but treat them as integers. More...
Public Member Functions | |
EnumDef () | |
EnumDef (const char *nm, const char *s[], short nrs=0) | |
void | add (const char *key, const uiString &, int enumval, const char *iconfile) |
int | convert (const char *txt) const |
const char * | convert (int idx) const |
int | getEnumValForIndex (int) const |
const char * | getIconFileForIndex (int idx) const |
const char * | getKeyForIndex (int i) const |
uiString | getUiStringForIndex (int i) const |
int | indexOf (const char *s) const |
int | indexOf (int enumval) const |
bool | isValidKey (const char *) const |
bool | isValidName (const char *key) const |
const BufferStringSet & | keys () const |
void | remove (const char *key) |
void | setIconFileForIndex (int idx, const char *) |
void | setUiStringForIndex (int, const uiString &) |
int | size () const |
const uiStringSet & | strings () const |
bool | validIdx (int idx) const |
Public Member Functions inherited from NamedObject | |
NamedObject (const char *nm=nullptr) | |
NamedObject (const NamedObject &oth) | |
virtual | ~NamedObject () |
virtual BufferString | getName () const |
bool | getNameFromPar (const IOPar &) |
const name_type & | name () const override |
NamedObject & | operator= (const NamedObject &) |
bool | operator== (const NamedObject &oth) const |
virtual void | setName (const char *nm) |
Public Member Functions inherited from ObjectWithName | |
virtual | ~ObjectWithName () |
bool | hasName (const char *nm) const |
bool | hasName (const name_type &nm) const |
void | putNameInPar (IOPar &) const |
Protected Member Functions | |
void | fillUiStrings () |
Protected Attributes | |
TypeSet< int > | enums_ |
BufferStringSet | iconfiles_ |
BufferStringSet | keys_ |
uiStringSet | uistrings_ |
Protected Attributes inherited from NamedObject | |
BufferString | name_ |
Additional Inherited Members | |
Public Types inherited from ObjectWithName | |
typedef OD::String | name_type |
Holds data pertinent to a certain enum. It does not know the enum values themselves, but treat them as integers.
In most cases, the inherited EnumDefImpl<ENUM> is used, but a stand-alone EnumDef can be used if one wants to use combinations of enums that are not available as EnumDefImpl.
A stand-alone EnumDef can be created as follows to create a combo box with all enums in Stats::Type without the average.
<>
EnumDef::EnumDef | ( | ) |
EnumDef::EnumDef | ( | const char * | nm, |
const char * | s[], | ||
short | nrs = 0 |
||
) |
void EnumDef::add | ( | const char * | key, |
const uiString & | , | ||
int | enumval, | ||
const char * | iconfile | ||
) |
|
inline |
|
inline |
|
protected |
int EnumDef::getEnumValForIndex | ( | int | ) | const |
const char* EnumDef::getIconFileForIndex | ( | int | idx | ) | const |
const char* EnumDef::getKeyForIndex | ( | int | i | ) | const |
uiString EnumDef::getUiStringForIndex | ( | int | i | ) | const |
int EnumDef::indexOf | ( | const char * | s | ) | const |
int EnumDef::indexOf | ( | int | enumval | ) | const |
bool EnumDef::isValidKey | ( | const char * | ) | const |
|
inline |
|
inline |
void EnumDef::remove | ( | const char * | key | ) |
void EnumDef::setIconFileForIndex | ( | int | idx, |
const char * | |||
) |
void EnumDef::setUiStringForIndex | ( | int | , |
const uiString & | |||
) |
int EnumDef::size | ( | ) | const |
|
inline |
bool EnumDef::validIdx | ( | int | idx | ) | const |
|
protected |
|
protected |
|
protected |
|
protected |
Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B.V. 1995-2024