QGIS API Documentation 3.41.0-Master (fda2aa46e9a)
|
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. | |
QgsAbstractMaterialSettings * | create () override |
Creates a new instance of this material settings type. | |
QgsMaterialSettingsCreateFunc | createFunction () const |
Returns the material setting's creation function. | |
QgsMaterialSettingsWidget * | createWidget () override |
Create a widget for configuring a material of this type. | |
void | setWidgetFunction (QgsMaterialSettingsWidgetFunc function) |
Sets the material settings's widget creation function. | |
bool | supportsTechnique (QgsMaterialSettingsRenderingTechnique technique) const override |
Returns true if the material type supports the specified rendering technique. | |
QgsMaterialSettingsWidgetFunc | widgetFunction () const |
Returns the material settings's widget creation function. | |
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. | |
virtual | ~QgsMaterialSettingsAbstractMetadata ()=default |
QIcon | icon () const |
Returns an icon representing the material type, if available. | |
QString | type () const |
Returns the unique material type string. | |
QString | visibleName () const |
Returns the material's visible (translated) name. | |
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.