Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
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
private
Enumerator
Current 
Global 
User 
anonymous enum
private
Enumerator
TypeRole 
NameRole 

Constructor & Destructor Documentation

GEOMToolsGUI_MaterialPropertiesDlg::~GEOMToolsGUI_MaterialPropertiesDlg ( )

Member Function Documentation

void GEOMToolsGUI_MaterialPropertiesDlg::accept ( )

References onApply().

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

References myMaterials, and onDeleteMaterial().

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.

void GEOMToolsGUI_MaterialPropertiesDlg::onAddMaterial ( )
privateslot
void GEOMToolsGUI_MaterialPropertiesDlg::onContextMenu ( QContextMenuEvent *  e)
privateslot
void GEOMToolsGUI_MaterialPropertiesDlg::onDeleteMaterial ( )
privateslot
void GEOMToolsGUI_MaterialPropertiesDlg::onHelp ( )
privateslot
void GEOMToolsGUI_MaterialPropertiesDlg::onItemChanged ( QListWidgetItem *  item)
privateslot
void GEOMToolsGUI_MaterialPropertiesDlg::onMaterialChanged ( )
privateslot
void GEOMToolsGUI_MaterialPropertiesDlg::SelectionIntoArgument ( )
privateslot
void GEOMToolsGUI_MaterialPropertiesDlg::SetEditCurrentArgument ( )
privateslot
void GEOMToolsGUI_MaterialPropertiesDlg::toModel ( Material_Model model) const
private
void GEOMToolsGUI_MaterialPropertiesDlg::updateState ( )
private

Member Data Documentation

QPushButton* GEOMToolsGUI_MaterialPropertiesDlg::myAddButton
private
QtxDoubleSpinBox* GEOMToolsGUI_MaterialPropertiesDlg::myBackShininess
private
QtxColorButton* GEOMToolsGUI_MaterialPropertiesDlg::myColor
private
QLabel* GEOMToolsGUI_MaterialPropertiesDlg::myColorLab
private
Material_Model GEOMToolsGUI_MaterialPropertiesDlg::myCurrentModel
private
QPushButton* GEOMToolsGUI_MaterialPropertiesDlg::myDelButton
private
QtxDoubleSpinBox* GEOMToolsGUI_MaterialPropertiesDlg::myFrontShininess
private
QLineEdit* GEOMToolsGUI_MaterialPropertiesDlg::myLineEditCurArg
private
GEOMToolsGUI_MaterialList* GEOMToolsGUI_MaterialPropertiesDlg::myMaterials
private
QCheckBox* GEOMToolsGUI_MaterialPropertiesDlg::myPhysical
private
QPushButton* GEOMToolsGUI_MaterialPropertiesDlg::myPushBtn
private
QList<Reflection> GEOMToolsGUI_MaterialPropertiesDlg::myReflection
private
Material_ResourceMgr GEOMToolsGUI_MaterialPropertiesDlg::myResourceMgr
private
bool GEOMToolsGUI_MaterialPropertiesDlg::myShowSelWidget
private

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