51 #include "TypePolyMesh.hh"
53 #include <OpenFlipper/common/BackupData.hh>
54 #include "PolyMeshBackup.hh"
59 TypePolyMeshPlugin::TypePolyMeshPlugin() {
65 bool TypePolyMeshPlugin::registerType() {
92 QString
name = QString(tr(
"New PolyMesh %1.off").arg( object->
id() ));
96 object->setName( f.fileName() );
99 const QColor color = OpenFlipper::Options::defaultColor();
100 const ACG::Vec4f default_color(color.redF(), color.greenF(), color.blueF(), color.alphaF());
101 object->materialNode()->set_color(default_color);
107 emit emptyObjectAdded (object->
id() );
127 backupData = dynamic_cast< BackupData* >(object->
objectData(OBJECT_BACKUPS));
131 object->setObjectData(OBJECT_BACKUPS, backupData);
143 #if QT_VERSION < 0x050000
DLLEXPORT OpenFlipperQSettings & OpenFlipperSettings()
QSettings object containing all program settings of OpenFlipper.
DLLEXPORT DataType typeId(QString _name)
Given a dataType Identifier string this function will return the id of the datatype.
DLLEXPORT void setTypeIcon(DataType _id, QString _icon)
Set an Icon for a given DataType.
Type for a Meshobject containing a poly mesh.
QString name()
Return a name for the plugin.
PerObjectData * objectData(QString _dataName)
Returns the object data pointer.
int targetCount()
Get the number of target objects.
void storeBackup(BaseBackup *_backup)
store a backup
bool getObject(int _identifier, BSplineCurveObject *&_object)
PolyMeshObject * polyMeshObject(BaseObjectData *_object)
Cast an BaseObject to a PolyMeshObject if possible.
DLLEXPORT DataType addDataType(QString _name, QString _readableName)
Adds a datatype and returns the id for the new type.
bool hasObjectData(QString _dataName)
Checks if object data with given name is available.
void generateBackup(int _id, QString _name, UpdateType _type)
This slot should be implemented in a TypePlugin to generate type specific backups.
int objectCount()
Get the number of available objects.
int addEmpty()
Create an empty object.
Class that encapsulates a backup.
Abstract class that is used to store backups.