|
QGIS API Documentation 4.1.0-Master (376402f9aeb)
|
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 settings' creation function. | |
| QgsMaterialSettingsWidget * | createWidget () override |
| Create a widget for configuring a material of this type. | |
| const QgsAbstractMaterial3DHandler * | handler () const |
| Returns the material settings' 3D handler. | |
| void | setHandler (QgsAbstractMaterial3DHandler *handler) |
| Sets the material settings' 3D handler. | |
| void | setWidgetFunction (QgsMaterialSettingsWidgetFunc function) |
| Sets the material settings' widget creation function. | |
| bool | supportsTechnique (Qgis::MaterialRenderingTechnique technique) const override |
Returns true if the material type supports the specified rendering technique. | |
| QgsMaterialSettingsWidgetFunc | widgetFunction () const |
| Returns the material settings' 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. | |
| virtual const QgsAbstractMaterial3DHandler * | material3DHandler () |
| Returns 3D handler relating to the material. | |
| 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 133 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 144 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 191 of file qgsmaterialregistry.h.
|
inline |
Returns the material settings' creation function.
Definition at line 161 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 193 of file qgsmaterialregistry.h.
|
inline |
Returns the material settings' 3D handler.
Definition at line 182 of file qgsmaterialregistry.h.
|
inline |
Sets the material settings' 3D handler.
Definition at line 189 of file qgsmaterialregistry.h.
|
inline |
Sets the material settings' widget creation function.
Definition at line 175 of file qgsmaterialregistry.h.
|
inlineoverridevirtual |
Returns true if the material type supports the specified rendering technique.
Implements QgsMaterialSettingsAbstractMetadata.
Definition at line 192 of file qgsmaterialregistry.h.
|
inline |
Returns the material settings' widget creation function.
Definition at line 168 of file qgsmaterialregistry.h.