|
HAL
|
#include <context_tree_model.h>


Public Member Functions | |
| ContextTreeItem (GraphContext *context) | |
| ContextTreeItem (ContextDirectory *directory) | |
| QVariant | getData (int column) const override |
| void | setData (QList< QVariant > data) override |
| void | setDataAtColumn (int column, QVariant &data) override |
| void | appendData (QVariant data) override |
| int | getColumnCount () const override |
| int | row () const |
| bool | isDirectory () const |
| bool | isContext () const |
| u32 | getId () const |
| QString | getName () const |
| QDateTime | getTimestamp () const |
| GraphContext * | context () const |
| ContextDirectory * | directory () const |
Public Member Functions inherited from hal::BaseTreeItem | |
| BaseTreeItem () | |
| BaseTreeItem (QList< QVariant > columnData) | |
| virtual | ~BaseTreeItem () |
| virtual BaseTreeItem * | getParent () const |
| virtual void | setParent (BaseTreeItem *parent) |
| virtual BaseTreeItem * | getChild (int row) const |
| virtual QList< BaseTreeItem * > | getChildren () const |
| virtual void | appendChild (BaseTreeItem *child) |
| virtual void | insertChild (int index, BaseTreeItem *child) |
| virtual BaseTreeItem * | removeChildAtPos (int row) |
| virtual bool | removeChild (BaseTreeItem *child) |
| virtual int | getChildCount () const |
| virtual int | getRowForChild (const BaseTreeItem *child) const |
| virtual int | getOwnRow () |
Additional Inherited Members | |
Protected Attributes inherited from hal::BaseTreeItem | |
| BaseTreeItem * | mParent |
| QList< BaseTreeItem * > | mChildren |
Definition at line 63 of file context_tree_model.h.
| hal::ContextTreeItem::ContextTreeItem | ( | GraphContext * | context | ) |
Definition at line 19 of file context_tree_model.cpp.
| hal::ContextTreeItem::ContextTreeItem | ( | ContextDirectory * | directory | ) |
Definition at line 26 of file context_tree_model.cpp.
|
overridevirtual |
Appends a new column to the item.
| data | - The data of the new column. |
Implements hal::BaseTreeItem.
Definition at line 102 of file context_tree_model.cpp.
| GraphContext * hal::ContextTreeItem::context | ( | ) | const |
Definition at line 82 of file context_tree_model.cpp.
Referenced by hal::ContextTreeModel::data(), hal::ContextProxyModel::dropMimeData(), hal::ContextManagerWidget::handleItemDoubleClicked(), hal::ContextProxyModel::mimeData(), and hal::ContextTreeModel::removeDirectory().
| ContextDirectory * hal::ContextTreeItem::directory | ( | ) | const |
Definition at line 87 of file context_tree_model.cpp.
Referenced by hal::ContextProxyModel::canDropMimeData(), hal::ContextProxyModel::dropMimeData(), hal::GuiApiClasses::View::getCurrentDirectory(), hal::ContextProxyModel::mimeData(), and hal::ContextTreeModel::removeDirectory().
|
overridevirtual |
Get the number of currently stored column data.
Implements hal::BaseTreeItem.
Definition at line 107 of file context_tree_model.cpp.
|
overridevirtual |
Get the data of a specific column (most in the form of a string).
| column | - The requested column. |
Implements hal::BaseTreeItem.
Definition at line 53 of file context_tree_model.cpp.
References hal::GraphContext::getNameWithDirtyState(), hal::GraphContext::getTimestamp(), hal::ContextDirectory::id(), hal::GraphContext::id(), isContext(), isDirectory(), hal::ContextDirectory::name(), Qt::SystemLocaleShortDate, and QDateTime::toString().
Referenced by hal::ContextTreeModel::data().
| u32 hal::ContextTreeItem::getId | ( | ) | const |
Definition at line 33 of file context_tree_model.cpp.
References hal::ContextDirectory::id(), and hal::GraphContext::id().
Referenced by hal::ContextProxyModel::dropMimeData(), hal::ActionMoveItem::exec(), hal::ContextTreeModel::getChildContextsOf(), hal::ContextTreeModel::getChildDirectoriesOf(), hal::GraphContextManager::getParentId(), and hal::ContextProxyModel::lessThan().
| QString hal::ContextTreeItem::getName | ( | ) | const |
Definition at line 40 of file context_tree_model.cpp.
References hal::ContextDirectory::name(), and hal::GraphContext::name().
Referenced by hal::ContextProxyModel::lessThan().
| QDateTime hal::ContextTreeItem::getTimestamp | ( | ) | const |
Definition at line 47 of file context_tree_model.cpp.
References hal::GraphContext::getTimestamp().
Referenced by hal::ContextProxyModel::lessThan().
| bool hal::ContextTreeItem::isContext | ( | ) | const |
Definition at line 124 of file context_tree_model.cpp.
Referenced by hal::ContextProxyModel::canDropMimeData(), hal::ContextProxyModel::dropMimeData(), hal::ContextTreeModel::flags(), hal::ContextTreeModel::getChildContextsOf(), getData(), hal::ContextManagerWidget::handleItemDoubleClicked(), hal::ContextProxyModel::mimeData(), hal::ContextTreeModel::removeDirectory(), and hal::ContextTreeModel::setCurrentDirectory().
| bool hal::ContextTreeItem::isDirectory | ( | ) | const |
Definition at line 119 of file context_tree_model.cpp.
Referenced by hal::ContextProxyModel::canDropMimeData(), hal::ContextTreeModel::data(), hal::ContextProxyModel::dropMimeData(), hal::ContextTreeModel::flags(), hal::ContextTreeModel::getChildDirectoriesOf(), getData(), hal::ContextProxyModel::lessThan(), hal::ContextProxyModel::mimeData(), hal::ContextTreeModel::moveItem(), hal::ContextTreeModel::removeDirectory(), and hal::ContextTreeModel::setCurrentDirectory().
| int hal::ContextTreeItem::row | ( | ) | const |
Definition at line 112 of file context_tree_model.cpp.
References hal::BaseTreeItem::getParent(), and hal::BaseTreeItem::getRowForChild().
Referenced by hal::ContextTreeModel::moveItem(), hal::ContextTreeModel::removeContext(), and hal::ContextTreeModel::removeDirectory().
Sets the data for all columns.
| data | - Each entry in the list represents one column. |
Implements hal::BaseTreeItem.
Definition at line 92 of file context_tree_model.cpp.
|
overridevirtual |
Sets the data for a specified column. The index must be within already existing boundaries (for example, add dummy data beforehand).
| index | - The column to set the new data. |
| data | - The new column data. |
Implements hal::BaseTreeItem.
Definition at line 97 of file context_tree_model.cpp.