Version: 9.12.0
GEOMToolsGUI_MaterialPropertiesDlg Class Reference

GEOM material properties dialog box class. More...

#include <GEOMToolsGUI_MaterialPropertiesDlg.h>

Inheritance diagram for GEOMToolsGUI_MaterialPropertiesDlg:
Inheritance graph

Classes

struct  Reflection
 

Signals

void changed ()
 

Public Member Functions

 GEOMToolsGUI_MaterialPropertiesDlg (QWidget *=0, bool=true, bool=false, const int=Standard)
 Constructor. More...
 
 ~GEOMToolsGUI_MaterialPropertiesDlg ()
 Destructor. More...
 
void accept ()
 Called when "OK" button is clicked. More...
 
bool eventFilter (QObject *, QEvent *)
 Event filter. More...
 

Private Types

enum  { Current , Global , User }
 
enum  { TypeRole = Qt::UserRole + 123 , NameRole }
 

Private Slots

void onChanged ()
 Called when any material parameter is changed by the user. More...
 
void onMaterialChanged ()
 Called when user selects any material item in the materials list. More...
 
void onItemChanged (QListWidgetItem *)
 Called when user material is renamed by the user. More...
 
void onContextMenu (QContextMenuEvent *)
 Process context menu event from materials list. More...
 
void onDeleteMaterial ()
 Delete currently selected user model. More...
 
void onAddMaterial ()
 Add new user material model. More...
 
void onApply ()
 Called when "Apply" button is pressed. More...
 
void onHelp ()
 Called when "Help" button is pressed. More...
 
void SetEditCurrentArgument ()
 
void SelectionIntoArgument ()
 Called when selection as changed or other case. More...
 

Private Member Functions

void updateState ()
 Update buttons state. More...
 
void toModel (Material_Model &) const
 Save values from dialog box widgets to material model. More...
 
void fromModel (const Material_Model &)
 Initialize dialog box widgets from material model. More...
 
QString findUniqueName (const QString &, QListWidgetItem *=0, bool=false)
 Find unique name for the material name. More...
 

Private Attributes

GEOMToolsGUI_MaterialListmyMaterials
 
QCheckBox * myPhysical
 
QList< ReflectionmyReflection
 
QtxDoubleSpinBox * myFrontShininess
 
QtxDoubleSpinBox * myBackShininess
 
QLabel * myColorLab
 
QtxColorButton * myColor
 
QPushButton * myAddButton
 
QPushButton * myDelButton
 
Material_ResourceMgr myResourceMgr
 
Material_Model myCurrentModel
 
bool myShowSelWidget
 
QLineEdit * myLineEditCurArg
 
QPushButton * myPushBtn
 

Detailed Description

The dialog box is used to set material properties for the presentation objects.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
Current 
Global 
User 

◆ anonymous enum

anonymous enum
private
Enumerator
TypeRole 
NameRole 

Constructor & Destructor Documentation

◆ GEOMToolsGUI_MaterialPropertiesDlg()

◆ ~GEOMToolsGUI_MaterialPropertiesDlg()

GEOMToolsGUI_MaterialPropertiesDlg::~GEOMToolsGUI_MaterialPropertiesDlg ( )

Member Function Documentation

◆ accept()

void GEOMToolsGUI_MaterialPropertiesDlg::accept ( )

References onApply().

◆ changed

void GEOMToolsGUI_MaterialPropertiesDlg::changed ( )
signal

◆ eventFilter()

bool GEOMToolsGUI_MaterialPropertiesDlg::eventFilter ( QObject o,
QEvent *  e 
)
Parameters
osender
eevent

References myMaterials, and onDeleteMaterial().

◆ findUniqueName()

QString GEOMToolsGUI_MaterialPropertiesDlg::findUniqueName ( const QString &  name,
QListWidgetItem *  item = 0,
bool  addSuffix = false 
)
private
Parameters
namematerial name template
itemthe item to be ignored when browsing through the materials list
addSuffixif true, the integrer suffix is always added to the material name (otherwise suffix is added only if item name is not unique)
Returns
new unique material name

References myMaterials.

◆ fromModel()

◆ onAddMaterial

void GEOMToolsGUI_MaterialPropertiesDlg::onAddMaterial ( )
privateslot

◆ onApply

◆ onChanged

◆ onContextMenu

void GEOMToolsGUI_MaterialPropertiesDlg::onContextMenu ( QContextMenuEvent *  e)
privateslot

◆ onDeleteMaterial

void GEOMToolsGUI_MaterialPropertiesDlg::onDeleteMaterial ( )
privateslot

◆ onHelp

void GEOMToolsGUI_MaterialPropertiesDlg::onHelp ( )
privateslot

◆ onItemChanged

void GEOMToolsGUI_MaterialPropertiesDlg::onItemChanged ( QListWidgetItem *  item)
privateslot

◆ onMaterialChanged

void GEOMToolsGUI_MaterialPropertiesDlg::onMaterialChanged ( )
privateslot

◆ SelectionIntoArgument

void GEOMToolsGUI_MaterialPropertiesDlg::SelectionIntoArgument ( )
privateslot

◆ SetEditCurrentArgument

void GEOMToolsGUI_MaterialPropertiesDlg::SetEditCurrentArgument ( )
privateslot

◆ toModel()

void GEOMToolsGUI_MaterialPropertiesDlg::toModel ( Material_Model model) const
private

◆ updateState()

void GEOMToolsGUI_MaterialPropertiesDlg::updateState ( )
private

Member Data Documentation

◆ myAddButton

QPushButton* GEOMToolsGUI_MaterialPropertiesDlg::myAddButton
private

◆ myBackShininess

QtxDoubleSpinBox* GEOMToolsGUI_MaterialPropertiesDlg::myBackShininess
private

◆ myColor

QtxColorButton* GEOMToolsGUI_MaterialPropertiesDlg::myColor
private

◆ myColorLab

QLabel* GEOMToolsGUI_MaterialPropertiesDlg::myColorLab
private

◆ myCurrentModel

Material_Model GEOMToolsGUI_MaterialPropertiesDlg::myCurrentModel
private

◆ myDelButton

QPushButton* GEOMToolsGUI_MaterialPropertiesDlg::myDelButton
private

◆ myFrontShininess

QtxDoubleSpinBox* GEOMToolsGUI_MaterialPropertiesDlg::myFrontShininess
private

◆ myLineEditCurArg

QLineEdit* GEOMToolsGUI_MaterialPropertiesDlg::myLineEditCurArg
private

◆ myMaterials

GEOMToolsGUI_MaterialList* GEOMToolsGUI_MaterialPropertiesDlg::myMaterials
private

◆ myPhysical

QCheckBox* GEOMToolsGUI_MaterialPropertiesDlg::myPhysical
private

◆ myPushBtn

QPushButton* GEOMToolsGUI_MaterialPropertiesDlg::myPushBtn
private

◆ myReflection

QList<Reflection> GEOMToolsGUI_MaterialPropertiesDlg::myReflection
private

◆ myResourceMgr

Material_ResourceMgr GEOMToolsGUI_MaterialPropertiesDlg::myResourceMgr
private

◆ myShowSelWidget

bool GEOMToolsGUI_MaterialPropertiesDlg::myShowSelWidget
private

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