44 #ifndef FILEOMPLUGIN_HH 45 #define FILEOMPLUGIN_HH 73 Q_PLUGIN_METADATA(IID
"org.OpenFlipper.Plugins.Plugin-FileOM")
76 void openedFile(
int _id );
77 void addEmptyObject(
DataType _type,
int& _id);
78 void load(QString _filename,
DataType _type,
int& _id);
79 void save(
int _id , QString _filename );
80 void log(
Logtype _type, QString _message);
81 void log(QString _message);
83 void updatedObject(
int _identifier,
const UpdateType& _type);
85 void deleteObject(
int _id );
89 void fileOpened(
int ){};
110 QString
name() {
return (QString(
"FileOM")); };
111 QString
description( ) {
return (QString(tr(
"Load/Save OM-Files"))); };
132 bool saveObject(
int _id, QString _filename);
134 QString version() {
return QString(
"1.0"); };
139 template <
class MeshT>
145 QWidget* loadOptions_;
146 QWidget* saveOptions_;
148 QCheckBox* saveBinary_;
150 QCheckBox* saveVertexNormal_;
151 QCheckBox* saveVertexTexCoord_;
152 QCheckBox* saveVertexColor_;
153 QCheckBox* saveFaceColor_;
154 QCheckBox* saveFaceNormal_;
155 QPushButton* saveDefaultButton_;
157 QComboBox* triMeshHandling_;
158 QCheckBox* loadVertexNormal_;
159 QCheckBox* loadVertexTexCoord_;
160 QCheckBox* loadVertexColor_;
161 QCheckBox* loadFaceColor_;
162 QCheckBox* loadFaceNormal_;
163 QPushButton* loadDefaultButton_;
167 #endif //FILEOMPLUGIN_HH void backupTextureCoordinates(MeshT &_mesh)
creates a backup of the original per vertex/face texture coordinates
int loadTriMeshObject(QString _filename)
Loads a triangle mesh.
QString name()
Return a name for the plugin.
Logtype
Log types for Message Window.
Interface for all Plugins which do logging to the logging window of the framework.
DataType supportedType()
Return your supported object type( e.g. DATA_TRIANGLE_MESH )
FileOMPlugin()
Constructor.
QString description()
Return a description of what the plugin is doing.
void initializePlugin()
Initialize Plugin.
int loadObject(QString _filename)
Loads Object and converts it to a triangle mesh if possible.
int loadPolyMeshObject(QString _filename)
Always loads mesh as polymesh.
void slotLoadDefault()
Slot called when user wants to save the given Load options as default.
Interface for all Plugins which provide scriptable Functions.
void handleTrimeshDialog()
Displays a dialog to ask how to load the mesh (triangle, polymesh , autodetect)
QWidget * saveOptionsWidget(QString)
Interface class from which all plugins have to be created.
Interface class for file handling.
void slotSaveDefault()
Slot called when user wants to save the given Save options as default.
Interface for all plugins which want to Load or Save files and create Objects.
QWidget * loadOptionsWidget(QString)