QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
core
browser
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_core.h"
21
#include "
qgis_sip.h
"
22
#include "
qgsdataitem.h
"
23
24
#include <QString>
25
26
using namespace
Qt::StringLiterals;
27
32
class
CORE_EXPORT
QgsProjectItem
:
public
QgsDataItem
33
{
34
Q_OBJECT
35
public
:
43
QgsProjectItem
(
QgsDataItem
*
parent
,
const
QString &
name
,
const
QString &
path
,
const
QString &
providerKey
= QString() );
44
45
#ifdef SIP_RUN
46
// clang-format off
47
SIP_PYOBJECT __repr__();
48
% MethodCode
49
QString str = u
"<QgsProjectItem: \"%1\" %2>"
_s.arg( sipCpp->name(), sipCpp->path() );
50
sipRes = PyUnicode_FromString( str.toUtf8().constData() );
51
% End
52
// clang-format on
53
#endif
54
55
bool
hasDragEnabled
()
const override
56
{
57
return
true
;
58
}
59
60
QgsMimeDataUtils::UriList
mimeUris
()
const override
;
61
};
62
63
#endif
// QGSPROJECTITEM_H
QgsDataItem::QgsDataItem
QgsDataItem(Qgis::BrowserItemType type, QgsDataItem *parent, const QString &name, const QString &path, const QString &providerKey=QString())
Constructor for QgsDataItem, with the specified parent item.
Definition
qgsdataitem.cpp:63
QgsDataItem::name
QString name() const
Returns the name of the item (the displayed text for the item).
Definition
qgsdataitem.h:406
QgsDataItem::path
QString path() const
Definition
qgsdataitem.h:415
QgsDataItem::parent
QgsDataItem * parent() const
Gets item parent.
Definition
qgsdataitem.h:379
QgsDataItem::mimeUris
virtual QgsMimeDataUtils::UriList mimeUris() const
Returns mime URIs for the data item, most data providers will only return a single URI but some data ...
Definition
qgsdataitem.cpp:550
QgsDataItem::providerKey
QString providerKey() const
Returns the provider key that created this item (e.g.
Definition
qgsdataitem.cpp:398
QgsMimeDataUtils::UriList
QList< QgsMimeDataUtils::Uri > UriList
Definition
qgsmimedatautils.h:246
QgsProjectItem::QgsProjectItem
QgsProjectItem(QgsDataItem *parent, const QString &name, const QString &path, const QString &providerKey=QString())
A data item holding a reference to a QGIS project file.
Definition
qgsprojectitem.cpp:27
QgsProjectItem::hasDragEnabled
bool hasDragEnabled() const override
Returns true if the item may be dragged.
Definition
qgsprojectitem.h:55
qgis_sip.h
qgsdataitem.h
Generated on
for QGIS API Documentation by
1.17.0