20 #include <QFileSystemWatcher> 21 #include <QFutureWatcher> 28 #include <QTreeWidget> 53 void setIconPath(
const QString & iconPath );
57 void connectFrameChanged(
const QObject * receiver,
const char * method );
59 void disconnectFrameChanged(
const QObject * receiver,
const char * method );
62 void onFrameChanged();
121 virtual void setState(
State state );
124 Q_DECL_DEPRECATED
bool isPopulated() {
return state() == Populated; }
131 virtual void addChildItem(
QgsDataItem *child,
bool refresh =
false );
137 virtual void deleteChildItem(
QgsDataItem * child );
180 { Q_UNUSED( crs );
return false; }
187 virtual void setCapabilities(
const Capabilities& capabilities ) { mCapabilities = capabilities; }
205 virtual QIcon icon();
269 virtual void populate(
bool foreground =
false );
272 virtual void depopulate();
274 virtual void refresh();
276 void emitBeginInsertItems(
QgsDataItem* parent,
int first,
int last );
277 void emitEndInsertItems();
278 void emitBeginRemoveItems(
QgsDataItem* parent,
int first,
int last );
279 void emitEndRemoveItems();
281 void emitDataChanged();
283 virtual void childrenCreated();
286 void beginInsertItems(
QgsDataItem* parent,
int first,
int last );
287 void endInsertItems();
288 void beginRemoveItems(
QgsDataItem* parent,
int first,
int last );
289 void endRemoveItems();
297 bool mDeferredDelete;
303 Q_DECLARE_OPERATORS_FOR_FLAGS( QgsDataItem::Capabilities )
330 virtual bool equal(
const QgsDataItem *other )
override;
372 static const QIcon &iconPoint();
373 static const QIcon &iconLine();
374 static const QIcon &iconPolygon();
375 static const QIcon &iconTable();
376 static const QIcon &iconRaster();
377 static const QIcon &iconDefault();
396 static const QIcon &iconDir();
397 static const QIcon &iconDataCollection();
443 static bool hiddenPath(
QString path );
447 void directoryChanged();
506 void showHideColumn();
521 void addDirectory(
const QString& favIcon );
524 static const QIcon &iconFavourites();
560 static const QIcon &iconZip();
566 #endif // QGSDATAITEM_H A Collection: logical collection of layers or subcollections, e.g.
QStringList mSupportFormats
The list of supported formats.
Contains various Favourites directories.
virtual void childrenCreated()
virtual QString layerName() const
QString providerKey()
Returns provider key.
QVector< QgsDataItem * > children() const
QString mProviderKey
The provider key.
virtual bool handleDrop(const QMimeData *, Qt::DropAction)
Attempts to process the mime data dropped on this item.
void moveToThread(QThread *targetThread)
void addChild(QgsDataItem *item)
void setIcon(const QIcon &icon)
Abstract base class for spatial data provider implementations.
void setToolTip(const QString &msg)
QString iconPath(const QString &iconFile)
QString uri()
Returns layer uri or empty string if layer cannot be created.
virtual QWidget * paramWidget()
A zip file: contains layers, using GDAL/OGR VSIFILE mechanism.
virtual bool equal(const QgsDataItem *other)
Returns true if this item is equal to another item (by testing item type and path).
QStringList mSupportedCRS
The list of supported CRS.
const char * name() const
QgsDataItem * parent() const
Get item parent.
LayerType
Layers enum defining the types of layers that can be added to a map.
Children not yet created.
Creating children in separate thread (populating or refreshing)
Data item that can be used to report problems (e.g.
static QStringList mProviderNames
A directory: contains subdirectories and layers.
Base class for all items in the model.
void setParent(QObject *parent)
QStringList supportedCRS()
Returns the supported CRS.
Capabilities mCapabilities
virtual void setState(State state)
Set item state.
void setName(const QString &name)
static QVector< dataItem_t * > mDataItemPtr
Q_DECL_DEPRECATED bool isPopulated()
virtual Q_DECL_DEPRECATED Capability capabilities()
QString qgsVsiPrefix(const QString &path)
Class for storing a coordinate reference system (CRS)
Animated icon is keeping an animation running if there are listeners connected to frameChanged...
bool deferredDelete()
The item is scheduled to be deleted.
virtual QVector< QgsDataItem * > createChildren()
Create children.
Item that represents a layer that can be opened with one of the providers.
virtual void mousePressEvent(QMouseEvent *event)
QgsDataItem * dataItem_t(QString, QgsDataItem *)
static Q_DECL_DEPRECATED QVector< QLibrary * > mLibraries
QVector< QgsDataItem * > mChildren
QStringList supportedFormats()
Returns the supported formats.
virtual QList< QAction * > actions()
Returns the list of actions available for this item.
Data item that can be used to represent QGIS projects.
void setPath(const QString &path)
virtual bool acceptDrop()
Returns whether the item accepts drag and dropped layers - e.g.
LayerType mLayerType
The layer type.
virtual QString comments() const
Returns comments of the layer.
virtual void setCapabilities(const Capabilities &capabilities)
void setIconName(const QString &iconName)
static QString vsiPrefix(const QString &uri)
QMap< QString, QIcon > mIconMap
virtual Capabilities capabilities2() const