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