QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Go to the documentation of this file.
17 #ifndef QGSDIRECTORYITEM_H
18 #define QGSDIRECTORYITEM_H
21 #include "qgis_core.h"
24 #include <QTreeWidget>
26 class QFileSystemWatcher;
73 SIP_PYOBJECT __repr__();
75 QString
str = QStringLiteral(
"<QgsDirectoryItem: %1 - %2>" ).arg( sipCpp->dirPath(), sipCpp->path() );
76 sipRes = PyUnicode_FromString(
str.toUtf8().constData() );
86 QString
dirPath()
const {
return mDirPath; }
89 QIcon
icon()
override;
99 QColor iconColor()
const;
112 void setIconColor(
const QColor &color );
121 static void setCustomColor(
const QString &directory,
const QColor &color );
124 bool hasDragEnabled()
const override {
return true; }
128 static bool hiddenPath(
const QString &path );
161 static bool pathShouldByMonitoredByDefault(
const QString &path );
196 void reevaluateMonitoring()
SIP_SKIP;
199 void childrenCreated() override;
200 void directoryChanged();
209 void createOrDestroyFileSystemWatcher();
211 Qgis::BrowserDirectoryMonitoring mMonitoring =
Qgis::BrowserDirectoryMonitoring::Default;
212 bool mMonitored = true;
213 QFileSystemWatcher *mFileSystemWatcher =
nullptr;
214 bool mRefreshLater = false;
218 friend class TestQgsDataItem;
239 void mousePressEvent( QMouseEvent *event )
override;
242 void showHideColumn();
265 QIcon
icon()
override;
266 QVariant
sortKey()
const override;
272 #endif // QGSDATAITEM_H
A Collection: logical collection of layers or subcollections, e.g. GRASS location/mapset,...
BrowserItemState
Browser item states.
virtual QVariant sortKey() const
Returns the sorting key for the item.
A directory item showing the current project directory.
QList< QgsMimeDataUtils::Uri > UriList
virtual bool equal(const QgsDataItem *other)
Returns true if this item is equal to another item (by testing item type and path).
QString dirPath() const
Returns the full path to the directory the item represents.
A directory: contains subdirectories and layers.
virtual Q_DECL_DEPRECATED QWidget * paramWidget()
Returns source widget from data item for QgsBrowserPropertiesWidget.
virtual void setState(Qgis::BrowserItemState state)
Set item state.
BrowserDirectoryMonitoring
Browser directory item monitoring switches.
The Qgis class provides global constants for use throughout the application.
virtual QgsMimeDataUtils::UriList mimeUris() const
Returns mime URIs for the data item, most data providers will only return a single URI but some data ...
Base class for all items in the model.
bool isMonitored() const
Returns true if the directory is currently being monitored for changes and the item auto-refreshed wh...
virtual QVector< QgsDataItem * > createChildren()
Create children.