45 #ifndef FILESTLPLUGIN_HH 46 #define FILESTLPLUGIN_HH 74 Q_PLUGIN_METADATA(IID
"org.OpenFlipper.Plugins.Plugin-FileSTL")
77 void openedFile(
int _id );
78 void addEmptyObject(
DataType _type,
int& _id);
79 void load(QString _filename,
DataType _type,
int& _id);
80 void save(
int _id , QString _filename );
81 void log(
Logtype _type, QString _message);
82 void log(QString _message);
84 void updatedObject(
int _identifier,
const UpdateType& _type);
86 void deleteObject(
int _id );
88 void setSlotDescription(QString _slotName, QString _slotDescription,
89 QStringList _parameters, QStringList _descriptions);
93 void fileOpened(
int ){};
111 QString
name() {
return (QString(
"FileSTL")); };
112 QString
description( ) {
return (QString(tr(
"Load/Save STL-Files"))); };
127 bool saveObject(
int _id, QString _filename);
138 bool saveObject(
int _id, QString _filename,
const bool _binary ,
const std::streamsize _precision = 6 );
140 QString version() {
return QString(
"1.0"); };
145 QWidget* saveOptions_;
146 QWidget* loadOptions_;
148 QCheckBox* saveBinary_;
149 QLabel* savePrecisionLabel_;
150 QSpinBox* savePrecision_;
152 QCheckBox* loadFaceNormal_;
154 QPushButton* saveDefaultButton_;
155 QPushButton* loadDefaultButton_;
158 #endif //FILESTLPLUGIN_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.
void initializePlugin()
Initialize Plugin.
void slotSaveDefault()
Slot called when user wants to save the given Save options as default.
int loadObject(QString _filename)
Loads Object as triangle mesh.
Interface for all Plugins which do logging to the logging window of the framework.
QWidget * loadOptionsWidget(QString)
QWidget * saveOptionsWidget(QString)
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 )
Interface class from which all plugins have to be created.
Interface class for file handling.
QString description()
Return a description of what the plugin is doing.
QString name()
Return a name for the plugin.
FileSTLPlugin()
Constructor.