QGIS API Documentation  3.16.0-Hannover (43b64b13f3)
Public Member Functions | List of all members
QgsMaterialSettingsAbstractMetadata Class Referenceabstract

Stores metadata about one 3D material settings class. More...

#include <qgsmaterialregistry.h>

Inheritance diagram for QgsMaterialSettingsAbstractMetadata:
Inheritance graph
[legend]

Public Member Functions

 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 QgsAbstractMaterialSettingscreate ()=0
 Creates a new instance of this material settings type. More...
 
virtual QgsMaterialSettingsWidgetcreateWidget ()
 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...
 

Detailed Description

Stores metadata about one 3D material settings class.

Note
It's necessary to implement createMaterialSettings() function. In C++ you can use QgsMaterialSettingsMetadata convenience class.
Since
QGIS 3.16

Definition at line 40 of file qgsmaterialregistry.h.

Constructor & Destructor Documentation

◆ QgsMaterialSettingsAbstractMetadata()

QgsMaterialSettingsAbstractMetadata::QgsMaterialSettingsAbstractMetadata ( const QString &  type,
const QString &  visibleName,
const QIcon &  icon = QIcon() 
)
inline

Constructor for QgsMaterialSettingsAbstractMetadata, with the specified type and visibleName.

An optional icon can be specified to represent the material type.

Definition at line 49 of file qgsmaterialregistry.h.

◆ ~QgsMaterialSettingsAbstractMetadata()

virtual QgsMaterialSettingsAbstractMetadata::~QgsMaterialSettingsAbstractMetadata ( )
virtualdefault

Member Function Documentation

◆ create()

virtual QgsAbstractMaterialSettings* QgsMaterialSettingsAbstractMetadata::create ( )
pure virtual

Creates a new instance of this material settings type.

Caller takes ownership of the returned object.

Implemented in QgsMaterialSettingsMetadata.

◆ createWidget()

virtual QgsMaterialSettingsWidget* QgsMaterialSettingsAbstractMetadata::createWidget ( )
inlinevirtual

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 in QgsMaterialSettingsMetadata.

Definition at line 93 of file qgsmaterialregistry.h.

◆ icon()

QIcon QgsMaterialSettingsAbstractMetadata::icon ( ) const
inline

Returns an icon representing the material type, if available.

Definition at line 70 of file qgsmaterialregistry.h.

◆ supportsTechnique()

virtual bool QgsMaterialSettingsAbstractMetadata::supportsTechnique ( QgsMaterialSettingsRenderingTechnique  technique) const
pure virtual

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

Implemented in QgsMaterialSettingsMetadata.

◆ type()

QString QgsMaterialSettingsAbstractMetadata::type ( ) const
inline

Returns the unique material type string.

Definition at line 60 of file qgsmaterialregistry.h.

◆ visibleName()

QString QgsMaterialSettingsAbstractMetadata::visibleName ( ) const
inline

Returns the material's visible (translated) name.

Definition at line 65 of file qgsmaterialregistry.h.


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