OpendTect  6.6
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Friends | List of all members
uiTreeItem Class Referenceabstract
Inheritance diagram for uiTreeItem:
[legend]

Public Member Functions

 uiTreeItem (const uiString &nm=uiString::emptyString())
 
virtual ~uiTreeItem ()
 
virtual bool addChild (uiTreeItem *child, bool below)
 
bool allChildrenChecked () const
 
bool allChildrenCollapsed () const
 
bool allChildrenExpanded () const
 
bool allChildrenUnchecked () const
 
bool areAllParentsChecked ()
 
virtual bool askContinueAndSaveIfNeeded (bool withcancel)
 
NotifierAccesscheckStatusChange ()
 
void collapse ()
 
void entryInEditMode (int col)
 
void expand ()
 
virtual uiTreeItemfindChild (const char *name)
 
virtual const uiTreeItemfindChild (const char *name) const
 
virtual uiTreeItemfindChild (int selkey)
 
virtual const uiTreeItemfindChild (int selkey) const
 
virtual void findChildren (const char *, ObjectSet< uiTreeItem > &)
 
uiTreeItemgetChild (int)
 
const uiTreeItemgetChild (int) const
 
ObjectSet< uiTreeItem > & getChildren ()
 
const ObjectSet< uiTreeItem > & getChildren () const
 
uiTreeViewItemgetItem ()
 
const uiTreeViewItemgetItem () const
 
template<class T >
bool getProperty (const char *key, T &res) const
 
bool getPropertyPtr (const char *key, void *&) const
 
bool hasChildren () const
 
bool hasGrandChildren () const
 
virtual bool isChecked () const
 
bool isCollapsed () const
 
bool isExpanded () const
 
virtual bool isSelected () const
 
NotifierAccesskeyPressed ()
 
uiTreeItemlastChild ()
 
virtual void moveItem (uiTreeItem *after)
 
virtual void moveItemToTop ()
 
uiString name () const
 
int nrChildren () const
 
uiTreeItemparentTreeItem ()
 
virtual void prepareForShutdown ()
 
virtual void removeAllChildren ()
 
virtual void removeChild (uiTreeItem *)
 
virtual bool select ()
 
virtual int selectionKey () const
 
void setChecked (bool yn, bool trigger=false)
 
void setName (const uiString &nm)
 
template<class T >
void setProperty (const char *key, const T &)
 
void setPropertyPtr (const char *key, void *)
 
virtual uiTreeItemsiblingAbove ()
 
virtual uiTreeItemsiblingBelow ()
 
virtual int siblingIndex () const
 
virtual void translateText ()
 
virtual void updateCheckStatus ()
 
virtual void updateColumnText (int col)
 
void updateSelTreeColumnText (int col)
 
- Public Member Functions inherited from CallBacker
 CallBacker ()
 
 CallBacker (const CallBacker &)
 
virtual ~CallBacker ()
 
bool attachCB (const NotifierAccess &, const CallBack &, bool onlyifnew=false) const
 
bool attachCB (const NotifierAccess *notif, const CallBack &cb, bool onlyifnew=false) const
 
void detachAllNotifiers () const
 Call from the destructor of your inherited object. More...
 
void detachCB (const NotifierAccess &, const CallBack &) const
 
void detachCB (const NotifierAccess *notif, const CallBack &cb) const
 
virtual bool isCapsule () const
 
bool isNotifierAttached (const NotifierAccess *) const
 Only for debugging purposes, don't use. More...
 
void stopReceivingNotifications () const
 

Protected Member Functions

virtual bool addChld (uiTreeItem *, bool below, bool downwards)
 
virtual bool anyButtonClick (uiTreeViewItem *)
 
virtual bool doubleClick (uiTreeViewItem *)
 
virtual uiParentgetUiParent () const
 
virtual bool init ()
 
virtual bool isExpandable () const
 
virtual bool isSelectable () const
 
virtual const char * parentType () const =0
 
virtual void removeItem (uiTreeViewItem *)
 
virtual void renameItem (uiTreeViewItem *)
 
virtual bool rightClick (uiTreeViewItem *)
 
virtual bool selectWithKey (int selkey)
 
virtual void setTreeViewItem (uiTreeViewItem *)
 
virtual bool shouldSelect (int selectionkey) const
 
virtual bool showSubMenu ()
 
virtual int uiTreeViewItemType () const
 
virtual void updateSelection (int selectionKey, bool dw=false)
 
virtual bool useParentType () const
 

Protected Attributes

ObjectSet< uiTreeItemchildren_
 
uiString name_
 
uiTreeItemparent_
 
IOPar properties_
 
uiTreeViewItemuitreeviewitem_
 

Private Member Functions

bool addChildImpl (CallBacker *, uiTreeItem *, bool, bool)
 

Friends

class uiODTreeTop
 
class uiTreeTopItem
 

Additional Inherited Members

- Static Public Member Functions inherited from CallBacker
static void createReceiverForCurrentThread ()
 
static void removeReceiverForCurrentThread ()
 

Detailed Description

<>

Constructor & Destructor Documentation

◆ uiTreeItem()

uiTreeItem::uiTreeItem ( const uiString nm = uiString::emptyString())

◆ ~uiTreeItem()

virtual uiTreeItem::~uiTreeItem ( )
virtual

Member Function Documentation

◆ addChild()

virtual bool uiTreeItem::addChild ( uiTreeItem child,
bool  below 
)
virtual

Adds a child. If the child does not fit (i.e. the child's parentType() is not the same as this), it will try to find a valid parent somewhere else in the tree.

Parameters
childbecomes mine
belowspecifies wether the child shoule be added above or below eventual existing siblings.

Reimplemented in uiTreeTopItem.

◆ addChildImpl()

bool uiTreeItem::addChildImpl ( CallBacker ,
uiTreeItem ,
bool  ,
bool   
)
private

◆ addChld()

virtual bool uiTreeItem::addChld ( uiTreeItem ,
bool  below,
bool  downwards 
)
protectedvirtual

Adds a child to this item. If the child does not fit (i.e. its parentType() is not equal to this), the object tries to add it to its parent if downwards is false. If downwards is true, it tries to add it to its children if it does not fit.

Parameters
belowspecifies wether the child should be added above or below eventual existing siblings.
downwards

Reimplemented in uiODHorizon2DParentTreeItem, uiODHorizonParentTreeItem, and uiTreeTopItem.

◆ allChildrenChecked()

bool uiTreeItem::allChildrenChecked ( ) const

◆ allChildrenCollapsed()

bool uiTreeItem::allChildrenCollapsed ( ) const

◆ allChildrenExpanded()

bool uiTreeItem::allChildrenExpanded ( ) const

◆ allChildrenUnchecked()

bool uiTreeItem::allChildrenUnchecked ( ) const

◆ anyButtonClick()

virtual bool uiTreeItem::anyButtonClick ( uiTreeViewItem )
protectedvirtual

◆ areAllParentsChecked()

bool uiTreeItem::areAllParentsChecked ( )

◆ askContinueAndSaveIfNeeded()

virtual bool uiTreeItem::askContinueAndSaveIfNeeded ( bool  withcancel)
virtual

◆ checkStatusChange()

NotifierAccess* uiTreeItem::checkStatusChange ( )

◆ collapse()

void uiTreeItem::collapse ( )

◆ doubleClick()

virtual bool uiTreeItem::doubleClick ( uiTreeViewItem )
protectedvirtual

◆ entryInEditMode()

void uiTreeItem::entryInEditMode ( int  col)

◆ expand()

void uiTreeItem::expand ( )

◆ findChild() [1/4]

virtual uiTreeItem* uiTreeItem::findChild ( const char *  name)
virtual

Finds a child in the tree below this item.

◆ findChild() [2/4]

virtual const uiTreeItem* uiTreeItem::findChild ( const char *  name) const
virtual

Finds a child in the tree below this item.

◆ findChild() [3/4]

virtual uiTreeItem* uiTreeItem::findChild ( int  selkey)
virtual

Finds a child in the tree below this item.

◆ findChild() [4/4]

virtual const uiTreeItem* uiTreeItem::findChild ( int  selkey) const
virtual

Finds a child in the tree below this item.

◆ findChildren()

virtual void uiTreeItem::findChildren ( const char *  ,
ObjectSet< uiTreeItem > &   
)
virtual

Finds all children in the tree below this item.

◆ getChild() [1/2]

uiTreeItem* uiTreeItem::getChild ( int  )

◆ getChild() [2/2]

const uiTreeItem* uiTreeItem::getChild ( int  ) const

◆ getChildren() [1/2]

ObjectSet<uiTreeItem>& uiTreeItem::getChildren ( )
inline

◆ getChildren() [2/2]

const ObjectSet<uiTreeItem>& uiTreeItem::getChildren ( ) const
inline

◆ getItem() [1/2]

uiTreeViewItem* uiTreeItem::getItem ( )
inline

◆ getItem() [2/2]

const uiTreeViewItem* uiTreeItem::getItem ( ) const
inline

◆ getProperty()

template<class T >
bool uiTreeItem::getProperty ( const char *  key,
T &  res 
) const
inline

Gets a keyed value that has been stored with setProperty().

Return values
truethe key was found and res is set
falsethe key was not found and res is not set
Note
Should not be used if T is a pointer. Use getPropertyPtr( const char*, T& ) instead.

◆ getPropertyPtr()

bool uiTreeItem::getPropertyPtr ( const char *  key,
void *&  res 
) const
inline

Gets a keyed pointer that has been stored with setPropertyPtr().

Return values
truethe key was found and res is set
falsethe key was not found and res is not set

◆ getUiParent()

virtual uiParent* uiTreeItem::getUiParent ( ) const
protectedvirtual

Reimplemented in uiTreeTopItem.

◆ hasChildren()

bool uiTreeItem::hasChildren ( ) const

◆ hasGrandChildren()

bool uiTreeItem::hasGrandChildren ( ) const

◆ init()

virtual bool uiTreeItem::init ( )
inlineprotectedvirtual

◆ isChecked()

virtual bool uiTreeItem::isChecked ( ) const
virtual

Reimplemented in uiTreeTopItem.

◆ isCollapsed()

bool uiTreeItem::isCollapsed ( ) const

◆ isExpandable()

virtual bool uiTreeItem::isExpandable ( ) const
inlineprotectedvirtual

◆ isExpanded()

bool uiTreeItem::isExpanded ( ) const

◆ isSelectable()

virtual bool uiTreeItem::isSelectable ( ) const
inlineprotectedvirtual

◆ isSelected()

virtual bool uiTreeItem::isSelected ( ) const
virtual

◆ keyPressed()

NotifierAccess* uiTreeItem::keyPressed ( )

◆ lastChild()

uiTreeItem* uiTreeItem::lastChild ( )

◆ moveItem()

virtual void uiTreeItem::moveItem ( uiTreeItem after)
virtual

◆ moveItemToTop()

virtual void uiTreeItem::moveItemToTop ( )
virtual

◆ name()

uiString uiTreeItem::name ( ) const

◆ nrChildren()

int uiTreeItem::nrChildren ( ) const
inline

◆ parentTreeItem()

uiTreeItem* uiTreeItem::parentTreeItem ( )
inline

◆ parentType()

virtual const char* uiTreeItem::parentType ( ) const
protectedpure virtual

◆ prepareForShutdown()

virtual void uiTreeItem::prepareForShutdown ( )
virtual

◆ removeAllChildren()

virtual void uiTreeItem::removeAllChildren ( )
virtual

Reimplemented in uiODVw2DTreeItem.

◆ removeChild()

virtual void uiTreeItem::removeChild ( uiTreeItem )
virtual

◆ removeItem()

virtual void uiTreeItem::removeItem ( uiTreeViewItem )
protectedvirtual

Reimplemented in uiTreeTopItem.

◆ renameItem()

virtual void uiTreeItem::renameItem ( uiTreeViewItem )
protectedvirtual

◆ rightClick()

virtual bool uiTreeItem::rightClick ( uiTreeViewItem )
protectedvirtual

◆ select()

virtual bool uiTreeItem::select ( )
virtual

◆ selectionKey()

virtual int uiTreeItem::selectionKey ( ) const
inlinevirtual

Reimplemented in uiODSceneTreeItem, and uiODDisplayTreeItem.

◆ selectWithKey()

virtual bool uiTreeItem::selectWithKey ( int  selkey)
protectedvirtual

Reimplemented in uiODVw2DTreeTop, and uiODTreeTop.

◆ setChecked()

void uiTreeItem::setChecked ( bool  yn,
bool  trigger = false 
)

◆ setName()

void uiTreeItem::setName ( const uiString nm)
inline

◆ setProperty()

template<class T >
void uiTreeItem::setProperty ( const char *  key,
const T &  val 
)
inline

Sets a keyed value that has been retrieved with getProperty().

Note
Should not be used if T is a pointer. Use setPropertyPtr( const char*, T& ) instead.

◆ setPropertyPtr()

void uiTreeItem::setPropertyPtr ( const char *  key,
void *  val 
)
inline

Sets a keyed pointer that may have been retrieved with getPropertyPtr().

◆ setTreeViewItem()

virtual void uiTreeItem::setTreeViewItem ( uiTreeViewItem )
protectedvirtual

◆ shouldSelect()

virtual bool uiTreeItem::shouldSelect ( int  selectionkey) const
protectedvirtual

Reimplemented in uiODDataTreeItem, and uiODDisplayTreeItem.

◆ showSubMenu()

virtual bool uiTreeItem::showSubMenu ( )
inlineprotectedvirtual

◆ siblingAbove()

virtual uiTreeItem* uiTreeItem::siblingAbove ( )
virtual

◆ siblingBelow()

virtual uiTreeItem* uiTreeItem::siblingBelow ( )
virtual

◆ siblingIndex()

virtual int uiTreeItem::siblingIndex ( ) const
virtual

◆ translateText()

virtual void uiTreeItem::translateText ( )
inlinevirtual

◆ uiTreeViewItemType()

virtual int uiTreeItem::uiTreeViewItemType ( ) const
protectedvirtual
Returns
the uiTreeViewItem::Type that should be created

Reimplemented in uiODParentTreeItem, uiODDisplayTreeItem, and uiODDataTreeItem.

◆ updateCheckStatus()

virtual void uiTreeItem::updateCheckStatus ( )
virtual

Reimplemented in uiODDisplayTreeItem.

◆ updateColumnText()

virtual void uiTreeItem::updateColumnText ( int  col)
virtual

◆ updateSelection()

virtual void uiTreeItem::updateSelection ( int  selectionKey,
bool  dw = false 
)
protectedvirtual

Does only update the display

Reimplemented in uiTreeTopItem.

◆ updateSelTreeColumnText()

void uiTreeItem::updateSelTreeColumnText ( int  col)

◆ useParentType()

virtual bool uiTreeItem::useParentType ( ) const
inlineprotectedvirtual

Friends And Related Function Documentation

◆ uiODTreeTop

friend class uiODTreeTop
friend

◆ uiTreeTopItem

friend class uiTreeTopItem
friend

Member Data Documentation

◆ children_

ObjectSet<uiTreeItem> uiTreeItem::children_
protected

◆ name_

uiString uiTreeItem::name_
protected

◆ parent_

uiTreeItem* uiTreeItem::parent_
protected

◆ properties_

IOPar uiTreeItem::properties_
protected
Returns
true if the item should be marked as selected given the selectionkey.

◆ uitreeviewitem_

uiTreeViewItem* uiTreeItem::uitreeviewitem_
protected

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