QObject wrapper around TreeItemAbstract (or its subclasses). More...
#include <qstreeitem.h>
Public Slots | |
| void | setSelected (bool selected=true) |
| bool | selected () |
| bool | valid () |
| void | setOpen (bool opened) |
| QSCObject * | item () |
| QSCObject * | itemref () |
| QString | itemtype () |
| QSTreeItem * | child (const QString &name) |
| QStringList | getChildNames () |
| QSTreeItem * | parent () |
| QString | id () |
| QString | text () |
| QString | path () |
| void | reload () |
| void | remove () |
| void | reload_force () |
Public Member Functions | |
| QSTreeItem (TreeItemAbstract *item, BaseCore *_base) | |
| virtual | ~QSTreeItem () |
| TreeItemAbstract * | get () const |
| void | disable () |
Protected Member Functions | |
| QSTreeItem (const QString &className, TreeItemAbstract *item, BaseCore *_base) | |
Protected Attributes | |
| TreeItemAbstract * | obj |
QObject wrapper around TreeItemAbstract (or its subclasses).
| gui::QSTreeItem::QSTreeItem | ( | TreeItemAbstract * | item, | |
| BaseCore * | _base | |||
| ) |
Construct wrapper with given TreeItemAbstract
| item | Tree item | |
| _base | scripting base |
References gui::BaseCore::addTreeItemToList(), and obj.
| gui::QSTreeItem::~QSTreeItem | ( | ) | [virtual] |
destructor
References gui::QSCObject::base, obj, and gui::BaseCore::removeTreeItemFromList().
| 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
| className | Item type to use. | |
| item | Tree item | |
| _base | scripting base |
References gui::BaseCore::addTreeItemToList(), and obj.
| 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
| name | Name of child to get |
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.
References gui::TreeItemAbstract::getChildNames(), gui::QSCObject::nullPtr(), and obj.
| QString gui::QSTreeItem::id | ( | ) | [slot] |
Return 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
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
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
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
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 "/").
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
References gui::QSCObject::nullPtr(), and obj.
| void gui::QSTreeItem::setOpen | ( | bool | opened | ) | [slot] |
Set the item to be opened or closed
| 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
| 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.
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
References obj.
TreeItemAbstract* gui::QSTreeItem::obj [protected] |
Object held in class
Referenced by child(), disable(), get(), getChildNames(), gui::QSTreeItemContentStream::getMode(), id(), item(), itemref(), itemtype(), parent(), path(), QSTreeItem(), reload(), reload_force(), remove(), selected(), gui::QSTreeItemContentStream::setMode(), setOpen(), setSelected(), text(), valid(), and ~QSTreeItem().