gui::QSTreeItem Class Reference

QObject wrapper around TreeItemAbstract (or its subclasses). More...

#include <qstreeitem.h>

Inheritance diagram for gui::QSTreeItem:
gui::QSCObject gui::QSTreeItemContentStream

List of all members.

Public Slots

void setSelected (bool selected=true)
bool selected ()
bool valid ()
void setOpen (bool opened)
QSCObjectitem ()
QSCObjectitemref ()
QString itemtype ()
QSTreeItemchild (const QString &name)
QStringList getChildNames ()
QSTreeItemparent ()
QString id ()
QString text ()
QString path ()
void reload ()
void remove ()
void reload_force ()

Public Member Functions

 QSTreeItem (TreeItemAbstract *item, BaseCore *_base)
virtual ~QSTreeItem ()
TreeItemAbstractget () const
void disable ()

Protected Member Functions

 QSTreeItem (const QString &className, TreeItemAbstract *item, BaseCore *_base)

Protected Attributes

TreeItemAbstractobj

Detailed Description

QObject wrapper around TreeItemAbstract (or its subclasses).


Constructor & Destructor Documentation

gui::QSTreeItem::QSTreeItem ( TreeItemAbstract item,
BaseCore _base 
)

Construct wrapper with given TreeItemAbstract

Parameters:
item Tree item
_base scripting base

References gui::BaseCore::addTreeItemToList(), and obj.

gui::QSTreeItem::~QSTreeItem (  )  [virtual]
gui::QSTreeItem::QSTreeItem ( const QString &  className,
TreeItemAbstract item,
BaseCore _base 
) [protected]

Construct wrapper with given TreeItemAbstract
This constructor is available only to subclasses - they can set their own class name here

Parameters:
className Item type to use.
item Tree item
_base scripting base

References gui::BaseCore::addTreeItemToList(), and obj.


Member Function Documentation

QSTreeItem * gui::QSTreeItem::child ( const QString &  name  )  [slot]

Return child of this Tree Item with given name, or NULL if such child does not exist, or is not subclass of TreeItemAbstract

Parameters:
name Name of child to get
Returns:
child of this TreeItem

References gui::QSCObject::base, gui::TreeItemAbstract::child(), gui::QSImporter::createQSObject(), gui::QSCObject::nullPtr(), and obj.

void gui::QSTreeItem::disable (  ) 

Disable this wrapper. Use when the tree item it contains is deleted Further usage of wrapper will result in a null pointer error

References debug::DBG_DBG, guiPrintDbg, and obj.

TreeItemAbstract * gui::QSTreeItem::get (  )  const

get TreeItemAbstract held inside this class. Not exposed to scripting

References obj.

QStringList gui::QSTreeItem::getChildNames (  )  [slot]

Return list of all possibly visible childs names of this treeitem. Childs that are not shown in treeview (because of treeview settings, etc ...) are not returned. Childs that are "not yet known" (unopened references) are not returned too.

Returns:
list of childs

References gui::TreeItemAbstract::getChildNames(), gui::QSCObject::nullPtr(), and obj.

QString gui::QSTreeItem::id (  )  [slot]

Return name of this item.

Returns:
name of this item

References gui::TreeItemAbstract::name(), gui::QSCObject::nullPtr(), and obj.

QSCObject * gui::QSTreeItem::item (  )  [slot]

Return item inside this tree item, wrapped by QObject wrapper. Caller is responsible for freeing the object

Returns:
QObject wrapper around data inside treeitem

References gui::TreeItemAbstract::getQSObject(), gui::QSCObject::nullPtr(), and obj.

QSCObject * gui::QSTreeItem::itemref (  )  [slot]

Return item inside this tree item, as item() does, but with one exception: If the item is reference, return reference target instead of the reference Caller is responsible for freeing the object

See also:
item
Returns:
QObject wrapper around data inside treeitem

References gui::TreeItemAbstract::getQSObject(), gui::QSCObject::nullPtr(), obj, and gui::QSIProperty::ref().

QString gui::QSTreeItem::itemtype (  )  [slot]

Return type of item inside this tree item

Returns:
Type of item

References gui::TreeItemAbstract::getQSObject(), gui::QSCObject::nullPtr(), obj, and gui::QSCObject::type().

QSTreeItem * gui::QSTreeItem::parent (  )  [slot]

Return parent of this Tree Item, or NULL if this item have not parent, or parent is not subclass of TreeItemAbstract

Returns:
parent of this TreeItem

References gui::QSCObject::base, gui::QSImporter::createQSObject(), gui::QSCObject::nullPtr(), and obj.

QString gui::QSTreeItem::path (  )  [slot]

Return path of this item (sequence of names from root to this item, separated by slash "/").

Returns:
path of this item

References gui::QSCObject::nullPtr(), obj, and gui::TreeItemAbstract::path().

void gui::QSTreeItem::reload (  )  [slot]

Explicitly reload contents of this item and its subtree from current state of PDF document

References gui::QSCObject::nullPtr(), obj, and gui::TreeItemAbstract::reload().

void gui::QSTreeItem::reload_force (  )  [slot]

Explicitly force reload contents of this item and its subtree from current state of PDF document Add "force reload" flag, to test for possible tree item reloading-related bugs Should only be used for debugging, reload() should normally work well

References gui::QSCObject::nullPtr(), obj, and gui::TreeItemAbstract::reload().

void gui::QSTreeItem::remove (  )  [slot]

Remove itself from Dict/Array where this property is held (and from document)

References gui::QSCObject::base, gui::BaseCore::errorException(), gui::QSCObject::nullPtr(), obj, and gui::TreeItemAbstract::remove().

bool gui::QSTreeItem::selected (  )  [slot]

Check if the item is selected

Returns:
True if the item is selected, false if not

References gui::QSCObject::nullPtr(), and obj.

void gui::QSTreeItem::setOpen ( bool  opened  )  [slot]

Set the item to be opened or closed

Parameters:
opened True if the item is to be opened, false if closed

References gui::QSCObject::nullPtr(), obj, and gui::TreeItemAbstract::setOpen().

void gui::QSTreeItem::setSelected ( bool  selected = true  )  [slot]

Select or unselect given item

Parameters:
selected Specifies what to do: true to select, false to unselect

References gui::QSCObject::nullPtr(), obj, and gui::TreeItemAbstract::setSelect().

QString gui::QSTreeItem::text (  )  [slot]

Return caption of this item in tree window. Most times it is identical to name, or at least similar.

Returns:
caption of this item

References gui::QSCObject::nullPtr(), and obj.

bool gui::QSTreeItem::valid (  )  [slot]

Check if the tree item wrapper is valid, i.e. if corresponding tree item still exist in the tree view

Returns:
True if valid, false if not

References obj.


Member Data Documentation


The documentation for this class was generated from the following files: