|
QGIS API Documentation 4.3.0-Master (16eddb2670e)
|
Base class for all items in a QgsCptCityBrowserModel model. More...
#include <qgscptcityarchive.h>

Public Types | |
| enum | Type { ColorRamp , Collection , Directory , Selection , AllRamps } |
Signals | |
| void | beginInsertItems (QgsCptCityDataItem *parent, int first, int last) |
| Emitted before child items are added to this item. | |
| void | beginRemoveItems (QgsCptCityDataItem *parent, int first, int last) |
| Emitted before child items are removed from this data item. | |
| void | endInsertItems () |
| Emitted after child items have been added to this data item. | |
| void | endRemoveItems () |
| Emitted after child items have been removed from this data item. | |
Public Member Functions | |
| QgsCptCityDataItem (QgsCptCityDataItem::Type type, QgsCptCityDataItem *parent, const QString &name, const QString &path) | |
| virtual Q_DECL_DEPRECATED bool | acceptDrop () |
Returns true if the item accepts drag & dropped layers - e.g. | |
| virtual void | addChildItem (QgsCptCityDataItem *child, bool refresh=false) |
| Inserts a new child using alphabetical order based on mName, emits necessary signal to model before and after, sets parent and connects signals. | |
| QVector< QgsCptCityDataItem * > | children () const |
| virtual QVector< QgsCptCityDataItem * > | createChildren () |
| Returns a vector of children items. | |
| virtual void | deleteChildItem (QgsCptCityDataItem *child) |
| Removes and deletes a child item, signals to browser are emitted. | |
| virtual bool | equal (const QgsCptCityDataItem *other) |
Returns true if this item is equal to an other item. | |
| virtual Q_DECL_DEPRECATED bool | handleDrop (const QMimeData *data, Qt::DropAction action) |
| Tries to process the data dropped on this item. | |
| bool | hasChildren () |
| virtual QIcon | icon () |
| virtual QIcon | icon (QSize size) |
| QString | info () const |
| bool | isPopulated () |
Returns true if the item is already populated. | |
| bool | isValid () |
| virtual int | leafCount () const |
| Returns the total count of "leaf" items (all children which are end nodes). | |
| QString | name () const |
| virtual Q_DECL_DEPRECATED QWidget * | paramWidget () |
| QgsCptCityDataItem * | parent () const |
| QString | path () const |
| virtual void | populate () |
| Populates children using children vector created by createChildren(). | |
| virtual void | refresh () |
| virtual QgsCptCityDataItem * | removeChildItem (QgsCptCityDataItem *child) |
| Removes a child item but doesn't delete it, signals to browser are emitted. | |
| int | rowCount () |
| void | setIcon (const QIcon &icon) |
| void | setParent (QgsCptCityDataItem *parent) |
| void | setToolTip (const QString &msg) |
| QString | shortInfo () const |
| QString | toolTip () const |
| Type | type () const |
Static Public Member Functions | |
| static int | findItem (QVector< QgsCptCityDataItem * > items, QgsCptCityDataItem *item) |
| Finds a child index in vector of items using '==' operator. | |
Protected Attributes | |
| QVector< QgsCptCityDataItem * > | mChildren |
| QIcon | mIcon |
| QString | mInfo |
| QString | mName |
| QgsCptCityDataItem * | mParent = nullptr |
| QString | mPath |
| bool | mPopulated = false |
| QString | mShortInfo |
| QString | mToolTip |
| Type | mType |
| bool | mValid = true |
Base class for all items in a QgsCptCityBrowserModel model.
Definition at line 101 of file qgscptcityarchive.h.
| Enumerator | |
|---|---|
| ColorRamp | |
| Collection | |
| Directory | |
| Selection | |
| AllRamps | |
Definition at line 105 of file qgscptcityarchive.h.
| QgsCptCityDataItem::QgsCptCityDataItem | ( | QgsCptCityDataItem::Type | type, |
| QgsCptCityDataItem * | parent, | ||
| const QString & | name, | ||
| const QString & | path ) |
Definition at line 518 of file qgscptcityarchive.cpp.
|
inlinevirtual |
Returns true if the item accepts drag & dropped layers - e.g.
for import.
Definition at line 178 of file qgscptcityarchive.h.
|
virtual |
Inserts a new child using alphabetical order based on mName, emits necessary signal to model before and after, sets parent and connects signals.
The refresh argument will refresh the populated item by emitting signals to the model.
Definition at line 581 of file qgscptcityarchive.cpp.
|
signal |
Emitted before child items are added to this item.
This signal must be followed by endInsertItems().
| parent | the parent item having children added |
| first | index of first child item to be added |
| last | index last child item, after the addition has occurred |
|
signal |
Emitted before child items are removed from this data item.
This signal must be followed by endRemoveItems().
| parent | the parent item having children removed |
| first | index of first child item to be removed |
| last | index of the last child item to be removed |
|
inline |
Definition at line 204 of file qgscptcityarchive.h.
|
virtual |
Returns a vector of children items.
Reimplemented in QgsCptCityAllRampsItem, QgsCptCityDirectoryItem, and QgsCptCitySelectionItem.
Definition at line 526 of file qgscptcityarchive.cpp.
|
virtual |
Removes and deletes a child item, signals to browser are emitted.
Definition at line 617 of file qgscptcityarchive.cpp.
|
signal |
Emitted after child items have been added to this data item.
This signal will always be preceded by beginInsertItems().
|
signal |
Emitted after child items have been removed from this data item.
This signal will always be preceded by beginRemoveItems().
|
virtual |
Returns true if this item is equal to an other item.
Reimplemented in QgsCptCityColorRampItem, QgsCptCityDirectoryItem, and QgsCptCitySelectionItem.
Definition at line 694 of file qgscptcityarchive.cpp.
|
static |
Finds a child index in vector of items using '==' operator.
Definition at line 644 of file qgscptcityarchive.cpp.
|
inlinevirtual |
Tries to process the data dropped on this item.
Definition at line 185 of file qgscptcityarchive.h.
| bool QgsCptCityDataItem::hasChildren | ( | ) |
Definition at line 576 of file qgscptcityarchive.cpp.
|
inlinevirtual |
Reimplemented in QgsCptCityColorRampItem.
Definition at line 205 of file qgscptcityarchive.h.
|
inlinevirtual |
Reimplemented in QgsCptCityColorRampItem.
Definition at line 206 of file qgscptcityarchive.h.
|
inline |
Definition at line 213 of file qgscptcityarchive.h.
|
inline |
Returns true if the item is already populated.
Definition at line 142 of file qgscptcityarchive.h.
|
inline |
Definition at line 221 of file qgscptcityarchive.h.
|
virtual |
Returns the total count of "leaf" items (all children which are end nodes).
Reimplemented in QgsCptCityColorRampItem.
Definition at line 560 of file qgscptcityarchive.cpp.
|
inline |
Definition at line 211 of file qgscptcityarchive.h.
|
inlinevirtual |
Definition at line 171 of file qgscptcityarchive.h.
|
inline |
Definition at line 202 of file qgscptcityarchive.h.
|
inline |
Definition at line 212 of file qgscptcityarchive.h.
|
virtual |
Populates children using children vector created by createChildren().
Definition at line 532 of file qgscptcityarchive.cpp.
|
virtual |
Definition at line 655 of file qgscptcityarchive.cpp.
|
virtual |
Removes a child item but doesn't delete it, signals to browser are emitted.
nullptr if no such item was found Definition at line 628 of file qgscptcityarchive.cpp.
| int QgsCptCityDataItem::rowCount | ( | ) |
Definition at line 553 of file qgscptcityarchive.cpp.
|
inline |
Definition at line 216 of file qgscptcityarchive.h.
|
inline |
Definition at line 203 of file qgscptcityarchive.h.
|
inline |
Definition at line 218 of file qgscptcityarchive.h.
|
inline |
Definition at line 214 of file qgscptcityarchive.h.
|
inline |
Definition at line 219 of file qgscptcityarchive.h.
|
inline |
Definition at line 201 of file qgscptcityarchive.h.
|
protected |
Definition at line 226 of file qgscptcityarchive.h.
|
protected |
Definition at line 233 of file qgscptcityarchive.h.
|
protected |
Definition at line 230 of file qgscptcityarchive.h.
|
protected |
Definition at line 228 of file qgscptcityarchive.h.
|
protected |
Definition at line 225 of file qgscptcityarchive.h.
|
protected |
Definition at line 229 of file qgscptcityarchive.h.
|
protected |
Definition at line 227 of file qgscptcityarchive.h.
|
protected |
Definition at line 231 of file qgscptcityarchive.h.
|
protected |
Definition at line 232 of file qgscptcityarchive.h.
|
protected |
Definition at line 224 of file qgscptcityarchive.h.
|
protected |
Definition at line 234 of file qgscptcityarchive.h.