QGIS API Documentation 3.27.0-Master (0a97e3138f)
qgsdatacollectionitem.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsdatacollectionitem.h
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 QGSDATACOLLECTIONITEM_H
18#define QGSDATACOLLECTIONITEM_H
19
20#include "qgis_sip.h"
21#include "qgis_core.h"
22#include "qgsdataitem.h"
23
28class CORE_EXPORT QgsDataCollectionItem : public QgsDataItem
29{
30 Q_OBJECT
31 public:
32
44 QgsDataCollectionItem( QgsDataItem *parent SIP_TRANSFERTHIS, const QString &name, const QString &path = QString(), const QString &providerKey = QString() );
45
46 ~QgsDataCollectionItem() override;
47
48#ifdef SIP_RUN
49 SIP_PYOBJECT __repr__();
50 % MethodCode
51 QString str = QStringLiteral( "<QgsDataCollectionItem: \"%1\" %2>" ).arg( sipCpp->name(), sipCpp->path() );
52 sipRes = PyUnicode_FromString( str.toUtf8().constData() );
53 % End
54#endif
55
56 void addChild( QgsDataItem *item SIP_TRANSFER ) { mChildren.append( item ); }
57
66 static QIcon iconDir( const QColor &fillColor = QColor(), const QColor &strokeColor = QColor() );
67
72 static QIcon iconDataCollection();
73
75
76 protected:
77
86 static QIcon openDirIcon( const QColor &fillColor = QColor(), const QColor &strokeColor = QColor() );
87
96 static QIcon homeDirIcon( const QColor &fillColor = QColor(), const QColor &strokeColor = QColor() );
97
98};
99
100
101#endif // QGSDATAITEM_H
102
103
The QgsAbstractDatabaseProviderConnection class provides common functionality for DB based connection...
A Collection: logical collection of layers or subcollections, e.g.
void addChild(QgsDataItem *item)
Base class for all items in the model.
Definition: qgsdataitem.h:46
virtual QgsAbstractDatabaseProviderConnection * databaseConnection() const
For data items that represent a DB connection or one of its children, this method returns a connectio...
#define str(x)
Definition: qgis.cpp:37
#define SIP_TRANSFERTHIS
Definition: qgis_sip.h:53
#define SIP_TRANSFER
Definition: qgis_sip.h:36