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

Protected Member Functions

virtual int uiTreeViewItemType () const
 
virtual uiParentgetUiParent () const
 
virtual bool addChld (uiTreeItem *, bool below, bool downwards)
 
virtual const char * parentType () const =0
 
virtual bool useParentType () const
 
virtual bool init ()
 
virtual bool rightClick (uiTreeViewItem *)
 
virtual bool anyButtonClick (uiTreeViewItem *)
 
virtual bool doubleClick (uiTreeViewItem *)
 
virtual void setTreeViewItem (uiTreeViewItem *)
 
virtual void removeItem (uiTreeViewItem *)
 
virtual void renameItem (uiTreeViewItem *)
 
virtual bool showSubMenu ()
 
virtual bool selectWithKey (int selkey)
 
virtual bool isSelectable () const
 
virtual bool isExpandable () const
 
virtual void updateSelection (int selectionKey, bool dw=false)
 
virtual bool shouldSelect (int selectionkey) const
 
- Protected Member Functions inherited from CallBacker
void detachAllNotifiers ()
 Call from the destructor of your inherited object. More...
 

Protected Attributes

IOPar properties_
 
uiTreeItemparent_
 
uiString name_
 
uiTreeViewItemuitreeviewitem_
 
ObjectSet< uiTreeItemchildren_
 

Private Member Functions

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

Friends

class uiTreeTopItem
 
class uiODTreeTop
 

Detailed Description

Constructor & Destructor Documentation

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

Member Function Documentation

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
belowspecifies wether the child shoule be added above or below eventual existing siblings.
Note
child becomes mine regardless of return value.

Reimplemented in uiTreeTopItem.

bool uiTreeItem::addChildImpl ( CallBacker ,
uiTreeItem ,
bool  ,
bool   
)
private
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.

Reimplemented in uiTreeTopItem, uiODHorizon2DParentTreeItem, and uiODHorizonParentTreeItem.

bool uiTreeItem::allChildrenChecked ( ) const
bool uiTreeItem::allChildrenCollapsed ( ) const
bool uiTreeItem::allChildrenExpanded ( ) const
bool uiTreeItem::allChildrenUnchecked ( ) const
virtual bool uiTreeItem::anyButtonClick ( uiTreeViewItem )
protectedvirtual
bool uiTreeItem::areAllParentsChecked ( )
virtual bool uiTreeItem::askContinueAndSaveIfNeeded ( bool  withcancel)
virtual
NotifierAccess* uiTreeItem::checkStatusChange ( )
void uiTreeItem::collapse ( )
virtual bool uiTreeItem::doubleClick ( uiTreeViewItem )
protectedvirtual
void uiTreeItem::entryInEditMode ( int  col)
void uiTreeItem::expand ( )
virtual const uiTreeItem* uiTreeItem::findChild ( const char *  name) const
virtual

Finds a child in the tree below this item.

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

Finds a child in the tree below this item.

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

Finds a child in the tree below this item.

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

Finds a child in the tree below this item.

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

Finds all children in the tree below this item.

const uiTreeItem* uiTreeItem::getChild ( int  ) const
uiTreeItem* uiTreeItem::getChild ( int  )
ObjectSet<uiTreeItem>& uiTreeItem::getChildren ( )
inline
const ObjectSet<uiTreeItem>& uiTreeItem::getChildren ( ) const
inline
uiTreeViewItem* uiTreeItem::getItem ( )
inline
const uiTreeViewItem* uiTreeItem::getItem ( ) const
inline
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.
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
virtual uiParent* uiTreeItem::getUiParent ( ) const
protectedvirtual

Reimplemented in uiTreeTopItem.

bool uiTreeItem::hasChildren ( ) const
bool uiTreeItem::hasGrandChildren ( ) const
virtual bool uiTreeItem::init ( )
inlineprotectedvirtual
virtual bool uiTreeItem::isChecked ( ) const
virtual

Reimplemented in uiTreeTopItem.

bool uiTreeItem::isCollapsed ( ) const
virtual bool uiTreeItem::isExpandable ( ) const
inlineprotectedvirtual
bool uiTreeItem::isExpanded ( ) const
virtual bool uiTreeItem::isSelectable ( ) const
inlineprotectedvirtual
virtual bool uiTreeItem::isSelected ( ) const
virtual
NotifierAccess* uiTreeItem::keyPressed ( )
uiTreeItem* uiTreeItem::lastChild ( )
virtual void uiTreeItem::moveItem ( uiTreeItem after)
virtual
virtual void uiTreeItem::moveItemToTop ( )
virtual
uiString uiTreeItem::name ( ) const
int uiTreeItem::nrChildren ( ) const
inline
uiTreeItem* uiTreeItem::parentTreeItem ( )
inline
virtual const char* uiTreeItem::parentType ( ) const
protectedpure virtual
virtual void uiTreeItem::prepareForShutdown ( )
virtual
virtual void uiTreeItem::removeAllChildren ( )
virtual

Reimplemented in uiODVw2DTreeItem.

virtual void uiTreeItem::removeChild ( uiTreeItem )
virtual
virtual void uiTreeItem::removeItem ( uiTreeViewItem )
protectedvirtual

Reimplemented in uiTreeTopItem.

virtual void uiTreeItem::renameItem ( uiTreeViewItem )
protectedvirtual
virtual bool uiTreeItem::rightClick ( uiTreeViewItem )
protectedvirtual

Reimplemented in uiODAnnotParentTreeItem.

virtual bool uiTreeItem::select ( )
virtual
virtual int uiTreeItem::selectionKey ( ) const
inlinevirtual

Reimplemented in uiODDisplayTreeItem, and uiODSceneTreeItem.

virtual bool uiTreeItem::selectWithKey ( int  selkey)
protectedvirtual

Reimplemented in uiODVw2DTreeTop, and uiODTreeTop.

void uiTreeItem::setChecked ( bool  yn,
bool  trigger = false 
)
void uiTreeItem::setName ( const uiString nm)
inline
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.
void uiTreeItem::setPropertyPtr ( const char *  key,
void *  val 
)
inline

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

virtual void uiTreeItem::setTreeViewItem ( uiTreeViewItem )
protectedvirtual
virtual bool uiTreeItem::shouldSelect ( int  selectionkey) const
protectedvirtual

Reimplemented in uiODDataTreeItem, and uiODDisplayTreeItem.

virtual bool uiTreeItem::showSubMenu ( )
inlineprotectedvirtual
virtual uiTreeItem* uiTreeItem::siblingAbove ( )
virtual
virtual uiTreeItem* uiTreeItem::siblingBelow ( )
virtual
virtual int uiTreeItem::siblingIndex ( ) const
virtual
virtual void uiTreeItem::translateText ( )
inlinevirtual
virtual int uiTreeItem::uiTreeViewItemType ( ) const
protectedvirtual
Returns
the uiTreeViewItem::Type that should be created

Reimplemented in uiODDataTreeItem, and uiODDisplayTreeItem.

virtual void uiTreeItem::updateCheckStatus ( )
virtual

Reimplemented in uiODDisplayTreeItem.

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

Does only update the display

Reimplemented in uiTreeTopItem.

void uiTreeItem::updateSelTreeColumnText ( int  col)
virtual bool uiTreeItem::useParentType ( ) const
inlineprotectedvirtual

Friends And Related Function Documentation

friend class uiODTreeTop
friend
friend class uiTreeTopItem
friend

Member Data Documentation

ObjectSet<uiTreeItem> uiTreeItem::children_
protected
uiString uiTreeItem::name_
protected
uiTreeItem* uiTreeItem::parent_
protected
IOPar uiTreeItem::properties_
protected
Returns
true if the item should be marked as selected given the selectionkey.
uiTreeViewItem* uiTreeItem::uitreeviewitem_
protected

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