OpendTect  6.3
Protected Member Functions | Protected Attributes | Private Member Functions | Friends | List of all members
uiTreeItem Class Referenceabstract

are helping classes for uiTreeViews, wich makes it easy to bundle inteligence and data to treeitems. Usage is normally to create the uiTreeTopItem, run its init() and add Childrens. More...

Inheritance diagram for uiTreeItem:
[legend]

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 () const
 Call from the destructor of your inherited object. More...
 

Protected Attributes

IOPar properties_
 
uiTreeItemparent_
 
uiString name_
 
uiTreeViewItemuitreeviewitem_
 
ObjectSet< uiTreeItemchildren_
 

Private Member Functions

virtual mODTextTranslationClass(uiTreeItem) public ~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 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
 
void updateSelTreeColumnText (int col)
 
virtual void updateColumnText (int col)
 
virtual void updateCheckStatus ()
 
virtual void translateText ()
 
uiTreeViewItemgetItem ()
 
const uiTreeViewItemgetItem () const
 
void setPixmap (int col, const ColTab::Sequence *)
 
bool addChildImpl (CallBacker *, uiTreeItem *, bool, bool)
 

Friends

class uiTreeTopItem
 
class uiODTreeTop
 

Additional Inherited Members

- 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 detachCB (const NotifierAccess &, const CallBack &) const
 
void detachCB (const NotifierAccess *notif, const CallBack &cb) const
 
bool isNotifierAttached (const NotifierAccess *) const
 Only for debugging purposes, don't use. More...
 
virtual bool isCapsule () const
 
void stopReceivingNotifications () const
 
- Static Public Member Functions inherited from CallBacker
static void createReceiverForCurrentThread ()
 
static void removeReceiverForCurrentThread ()
 

Detailed Description

are helping classes for uiTreeViews, wich makes it easy to bundle inteligence and data to treeitems. Usage is normally to create the uiTreeTopItem, run its init() and add Childrens.

Constructor & Destructor Documentation

virtual mODTextTranslationClass (uiTreeItem) public uiTreeItem::~uiTreeItem ( )
privatevirtual

Member Function Documentation

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

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
private
bool uiTreeItem::allChildrenCollapsed ( ) const
private
bool uiTreeItem::allChildrenExpanded ( ) const
private
bool uiTreeItem::allChildrenUnchecked ( ) const
private
virtual bool uiTreeItem::anyButtonClick ( uiTreeViewItem )
protectedvirtual
bool uiTreeItem::areAllParentsChecked ( )
private
virtual bool uiTreeItem::askContinueAndSaveIfNeeded ( bool  withcancel)
privatevirtual
NotifierAccess* uiTreeItem::checkStatusChange ( )
private
void uiTreeItem::collapse ( )
private
virtual bool uiTreeItem::doubleClick ( uiTreeViewItem )
protectedvirtual
void uiTreeItem::entryInEditMode ( int  col)
private
void uiTreeItem::expand ( )
private
virtual const uiTreeItem* uiTreeItem::findChild ( const char *  name) const
privatevirtual

Finds a child in the tree below this item.

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

Finds a child in the tree below this item.

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

Finds a child in the tree below this item.

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

Finds a child in the tree below this item.

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

Finds all children in the tree below this item.

const uiTreeItem* uiTreeItem::getChild ( int  ) const
private
uiTreeItem* uiTreeItem::getChild ( int  )
private
ObjectSet<uiTreeItem>& uiTreeItem::getChildren ( )
inlineprivate
const ObjectSet<uiTreeItem>& uiTreeItem::getChildren ( ) const
inlineprivate
uiTreeViewItem* uiTreeItem::getItem ( )
inlineprivate
const uiTreeViewItem* uiTreeItem::getItem ( ) const
inlineprivate
template<class T >
bool uiTreeItem::getProperty ( const char *  key,
T &  res 
) const
inlineprivate

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
inlineprivate

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.

virtual bool uiTreeItem::init ( )
inlineprotectedvirtual
virtual bool uiTreeItem::isChecked ( ) const
privatevirtual

Reimplemented in uiTreeTopItem.

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

Reimplemented in uiODVw2DTreeItem.

virtual void uiTreeItem::removeChild ( uiTreeItem )
privatevirtual
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 ( )
privatevirtual
virtual int uiTreeItem::selectionKey ( ) const
inlineprivatevirtual
virtual bool uiTreeItem::selectWithKey ( int  selkey)
protectedvirtual

Reimplemented in uiODVw2DTreeTop, and uiODSceneTreeTop.

void uiTreeItem::setChecked ( bool  yn,
bool  trigger = false 
)
private
void uiTreeItem::setName ( const uiString nm)
inlineprivate
void uiTreeItem::setPixmap ( int  col,
const ColTab::Sequence  
)
private
template<class T >
void uiTreeItem::setProperty ( const char *  key,
const T &  val 
)
inlineprivate

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 
)
inlineprivate

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 ( )
privatevirtual
virtual uiTreeItem* uiTreeItem::siblingBelow ( )
privatevirtual
virtual int uiTreeItem::siblingIndex ( ) const
privatevirtual
virtual void uiTreeItem::translateText ( )
inlineprivatevirtual
virtual int uiTreeItem::uiTreeViewItemType ( ) const
protectedvirtual
Returns
the uiTreeViewItem::Type that should be created

Reimplemented in uiODDataTreeItem, and uiODDisplayTreeItem.

virtual void uiTreeItem::updateCheckStatus ( )
privatevirtual

Reimplemented in uiODDisplayTreeItem.

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

Does only update the display

Reimplemented in uiTreeTopItem.

void uiTreeItem::updateSelTreeColumnText ( int  col)
private
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. 2017