pqMaterialEditor is a widget that can be used to edit the OSPRay materials. More...
#include <pqMaterialEditor.h>
Inherits QWidget.
Public Types | |
enum | ExtendedItemDataRole { ExtendedItemDataRole::PropertyValue = Qt::UserRole + 1 } |
Strong type extension of the existing Qt::ItemDataRole. More... | |
Public Member Functions | |
pqMaterialEditor (QWidget *parent=nullptr, QDockWidget *dockWidget=nullptr) | |
~pqMaterialEditor () override | |
void | updateMaterialList () |
Clear the editor and fill the editor with the current created materials. More... | |
QString | currentMaterialName () |
Return the name of the current selected material. More... | |
std::vector< std::string > | availableParameters () |
Return the list of the available OSPRay parameters for the current material. More... | |
Protected Slots | |
void | updateCurrentMaterial (const std::string &) |
void | updateCurrentMaterialWithIndex (int index) |
void | loadMaterials () |
void | addMaterial () |
void | removeMaterial () |
void | attachMaterial () |
void | saveMaterials () |
void | addProperty () |
void | propertyChanged (const QModelIndex &topLeft, const QModelIndex &bottomRight) |
Protected Member Functions | |
std::string | generateValidMaterialName (const std::string &name) |
Return a unique material name given a desired name. More... | |
void | showEvent (QShowEvent *event) override |
Overriden to warn user when material editor is not usable. More... | |
Friends | |
class | pqInternals |
pqMaterialEditor is a widget that can be used to edit the OSPRay materials.
This widget allows you to create or remove an OSPRay material. Then, you can customize this material by adding or removing properties, such as the color, the roughness, the textures... depending on the available properties that you can see in vtkOSPRayMaterialLibrary. Texture format supported are *.png, *.jpg, *.bmp and *.ppm.
Definition at line 26 of file pqMaterialEditor.h.
|
strong |
Strong type extension of the existing Qt::ItemDataRole.
This is used to store the QVariant value for the properties
Enumerator | |
---|---|
PropertyValue |
Definition at line 54 of file pqMaterialEditor.h.
pqMaterialEditor::pqMaterialEditor | ( | QWidget * | parent = nullptr , |
QDockWidget * | dockWidget = nullptr |
||
) |
|
override |
void pqMaterialEditor::updateMaterialList | ( | ) |
Clear the editor and fill the editor with the current created materials.
QString pqMaterialEditor::currentMaterialName | ( | ) |
Return the name of the current selected material.
std::vector<std::string> pqMaterialEditor::availableParameters | ( | ) |
Return the list of the available OSPRay parameters for the current material.
|
protectedslot |
|
protectedslot |
|
protectedslot |
|
protectedslot |
|
protectedslot |
|
protectedslot |
|
protectedslot |
|
protectedslot |
|
protectedslot |
|
protected |
Return a unique material name given a desired name.
Checks for all the already existing materials and if one has the same name, this function appends the suffix _X
where X
is the next unique integer identifier.
|
overrideprotected |
Overriden to warn user when material editor is not usable.
|
friend |
Definition at line 93 of file pqMaterialEditor.h.