QGIS API Documentation 3.99.0-Master (2fe06baccd8)
Loading...
Searching...
No Matches
QgsDataItemGuiContext Class Reference

Encapsulates the context in which a QgsDataItem is shown within the application GUI. More...

#include <qgsdataitemguiprovider.h>

Public Member Functions

 QgsDataItemGuiContext ()=default
QgsMapCanvasmapCanvas () const
 Returns the map canvas associated with the item.
QgsMessageBarmessageBar () const
 Returns the associated message bar.
void setMapCanvas (QgsMapCanvas *canvas)
 Sets the map canvas associated with the data item.
void setMessageBar (QgsMessageBar *bar)
 Sets the associated message bar.
void setView (QgsBrowserTreeView *view)
 Sets the associated view.
QgsBrowserTreeViewview () const
 Returns the associated view.

Detailed Description

Encapsulates the context in which a QgsDataItem is shown within the application GUI.

Since
QGIS 3.6

Definition at line 43 of file qgsdataitemguiprovider.h.

Constructor & Destructor Documentation

◆ QgsDataItemGuiContext()

QgsDataItemGuiContext::QgsDataItemGuiContext ( )
default

Member Function Documentation

◆ mapCanvas()

QgsMapCanvas * QgsDataItemGuiContext::mapCanvas ( ) const

Returns the map canvas associated with the item.

See also
setMapCanvas()
Since
QGIS 3.44

Definition at line 45 of file qgsdataitemguiprovider.cpp.

◆ messageBar()

QgsMessageBar * QgsDataItemGuiContext::messageBar ( ) const

Returns the associated message bar.

This bar can be used to provide non-blocking feedback to users.

See also
setMessageBar()

Definition at line 30 of file qgsdataitemguiprovider.cpp.

◆ setMapCanvas()

void QgsDataItemGuiContext::setMapCanvas ( QgsMapCanvas * canvas)

Sets the map canvas associated with the data item.

This allows the item to retrieve the current map scale and other properties from the canvas.

See also
mapCanvas()
Since
QGIS 3.44

Definition at line 40 of file qgsdataitemguiprovider.cpp.

◆ setMessageBar()

void QgsDataItemGuiContext::setMessageBar ( QgsMessageBar * bar)

Sets the associated message bar.

This bar can be used to provide non-blocking feedback to users.

See also
messageBar()

Definition at line 35 of file qgsdataitemguiprovider.cpp.

◆ setView()

void QgsDataItemGuiContext::setView ( QgsBrowserTreeView * view)

Sets the associated view.

See also
view()
Since
QGIS 3.28

Definition at line 55 of file qgsdataitemguiprovider.cpp.

◆ view()

QgsBrowserTreeView * QgsDataItemGuiContext::view ( ) const

Returns the associated view.

See also
setView()
Since
QGIS 3.28

Definition at line 50 of file qgsdataitemguiprovider.cpp.


The documentation for this class was generated from the following files: