17#ifndef QGSFAVORITESITEM_H
18#define QGSFAVORITESITEM_H
44 SIP_PYOBJECT __repr__();
46 QString
str = QStringLiteral(
"<QgsFavoritesItem: \"%1\">" ).arg( sipCpp->name() );
47 sipRes = PyUnicode_FromString(
str.toUtf8().constData() );
61 void addDirectory(
const QString &directory,
const QString &name = QString() );
72 void renameFavorite(
const QString &path,
const QString &name );
75 static QIcon iconFavorites();
77 QVariant
sortKey()
const override;
80 QVector<QgsDataItem *>
createChildren(
const QString &directory,
const QString &name );
114 bool rename(
const QString &name )
override;
A Collection: logical collection of layers or subcollections, e.g.
Base class for all items in the model.
virtual QVariant sortKey() const
Returns the sorting key for the item.
virtual QVector< QgsDataItem * > createChildren()
Create children.
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.
A directory: contains subdirectories and layers.
A directory item showing the a single favorite directory.
Contains various Favorites directories.
#define Q_NOWARN_DEPRECATED_POP
#define Q_NOWARN_DEPRECATED_PUSH