|
Quantum GIS API Documentation
1.8
|
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 () |
| virtual void | addChildItem (QgsDataItem *child, bool refresh=false) |
| virtual void | deleteChildItem (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 |
| 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 QPixmap | getThemePixmap (const QString theName) |
| 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 40 of file qgsdataitem.h.
Definition at line 92 of file qgsdataitem.h.
| enum QgsDataItem::Type |
Reimplemented in QgsDirectoryItem.
Definition at line 44 of file qgsdataitem.h.
| QgsDataItem::QgsDataItem | ( | QgsDataItem::Type | type, |
| QgsDataItem * | parent, | ||
| QString | name, | ||
| QString | path | ||
| ) |
Definition at line 152 of file qgsdataitem.cpp.
| virtual QgsDataItem::~QgsDataItem | ( | ) | [inline, virtual] |
Definition at line 54 of file qgsdataitem.h.
| virtual bool QgsDataItem::acceptDrop | ( | ) | [inline, virtual] |
Definition at line 85 of file qgsdataitem.h.
Referenced by QgsBrowserModel::flags().
| virtual QList<QAction*> QgsDataItem::actions | ( | ) | [inline, virtual] |
Definition at line 82 of file qgsdataitem.h.
| void QgsDataItem::addChildItem | ( | QgsDataItem * | child, |
| bool | refresh = false |
||
| ) | [virtual] |
Definition at line 233 of file qgsdataitem.cpp.
References beginInsertItems(), beginRemoveItems(), Directory, emitBeginInsertItems(), emitBeginRemoveItems(), emitEndInsertItems(), emitEndRemoveItems(), endInsertItems(), endRemoveItems(), mChildren, mName, mType, QgsDebugMsg, and type().
Referenced by populate(), and refresh().
| void QgsDataItem::beginInsertItems | ( | QgsDataItem * | parent, |
| int | first, | ||
| int | last | ||
| ) | [signal] |
Referenced by addChildItem(), and emitBeginInsertItems().
| void QgsDataItem::beginRemoveItems | ( | QgsDataItem * | parent, |
| int | first, | ||
| int | last | ||
| ) | [signal] |
Referenced by addChildItem(), deleteChildItem(), and emitBeginRemoveItems().
| virtual Capability QgsDataItem::capabilities | ( | ) | [inline, virtual] |
Definition at line 102 of file qgsdataitem.h.
Referenced by QgsDirectoryItem::createChildren().
| QVector<QgsDataItem*> QgsDataItem::children | ( | ) | const [inline] |
Definition at line 115 of file qgsdataitem.h.
Referenced by createChildren(), 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 196 of file qgsdataitem.cpp.
References children().
Referenced by populate(), and refresh().
| void QgsDataItem::deleteChildItem | ( | QgsDataItem * | child | ) | [virtual] |
Definition at line 274 of file qgsdataitem.cpp.
References beginRemoveItems(), endRemoveItems(), mChildren, mName, and QgsDebugMsg.
Referenced by refresh().
| void QgsDataItem::emitBeginInsertItems | ( | QgsDataItem * | parent, |
| int | first, | ||
| int | last | ||
| ) | [slot] |
Definition at line 179 of file qgsdataitem.cpp.
References beginInsertItems().
Referenced by addChildItem().
| void QgsDataItem::emitBeginRemoveItems | ( | QgsDataItem * | parent, |
| int | first, | ||
| int | last | ||
| ) | [slot] |
Definition at line 187 of file qgsdataitem.cpp.
References beginRemoveItems().
Referenced by addChildItem().
| void QgsDataItem::emitEndInsertItems | ( | ) | [slot] |
Definition at line 183 of file qgsdataitem.cpp.
References endInsertItems().
Referenced by addChildItem().
| void QgsDataItem::emitEndRemoveItems | ( | ) | [slot] |
Definition at line 191 of file qgsdataitem.cpp.
References endRemoveItems().
Referenced by addChildItem().
| void QgsDataItem::endInsertItems | ( | ) | [signal] |
Referenced by addChildItem(), and emitEndInsertItems().
| void QgsDataItem::endRemoveItems | ( | ) | [signal] |
Referenced by addChildItem(), deleteChildItem(), and emitEndRemoveItems().
| bool QgsDataItem::equal | ( | const QgsDataItem * | other | ) | [virtual] |
Reimplemented in QgsDirectoryItem, and QgsLayerItem.
Definition at line 332 of file qgsdataitem.cpp.
Referenced by findItem().
| int QgsDataItem::findItem | ( | QVector< QgsDataItem * > | items, |
| QgsDataItem * | item | ||
| ) | [static] |
Definition at line 285 of file qgsdataitem.cpp.
References equal(), mPath, and QgsDebugMsg.
Referenced by refresh().
| QPixmap QgsDataItem::getThemePixmap | ( | const QString | theName | ) | [static] |
Definition at line 159 of file qgsdataitem.cpp.
References QgsApplication::activeThemePath(), and QgsApplication::defaultThemePath().
Referenced by QgsDataCollectionItem::iconDataCollection(), QgsLayerItem::iconDefault(), QgsFavouritesItem::iconFavourites(), QgsLayerItem::iconLine(), QgsLayerItem::iconPoint(), QgsLayerItem::iconPolygon(), QgsLayerItem::iconRaster(), QgsLayerItem::iconTable(), QgsZipItem::iconZip(), and QgsErrorItem::QgsErrorItem().
| virtual bool QgsDataItem::handleDrop | ( | const QMimeData * | , |
| Qt::DropAction | |||
| ) | [inline, virtual] |
Definition at line 88 of file qgsdataitem.h.
Referenced by QgsBrowserModel::dropMimeData().
| bool QgsDataItem::hasChildren | ( | ) |
Definition at line 228 of file qgsdataitem.cpp.
References mChildren, and mPopulated.
Referenced by QgsBrowserModel::hasChildren().
| QIcon QgsDataItem::icon | ( | ) | const [inline] |
Definition at line 116 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().
| QString QgsDataItem::name | ( | ) | const [inline] |
Definition at line 117 of file qgsdataitem.h.
Referenced by QgsBrowserModel::addRootItems(), QgsDirectoryItem::createChildren(), QgsZipItem::createChildren(), QgsBrowserModel::data(), QgsZipItem::itemFromPath(), and QgsLayerItem::layerName().
| virtual QWidget* QgsDataItem::paramWidget | ( | ) | [inline, virtual] |
Reimplemented in QgsDirectoryItem.
Definition at line 79 of file qgsdataitem.h.
| QgsDataItem* QgsDataItem::parent | ( | ) | const [inline] |
Definition at line 114 of file qgsdataitem.h.
Referenced by QgsBrowserModel::parent().
| QString QgsDataItem::path | ( | ) | const [inline] |
Definition at line 118 of file qgsdataitem.h.
Referenced by QgsBrowserModel::beginInsertItems(), QgsBrowserModel::beginRemoveItems(), QgsDirectoryItem::createChildren(), QgsZipItem::createChildren(), equal(), QgsDirectoryItem::equal(), QgsBrowserModel::findPath(), QgsZipItem::itemFromPath(), and QgsBrowserModel::refresh().
| void QgsDataItem::populate | ( | ) | [virtual] |
Definition at line 202 of file qgsdataitem.cpp.
References addChildItem(), children(), createChildren(), mPath, mPopulated, and QgsDebugMsg.
Referenced by QgsZipItem::itemFromPath(), and rowCount().
| void QgsDataItem::refresh | ( | ) | [virtual] |
Definition at line 296 of file qgsdataitem.cpp.
References addChildItem(), createChildren(), deleteChildItem(), findItem(), mChildren, mPath, and QgsDebugMsg.
Referenced by QgsBrowserModel::refresh().
| int QgsDataItem::rowCount | ( | ) |
Definition at line 222 of file qgsdataitem.cpp.
References mChildren, mPopulated, and populate().
Referenced by QgsZipItem::itemFromPath(), and QgsBrowserModel::rowCount().
| virtual bool QgsDataItem::setCrs | ( | QgsCoordinateReferenceSystem | crs | ) | [inline, virtual] |
Definition at line 99 of file qgsdataitem.h.
| void QgsDataItem::setIcon | ( | QIcon | icon | ) | [inline] |
Definition at line 120 of file qgsdataitem.h.
References icon().
Referenced by QgsBrowserModel::addRootItems().
| void QgsDataItem::setToolTip | ( | QString | msg | ) | [inline] |
Definition at line 122 of file qgsdataitem.h.
| QString QgsDataItem::toolTip | ( | ) | const [inline] |
Definition at line 123 of file qgsdataitem.h.
Referenced by QgsBrowserModel::data().
| Type QgsDataItem::type | ( | ) | const [inline] |
Definition at line 113 of file qgsdataitem.h.
Referenced by addChildItem(), QgsLayerItem::equal(), QgsDirectoryItem::equal(), QgsBrowserModel::flags(), and QgsBrowserModel::mimeData().
QVector<QgsDataItem*> QgsDataItem::mChildren [protected] |
Definition at line 129 of file qgsdataitem.h.
Referenced by addChildItem(), deleteChildItem(), hasChildren(), refresh(), rowCount(), and QgsDataCollectionItem::~QgsDataCollectionItem().
QIcon QgsDataItem::mIcon [protected] |
Definition at line 134 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 131 of file qgsdataitem.h.
Referenced by addChildItem(), deleteChildItem(), and QgsLayerItem::equal().
QgsDataItem* QgsDataItem::mParent [protected] |
Definition at line 128 of file qgsdataitem.h.
QString QgsDataItem::mPath [protected] |
Definition at line 132 of file qgsdataitem.h.
Referenced by QgsDirectoryItem::createChildren(), QgsZipItem::createChildren(), equal(), QgsLayerItem::equal(), findItem(), QgsDirectoryItem::paramWidget(), populate(), and refresh().
bool QgsDataItem::mPopulated [protected] |
Definition at line 130 of file qgsdataitem.h.
Referenced by hasChildren(), populate(), QgsErrorItem::QgsErrorItem(), and rowCount().
QString QgsDataItem::mToolTip [protected] |
Definition at line 133 of file qgsdataitem.h.
Type QgsDataItem::mType [protected] |
Definition at line 127 of file qgsdataitem.h.
Referenced by addChildItem(), QgsDirectoryItem::QgsDirectoryItem(), QgsFavouritesItem::QgsFavouritesItem(), and QgsZipItem::QgsZipItem().
1.7.6.1