OpendTect-6_4  6.4
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
uiBuildListFromList Class Referenceabstract

Base class for element allowing the building of lists of items from available 'ingredients'. More...

Inheritance diagram for uiBuildListFromList:
[legend]

Classes

class  Setup
 

Public Member Functions

 uiBuildListFromList (uiParent *, const Setup &, const char *grpnm=0)
 
bool haveUserChange () const
 
- Public Member Functions inherited from uiGroup
 uiGroup (uiParent *, const char *nm="uiGroup", bool manage=true)
 
virtual ~uiGroup ()
 
 operator const uiGroupObj * () const
 
 operator uiGroupObj * ()
 
 operator const uiObject & () const
 
 operator uiObject & ()
 
uiObjectattachObj ()
 
const uiObjectattachObj () const
 
uiParentparent ()
 
const uiParentparent () const
 
void setHSpacing (int)
 
void setVSpacing (int)
 
void setSpacing (int s=0)
 
void setBorder (int)
 
void setFrame (bool yn=true)
 
void setNoBackGround ()
 
uiObjecthAlignObj ()
 
void setHAlignObj (uiObject *o)
 
void setHAlignObj (uiGroup *o)
 
uiObjecthCenterObj ()
 
void setHCenterObj (uiObject *o)
 
void setHCenterObj (uiGroup *o)
 
void setIsMain (bool)
 internal use only. Tells the layout manager it's a toplevel mngr. More...
 
virtual uiMainWinmainwin ()
 
void setChildrenSensitive (bool)
 
virtual Notifier< uiBaseObject > & preFinalise ()
 
virtual Notifier< uiBaseObject > & postFinalise ()
 
virtual void setSize (const uiSize &)
 
- Public Member Functions inherited from uiParent
 uiParent (const char *nm, uiParentBody *)
 
void addChild (uiBaseObject &)
 
void manageChld (uiBaseObject &, uiObjectBody &)
 
void attachChild (constraintType tp, uiObject *child, uiObject *other, int margin, bool reciprocal)
 
const ObjectSet< uiBaseObject > * childList () const
 
uiObjectmainObject ()
 
const uiObjectmainObject () const
 
uiParentBodypbody ()
 
const uiParentBodypbody () const
 
void attach (constraintType t, int margin=-1)
 
void attach (constraintType t, uiParent *oth, int margin=-1, bool reciprocal=true)
 
void attach (constraintType t, uiObject *oth, int margin=-1, bool reciprocal=true)
 
virtual void display (bool yn, bool shrk=false, bool maximize=false)
 
bool isDisplayed () const
 
void setFocus ()
 
bool hasFocus () const
 
void setSensitive (bool yn=true)
 
bool sensitive () const
 
const uiFontfont () const
 
void setFont (const uiFont &f)
 
void setCaption (const uiString &c)
 
void setCursor (const MouseCursor &c)
 
uiSize actualsize (bool include_border) const
 
int prefHNrPics () const
 
int prefVNrPics () const
 
void setPrefHeight (int h)
 
void setPrefWidth (int w)
 
void setPrefHeightInChar (int h)
 
void setPrefHeightInChar (float h)
 
void setPrefWidthInChar (float w)
 
void setPrefWidthInChar (int w)
 
virtual void reDraw (bool deep)
 
void shallowRedraw (CallBacker *=0)
 
void deepRedraw (CallBacker *=0)
 
void setStretch (int h, int v)
 
Color backgroundColor () const
 
Color roBackgroundColor () const
 
void setBackgroundColor (const Color &c)
 
void translateText ()
 

Protected Member Functions

uiToolButtonlowestStdBut ()
 
const char * curAvSel () const
 null = no selection More...
 
const char * curDefSel () const
 null = no selection More...
 
void setCurDefSel (const char *)
 null = first More...
 
virtual void editReq (bool isadd)=0
 
virtual void removeReq ()=0
 
virtual const char * avFromDef (const char *) const =0
 
virtual bool ioReq (bool forsave)
 
virtual void itemSwitch (const char *, const char *)
 
virtual void defSelChg ()
 
void setAvailable (const BufferStringSet &)
 at start More...
 
void removeItem ()
 
void removeAll ()
 
void setItemName (const char *)
 
void addItem (const char *)
 
void handleSuccessfullEdit (bool isadd, const char *itmnm)
 
void defSelCB (CallBacker *)
 
void addCB (CallBacker *)
 
void edCB (CallBacker *)
 
void rmCB (CallBacker *)
 
void openCB (CallBacker *)
 
void saveCB (CallBacker *)
 
void moveCB (CallBacker *)
 
void rmItm (int, bool)
 
- Protected Member Functions inherited from uiGroup
virtual uiObjectmainobject ()
 
virtual void attach_ (constraintType, uiObject *oth, int margin=-1, bool reciprocal=true)
 
virtual void reDraw_ (bool deep)
 
void setShrinkAllowed (bool)
 
bool shrinkAllowed ()
 
void bodyDel (CallBacker *)
 
void uiobjDel (CallBacker *)
 
void setFrameStyle (int)
 
void reSizeChildren (const uiObject *, float, float)
 

Protected Attributes

Setup setup_
 
bool usrchg_
 
uiListBoxavfld_
 
uiListBoxdeffld_
 
uiToolButtonedbut_
 
uiToolButtonrmbut_
 
uiToolButtonsavebut_
 
uiToolButtonmoveupbut_
 
uiToolButtonmovedownbut_
 
- Protected Attributes inherited from uiGroup
uiGroupObjgrpobj_
 
uiGroupParentBodybody_
 

Private Member Functions

 mODTextTranslationClass (uiBuildListFromList)
 

Additional Inherited Members

- Static Public Member Functions inherited from uiGroup
static uiGroupgtDynamicCastToGrp (mQtclass(QWidget *))
 

Detailed Description

Base class for element allowing the building of lists of items from available 'ingredients'.

Let's say you want to make a list of persons. These can be male or female, and dep on the gender you want to be able to define different properties.

uiBuildListFromList::Setup( true, "person" ) .withtitles(true).avtitle("gender");

The list of 'available' items is simply "male" and "female". Once you create e.g. a female, the option 'female' itself should stay in the available list. Thus singleuse must remain false. The order of the defined items is not important so we choose 'movable' = true. The constructor will now generate default tooltips and titles, like "Add person".

Required: Both sets of names cannot have double entries. You only get requests for edit and remove. You have to manage underlying objects yourself. Moreover, you have to use functions like 'removeItem' and 'handleSuccessfullEdit' to keep the display in sync with the actual set that is being built. You must define the avFromDef() function. It should return the 'available' item that belongs to a 'defined' item name.

Constructor & Destructor Documentation

uiBuildListFromList::uiBuildListFromList ( uiParent ,
const Setup ,
const char *  grpnm = 0 
)

Member Function Documentation

void uiBuildListFromList::addCB ( CallBacker )
inlineprotected
void uiBuildListFromList::addItem ( const char *  )
protected
virtual const char* uiBuildListFromList::avFromDef ( const char *  ) const
protectedpure virtual
const char* uiBuildListFromList::curAvSel ( ) const
protected

null = no selection

const char* uiBuildListFromList::curDefSel ( ) const
protected

null = no selection

void uiBuildListFromList::defSelCB ( CallBacker )
inlineprotected
virtual void uiBuildListFromList::defSelChg ( )
protectedvirtual

Reimplemented in uiAttribDescSetBuild.

void uiBuildListFromList::edCB ( CallBacker )
inlineprotected
virtual void uiBuildListFromList::editReq ( bool  isadd)
protectedpure virtual
void uiBuildListFromList::handleSuccessfullEdit ( bool  isadd,
const char *  itmnm 
)
inlineprotected
bool uiBuildListFromList::haveUserChange ( ) const
inline
virtual bool uiBuildListFromList::ioReq ( bool  forsave)
inlineprotectedvirtual
virtual void uiBuildListFromList::itemSwitch ( const char *  ,
const char *   
)
inlineprotectedvirtual
uiToolButton* uiBuildListFromList::lowestStdBut ( )
protected
uiBuildListFromList::mODTextTranslationClass ( uiBuildListFromList  )
private
void uiBuildListFromList::moveCB ( CallBacker )
protected
void uiBuildListFromList::openCB ( CallBacker )
protected
void uiBuildListFromList::removeAll ( )
protected
void uiBuildListFromList::removeItem ( )
protected
virtual void uiBuildListFromList::removeReq ( )
protectedpure virtual
void uiBuildListFromList::rmCB ( CallBacker )
inlineprotected
void uiBuildListFromList::rmItm ( int  ,
bool   
)
protected
void uiBuildListFromList::saveCB ( CallBacker )
protected
void uiBuildListFromList::setAvailable ( const BufferStringSet )
protected

at start

void uiBuildListFromList::setCurDefSel ( const char *  )
protected

null = first

void uiBuildListFromList::setItemName ( const char *  )
protected

Member Data Documentation

uiListBox* uiBuildListFromList::avfld_
protected
uiListBox* uiBuildListFromList::deffld_
protected
uiToolButton* uiBuildListFromList::edbut_
protected
uiToolButton* uiBuildListFromList::movedownbut_
protected
uiToolButton* uiBuildListFromList::moveupbut_
protected
uiToolButton* uiBuildListFromList::rmbut_
protected
uiToolButton* uiBuildListFromList::savebut_
protected
Setup uiBuildListFromList::setup_
protected
bool uiBuildListFromList::usrchg_
protected

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