Tree item containing CStream. More...
#include <treeitemcstream.h>
Public Member Functions | |
| void | remove (const QString &name) |
| TreeItemCStream (TreeData *_data, Q_ListView *parent, boost::shared_ptr< IProperty > pdfObj, const QString name=QString::null, Q_ListViewItem *after=NULL, const QString &nameId=NULL) | |
| TreeItemCStream (TreeData *_data, Q_ListViewItem *parent, boost::shared_ptr< IProperty > pdfObj, const QString name=QString::null, Q_ListViewItem *after=NULL, const QString &nameId=NULL) | |
| virtual | ~TreeItemCStream () |
| virtual bool | validChild (const QString &name, Q_ListViewItem *oldChild) |
| virtual QSCObject * | getQSObject (BaseCore *_base) |
| virtual ChildType | getChildType (const QString &name) |
| virtual TreeItemAbstract * | createChild (const QString &name, ChildType typ, Q_ListViewItem *after=NULL) |
| virtual QStringList | getChildNames () |
| virtual bool | haveChild () |
| virtual QSCObject * | getQSObject () |
Tree item containing CStream.
class holding one CStream object in tree
| gui::TreeItemCStream::TreeItemCStream | ( | TreeData * | _data, | |
| Q_ListView * | parent, | |||
| boost::shared_ptr< IProperty > | pdfObj, | |||
| const QString | name = QString::null, |
|||
| Q_ListViewItem * | after = NULL, |
|||
| const QString & | nameId = NULL | |||
| ) |
constructor of TreeItem - create root item from given object
| parent | Q_ListView in which to put item | |
| pdfObj | Object contained in this item | |
| nameId | Internal name of this item | |
| name | Caption of this item - will be shown in treeview | |
| _data | TreeData containing necessary information about tree in which this item will be inserted | |
| after | Item after which this one will be inserted |
References gui::TreeItemAbstract::data, gui::TreeItem::initObserver(), and gui::TreeItemAbstract::reload().
| gui::TreeItemCStream::TreeItemCStream | ( | TreeData * | _data, | |
| Q_ListViewItem * | parent, | |||
| boost::shared_ptr< IProperty > | pdfObj, | |||
| const QString | name = QString::null, |
|||
| Q_ListViewItem * | after = NULL, |
|||
| const QString & | nameId = NULL | |||
| ) |
constructor of TreeItem - create child item from given object
| parent | Q_ListViewItem which is parent of this object | |
| pdfObj | Object contained in this item | |
| nameId | Internal name of this item | |
| name | Caption of this item - will be shown in treeview | |
| _data | TreeData containing necessary information about tree in which this item will be inserted | |
| after | Item after which this one will be inserted |
References gui::TreeItemAbstract::data, gui::TreeItem::initObserver(), and gui::TreeItemAbstract::reload().
| gui::TreeItemCStream::~TreeItemCStream | ( | ) | [virtual] |
default destructor
References gui::TreeItem::uninitObserver().
| TreeItemAbstract * gui::TreeItemCStream::createChild | ( | const QString & | name, | |
| ChildType | typ, | |||
| Q_ListViewItem * | after = NULL | |||
| ) | [virtual] |
Create one subchild
| name | Name of child (the same as in list returned from getChildNames) | |
| typ | Type of TreeItemAbstract's child. (see ChildType) | |
| after | Q_ListViewItem after which will be this item added. If unspecified (or NULL), it is added before any other items |
Implements gui::TreeItemAbstract.
References util::convertFromUnicode(), gui::TreeItem::create(), gui::TreeItemAbstract::data, pdfobjects::CStream::getProperty(), gui::TreeItem::obj, and util::PDF.
| QStringList gui::TreeItemCStream::getChildNames | ( | ) | [virtual] |
Get list of all item's childs names
Implements gui::TreeItemAbstract.
References util::convertToUnicode(), gui::TreeItemAbstract::data, pdfobjects::CStream::getAllPropertyNames(), pdfobjects::CStream::getProperty(), util::isSimple(), gui::TreeItem::obj, util::PDF, and gui::TreeData::showSimple().
| ChildType gui::TreeItemCStream::getChildType | ( | const QString & | name | ) | [virtual] |
Get type of this items child, given its name.
| name | Name of child item |
Implements gui::TreeItemAbstract.
References util::convertFromUnicode(), pdfobjects::CStream::getProperty(), gui::TreeItem::obj, and util::PDF.
| QSCObject * gui::TreeItemCStream::getQSObject | ( | ) | [virtual] |
Create and return object for scripting representing this tree item
Reimplemented from gui::TreeItem.
References gui::TreeData::base(), gui::TreeItemAbstract::data, and gui::TreeItem::obj.
Create and return object for scripting representing this tree item, relocated in different base If the object cannot be copied into new base, return NULL
| _base | BaseCore for the new object. |
Reimplemented from gui::TreeItem.
References gui::TreeItem::obj.
| bool gui::TreeItemCStream::haveChild | ( | ) | [virtual] |
Return true, if the item have at least one child
Implements gui::TreeItemAbstract.
References pdfobjects::CStream::getPropertyCount(), and gui::TreeItem::obj.
| void gui::TreeItemCStream::remove | ( | const QString & | name | ) |
Remove property with given name from stream
| name | Name of property to remove |
References util::convertFromUnicode(), gui::TreeItemAbstract::data, debug::DBG_DBG, guiPrintDbg, gui::TreeItemAbstract::items, gui::TreeItem::obj, util::PDF, Q_OUT, gui::TreeData::tree(), and gui::TreeItemAbstract::unSelect().
| bool gui::TreeItemCStream::validChild | ( | const QString & | name, | |
| Q_ListViewItem * | oldChild | |||
| ) | [virtual] |
Validate child, given its name and reference to old child Usually it is valid, since item with same name refer to same subitem (key-based items), but for value-based items (array) same keys can correspond to different values after reloading. In such cases, false should be returned. Also, similar problems can happen when switching revisions (with almost all types)
Note: false negative it not a problem (only unnecessary reloading), while false positive mean the tree is invalid/outdated
| name | name of (old and new) treeitem | |
| oldChild | reference to old child tree item |
Implements gui::TreeItemAbstract.
References util::convertFromUnicode(), gui::TreeItem::getObject(), pdfobjects::CStream::getProperty(), gui::TreeItem::obj, and util::PDF.