QgsMessageBar * messageBar() const
Returns the associated message bar.
virtual void populateContextMenu(QgsDataItem *item, QMenu *menu, const QList< QgsDataItem *> &selectedItems, QgsDataItemGuiContext context)
Called when the given context menu is being populated for the given item, allowing the provider to ad...
A bar for displaying non-blocking messages to the user.
virtual bool deleteLayer(QgsLayerItem *item, QgsDataItemGuiContext context)
Tries to permanently delete map layer representing the given item.
virtual bool acceptDrop(QgsDataItem *item, QgsDataItemGuiContext context)
Providers should return true if the drops are allowed (handleDrop() should be implemented in that cas...
Base class for all items in the model.
Encapsulates the context in which a QgsDataItem is shown within the application GUI.
virtual bool rename(QgsDataItem *item, const QString &name, QgsDataItemGuiContext context)
Sets a new name for the item, and returns true if the item was successfully renamed.
virtual bool handleDoubleClick(QgsDataItem *item, QgsDataItemGuiContext context)
Called when a user double clicks on an item.
void setMessageBar(QgsMessageBar *bar)
Sets the associated message bar.
virtual QWidget * createParamWidget(QgsDataItem *item, QgsDataItemGuiContext context)
Creates source widget from data item for QgsBrowserPropertiesWidget By default it returns nullptr...
Item that represents a layer that can be opened with one of the providers.
virtual bool handleDrop(QgsDataItem *item, QgsDataItemGuiContext context, const QMimeData *data, Qt::DropAction action)
Called when a user drops on an item.