Developer Documentation
FilePLYPlugin Class Reference
Inheritance diagram for FilePLYPlugin:
BaseInterface FileInterface LoadSaveInterface LoggingInterface ScriptInterface PythonInterface

Public Slots

int loadObject (QString _filename)
 Loads Object and converts it to a triangle mesh if possible. More...
 
int loadObject (QString _filename, DataType _type)
 Loads object with forcing the given datatype. More...
 
int loadPolyMeshObject (QString _filename, OpenMesh::IO::Options &_opt)
 Always loads mesh as polymesh. More...
 
int loadTriMeshObject (QString _filename, OpenMesh::IO::Options &_opt)
 Loads a triangle mesh. More...
 
bool saveObject (int _id, QString _filename)
 
QString version ()
 

Signals

void openedFile (int _id)
 
void addEmptyObject (DataType _type, int &_id)
 
void load (QString _filename, DataType _type, int &_id)
 
void save (int _id, QString _filename)
 
void log (Logtype _type, QString _message)
 
void log (QString _message)
 
void updateView ()
 
void updatedObject (int _identifier, const UpdateType &_type)
 
void deleteObject (int _id)
 
- Signals inherited from BaseInterface
virtual void updateView ()
 Update current view in Main Application. More...
 
virtual void setSlotDescription (QString _slotName, QString _slotDescription, QStringList _parameters, QStringList _descriptions)
 Set a description for a public slot. More...
 
virtual void setRenderer (unsigned int _viewer, QString _rendererName)
 Set a renderer for the given viewer. More...
 
- Signals inherited from FileInterface
virtual void openedFile (int _id)
 This signal has to be emitted if an object has been loaded from a file. More...
 
- Signals inherited from LoadSaveInterface
virtual void save (int _id, QString _filename)
 Save object to a file. More...
 
virtual void load (QString _filename, DataType _type, int &_id)
 Load object from file with a specific DataType. More...
 
- Signals inherited from LoggingInterface
virtual void log (Logtype _type, QString _message)=0
 
virtual void log (QString _message)=0
 
- Signals inherited from ScriptInterface
virtual void scriptInfo (QString _functionWithParameters)
 Emit this signal if a scriptable function is executed. More...
 
virtual void getScriptingEngine (QScriptEngine *&_engine)
 
virtual void executeFileScript (QString _filename)
 
virtual void getAvailableFunctions (QStringList &_functions)
 
- Signals inherited from PythonInterface
virtual void executePythonScript (QString _script)
 

Public Member Functions

 FilePLYPlugin ()
 Constructor. More...
 
QString name ()
 Return a name for the plugin. More...
 
QString description ()
 Return a description of what the plugin is doing. More...
 
DataType supportedType ()
 Return your supported object type( e.g. DATA_TRIANGLE_MESH ) More...
 
QString getSaveFilters ()
 
QString getLoadFilters ()
 
QWidget * saveOptionsWidget (QString)
 
QWidget * loadOptionsWidget (QString)
 

Private Slots

void fileOpened (int)
 
- Private Slots inherited from BaseInterface
virtual void exit ()
 
virtual QString version ()
 Return a version string for your plugin. More...
 
- Private Slots inherited from FileInterface
virtual int loadObject (QString _filename)=0
 Load an object from the given file. More...
 
virtual int loadObject (QString _filename, DataType _type)
 Load an object from the given file. More...
 

Private Member Functions

void noguiSupported ()
 
void initializePlugin ()
 Initialize Plugin. More...
 
void handleTrimeshDialog ()
 Displays a dialog to ask how to load the mesh (triangle, polymesh , autodetect) More...
 
void slotLoadDefault ()
 Slot called when user wants to save the given Load options as default. More...
 
void slotSaveDefault ()
 Slot called when user wants to save the given Save options as default. More...
 
template<class MeshT >
void backupTextureCoordinates (MeshT &_mesh)
 creates a backup of the original per vertex/face texture coordinates More...
 
- Private Member Functions inherited from BaseInterface
virtual void noguiSupported ()
 
virtual ~BaseInterface ()
 Destructor. More...
 
virtual void blockScenegraphUpdates (bool _block)
 Tell the core to prevent scenegraph updates. More...
 
virtual void updatedObject (int _objectId)
 An object has been changed or added by this plugin. More...
 
virtual void updatedObject (int _identifier, const UpdateType &_type)
 An object has been changed or added by this plugin. More...
 
virtual void nodeVisibilityChanged (int _identifier)
 A scenegraph node has been shown or hidden. More...
 
virtual void getCurrentRenderer (unsigned int _viewer, QString &_rendererName)
 Get the current renderer for the given viewer. More...
 
- Private Member Functions inherited from FileInterface
virtual ~FileInterface ()
 Destructor. More...
 
virtual bool saveObject (int _id, QString _filename)=0
 Save an object from the given file. More...
 
virtual bool saveObjects (IdList _ids, QString _filename)
 Save multiple objects to one file. More...
 
- Private Member Functions inherited from LoadSaveInterface
virtual ~LoadSaveInterface ()
 Destructor. More...
 
virtual void addEmptyObject (DataType _type, int &_id)
 
virtual void copyObject (int _oldId, int &_newId)
 
virtual void emptyObjectAdded (int _id)
 DEPRECATED HERE (Moved to Type Interface)! Emit this signal if an empty object has been created. More...
 
virtual void deleteObject (int _id)
 Delete an object
This signal can be called from any thread.
. More...
 
virtual void deleteAllObjects ()
 Delete all Objects. More...
 
virtual void getAllFileFilters (QStringList &_filters)
 Get all file filters that are registered. More...
 
- Private Member Functions inherited from LoggingInterface
virtual ~LoggingInterface ()
 Destructor. More...
 
- Private Member Functions inherited from ScriptInterface
virtual ~ScriptInterface ()
 Destructor. More...
 
virtual void showScriptInEditor (QString _filename)
 
virtual void executeScript (QString _script)
 
virtual void getDescription (QString _function, QString &_description, QStringList &_parameters, QStringList &_descriptions)
 
- Private Member Functions inherited from PythonInterface
virtual void openPythonScriptInEditor (QString _script)
 
virtual ~PythonInterface ()
 Destructor. More...
 

Private Attributes

QWidget * loadOptions_
 
QWidget * saveOptions_
 
QCheckBox * saveBinary_
 
QCheckBox * saveVertexNormal_
 
QCheckBox * saveVertexColor_
 
QCheckBox * saveVertexTexCoord_
 
QCheckBox * saveFaceNormal_
 
QCheckBox * saveFaceColor_
 
QLabel * savePrecisionLabel_
 
QSpinBox * savePrecision_
 
QPushButton * saveDefaultButton_
 
QComboBox * triMeshHandling_
 
QCheckBox * loadVertexNormal_
 
QCheckBox * loadVertexColor_
 
QCheckBox * loadVertexTexCoord_
 
QCheckBox * loadFaceNormal_
 
QCheckBox * loadFaceColor_
 
QPushButton * loadDefaultButton_
 
int trimeshOptions_
 

Detailed Description

Definition at line 67 of file FilePLY.hh.

Constructor & Destructor Documentation

◆ FilePLYPlugin()

FilePLYPlugin::FilePLYPlugin ( )

Constructor.

Definition at line 56 of file FilePLY.cc.

◆ ~FilePLYPlugin()

FilePLYPlugin::~FilePLYPlugin ( )
inline

Definition at line 113 of file FilePLY.hh.

Member Function Documentation

◆ backupTextureCoordinates()

template<class MeshT >
void FilePLYPlugin::backupTextureCoordinates ( MeshT _mesh)
private

creates a backup of the original per vertex/face texture coordinates

Definition at line 56 of file FilePLYT_impl.hh.

◆ description()

QString FilePLYPlugin::description ( )
inlinevirtual

Return a description of what the plugin is doing.

This function has to return a basic description of the plugin

Implements BaseInterface.

Definition at line 116 of file FilePLY.hh.

◆ fileOpened

void FilePLYPlugin::fileOpened ( int  )
inlineprivateslot

Definition at line 94 of file FilePLY.hh.

◆ getLoadFilters()

QString FilePLYPlugin::getLoadFilters ( )
virtual

Return the Qt Filters for File dialogs when loading files (e.g. "Off files ( *.off )" )

Implements FileInterface.

Definition at line 85 of file FilePLY.cc.

◆ getSaveFilters()

QString FilePLYPlugin::getSaveFilters ( )
virtual

Get the Qt Filters for Filedialogs when saving files (e.g. "Off files ( *.off )" )

Implements FileInterface.

Definition at line 91 of file FilePLY.cc.

◆ handleTrimeshDialog()

void FilePLYPlugin::handleTrimeshDialog ( )
private

Displays a dialog to ask how to load the mesh (triangle, polymesh , autodetect)

Definition at line 301 of file FilePLY.cc.

◆ initializePlugin()

void FilePLYPlugin::initializePlugin ( )
privatevirtual

Initialize Plugin.

This slot is called if the plugin is loaded and has to be initialized. All initialization stuff in this slot has to stay inside the plugin, no external signals are allowed here (and will be ignored). Don't create any objects via PluginFunctions here. Use the pluginsInitialized() slot for external initialization. After execution of this slot your plugin should be fully functional. Only gui elements may be uninitialized and should be created in pluginsInitialized().

Reimplemented from BaseInterface.

Definition at line 80 of file FilePLY.cc.

◆ loadObject [1/2]

int FilePLYPlugin::loadObject ( QString  _filename)
slot

Loads Object and converts it to a triangle mesh if possible.

Definition at line 168 of file FilePLY.cc.

◆ loadObject [2/2]

int FilePLYPlugin::loadObject ( QString  _filename,
DataType  _type 
)
slot

Loads object with forcing the given datatype.

Definition at line 103 of file FilePLY.cc.

◆ loadOptionsWidget()

QWidget * FilePLYPlugin::loadOptionsWidget ( QString  _currentFilter)
virtual

You can provide a special widget showing options for loading your file types depending on the current filter

_currentFilter: one filter from loadFilters

Return 0 when you don't need one

Implements FileInterface.

Definition at line 636 of file FilePLY.cc.

◆ loadPolyMeshObject

int FilePLYPlugin::loadPolyMeshObject ( QString  _filename,
OpenMesh::IO::Options _opt 
)
slot

Always loads mesh as polymesh.

load a poly-mesh with given filename

Definition at line 409 of file FilePLY.cc.

◆ loadTriMeshObject

int FilePLYPlugin::loadTriMeshObject ( QString  _filename,
OpenMesh::IO::Options _opt 
)
slot

Loads a triangle mesh.

load a triangle-mesh with given filename

Definition at line 324 of file FilePLY.cc.

◆ name()

QString FilePLYPlugin::name ( )
inlinevirtual

Return a name for the plugin.

This Function has to return the name of the plugin.

Implements BaseInterface.

Definition at line 115 of file FilePLY.hh.

◆ noguiSupported()

void FilePLYPlugin::noguiSupported ( )
inlineprivatevirtual

Using this function you can inform the core that your plugin can run without creating a widget. If your plugin does not implement this function, it will not be loaded in scripting mode without gui. You don't have to do anything in this function.

Reimplemented from BaseInterface.

Definition at line 96 of file FilePLY.hh.

◆ saveObject

bool FilePLYPlugin::saveObject ( int  _id,
QString  _filename 
)
slot

Definition at line 497 of file FilePLY.cc.

◆ saveOptionsWidget()

QWidget * FilePLYPlugin::saveOptionsWidget ( QString  _currentFilter)
virtual

You can provide a special widget showing options for saving your file types depending on the current filter

_currentFilter: one filter from saveFilters

Return 0 when you don't need one

Implements FileInterface.

Definition at line 579 of file FilePLY.cc.

◆ slotLoadDefault()

void FilePLYPlugin::slotLoadDefault ( )
private

Slot called when user wants to save the given Load options as default.

Definition at line 691 of file FilePLY.cc.

◆ slotSaveDefault()

void FilePLYPlugin::slotSaveDefault ( )
private

Slot called when user wants to save the given Save options as default.

Definition at line 705 of file FilePLY.cc.

◆ supportedType()

DataType FilePLYPlugin::supportedType ( )
virtual

Return your supported object type( e.g. DATA_TRIANGLE_MESH )

If you support multiple DataTypes you can combine them bitwise here. The function is used from the load and save code to check if your plugin can handle an object of a given dataType.

Implements FileInterface.

Definition at line 97 of file FilePLY.cc.

◆ version

QString FilePLYPlugin::version ( )
inlineslot

Definition at line 142 of file FilePLY.hh.

Member Data Documentation

◆ loadDefaultButton_

QPushButton* FilePLYPlugin::loadDefaultButton_
private

Definition at line 171 of file FilePLY.hh.

◆ loadFaceColor_

QCheckBox* FilePLYPlugin::loadFaceColor_
private

Definition at line 170 of file FilePLY.hh.

◆ loadFaceNormal_

QCheckBox* FilePLYPlugin::loadFaceNormal_
private

Definition at line 169 of file FilePLY.hh.

◆ loadOptions_

QWidget* FilePLYPlugin::loadOptions_
private

Definition at line 152 of file FilePLY.hh.

◆ loadVertexColor_

QCheckBox* FilePLYPlugin::loadVertexColor_
private

Definition at line 167 of file FilePLY.hh.

◆ loadVertexNormal_

QCheckBox* FilePLYPlugin::loadVertexNormal_
private

Definition at line 166 of file FilePLY.hh.

◆ loadVertexTexCoord_

QCheckBox* FilePLYPlugin::loadVertexTexCoord_
private

Definition at line 168 of file FilePLY.hh.

◆ saveBinary_

QCheckBox* FilePLYPlugin::saveBinary_
private

Definition at line 155 of file FilePLY.hh.

◆ saveDefaultButton_

QPushButton* FilePLYPlugin::saveDefaultButton_
private

Definition at line 163 of file FilePLY.hh.

◆ saveFaceColor_

QCheckBox* FilePLYPlugin::saveFaceColor_
private

Definition at line 160 of file FilePLY.hh.

◆ saveFaceNormal_

QCheckBox* FilePLYPlugin::saveFaceNormal_
private

Definition at line 159 of file FilePLY.hh.

◆ saveOptions_

QWidget* FilePLYPlugin::saveOptions_
private

Definition at line 153 of file FilePLY.hh.

◆ savePrecision_

QSpinBox* FilePLYPlugin::savePrecision_
private

Definition at line 162 of file FilePLY.hh.

◆ savePrecisionLabel_

QLabel* FilePLYPlugin::savePrecisionLabel_
private

Definition at line 161 of file FilePLY.hh.

◆ saveVertexColor_

QCheckBox* FilePLYPlugin::saveVertexColor_
private

Definition at line 157 of file FilePLY.hh.

◆ saveVertexNormal_

QCheckBox* FilePLYPlugin::saveVertexNormal_
private

Definition at line 156 of file FilePLY.hh.

◆ saveVertexTexCoord_

QCheckBox* FilePLYPlugin::saveVertexTexCoord_
private

Definition at line 158 of file FilePLY.hh.

◆ triMeshHandling_

QComboBox* FilePLYPlugin::triMeshHandling_
private

Definition at line 165 of file FilePLY.hh.

◆ trimeshOptions_

int FilePLYPlugin::trimeshOptions_
private

Definition at line 173 of file FilePLY.hh.


The documentation for this class was generated from the following files: