QGIS API Documentation 3.28.0-Firenze (ed3ad0430f)
|
Convenience metadata class that uses static functions to create a 3D material settings object and its widget. More...
#include <qgsmaterialregistry.h>
Public Member Functions | |
QgsMaterialSettingsMetadata (const QString &type, const QString &visibleName, QgsMaterialSettingsCreateFunc pfCreate, QgsMaterialSettingsSupportsTechniqueFunc pfSupportsTechnique, QgsMaterialSettingsWidgetFunc pfWidget=nullptr, const QIcon &icon=QIcon()) | |
Constructor for QgsMaterialSettingsMetadata, with the specified type and visibleName. More... | |
QgsAbstractMaterialSettings * | create () override |
Creates a new instance of this material settings type. More... | |
QgsMaterialSettingsCreateFunc | createFunction () const |
Returns the material setting's creation function. More... | |
QgsMaterialSettingsWidget * | createWidget () override |
Create a widget for configuring a material of this type. More... | |
void | setWidgetFunction (QgsMaterialSettingsWidgetFunc function) |
Sets the material settings's widget creation function. More... | |
bool | supportsTechnique (QgsMaterialSettingsRenderingTechnique technique) const override |
Returns true if the material type supports the specified rendering technique. More... | |
QgsMaterialSettingsWidgetFunc | widgetFunction () const |
Returns the material settings's widget creation function. More... | |
Public Member Functions inherited from QgsMaterialSettingsAbstractMetadata | |
QgsMaterialSettingsAbstractMetadata (const QString &type, const QString &visibleName, const QIcon &icon=QIcon()) | |
Constructor for QgsMaterialSettingsAbstractMetadata, with the specified type and visibleName. More... | |
virtual | ~QgsMaterialSettingsAbstractMetadata ()=default |
virtual QgsAbstractMaterialSettings * | create ()=0 |
Creates a new instance of this material settings type. More... | |
virtual QgsMaterialSettingsWidget * | createWidget () |
Create a widget for configuring a material of this type. More... | |
QIcon | icon () const |
Returns an icon representing the material type, if available. More... | |
virtual bool | supportsTechnique (QgsMaterialSettingsRenderingTechnique technique) const =0 |
Returns true if the material type supports the specified rendering technique. More... | |
QString | type () const |
Returns the unique material type string. More... | |
QString | visibleName () const |
Returns the material's visible (translated) name. More... | |
Convenience metadata class that uses static functions to create a 3D material settings object and its widget.
Definition at line 121 of file qgsmaterialregistry.h.
|
inline |
Constructor for QgsMaterialSettingsMetadata, with the specified type and visibleName.
The pfCreate, pfSupportsTechnique and pfWidget arguments are used to specify static functions for creating the material settings type and configuration widget.
An optional icon can be specified to represent the material type.
Definition at line 133 of file qgsmaterialregistry.h.
|
inlineoverridevirtual |
Creates a new instance of this material settings type.
Caller takes ownership of the returned object.
Implements QgsMaterialSettingsAbstractMetadata.
Definition at line 163 of file qgsmaterialregistry.h.
|
inline |
Returns the material setting's creation function.
Definition at line 147 of file qgsmaterialregistry.h.
|
inlineoverridevirtual |
Create a widget for configuring a material of this type.
Can return nullptr
if there's no GUI.
Reimplemented from QgsMaterialSettingsAbstractMetadata.
Definition at line 165 of file qgsmaterialregistry.h.
|
inline |
Sets the material settings's widget creation function.
Definition at line 161 of file qgsmaterialregistry.h.
|
inlineoverridevirtual |
Returns true
if the material type supports the specified rendering technique.
Implements QgsMaterialSettingsAbstractMetadata.
Definition at line 164 of file qgsmaterialregistry.h.
|
inline |
Returns the material settings's widget creation function.
Definition at line 154 of file qgsmaterialregistry.h.