|
QGIS API Documentation 4.3.0-Master (d583d975f4e)
|
Registry of available 3d material settings classes. More...
#include <qgsmaterialregistry.h>
Public Member Functions | |
| QgsMaterialRegistry () | |
| QgsMaterialRegistry (const QgsMaterialRegistry &rh)=delete | |
| ~QgsMaterialRegistry () | |
| bool | addMaterialSettingsType (QgsMaterialSettingsAbstractMetadata *metadata) |
| Registers a new material settings type. Takes ownership of the metadata instance. | |
| std::unique_ptr< QgsAbstractMaterialSettings > | createMaterialSettings (const QString &type) const |
| Creates a new instance of the material settings of the specified type. | |
| QgsMaterialSettingsAbstractMetadata * | materialSettingsMetadata (const QString &type) const |
Returns metadata for specified material settings type. Returns nullptr if not found. | |
| QStringList | materialSettingsTypes () const |
| Returns a list of all available material settings types. | |
| QgsMaterialRegistry & | operator= (const QgsMaterialRegistry &rh)=delete |
| bool | populate () |
| Populates the registry with standard material types. | |
Registry of available 3d material settings classes.
QgsMaterialRegistry is not usually directly created, but rather accessed through QgsApplication::materialRegistry().
Definition at line 213 of file qgsmaterialregistry.h.
| QgsMaterialRegistry::QgsMaterialRegistry | ( | ) |
Definition at line 33 of file qgsmaterialregistry.cpp.
| QgsMaterialRegistry::~QgsMaterialRegistry | ( | ) |
Definition at line 36 of file qgsmaterialregistry.cpp.
|
delete |
| bool QgsMaterialRegistry::addMaterialSettingsType | ( | QgsMaterialSettingsAbstractMetadata * | metadata | ) |
Registers a new material settings type. Takes ownership of the metadata instance.
Definition at line 80 of file qgsmaterialregistry.cpp.
| std::unique_ptr< QgsAbstractMaterialSettings > QgsMaterialRegistry::createMaterialSettings | ( | const QString & | type | ) | const |
Creates a new instance of the material settings of the specified type.
The caller takes ownership of the returned object.
Returns nullptr if the specified type is not found in the registry.
Definition at line 90 of file qgsmaterialregistry.cpp.
| QgsMaterialSettingsAbstractMetadata * QgsMaterialRegistry::materialSettingsMetadata | ( | const QString & | type | ) | const |
Returns metadata for specified material settings type. Returns nullptr if not found.
Definition at line 98 of file qgsmaterialregistry.cpp.
| QStringList QgsMaterialRegistry::materialSettingsTypes | ( | ) | const |
Returns a list of all available material settings types.
Definition at line 103 of file qgsmaterialregistry.cpp.
|
delete |
| bool QgsMaterialRegistry::populate | ( | ) |
Populates the registry with standard material types.
If called on a non-empty registry then this will have no effect and will return false.
Definition at line 41 of file qgsmaterialregistry.cpp.