QGIS API Documentation 3.28.0-Firenze (ed3ad0430f)
Public Member Functions | List of all members
QgsMaterialSettingsMetadata Class Reference

Convenience metadata class that uses static functions to create a 3D material settings object and its widget. More...

#include <qgsmaterialregistry.h>

Inheritance diagram for QgsMaterialSettingsMetadata:
Inheritance graph
[legend]

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...
 
QgsAbstractMaterialSettingscreate () override
 Creates a new instance of this material settings type. More...
 
QgsMaterialSettingsCreateFunc createFunction () const
 Returns the material setting's creation function. More...
 
QgsMaterialSettingsWidgetcreateWidget () 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...
 

Detailed Description

Convenience metadata class that uses static functions to create a 3D material settings object and its widget.

Note
Not available in Python bindings.
Since
QGIS 3.16

Definition at line 121 of file qgsmaterialregistry.h.

Constructor & Destructor Documentation

◆ QgsMaterialSettingsMetadata()

QgsMaterialSettingsMetadata::QgsMaterialSettingsMetadata ( const QString &  type,
const QString &  visibleName,
QgsMaterialSettingsCreateFunc  pfCreate,
QgsMaterialSettingsSupportsTechniqueFunc  pfSupportsTechnique,
QgsMaterialSettingsWidgetFunc  pfWidget = nullptr,
const QIcon &  icon = QIcon() 
)
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.

Member Function Documentation

◆ create()

QgsAbstractMaterialSettings * QgsMaterialSettingsMetadata::create ( )
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.

◆ createFunction()

QgsMaterialSettingsCreateFunc QgsMaterialSettingsMetadata::createFunction ( ) const
inline

Returns the material setting's creation function.

Definition at line 147 of file qgsmaterialregistry.h.

◆ createWidget()

QgsMaterialSettingsWidget * QgsMaterialSettingsMetadata::createWidget ( )
inlineoverridevirtual

Create a widget for configuring a material of this type.

Can return nullptr if there's no GUI.

Note
Not available in Python bindings

Reimplemented from QgsMaterialSettingsAbstractMetadata.

Definition at line 165 of file qgsmaterialregistry.h.

◆ setWidgetFunction()

void QgsMaterialSettingsMetadata::setWidgetFunction ( QgsMaterialSettingsWidgetFunc  function)
inline

Sets the material settings's widget creation function.

See also
widgetFunction()

Definition at line 161 of file qgsmaterialregistry.h.

◆ supportsTechnique()

bool QgsMaterialSettingsMetadata::supportsTechnique ( QgsMaterialSettingsRenderingTechnique  technique) const
inlineoverridevirtual

Returns true if the material type supports the specified rendering technique.

Implements QgsMaterialSettingsAbstractMetadata.

Definition at line 164 of file qgsmaterialregistry.h.

◆ widgetFunction()

QgsMaterialSettingsWidgetFunc QgsMaterialSettingsMetadata::widgetFunction ( ) const
inline

Returns the material settings's widget creation function.

See also
setWidgetFunction()

Definition at line 154 of file qgsmaterialregistry.h.


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