Skip to content

Commit

Permalink
+ editor for PropertyMaterial
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed May 7, 2016
1 parent a175c48 commit 8bbc642
Show file tree
Hide file tree
Showing 6 changed files with 412 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/App/FeatureTest.cpp
Expand Up @@ -66,7 +66,7 @@ FeatureTest::FeatureTest()
ConstraintFloat.setConstraints(&floatPercent);

App::Color c;
App::Material mat;
App::Material mat(App::Material::GOLD);
ADD_PROPERTY(Colour ,(c) );
ADD_PROPERTY(ColourList ,(c) );
ADD_PROPERTY(Material ,(mat));
Expand Down
10 changes: 10 additions & 0 deletions src/App/PropertyStandard.cpp
Expand Up @@ -2516,6 +2516,11 @@ void PropertyMaterial::Restore(Base::XMLReader &reader)
hasSetValue();
}

const char* PropertyMaterial::getEditorName(void) const
{
return "";// "Gui::PropertyEditor::PropertyMaterialItem";
}

Property *PropertyMaterial::Copy(void) const
{
PropertyMaterial *p= new PropertyMaterial();
Expand Down Expand Up @@ -2672,6 +2677,11 @@ void PropertyMaterialList::RestoreDocFile(Base::Reader &reader)
setValues(values);
}

const char* PropertyMaterialList::getEditorName(void) const
{
return "";// "Gui::PropertyEditor::PropertyMaterialListItem";
}

Property *PropertyMaterialList::Copy(void) const
{
PropertyMaterialList *p = new PropertyMaterialList();
Expand Down
6 changes: 5 additions & 1 deletion src/App/PropertyStandard.h
Expand Up @@ -952,7 +952,9 @@ class AppExport PropertyMaterial : public Property

virtual void Save (Base::Writer &writer) const;
virtual void Restore(Base::XMLReader &reader);


virtual const char* getEditorName(void) const;

virtual Property *Copy(void) const;
virtual void Paste(const Property &from);

Expand Down Expand Up @@ -1006,6 +1008,8 @@ class AppExport PropertyMaterialList : public PropertyLists
virtual void SaveDocFile(Base::Writer &writer) const;
virtual void RestoreDocFile(Base::Reader &reader);

virtual const char* getEditorName(void) const;

virtual Property *Copy(void) const;
virtual void Paste(const Property &from);
virtual unsigned int getMemSize(void) const;
Expand Down
1 change: 1 addition & 0 deletions src/Gui/SoFCDB.cpp
Expand Up @@ -134,6 +134,7 @@ void Gui::SoFCDB::init()
PropertyFloatListItem ::init();
PropertyIntegerListItem ::init();
PropertyColorItem ::init();
PropertyMaterialItem ::init();
PropertyFileItem ::init();
PropertyPathItem ::init();
PropertyTransientFileItem ::init();
Expand Down

0 comments on commit 8bbc642

Please sign in to comment.