17#ifndef QGSFAVORITESITEM_H
18#define QGSFAVORITESITEM_H
43 SIP_PYOBJECT __repr__();
45 QString str = QStringLiteral(
"<QgsFavoritesItem: \"%1\">" ).arg( sipCpp->name() );
46 sipRes = PyUnicode_FromString( str.toUtf8().constData() );
60 void addDirectory(
const QString &directory,
const QString &name = QString() );
71 void renameFavorite(
const QString &path,
const QString &name );
74 static QIcon iconFavorites();
76 QVariant
sortKey()
const override;
79 QVector<QgsDataItem *>
createChildren(
const QString &directory,
const QString &name );
112 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