QGIS API Documentation  3.14.0-Pi (9f7028fd23)
qgsdataitem.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsdataitem.h - Items representing data
3  -------------------
4  begin : 2011-04-01
5  copyright : (C) 2011 Radim Blazek
6  email : radim dot blazek at gmail dot com
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 #ifndef QGSDATAITEM_H
18 #define QGSDATAITEM_H
19 
20 #include "qgis_sip.h"
21 #include "qgis_core.h"
22 #include <QFileSystemWatcher>
23 #include <QFutureWatcher>
24 #include <QIcon>
25 #include <QObject>
26 #include <QPixmap>
27 #include <QString>
28 #include <QTreeWidget>
29 #include <QVector>
30 #include <QDateTime>
31 
32 #include "qgsmaplayer.h"
34 #include "qgsmimedatautils.h"
35 #include "qgswkbtypes.h"
36 
37 class QgsDataProvider;
38 class QgsDataItem;
39 class QgsAnimatedIcon;
40 class QgsBookmarkManager;
41 
42 typedef QgsDataItem *dataItem_t( QString, QgsDataItem * ) SIP_SKIP;
43 
49 class CORE_EXPORT QgsDataItem : public QObject
50 {
51 
52 #ifdef SIP_RUN
54  if ( qobject_cast<QgsLayerItem *>( sipCpp ) )
55  sipType = sipType_QgsLayerItem;
56  else if ( qobject_cast<QgsErrorItem *>( sipCpp ) )
57  sipType = sipType_QgsErrorItem;
58  else if ( qobject_cast<QgsDirectoryItem *>( sipCpp ) )
59  sipType = sipType_QgsDirectoryItem;
60  else if ( qobject_cast<QgsFavoritesItem *>( sipCpp ) )
61  sipType = sipType_QgsFavoritesItem;
62  else if ( qobject_cast<QgsZipItem *>( sipCpp ) )
63  sipType = sipType_QgsZipItem;
64  else if ( qobject_cast<QgsDataCollectionItem *>( sipCpp ) )
65  sipType = sipType_QgsDataCollectionItem;
66  else if ( qobject_cast<QgsProjectItem *>( sipCpp ) )
67  sipType = sipType_QgsProjectItem;
68  else
69  sipType = 0;
70  SIP_END
71 #endif
72 
73  Q_OBJECT
74 
75  public:
76  enum Type
77  {
85  };
86 
87  Q_ENUM( Type )
88 
89 
100  QgsDataItem( QgsDataItem::Type type, QgsDataItem *parent SIP_TRANSFERTHIS, const QString &name, const QString &path, const QString &providerKey = QString() );
101 
102  ~QgsDataItem() override;
103 
104  bool hasChildren();
105 
111  virtual bool layerCollection() const;
112 
113  int rowCount();
114 
118  virtual QVector<QgsDataItem *> createChildren() SIP_FACTORY;
119 
120  enum State
121  {
124  Populated
125  };
126  Q_ENUM( State )
127 
128 
129  State state() const;
130 
136  virtual void setState( State state );
137 
144  virtual void addChildItem( QgsDataItem *child SIP_TRANSFER, bool refresh = false );
145 
151  virtual void deleteChildItem( QgsDataItem *child );
152 
158  virtual QgsDataItem *removeChildItem( QgsDataItem *child ) SIP_TRANSFERBACK;
159 
163  virtual bool equal( const QgsDataItem *other );
164 
172  Q_DECL_DEPRECATED virtual QWidget *paramWidget() SIP_FACTORY SIP_DEPRECATED { return nullptr; }
173 
181  virtual QList<QAction *> actions( QWidget *parent );
182 
191  virtual QList<QMenu *> menus( QWidget *parent );
192 
201  Q_DECL_DEPRECATED virtual bool acceptDrop() SIP_DEPRECATED { return false; }
202 
211  Q_DECL_DEPRECATED virtual bool handleDrop( const QMimeData * /*data*/, Qt::DropAction /*action*/ ) SIP_DEPRECATED { return false; }
212 
219  virtual bool handleDoubleClick();
220 
228  virtual bool hasDragEnabled() const { return false; }
229 
237 
239  {
240  NoCapabilities = 0,
241  SetCrs = 1 << 0,
242  Fertile = 1 << 1,
243  Fast = 1 << 2,
244  Collapse = 1 << 3,
245  Rename = 1 << 4,
246  Delete = 1 << 5,
247  };
248  Q_DECLARE_FLAGS( Capabilities, Capability )
249 
250 
256  Q_DECL_DEPRECATED virtual bool setCrs( const QgsCoordinateReferenceSystem &crs ) SIP_DEPRECATED
257  {
258  Q_UNUSED( crs )
259  return false;
260  }
261 
274  Q_DECL_DEPRECATED virtual bool rename( const QString &name ) SIP_DEPRECATED;
275 
276  // ### QGIS 4 - rename to capabilities()
277 
283  virtual Capabilities capabilities2() const { return mCapabilities; }
284 
290  virtual void setCapabilities( Capabilities capabilities ) { mCapabilities = capabilities; }
291 
292  // static methods
293 
294  // Find child index in vector of items using '==' operator
295  static int findItem( QVector<QgsDataItem *> items, QgsDataItem *item );
296 
297  // members
298 
299  Type type() const { return mType; }
300 
304  QgsDataItem *parent() const { return mParent; }
305 
309  void setParent( QgsDataItem *parent );
310  QVector<QgsDataItem *> children() const { return mChildren; }
311  virtual QIcon icon();
312 
318  QString name() const { return mName; }
319 
325  void setName( const QString &name );
326 
327  QString path() const { return mPath; }
328  void setPath( const QString &path ) { mPath = path; }
329 
338  QString providerKey() const;
339 
348  void setProviderKey( const QString &value );
349 
351  static QString pathComponent( const QString &component );
352 
363  virtual QVariant sortKey() const;
364 
370  void setSortKey( const QVariant &key );
371 
372 
373  // Because QIcon (QPixmap) must not be used in outside the GUI thread, it is
374  // not possible to set mIcon in constructor. Either use mIconName/setIconName()
375  // or implement icon().
376  void setIcon( const QIcon &icon ) { mIcon = icon; }
377  void setIconName( const QString &iconName ) { mIconName = iconName; }
378 
379  void setToolTip( const QString &msg ) { mToolTip = msg; }
380  QString toolTip() const { return mToolTip; }
381 
382  // deleteLater() items and clear the vector
383  static void deleteLater( QVector<QgsDataItem *> &items );
384 
386  void moveToThread( QThread *targetThread );
387 
388  protected:
389  virtual void populate( const QVector<QgsDataItem *> &children );
390 
394  virtual void refresh( const QVector<QgsDataItem *> &children );
395 
403  bool deferredDelete() { return mDeferredDelete; }
404 
406  Capabilities mCapabilities;
407  QgsDataItem *mParent = nullptr;
408  QVector<QgsDataItem *> mChildren; // easier to have it always
410  QString mName;
411  QString mProviderKey;
412  // Path is slash ('/') separated chain of item identifiers which are usually item names, but may be different if it is
413  // necessary to distinguish paths of two providers to the same source (e.g GRASS location and standard directory have the same
414  // name but different paths). Identifiers in path must not contain '/' characters.
415  // The path is used to identify item in tree.
416  QString mPath;
417  QString mToolTip;
418  QString mIconName;
419  QIcon mIcon;
420  QMap<QString, QIcon> mIconMap;
421 
423  QVariant mSortKey;
424 
425  public slots:
426 
436  virtual void deleteLater();
437 
438  // Populate children using children vector created by createChildren()
439  // \param foreground run createChildren in foreground
440  virtual void populate( bool foreground = false );
441 
443  virtual void depopulate();
444 
445  virtual void refresh();
446 
453  virtual void refreshConnections( const QString &providerKey = QString() );
454 
455  virtual void childrenCreated();
456 
457  signals:
458  void beginInsertItems( QgsDataItem *parent, int first, int last );
459  void endInsertItems();
460  void beginRemoveItems( QgsDataItem *parent, int first, int last );
461  void endRemoveItems();
462  void dataChanged( QgsDataItem *item );
463  void stateChanged( QgsDataItem *item, QgsDataItem::State oldState );
464 
472  void connectionsChanged( const QString &providerKey = QString() );
473 
474  protected slots:
475 
481  void updateIcon();
482 
483  private:
484  static QVector<QgsDataItem *> runCreateChildren( QgsDataItem *item );
485 
486  // Set to true if object has to be deleted when possible (nothing running in threads)
487  bool mDeferredDelete;
488  QFutureWatcher< QVector <QgsDataItem *> > *mFutureWatcher;
489  // number of items currently in loading (populating) state
490  static QgsAnimatedIcon *sPopulatingIcon;
491 };
492 
493 Q_DECLARE_OPERATORS_FOR_FLAGS( QgsDataItem::Capabilities )
494 
495 
499 class CORE_EXPORT QgsLayerItem : public QgsDataItem
500 {
501  Q_OBJECT
502 
503  public:
505  {
517  VectorTile
518  };
519 
520  Q_ENUM( LayerType )
521 
522  QgsLayerItem( QgsDataItem *parent, const QString &name, const QString &path, const QString &uri, LayerType layerType, const QString &providerKey );
523 
524  // --- reimplemented from QgsDataItem ---
525 
526  bool equal( const QgsDataItem *other ) override;
527 
528  bool hasDragEnabled() const override { return true; }
529 
530  QgsMimeDataUtils::Uri mimeUri() const override;
531 
532  // --- New virtual methods for layer item derived classes ---
533 
535  QgsMapLayerType mapLayerType() const;
536 
541  static LayerType typeFromMapLayer( QgsMapLayer *layer );
542 
544  QString uri() const { return mUri; }
545 
547  QString providerKey() const { return mProviderKey; }
548 
553  QStringList supportedCrs() const { return mSupportedCRS; }
554 
559  QStringList supportedFormats() const { return mSupportFormats; }
560 
565  virtual QString comments() const { return QString(); }
566 
571  static QString layerTypeAsString( LayerType layerType );
572 
577  static QString iconName( LayerType layerType );
578 
585  Q_DECL_DEPRECATED virtual bool deleteLayer() SIP_DEPRECATED;
586 
587  protected:
589  QString mUri;
591  LayerType mLayerType;
593  QStringList mSupportedCRS;
595  QStringList mSupportFormats;
596 
597  public:
598  static QIcon iconPoint();
599  static QIcon iconLine();
600  static QIcon iconPolygon();
601  static QIcon iconTable();
602  static QIcon iconRaster();
603  static QIcon iconDefault();
605  static QIcon iconMesh();
607  static QIcon iconVectorTile();
608 
610  virtual QString layerName() const { return name(); }
611 };
612 
613 
618 class CORE_EXPORT QgsDataCollectionItem : public QgsDataItem
619 {
620  Q_OBJECT
621  public:
622 
634  QgsDataCollectionItem( QgsDataItem *parent SIP_TRANSFERTHIS, const QString &name, const QString &path = QString(), const QString &providerKey = QString() );
635 
636  ~QgsDataCollectionItem() override;
637 
638  void addChild( QgsDataItem *item SIP_TRANSFER ) { mChildren.append( item ); }
639 
644  static QIcon iconDir();
645 
650  static QIcon iconDataCollection();
651 
652  protected:
653 
658  static QIcon openDirIcon();
659 
664  static QIcon homeDirIcon();
665 };
666 
671 class CORE_EXPORT QgsDirectoryItem : public QgsDataCollectionItem
672 {
673  Q_OBJECT
674  public:
675 
686  QgsDirectoryItem( QgsDataItem *parent SIP_TRANSFERTHIS, const QString &name, const QString &path );
687 
688 
689  // TODO QGIS 4.0 -- rename "name" to "title" or "text" or something more descriptive, and "path" to something
690  // else to clarify the role of dirPath vs path
691 
708  QgsDirectoryItem( QgsDataItem *parent SIP_TRANSFERTHIS, const QString &name, const QString &dirPath, const QString &path, const QString &providerKey = QString() );
709 
710  void setState( State state ) override;
711 
712  QVector<QgsDataItem *> createChildren() override;
713 
717  QString dirPath() const { return mDirPath; }
718 
719  bool equal( const QgsDataItem *other ) override;
720  QIcon icon() override;
721  Q_DECL_DEPRECATED QWidget *paramWidget() override SIP_FACTORY SIP_DEPRECATED;
722  bool hasDragEnabled() const override { return true; }
723  QgsMimeDataUtils::Uri mimeUri() const override;
724 
726  static bool hiddenPath( const QString &path );
727 
728  public slots:
729  void childrenCreated() override;
730  void directoryChanged();
731 
732  protected:
733  void init();
734  QString mDirPath;
735 
736  private:
737  QFileSystemWatcher *mFileSystemWatcher = nullptr;
738  bool mRefreshLater;
739  QDateTime mLastScan;
740 };
741 
746 class CORE_EXPORT QgsProjectItem : public QgsDataItem
747 {
748  Q_OBJECT
749  public:
750 
758  QgsProjectItem( QgsDataItem *parent, const QString &name, const QString &path, const QString &providerKey = QString() );
759 
760  bool hasDragEnabled() const override { return true; }
761 
762  QgsMimeDataUtils::Uri mimeUri() const override;
763 
764 };
765 
770 class CORE_EXPORT QgsErrorItem : public QgsDataItem
771 {
772  Q_OBJECT
773  public:
774 
775  QgsErrorItem( QgsDataItem *parent, const QString &error, const QString &path );
776 
777 };
778 
779 // ---------
780 
781 // TODO: move to qgis_gui for QGIS 4
782 
789 class CORE_EXPORT QgsDirectoryParamWidget : public QTreeWidget
790 {
791  Q_OBJECT
792 
793  public:
794  QgsDirectoryParamWidget( const QString &path, QWidget *parent SIP_TRANSFERTHIS = nullptr );
795 
796  protected:
797  void mousePressEvent( QMouseEvent *event ) override;
798 
799  public slots:
800  void showHideColumn();
801 };
802 
808 class CORE_EXPORT QgsFavoritesItem : public QgsDataCollectionItem
809 {
810  Q_OBJECT
811  public:
812 
817  QgsFavoritesItem( QgsDataItem *parent, const QString &name, const QString &path = QString() );
818 
819  QVector<QgsDataItem *> createChildren() override;
820 
829  void addDirectory( const QString &directory, const QString &name = QString() );
830 
835  void removeDirectory( QgsDirectoryItem *item );
836 
840  void renameFavorite( const QString &path, const QString &name );
841 
843  static QIcon iconFavorites();
844 
845  QVariant sortKey() const override;
846 
847  private:
848  QVector<QgsDataItem *> createChildren( const QString &favDir, const QString &name );
849 };
850 
855 class CORE_EXPORT QgsZipItem : public QgsDataCollectionItem
856 {
857  Q_OBJECT
858 
859  protected:
860  QString mFilePath;
861  QString mVsiPrefix;
862  QStringList mZipFileList;
863 
864  public:
866  QgsZipItem( QgsDataItem *parent, const QString &name, const QString &path );
867 
869  QgsZipItem( QgsDataItem *parent, const QString &name, const QString &filePath, const QString &path, const QString &providerKey = QString() );
870 
871  QVector<QgsDataItem *> createChildren() override;
872  QStringList getZipFileList();
873 
875  static QVector<dataItem_t *> sDataItemPtr SIP_SKIP;
876  static QStringList sProviderNames;
877 
878  static QString vsiPrefix( const QString &uri ) { return qgsVsiPrefix( uri ); }
879 
883  static QgsDataItem *itemFromPath( QgsDataItem *parent, const QString &path, const QString &name ) SIP_FACTORY;
884 
889  static QgsDataItem *itemFromPath( QgsDataItem *parent, const QString &filePath, const QString &name, const QString &path ) SIP_FACTORY SIP_PYNAME( itemFromFilePath );
890 
891  static QIcon iconZip();
892 
893  private:
894  void init();
895 };
896 
897 
899 #ifndef SIP_RUN
900 
906 class CORE_EXPORT QgsProjectHomeItem : public QgsDirectoryItem
907 {
908  Q_OBJECT
909 
910  public:
911 
912  QgsProjectHomeItem( QgsDataItem *parent, const QString &name, const QString &dirPath, const QString &path );
913 
914  QIcon icon() override;
915  QVariant sortKey() const override;
916 
917 };
918 
924 Q_NOWARN_DEPRECATED_PUSH // rename is deprecated
925 class CORE_EXPORT QgsFavoriteItem : public QgsDirectoryItem
926 {
927  Q_OBJECT
928 
929  public:
930 
931  QgsFavoriteItem( QgsFavoritesItem *parent, const QString &name, const QString &dirPath, const QString &path );
932 
933  bool rename( const QString &name ) override;
934 
935  private:
936 
937  QgsFavoritesItem *mFavorites = nullptr;
938 };
940 
941 #endif
942 
944 #endif // QGSDATAITEM_H
945 
946 
QgsDataItem::setIconName
void setIconName(const QString &iconName)
Definition: qgsdataitem.h:377
QgsLayerItem::TableLayer
@ TableLayer
Definition: qgsdataitem.h:512
SIP_PYNAME
#define SIP_PYNAME(name)
Definition: qgis_sip.h:81
QgsDataItem::mIconMap
QMap< QString, QIcon > mIconMap
Definition: qgsdataitem.h:420
QgsLayerItem::Point
@ Point
Definition: qgsdataitem.h:509
QgsLayerItem::Mesh
@ Mesh
Added in 3.2.
Definition: qgsdataitem.h:516
QgsDataItem::icon
virtual QIcon icon()
Definition: qgsdataitem.cpp:233
QgsDataItem::mIcon
QIcon mIcon
Definition: qgsdataitem.h:419
QgsDataCollectionItem
Definition: qgsdataitem.h:618
QgsDataItem::Favorites
@ Favorites
Represents a favorite item.
Definition: qgsdataitem.h:82
QgsDataCollectionItem::addChild
void addChild(QgsDataItem *item)
Definition: qgsdataitem.h:638
QgsDataItem::path
QString path() const
Definition: qgsdataitem.h:327
QgsZipItem::mZipFileList
QStringList mZipFileList
Definition: qgsdataitem.h:862
QgsDataItem::setIcon
void setIcon(const QIcon &icon)
Definition: qgsdataitem.h:376
QgsDataProvider
Definition: qgsdataprovider.h:41
QgsDataItem::mType
Type mType
Definition: qgsdataitem.h:405
QgsDataItem::capabilities2
virtual Capabilities capabilities2() const
Returns the capabilities for the data item.
Definition: qgsdataitem.h:283
QgsZipItem::mFilePath
QString mFilePath
Definition: qgsdataitem.h:860
QgsZipItem
Definition: qgsdataitem.h:855
crs
const QgsCoordinateReferenceSystem & crs
Definition: qgswfsgetfeature.cpp:105
QgsMapLayerType
QgsMapLayerType
Definition: qgsmaplayer.h:67
QgsDataItem::sortKey
virtual QVariant sortKey() const
Returns the sorting key for the item.
Definition: qgsdataitem.cpp:172
QgsLayerItem::NoType
@ NoType
Definition: qgsdataitem.h:506
QgsLayerItem::Vector
@ Vector
Definition: qgsdataitem.h:507
QgsDataItem::setToolTip
void setToolTip(const QString &msg)
Definition: qgsdataitem.h:379
QgsDirectoryItem::icon
QIcon icon() override
Definition: qgsdataitem.cpp:871
QgsBookmarkManager
Manages storage of a set of bookmarks.
Definition: qgsbookmarkmanager.h:144
QgsDataItem::name
QString name() const
Returns the name of the item (the displayed text for the item).
Definition: qgsdataitem.h:318
QgsDataItem::Error
@ Error
Definition: qgsdataitem.h:81
QgsDataItem::toolTip
QString toolTip() const
Definition: qgsdataitem.h:380
qgsmimedatautils.h
QgsDataItem::mSortKey
QVariant mSortKey
Custom sort key. If invalid, name() will be used for sorting instead.
Definition: qgsdataitem.h:423
QgsDataItem::mIconName
QString mIconName
Definition: qgsdataitem.h:418
QgsDataItem::Directory
@ Directory
Definition: qgsdataitem.h:79
QgsDataItem::mToolTip
QString mToolTip
Definition: qgsdataitem.h:417
QgsDataItem::equal
virtual bool equal(const QgsDataItem *other)
Returns true if this item is equal to another item (by testing item type and path).
Definition: qgsdataitem.cpp:567
SIP_TRANSFERBACK
#define SIP_TRANSFERBACK
Definition: qgis_sip.h:48
SIP_FACTORY
#define SIP_FACTORY
Definition: qgis_sip.h:76
QgsDirectoryItem::dirPath
QString dirPath() const
Returns the full path to the directory the item represents.
Definition: qgsdataitem.h:717
SIP_DEPRECATED
#define SIP_DEPRECATED
Definition: qgis_sip.h:106
Q_NOWARN_DEPRECATED_POP
#define Q_NOWARN_DEPRECATED_POP
Definition: qgis.h:752
SIP_CONVERT_TO_SUBCLASS_CODE
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
Definition: qgis_sip.h:172
QgsDataItem::mState
State mState
Definition: qgsdataitem.h:409
QgsZipItem::mVsiPrefix
QString mVsiPrefix
Definition: qgsdataitem.h:861
QgsDataItem::type
Type type() const
Definition: qgsdataitem.h:299
QgsDataItem::mimeUri
virtual QgsMimeDataUtils::Uri mimeUri() const
Returns mime URI for the data item.
Definition: qgsdataitem.h:236
SIP_SKIP
#define SIP_SKIP
Definition: qgis_sip.h:126
QgsDataItem::rename
virtual Q_DECL_DEPRECATED bool rename(const QString &name)
Sets a new name for the item, and returns true if the item was successfully renamed.
Definition: qgsdataitem.cpp:584
dataItem_t
QgsDataItem * dataItem_t(QString, QgsDataItem *)
Definition: qgsdataitem.h:42
QgsProjectItem
Definition: qgsdataitem.h:746
QgsDirectoryItem
Definition: qgsdataitem.h:671
QgsLayerItem::Database
@ Database
Definition: qgsdataitem.h:513
QgsDataItem::parent
QgsDataItem * parent() const
Gets item parent.
Definition: qgsdataitem.h:304
QgsLayerItem::Line
@ Line
Definition: qgsdataitem.h:510
QgsProjectItem::hasDragEnabled
bool hasDragEnabled() const override
Returns true if the item may be dragged.
Definition: qgsdataitem.h:760
QgsDataItem::paramWidget
virtual Q_DECL_DEPRECATED QWidget * paramWidget()
Returns source widget from data item for QgsBrowserPropertiesWidget.
Definition: qgsdataitem.h:172
qgsmaplayer.h
qgis_sip.h
SIP_TRANSFER
#define SIP_TRANSFER
Definition: qgis_sip.h:36
QgsDataItem::Collection
@ Collection
Definition: qgsdataitem.h:78
QgsDataItem::acceptDrop
virtual Q_DECL_DEPRECATED bool acceptDrop()
Returns whether the item accepts drag and dropped layers - e.g.
Definition: qgsdataitem.h:201
QgsDataItem::Capability
Capability
Definition: qgsdataitem.h:238
QgsDataItem::Populating
@ Populating
Creating children in separate thread (populating or refreshing)
Definition: qgsdataitem.h:123
QgsDataItem::Project
@ Project
Represents a QGIS project.
Definition: qgsdataitem.h:83
QgsDataItem::hasDragEnabled
virtual bool hasDragEnabled() const
Returns true if the item may be dragged.
Definition: qgsdataitem.h:228
QgsDataItem::mName
QString mName
Definition: qgsdataitem.h:410
QgsDataItem::Type
Type
Definition: qgsdataitem.h:76
QgsMimeDataUtils::Uri
Definition: qgsmimedatautils.h:40
qgsVsiPrefix
QString qgsVsiPrefix(const QString &path)
Definition: qgis.cpp:194
QgsDataItem::NotPopulated
@ NotPopulated
Children not yet created.
Definition: qgsdataitem.h:122
QgsLayerItem::Polygon
@ Polygon
Definition: qgsdataitem.h:511
QgsAnimatedIcon
Definition: qgsanimatedicon.h:30
QgsCoordinateReferenceSystem
Definition: qgscoordinatereferencesystem.h:206
QgsDataItem::setCapabilities
virtual void setCapabilities(Capabilities capabilities)
Sets the capabilities for the data item.
Definition: qgsdataitem.h:290
QgsZipItem::vsiPrefix
static QString vsiPrefix(const QString &uri)
Definition: qgsdataitem.h:878
QgsErrorItem
Definition: qgsdataitem.h:770
QgsDirectoryItem::mDirPath
QString mDirPath
Definition: qgsdataitem.h:734
QgsLayerItem::Plugin
@ Plugin
Added in 2.10.
Definition: qgsdataitem.h:515
QgsDataItem::mCapabilities
Capabilities mCapabilities
Definition: qgsdataitem.h:406
QgsDataItem::mPath
QString mPath
Definition: qgsdataitem.h:416
QgsLayerItem::comments
virtual QString comments() const
Returns comments of the layer.
Definition: qgsdataitem.h:565
QgsDataItem::mProviderKey
QString mProviderKey
Definition: qgsdataitem.h:411
QgsDataItem::setPath
void setPath(const QString &path)
Definition: qgsdataitem.h:328
QgsMapLayer
Definition: qgsmaplayer.h:81
QgsDataItem::mChildren
QVector< QgsDataItem * > mChildren
Definition: qgsdataitem.h:408
QgsDataItem::handleDrop
virtual Q_DECL_DEPRECATED bool handleDrop(const QMimeData *, Qt::DropAction)
Attempts to process the mime data dropped on this item.
Definition: qgsdataitem.h:211
QgsDataItem::Layer
@ Layer
Definition: qgsdataitem.h:80
QgsDataItem::setState
virtual void setState(State state)
Set item state.
Definition: qgsdataitem.cpp:594
QgsLayerItem::supportedCrs
QStringList supportedCrs() const
Returns the supported CRS.
Definition: qgsdataitem.h:553
QgsDataItem::children
QVector< QgsDataItem * > children() const
Definition: qgsdataitem.h:310
QgsLayerItem
Definition: qgsdataitem.h:499
QgsDirectoryParamWidget
Definition: qgsdataitem.h:789
QgsDataItem::deferredDelete
bool deferredDelete()
The item is scheduled to be deleted.
Definition: qgsdataitem.h:403
QgsDataItem::Custom
@ Custom
Custom item type.
Definition: qgsdataitem.h:84
QgsZipItem::sProviderNames
static QStringList sProviderNames
Definition: qgsdataitem.h:876
QgsLayerItem::Table
@ Table
Definition: qgsdataitem.h:514
QgsLayerItem::providerKey
QString providerKey() const
Returns provider key.
Definition: qgsdataitem.h:547
QgsFavoritesItem
Definition: qgsdataitem.h:808
QgsDataItem
Definition: qgsdataitem.h:49
Q_NOWARN_DEPRECATED_PUSH
#define Q_NOWARN_DEPRECATED_PUSH
Definition: qgis.h:751
QgsLayerItem::supportedFormats
QStringList supportedFormats() const
Returns the supported formats.
Definition: qgsdataitem.h:559
qgswkbtypes.h
SIP_END
#define SIP_END
Definition: qgis_sip.h:189
SIP_TRANSFERTHIS
#define SIP_TRANSFERTHIS
Definition: qgis_sip.h:53
qgscoordinatereferencesystem.h
QgsDataItem::State
State
Definition: qgsdataitem.h:120
QgsLayerItem::hasDragEnabled
bool hasDragEnabled() const override
Returns true if the item may be dragged.
Definition: qgsdataitem.h:528
QgsDataItem::createChildren
virtual QVector< QgsDataItem * > createChildren()
Create children.
Definition: qgsdataitem.cpp:255
QgsLayerItem::LayerType
LayerType
Definition: qgsdataitem.h:504
QgsLayerItem::Raster
@ Raster
Definition: qgsdataitem.h:508
QgsLayerItem::uri
QString uri() const
Returns layer uri or empty string if layer cannot be created.
Definition: qgsdataitem.h:544
QgsDataItem::childrenCreated
virtual void childrenCreated()
Definition: qgsdataitem.cpp:307