GEOM material properties dialog box class. More...
#include <GEOMToolsGUI_MaterialPropertiesDlg.h>

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_MaterialList * | myMaterials | 
| QCheckBox * | myPhysical | 
| QList< Reflection > | myReflection | 
| QtxDoubleSpinBox * | myFrontShininess | 
| QtxDoubleSpinBox * | myBackShininess | 
| QLabel * | myColorLab | 
| QtxColorButton * | myColor | 
| QPushButton * | myAddButton | 
| QPushButton * | myDelButton | 
| Material_ResourceMgr | myResourceMgr | 
| Material_Model | myCurrentModel | 
| bool | myShowSelWidget | 
| QLineEdit * | myLineEditCurArg | 
| QPushButton * | myPushBtn | 
The dialog box is used to set material properties for the presentation objects.
| GEOMToolsGUI_MaterialPropertiesDlg::GEOMToolsGUI_MaterialPropertiesDlg | ( | QWidget * | parent = 0,  | 
        
| bool | showSelWidget = true,  | 
        ||
| bool | modal = false,  | 
        ||
| const int | f = Standard  | 
        ||
| ) | 
| parent | parent widget | 
| showSelWidget | if true then objects can be selected by user  | 
| modal | if true dialog box is modal  | 
| f | specified control buttons for dialog box (QtxDialog::ButtonFlags) | 
References Material_Model::Ambient, GEOMToolsGUI_MaterialPropertiesDlg::Reflection::back_coef, Box(), changed(), GEOM::Color, GEOMToolsGUI_MaterialPropertiesDlg::Reflection::color, Current, Material_Model::Emissive, GEOMToolsGUI_MaterialPropertiesDlg::Reflection::enabled, Material_Model::fromProperties(), Material_Model::fromResources(), GEOMToolsGUI_MaterialPropertiesDlg::Reflection::front_coef, Material_ResourceMgr::Global, Global, Handle(), GEOMToolsGUI_MaterialPropertiesDlg::Reflection::label, main(), MARGIN, GEOM::Material, Material_ResourceMgr::materials(), myAddButton, myBackShininess, myColor, myColorLab, myCurrentModel, myDelButton, myFrontShininess, myLineEditCurArg, myMaterials, myPhysical, myPushBtn, myReflection, myResourceMgr, myShowSelWidget, NameRole, onAddMaterial(), onApply(), onChanged(), onContextMenu(), onDeleteMaterial(), onHelp(), onItemChanged(), onMaterialChanged(), GEOM::propertyName(), SelectionIntoArgument(), SetEditCurrentArgument(), SPACING, TypeRole, Material_ResourceMgr::User, and User.
| GEOMToolsGUI_MaterialPropertiesDlg::~GEOMToolsGUI_MaterialPropertiesDlg | ( | ) | 
| void GEOMToolsGUI_MaterialPropertiesDlg::accept | ( | ) | 
References onApply().
      
  | 
  signal | 
| bool GEOMToolsGUI_MaterialPropertiesDlg::eventFilter | ( | QObject * | o, | 
| QEvent * | e | ||
| ) | 
| o | sender | 
| e | event | 
References myMaterials, and onDeleteMaterial().
      
  | 
  private | 
| name | material name template | 
| item | the item to be ignored when browsing through the materials list | 
| addSuffix | if true, the integrer suffix is always added to the material name (otherwise suffix is added only if item name is not unique)  | 
References myMaterials.
      
  | 
  private | 
| model | material model | 
References Material_Model::Ambient, Material_Model::color(), Material_Model::Emissive, Material_Model::hasReflection(), Material_Model::isPhysical(), myBackShininess, myFrontShininess, myPhysical, myReflection, Material_Model::reflection(), and Material_Model::shininess().
      
  | 
  privateslot | 
References findUniqueName(), myMaterials, myResourceMgr, NameRole, toModel(), Material_Model::toResources(), TypeRole, and User.
      
  | 
  privateslot | 
References aView, GEOM::Color, Material_Model::getMaterialOCCAspect(), Material_Model::getMaterialVTKProperty(), Handle(), Material_Model::isPhysical(), GEOM::Material, GeometryGUI::Modified(), myColor, myCurrentModel, myResourceMgr, myShowSelWidget, GEOM::propertyName(), toModel(), and Material_Model::toProperties().
      
  | 
  privateslot | 
      
  | 
  privateslot | 
References myMaterials, onAddMaterial(), onDeleteMaterial(), TypeRole, and User.
      
  | 
  privateslot | 
References myMaterials, myResourceMgr, NameRole, TypeRole, and User.
      
  | 
  privateslot | 
      
  | 
  privateslot | 
References findUniqueName(), myMaterials, and onChanged().
      
  | 
  privateslot | 
References Current, fromModel(), Material_Model::fromResources(), myCurrentModel, myMaterials, myResourceMgr, NameRole, TypeRole, and updateState().
      
  | 
  privateslot | 
References GEOMBase::GetNameOfSelectedIObjects(), and myLineEditCurArg.
      
  | 
  privateslot | 
References myLineEditCurArg, myPushBtn, and SelectionIntoArgument().
      
  | 
  private | 
| model | material model to be filled in | 
References Material_Model::Ambient, Material_Model::Emissive, myBackShininess, myFrontShininess, myPhysical, myReflection, Material_Model::setColor(), Material_Model::setPhysical(), Material_Model::setReflection(), and Material_Model::setShininess().
      
  | 
  private | 
References myColor, myColorLab, myDelButton, myMaterials, myPhysical, myReflection, TypeRole, and User.
      
  | 
  private | 
      
  | 
  private | 
      
  | 
  private | 
      
  | 
  private | 
      
  | 
  private | 
      
  | 
  private | 
      
  | 
  private | 
      
  | 
  private | 
      
  | 
  private | 
      
  | 
  private | 
      
  | 
  private | 
      
  | 
  private | 
      
  | 
  private | 
      
  | 
  private |