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
Logtype
Log types for Message Window.
Interface for all plugins which want to Load or Save files and create Objects.
Interface for all Plugins which provide scriptable Functions.
DataType supportedType()
Return your supported object type( e.g. DATA_TRIANGLE_MESH )
void slotLoadDefault()
Slot called when user wants to save the given Load options as default.
QWidget * saveOptionsWidget(QString)
void backupTextureCoordinates(MeshT &_mesh)
creates a backup of the original per vertex/face texture coordinates
QWidget * loadOptionsWidget(QString)
void initializePlugin()
Initialize Plugin.
int loadTriMeshObject(QString _filename)
Loads a triangle mesh.
Interface for all Plugins which do logging to the logging window of the framework.
int loadObject(QString _filename)
Loads Object and converts it to a triangle mesh if possible.
void slotSaveDefault()
Slot called when user wants to save the given Save options as default.
FileOMPlugin()
Constructor.
Interface class from which all plugins have to be created.
void handleTrimeshDialog()
Displays a dialog to ask how to load the mesh (triangle, polymesh , autodetect)
int loadPolyMeshObject(QString _filename)
Always loads mesh as polymesh.
Interface class for file handling.
QString description()
Return a description of what the plugin is doing.
QString name()
Return a name for the plugin.