|
QGIS API Documentation
master-3f58142
|
base class for all items in the model More...
#include <qgsdataitem.h>
Inheritance diagram for QgsDataItem:
Collaboration diagram for QgsDataItem:Public Types | |
| enum | Capability { NoCapabilities = 0, SetCrs = 1 } |
| enum | Type { Collection, Directory, Layer, Error, Favourites } |
Public Slots | |
| void | emitBeginInsertItems (QgsDataItem *parent, int first, int last) |
| void | emitBeginRemoveItems (QgsDataItem *parent, int first, int last) |
| void | emitEndInsertItems () |
| void | emitEndRemoveItems () |
Signals | |
| void | beginInsertItems (QgsDataItem *parent, int first, int last) |
| void | beginRemoveItems (QgsDataItem *parent, int first, int last) |
| void | endInsertItems () |
| void | endRemoveItems () |
Public Member Functions | |
| QgsDataItem (QgsDataItem::Type type, QgsDataItem *parent, QString name, QString path) | |
| virtual | ~QgsDataItem () |
| virtual bool | acceptDrop () |
| virtual QList< QAction * > | actions () |
| virtual void | addChildItem (QgsDataItem *child, bool refresh=false) |
| virtual Capability | capabilities () |
| QVector< QgsDataItem * > | children () const |
| virtual QVector< QgsDataItem * > | createChildren () |
| virtual void | deleteChildItem (QgsDataItem *child) |
| virtual bool | equal (const QgsDataItem *other) |
| virtual bool | handleDrop (const QMimeData *, Qt::DropAction) |
| bool | hasChildren () |
| QIcon | icon () const |
| bool | isPopulated () |
| QString | name () const |
| virtual QWidget * | paramWidget () |
| QgsDataItem * | parent () const |
| QString | path () const |
| virtual void | populate () |
| virtual void | refresh () |
| virtual QgsDataItem * | removeChildItem (QgsDataItem *child) |
| int | rowCount () |
| virtual bool | setCrs (QgsCoordinateReferenceSystem crs) |
| void | setIcon (QIcon icon) |
| void | setParent (QgsDataItem *parent) |
| void | setToolTip (QString msg) |
| QString | toolTip () const |
| Type | type () const |
Static Public Member Functions | |
| static int | findItem (QVector< QgsDataItem * > items, QgsDataItem *item) |
Protected Attributes | |
| QVector< QgsDataItem * > | mChildren |
| QIcon | mIcon |
| QString | mName |
| QgsDataItem * | mParent |
| QString | mPath |
| bool | mPopulated |
| QString | mToolTip |
| Type | mType |
base class for all items in the model
Definition at line 41 of file qgsdataitem.h.
Definition at line 98 of file qgsdataitem.h.
| enum QgsDataItem::Type |
Reimplemented in QgsDirectoryItem.
Definition at line 45 of file qgsdataitem.h.
| QgsDataItem::QgsDataItem | ( | QgsDataItem::Type | type, |
| QgsDataItem * | parent, | ||
| QString | name, | ||
| QString | path | ||
| ) |
Definition at line 151 of file qgsdataitem.cpp.
| QgsDataItem::~QgsDataItem | ( | ) | [virtual] |
Definition at line 157 of file qgsdataitem.cpp.
References mName, mPath, and QgsDebugMsgLevel.
| virtual bool QgsDataItem::acceptDrop | ( | ) | [inline, virtual] |
Definition at line 91 of file qgsdataitem.h.
Referenced by QgsBrowserModel::flags().
| virtual QList<QAction*> QgsDataItem::actions | ( | ) | [inline, virtual] |
Definition at line 88 of file qgsdataitem.h.
| void QgsDataItem::addChildItem | ( | QgsDataItem * | child, |
| bool | refresh = false |
||
| ) | [virtual] |
Definition at line 215 of file qgsdataitem.cpp.
References beginInsertItems(), beginRemoveItems(), Directory, emitBeginInsertItems(), emitBeginRemoveItems(), emitEndInsertItems(), emitEndRemoveItems(), endInsertItems(), endRemoveItems(), mChildren, mName, mPath, mType, QgsDebugMsg, and type().
Referenced by QgsFavouritesItem::addDirectory(), populate(), and refresh().
| void QgsDataItem::beginInsertItems | ( | QgsDataItem * | parent, |
| int | first, | ||
| int | last | ||
| ) | [signal] |
Referenced by addChildItem(), emitBeginInsertItems(), and removeChildItem().
| void QgsDataItem::beginRemoveItems | ( | QgsDataItem * | parent, |
| int | first, | ||
| int | last | ||
| ) | [signal] |
Referenced by addChildItem(), deleteChildItem(), emitBeginRemoveItems(), and removeChildItem().
| virtual Capability QgsDataItem::capabilities | ( | ) | [inline, virtual] |
Definition at line 108 of file qgsdataitem.h.
Referenced by QgsDirectoryItem::createChildren().
| QVector<QgsDataItem*> QgsDataItem::children | ( | ) | const [inline] |
Definition at line 120 of file qgsdataitem.h.
Referenced by QgsDirectoryItem::createChildren(), QgsFavouritesItem::createChildren(), QgsZipItem::createChildren(), QgsBrowserModel::findItem(), QgsBrowserModel::index(), and populate().
| QVector< QgsDataItem * > QgsDataItem::createChildren | ( | ) | [virtual] |
Reimplemented in QgsZipItem, QgsFavouritesItem, and QgsDirectoryItem.
Definition at line 179 of file qgsdataitem.cpp.
Referenced by populate(), and refresh().
| void QgsDataItem::deleteChildItem | ( | QgsDataItem * | child | ) | [virtual] |
Definition at line 256 of file qgsdataitem.cpp.
References beginRemoveItems(), endRemoveItems(), mChildren, mName, and QgsDebugMsgLevel.
Referenced by refresh(), and QgsFavouritesItem::removeDirectory().
| void QgsDataItem::emitBeginInsertItems | ( | QgsDataItem * | parent, |
| int | first, | ||
| int | last | ||
| ) | [slot] |
Definition at line 162 of file qgsdataitem.cpp.
References beginInsertItems().
Referenced by addChildItem(), and removeChildItem().
| void QgsDataItem::emitBeginRemoveItems | ( | QgsDataItem * | parent, |
| int | first, | ||
| int | last | ||
| ) | [slot] |
Definition at line 170 of file qgsdataitem.cpp.
References beginRemoveItems().
Referenced by addChildItem(), and removeChildItem().
| void QgsDataItem::emitEndInsertItems | ( | ) | [slot] |
Definition at line 166 of file qgsdataitem.cpp.
References endInsertItems().
Referenced by addChildItem(), and removeChildItem().
| void QgsDataItem::emitEndRemoveItems | ( | ) | [slot] |
Definition at line 174 of file qgsdataitem.cpp.
References endRemoveItems().
Referenced by addChildItem(), and removeChildItem().
| void QgsDataItem::endInsertItems | ( | ) | [signal] |
Referenced by addChildItem(), emitEndInsertItems(), and removeChildItem().
| void QgsDataItem::endRemoveItems | ( | ) | [signal] |
Referenced by addChildItem(), deleteChildItem(), emitEndRemoveItems(), and removeChildItem().
| bool QgsDataItem::equal | ( | const QgsDataItem * | other | ) | [virtual] |
Reimplemented in QgsDirectoryItem, and QgsLayerItem.
Definition at line 334 of file qgsdataitem.cpp.
Referenced by findItem().
| int QgsDataItem::findItem | ( | QVector< QgsDataItem * > | items, |
| QgsDataItem * | item | ||
| ) | [static] |
Definition at line 287 of file qgsdataitem.cpp.
References equal(), mPath, and QgsDebugMsgLevel.
Referenced by refresh().
| virtual bool QgsDataItem::handleDrop | ( | const QMimeData * | , |
| Qt::DropAction | |||
| ) | [inline, virtual] |
Definition at line 94 of file qgsdataitem.h.
Referenced by QgsBrowserModel::dropMimeData().
| bool QgsDataItem::hasChildren | ( | ) |
Definition at line 210 of file qgsdataitem.cpp.
References mChildren, and mPopulated.
Referenced by QgsBrowserModel::hasChildren().
| QIcon QgsDataItem::icon | ( | ) | const [inline] |
Definition at line 121 of file qgsdataitem.h.
Referenced by QgsBrowserModel::data(), QgsDataCollectionItem::iconDataCollection(), QgsLayerItem::iconDefault(), QgsDataCollectionItem::iconDir(), QgsFavouritesItem::iconFavourites(), QgsLayerItem::iconLine(), QgsLayerItem::iconPoint(), QgsLayerItem::iconPolygon(), QgsLayerItem::iconRaster(), QgsLayerItem::iconTable(), and QgsZipItem::iconZip().
| bool QgsDataItem::isPopulated | ( | ) | [inline] |
Definition at line 70 of file qgsdataitem.h.
Referenced by QgsBrowserModel::canFetchMore().
| QString QgsDataItem::name | ( | ) | const [inline] |
Definition at line 122 of file qgsdataitem.h.
Referenced by QgsBrowserModel::addRootItems(), QgsDirectoryItem::createChildren(), QgsZipItem::createChildren(), QgsBrowserModel::data(), QgsZipItem::getZipFileList(), QgsZipItem::itemFromPath(), and QgsLayerItem::layerName().
| virtual QWidget* QgsDataItem::paramWidget | ( | ) | [inline, virtual] |
Reimplemented in QgsDirectoryItem.
Definition at line 85 of file qgsdataitem.h.
| QgsDataItem* QgsDataItem::parent | ( | ) | const [inline] |
Definition at line 118 of file qgsdataitem.h.
Referenced by QgsBrowserModel::parent().
| QString QgsDataItem::path | ( | ) | const [inline] |
Definition at line 123 of file qgsdataitem.h.
Referenced by QgsBrowserModel::beginInsertItems(), QgsBrowserModel::beginRemoveItems(), QgsDirectoryItem::createChildren(), QgsZipItem::createChildren(), equal(), QgsDirectoryItem::equal(), QgsBrowserModel::fetchMore(), QgsBrowserModel::findPath(), QgsZipItem::getZipFileList(), QgsZipItem::itemFromPath(), QgsBrowserModel::refresh(), and QgsFavouritesItem::removeDirectory().
| void QgsDataItem::populate | ( | ) | [virtual] |
Definition at line 184 of file qgsdataitem.cpp.
References addChildItem(), children(), createChildren(), mPath, mPopulated, and QgsDebugMsg.
Referenced by QgsBrowserModel::fetchMore(), and QgsZipItem::itemFromPath().
| void QgsDataItem::refresh | ( | ) | [virtual] |
Definition at line 298 of file qgsdataitem.cpp.
References addChildItem(), createChildren(), deleteChildItem(), findItem(), mChildren, mPath, and QgsDebugMsgLevel.
Referenced by QgsBrowserModel::refresh().
| QgsDataItem * QgsDataItem::removeChildItem | ( | QgsDataItem * | child | ) | [virtual] |
Definition at line 267 of file qgsdataitem.cpp.
References beginInsertItems(), beginRemoveItems(), emitBeginInsertItems(), emitBeginRemoveItems(), emitEndInsertItems(), emitEndRemoveItems(), endInsertItems(), endRemoveItems(), mChildren, mName, QgsDebugMsgLevel, and setParent().
| int QgsDataItem::rowCount | ( | ) |
Definition at line 204 of file qgsdataitem.cpp.
References mChildren.
Referenced by QgsZipItem::itemFromPath(), and QgsBrowserModel::rowCount().
| virtual bool QgsDataItem::setCrs | ( | QgsCoordinateReferenceSystem | crs | ) | [inline, virtual] |
Definition at line 105 of file qgsdataitem.h.
| void QgsDataItem::setIcon | ( | QIcon | icon | ) | [inline] |
Definition at line 125 of file qgsdataitem.h.
References icon().
Referenced by QgsBrowserModel::addRootItems().
| void QgsDataItem::setParent | ( | QgsDataItem * | parent | ) | [inline] |
Definition at line 119 of file qgsdataitem.h.
Referenced by removeChildItem().
| void QgsDataItem::setToolTip | ( | QString | msg | ) | [inline] |
Definition at line 127 of file qgsdataitem.h.
| QString QgsDataItem::toolTip | ( | ) | const [inline] |
Definition at line 128 of file qgsdataitem.h.
Referenced by QgsBrowserModel::data().
| Type QgsDataItem::type | ( | ) | const [inline] |
Definition at line 117 of file qgsdataitem.h.
Referenced by addChildItem(), QgsLayerItem::equal(), QgsDirectoryItem::equal(), QgsBrowserModel::flags(), and QgsBrowserModel::mimeData().
QVector<QgsDataItem*> QgsDataItem::mChildren [protected] |
Definition at line 134 of file qgsdataitem.h.
Referenced by addChildItem(), deleteChildItem(), hasChildren(), refresh(), removeChildItem(), rowCount(), and QgsDataCollectionItem::~QgsDataCollectionItem().
QIcon QgsDataItem::mIcon [protected] |
Definition at line 139 of file qgsdataitem.h.
Referenced by QgsDataCollectionItem::QgsDataCollectionItem(), QgsDirectoryItem::QgsDirectoryItem(), QgsErrorItem::QgsErrorItem(), QgsFavouritesItem::QgsFavouritesItem(), QgsLayerItem::QgsLayerItem(), and QgsZipItem::QgsZipItem().
QString QgsDataItem::mName [protected] |
Definition at line 136 of file qgsdataitem.h.
Referenced by addChildItem(), deleteChildItem(), QgsLayerItem::equal(), removeChildItem(), and ~QgsDataItem().
QgsDataItem* QgsDataItem::mParent [protected] |
Definition at line 133 of file qgsdataitem.h.
QString QgsDataItem::mPath [protected] |
Definition at line 137 of file qgsdataitem.h.
Referenced by addChildItem(), QgsDirectoryItem::createChildren(), QgsZipItem::createChildren(), equal(), QgsLayerItem::equal(), findItem(), QgsDirectoryItem::paramWidget(), populate(), refresh(), and ~QgsDataItem().
bool QgsDataItem::mPopulated [protected] |
Definition at line 135 of file qgsdataitem.h.
Referenced by hasChildren(), populate(), and QgsErrorItem::QgsErrorItem().
QString QgsDataItem::mToolTip [protected] |
Definition at line 138 of file qgsdataitem.h.
Type QgsDataItem::mType [protected] |
Definition at line 132 of file qgsdataitem.h.
Referenced by addChildItem(), QgsDirectoryItem::QgsDirectoryItem(), QgsFavouritesItem::QgsFavouritesItem(), and QgsZipItem::QgsZipItem().