QGIS API Documentation 3.30.0-'s-Hertogenbosch (f186b8efe0)
|
Factory class for creating custom map layer property pages. More...
#include <qgsmaplayerconfigwidgetfactory.h>
Public Types | |
enum class | ParentPage : int { NoParent , Temporal } |
Available parent pages, for factories which create a widget which is a sub-component of a standard page. More... | |
Public Member Functions | |
QgsMapLayerConfigWidgetFactory ()=default | |
Constructor. More... | |
QgsMapLayerConfigWidgetFactory (const QString &title, const QIcon &icon) | |
Constructor. More... | |
virtual | ~QgsMapLayerConfigWidgetFactory ()=default |
virtual QgsMapLayerConfigWidget * | createWidget (QgsMapLayer *layer, QgsMapCanvas *canvas, bool dockWidget=true, QWidget *parent=nullptr) const =0 |
Factory function to create the widget on demand as needed by the dock. More... | |
virtual QIcon | icon () const |
The icon that will be shown in the UI for the panel. More... | |
virtual QString | layerPropertiesPagePositionHint () const |
Returns a tab name hinting at where this page should be inserted into the layer properties tab list. More... | |
virtual ParentPage | parentPage () const |
Returns the associated parent page, for factories which create sub-components of a standard page. More... | |
void | setIcon (const QIcon &icon) |
Set the icon for the factory object. More... | |
void | setSupportLayerPropertiesDialog (bool supports) |
Set support flag for style dock. More... | |
void | setSupportsStyleDock (bool supports) |
Set support flag for style dock. More... | |
void | setTitle (const QString &title) |
Set the title for the interface. More... | |
virtual bool | supportLayerPropertiesDialog () const |
Flag if widget is supported for use in layer properties dialog. More... | |
virtual bool | supportsLayer (QgsMapLayer *layer) const |
Check if the layer is supported for this widget. More... | |
virtual bool | supportsLayerTreeGroup (QgsLayerTreeGroup *group) const |
Check if a layer tree group is supported for this widget. More... | |
virtual bool | supportsStyleDock () const |
Flag if widget is supported for use in style dock. More... | |
virtual QString | title () const |
The title of the panel. More... | |
Factory class for creating custom map layer property pages.
Definition at line 34 of file qgsmaplayerconfigwidgetfactory.h.
|
strong |
Available parent pages, for factories which create a widget which is a sub-component of a standard page.
Enumerator | |
---|---|
NoParent | Factory creates pages itself, not sub-components. |
Temporal | Factory creates sub-components of the temporal properties page (only supported for raster layer temporal properties) |
Definition at line 44 of file qgsmaplayerconfigwidgetfactory.h.
|
default |
Constructor.
QgsMapLayerConfigWidgetFactory::QgsMapLayerConfigWidgetFactory | ( | const QString & | title, |
const QIcon & | icon | ||
) |
Constructor.
Definition at line 18 of file qgsmaplayerconfigwidgetfactory.cpp.
|
virtualdefault |
|
pure virtual |
Factory function to create the widget on demand as needed by the dock.
layer | The active layer in the dock. |
canvas | The map canvas. |
dockWidget | true of the widget will be shown a dock style widget. |
parent | The parent of the widget. |
|
inlinevirtual |
The icon that will be shown in the UI for the panel.
Definition at line 62 of file qgsmaplayerconfigwidgetfactory.h.
|
virtual |
Returns a tab name hinting at where this page should be inserted into the layer properties tab list.
If the returned string is non-empty, the config widget page will be inserted before the existing page with matching object name.
The default implementation returns an empty string, which causes the widget to be placed at the end of the dialog page list.
Definition at line 24 of file qgsmaplayerconfigwidgetfactory.cpp.
|
virtual |
Returns the associated parent page, for factories which create sub-components of a standard page.
The default implementation returns QgsMapLayerConfigWidgetFactory::ParentPage::NoParent, indicating that the factory creates top-level pages which are not subcomponents.
Definition at line 40 of file qgsmaplayerconfigwidgetfactory.cpp.
|
inline |
Set the icon for the factory object.
icon | The icon to show in the interface. |
Definition at line 68 of file qgsmaplayerconfigwidgetfactory.h.
|
inline |
Set support flag for style dock.
supports | true if this widget is supported in the style dock. |
Definition at line 123 of file qgsmaplayerconfigwidgetfactory.h.
|
inline |
Set support flag for style dock.
supports | true if this widget is supported in the style dock. |
Definition at line 96 of file qgsmaplayerconfigwidgetfactory.h.
|
inline |
Set the title for the interface.
title | The title to set. |
Definition at line 83 of file qgsmaplayerconfigwidgetfactory.h.
|
inlinevirtual |
Flag if widget is supported for use in layer properties dialog.
The default implementation returns false
.
true
if supported Definition at line 103 of file qgsmaplayerconfigwidgetfactory.h.
|
virtual |
Check if the layer is supported for this widget.
true
if this layer is supported for this widget Definition at line 29 of file qgsmaplayerconfigwidgetfactory.cpp.
|
virtual |
Check if a layer tree group is supported for this widget.
true
if the group is supported for this widget Definition at line 35 of file qgsmaplayerconfigwidgetfactory.cpp.
|
inlinevirtual |
Flag if widget is supported for use in style dock.
The default implementation returns false
.
true
if supported Definition at line 90 of file qgsmaplayerconfigwidgetfactory.h.
|
inlinevirtual |
The title of the panel.
Definition at line 75 of file qgsmaplayerconfigwidgetfactory.h.