50 #ifndef FILEOMPLUGIN_HH 51 #define FILEOMPLUGIN_HH 79 #if QT_VERSION >= 0x050000 80 Q_PLUGIN_METADATA(IID
"org.OpenFlipper.Plugins.Plugin-FileOM")
84 void openedFile(
int _id );
85 void addEmptyObject(
DataType _type,
int& _id);
86 void load(QString _filename,
DataType _type,
int& _id);
87 void save(
int _id , QString _filename );
88 void log(
Logtype _type, QString _message);
89 void log(QString _message);
91 void updatedObject(
int _identifier,
const UpdateType& _type);
93 void deleteObject(
int _id );
97 void fileOpened(
int ){};
118 QString
name() {
return (QString(
"FileOM")); };
119 QString
description( ) {
return (QString(tr(
"Load/Save OM-Files"))); };
140 bool saveObject(
int _id, QString _filename);
142 QString version() {
return QString(
"1.0"); };
147 template <
class MeshT>
153 QWidget* loadOptions_;
154 QWidget* saveOptions_;
156 QCheckBox* saveBinary_;
158 QCheckBox* saveVertexNormal_;
159 QCheckBox* saveVertexTexCoord_;
160 QCheckBox* saveVertexColor_;
161 QCheckBox* saveFaceColor_;
162 QCheckBox* saveFaceNormal_;
163 QPushButton* saveDefaultButton_;
165 QComboBox* triMeshHandling_;
166 QCheckBox* loadVertexNormal_;
167 QCheckBox* loadVertexTexCoord_;
168 QCheckBox* loadVertexColor_;
169 QCheckBox* loadFaceColor_;
170 QCheckBox* loadFaceNormal_;
171 QPushButton* loadDefaultButton_;
175 #endif //FILEOMPLUGIN_HH void backupTextureCoordinates(MeshT &_mesh)
creates a backup of the original per vertex/face texture coordinates
QString name()
Return a name for the plugin.
Logtype
Log types for Message Window.
FileOMPlugin()
Constructor.
void handleTrimeshDialog()
Displays a dialog to ask how to load the mesh (triangle, polymesh , autodetect)
QWidget * saveOptionsWidget(QString)
Interface for all Plugins which provide scriptable Functions.
Interface class from which all plugins have to be created.
void slotSaveDefault()
Slot called when user wants to save the given Save options as default.
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.
Interface class for file handling.
DataType supportedType()
Return your supported object type( e.g. DATA_TRIANGLE_MESH )
Interface for all plugins which want to Load or Save files and create Objects.
void initializePlugin()
Initialize Plugin.
void slotLoadDefault()
Slot called when user wants to save the given Load options as default.
int loadTriMeshObject(QString _filename)
Loads a triangle mesh.
QWidget * loadOptionsWidget(QString)
QString description()
Return a description of what the plugin is doing.
int loadPolyMeshObject(QString _filename)
Always loads mesh as polymesh.