51 #include "iniPlugin.hh" 67 std::vector< QString > draw_modes;
68 if( _ini.
get_entry(draw_modes, _object->
name(),
"MaterialDrawMode") )
90 std::vector< QString > draw_modes;
91 if( _ini.
get_entry(draw_modes, _object->
name(),
"MaterialDrawMode") )
112 if ( _ini.
get_entry( shininess, _object->
name() ,
"Shininess" ) )
116 if ( _ini.
get_entry( reflectance, _object->
name() ,
"Reflectance" ) ) {
121 if ( _ini.
get_entry( visible, _object->
name() ,
"Visible" ) ) {
174 void INIPlugin::loadIniFile(
INIFile& _ini,
int _id ) {
178 emit log(
LOGERR, tr(
"Cannot find object for id ") + QString::number(_id) + tr(
" in saveFile"));
183 parseIniFile(_ini, baseObject);
187 parseIniFileT(_ini, polyObject);
190 parseIniFileT(_ini, triObject);
193 parseIniFileT(_ini, lightObject);
196 emit log(
LOGERR, tr(
"The specified data type is not supported, yet. Aborting!"));
200 void INIPlugin::saveIniFile(
INIFile& _ini,
int _id) {
204 emit log(
LOGERR, tr(
"Cannot find object for id ") + QString::number(_id) + tr(
" in saveFile"));
209 saveIniFile(_ini, baseObject);
213 saveIniFileT(_ini, polyObject);
216 saveIniFileT(_ini, triObject);
219 saveIniFileT(_ini, lightObject);
222 emit log(
LOGERR, tr(
"The specified data type is not supported, yet. Aborting!"));
228 #if QT_VERSION < 0x050000 229 Q_EXPORT_PLUGIN2( iniplugin ,
INIPlugin );
LightObject * lightObject(BaseObjectData *_object)
Cast an BaseObject to a LightObject if possible.
const Vec4f & ambient_color() const
get the ambient color.
DrawModes::DrawMode drawMode() const
Return the own draw modes of this node.
void set_reflectance(double _m)
set reflectance
Type for a MeshObject containing a triangle mesh.
void set_specular_color(const Vec4f &_s)
set the specular color
bool getObject(int _identifier, BSplineCurveObject *&_object)
bool dataType(DataType _type) const
void set_shininess(float _s)
set shininess
void add_entryVec(const QString &_section, const QString &_key, const VectorT &_value)
Addition of a Vec_n_something.
void set_ambient_color(const Vec4f &_a)
set the ambient color.
bool get_entryVecf(VectorT &_val, const QString &_section, const QString &_key) const
Get a Vec_n_i (int)
float point_size() const
get point size
virtual bool visible()
return visiblity
float line_width() const
get line width
MaterialNode * materialNode()
get a pointer to the materialnode
PolyMeshObject * polyMeshObject(BaseObjectData *_object)
Cast an BaseObject to a PolyMeshObject if possible.
bool get_entry(QString &_val, const QString &_section, const QString &_key) const
Access to a string entry.
void set_diffuse_color(const Vec4f &_d)
set the diffuse color.
float shininess() const
get shininess
Class for the handling of simple configuration files.
const Vec4f & overlay_color() const
get the overlay color
const Vec4f & diffuse_color() const
get the diffuse color.
void set_overlay_color(const Vec4f &_s)
set the overlay color
TriMeshObject * triMeshObject(BaseObjectData *_object)
Cast an BaseObject to a TriMeshObject if possible.
void set_line_width(float _sz)
set line width (default: 1.0)
const Vec4f & base_color() const
get the base color
QString name() const
return the name of the object. The name defaults to NONAME if unset.
Type for a Meshobject containing a poly mesh.
void add_entry(const QString &_section, const QString &_key, const QString &_value)
Addition / modification of a string entry.
void set_base_color(const Vec4f &_c)
set the base color
const Vec4f & specular_color() const
get the specular color
#define DATA_TRIANGLE_MESH
double reflectance() const
get reflectance
void set_point_size(float _sz)
set point size (default: 1.0)