QGIS API Documentation 3.41.0-Master (cea29feecf2)
Loading...
Searching...
No Matches
qgsprojectitem.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsprojectitem.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 QGSPROJECTITEM_H
18#define QGSPROJECTITEM_H
19
20#include "qgis_sip.h"
21#include "qgis_core.h"
22#include "qgsdataitem.h"
23
28class CORE_EXPORT QgsProjectItem : public QgsDataItem
29{
30 Q_OBJECT
31 public:
32
40 QgsProjectItem( QgsDataItem *parent, const QString &name, const QString &path, const QString &providerKey = QString() );
41
42#ifdef SIP_RUN
43 SIP_PYOBJECT __repr__();
44 % MethodCode
45 QString str = QStringLiteral( "<QgsProjectItem: \"%1\" %2>" ).arg( sipCpp->name(), sipCpp->path() );
46 sipRes = PyUnicode_FromString( str.toUtf8().constData() );
47 % End
48#endif
49
50 bool hasDragEnabled() const override { return true; }
51
52 QgsMimeDataUtils::UriList mimeUris() const override;
53
54};
55
56#endif // QGSPROJECTITEM_H
57
58
Base class for all items in the model.
Definition qgsdataitem.h:46
virtual QgsMimeDataUtils::UriList mimeUris() const
Returns mime URIs for the data item, most data providers will only return a single URI but some data ...
QList< QgsMimeDataUtils::Uri > UriList
Data item that can be used to represent QGIS projects.
bool hasDragEnabled() const override
Returns true if the item may be dragged.