44#ifndef FILEOMPLUGIN_HH
45#define FILEOMPLUGIN_HH
75 Q_PLUGIN_METADATA(IID
"org.OpenFlipper.Plugins.Plugin-FileOM")
78 void openedFile(
int _id );
79 void addEmptyObject(
DataType _type,
int& _id);
80 void load(QString _filename,
DataType _type,
int& _id);
81 void save(
int _id , QString _filename );
82 void log(
Logtype _type, QString _message);
83 void log(QString _message);
85 void updatedObject(
int _identifier,
const UpdateType& _type);
87 void deleteObject(
int _id );
91 void fileOpened(
int ){};
112 QString
name() {
return (QString(
"FileOM")); };
113 QString
description( ) {
return (QString(tr(
"Load/Save OM-Files"))); };
136 bool saveObject(
int _id, QString _filename);
138 QString version() {
return QString(
"1.0"); };
143 template <
class MeshT>
149 QWidget* loadOptions_;
150 QWidget* saveOptions_;
152 QCheckBox* saveBinary_;
154 QCheckBox* saveVertexNormal_;
155 QCheckBox* saveVertexTexCoord_;
156 QCheckBox* saveVertexColor_;
157 QCheckBox* saveFaceColor_;
158 QCheckBox* saveFaceNormal_;
159 QCheckBox* saveFaceTexCoord_;
160 QCheckBox* saveCustomProperties_;
161 QCheckBox* saveStatus_;
162 QPushButton* saveDefaultButton_;
164 QComboBox* triMeshHandling_;
165 QCheckBox* loadVertexNormal_;
166 QCheckBox* loadVertexTexCoord_;
167 QCheckBox* loadVertexColor_;
168 QCheckBox* loadFaceColor_;
169 QCheckBox* loadFaceNormal_;
170 QCheckBox* loadFaceTexCoord_;
171 QCheckBox* loadCustomProperties_;
172 QCheckBox* loadStatus_;
173 QPushButton* loadDefaultButton_;
Logtype
Log types for Message Window.
Interface class from which all plugins have to be created.
Interface class for file handling.
QWidget * saveOptionsWidget(QString)
FileOMPlugin()
Constructor.
int loadPolyMeshObject(QString _filename)
Always loads mesh as polymesh.
void slotSaveDefault()
Slot called when user wants to save the given Save options as default.
int loadObject(QString _filename)
Loads Object and converts it to a triangle mesh if possible.
int loadTriMeshObject(QString _filename)
Loads a triangle mesh.
void handleTrimeshDialog()
Displays a dialog to ask how to load the mesh (triangle, polymesh , autodetect)
QString name()
Return a name for the plugin.
QString description()
Return a description of what the plugin is doing.
void backupTextureCoordinates(MeshT &_mesh)
creates a backup of the original per vertex/face texture coordinates
void initializePlugin()
Initialize Plugin.
void slotLoadDefault()
Slot called when user wants to save the given Load options as default.
DataType supportedType()
Return your supported object type( e.g. DATA_TRIANGLE_MESH )
QWidget * loadOptionsWidget(QString)
Interface for all plugins which want to Load or Save files and create Objects.
Interface for all Plugins which do logging to the logging window of the framework.
Set options for reader/writer modules.
Interface class for exporting functions to python.
Interface for all Plugins which provide scriptable Functions.