Developer Documentation

Signals | Public Member Functions | Private Slots | Private Member Functions | List of all members
LoadSaveInterface Class Reference

Interface for all plugins which want to Load or Save files and create Objects. More...

`#include <OpenFlipper/BasePlugin/LoadSaveInterface.hh>`

Inheritance diagram for LoadSaveInterface:

## Signals
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...

## Public Member Functions
virtual | ~LoadSaveInterface ()
| Destructor.
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 Slots
virtual void | fileOpened (int _id)
| A file has been opened. More...

## Private Member Functions
virtual void | addedEmptyObject (int _id)
| An empty object has been added. More...
virtual void | objectDeleted (int _id)
| An object was deleted. More...

## Detailed Description

Interface for all plugins which want to Load or Save files and create Objects.

Detailed description
Using this interface you can instruct the core to open/save objects or to create new empty objects.

Definition at line 59 of file LoadSaveInterface.hh.

## Member Function Documentation

## ◆ addedEmptyObject()

virtual void LoadSaveInterface::addedEmptyObject | ( | int | _id | ) |
| inline private virtual

An empty object has been added.

Slot is called if an empty object has been added by the core.
This slot will be executed on the main thread.

Parameters

  _id | Id of the new object

Reimplemented in MeshObjectSelectionPlugin, and TypeLightPlugin.

Definition at line 139 of file LoadSaveInterface.hh.

## ◆ addEmptyObject()

virtual void LoadSaveInterface::addEmptyObject | ( | DataType | _type,
|  | int & | _id
| ) |  |
| inline virtual

Add an empty object of the given type
This signal can be called from any thread.

Parameters

  _type | Type to be created
  _id | Here the id of the loaded object is returned. id is -1 something went wrong

Definition at line 89 of file LoadSaveInterface.hh.

## ◆ copyObject()

virtual void LoadSaveInterface::copyObject | ( | int | _oldId,
|  | int & | _newId
| ) |  |
| inline virtual

Create a copy of an existing object

Parameters

  _oldId | id of the object to copy
  _newId | id of the new object created

Definition at line 96 of file LoadSaveInterface.hh.

## ◆ deleteAllObjects()

virtual void LoadSaveInterface::deleteAllObjects | ( |  | ) |
| inline virtual

Delete all Objects.

Definition at line 116 of file LoadSaveInterface.hh.

## ◆ deleteObject()

virtual void LoadSaveInterface::deleteObject | ( | int | _id | ) |
| inline virtual

Delete an object
This signal can be called from any thread.
.

Parameters

  _id | Id of the object

Definition at line 111 of file LoadSaveInterface.hh.

## ◆ emptyObjectAdded()

virtual void LoadSaveInterface::emptyObjectAdded | ( | int | _id | ) |
| inline virtual

DEPRECATED HERE (Moved to Type Interface)! Emit this signal if an empty object has been created.

Deprecated! Objects are added by the Type Plugins and this is signal is in the TypeInterface now

Parameters

  _id | Id of the added object

Definition at line 105 of file LoadSaveInterface.hh.

## ◆ fileOpened

virtual void LoadSaveInterface::fileOpened | ( | int | _id | ) |
| inline private virtual slot

A file has been opened.

This slot is called if a file has been opened by the core.
This slot will be executed in the main thread.

Parameters

  _id | Id of the new object

Definition at line 131 of file LoadSaveInterface.hh.

## ◆ getAllFileFilters()

virtual void LoadSaveInterface::getAllFileFilters | ( | QStringList & | _filters | ) |
| inline virtual

Get all file filters that are registered.

Definition at line 121 of file LoadSaveInterface.hh.

## ◆ load

virtual void LoadSaveInterface::load | ( | QString | _filename,
|  | DataType | _type,
|  | int & | _id
| ) |  |
| inline virtual signal

Load object from file with a specific DataType.

Parameters

  _filename | Filename of the File to load
  _type | Type to be loaded
  _id | Here the id of the loaded object is returned. id is -1 something went wrong

Definition at line 80 of file LoadSaveInterface.hh.

## ◆ objectDeleted()

virtual void LoadSaveInterface::objectDeleted | ( | int | _id | ) |
| inline private virtual

An object was deleted.

This function is called by the core if an object gets deleted. It is called immediately before the object is removed from the scenegraph. So if this function is invoked, the object still exists. All plugins get informed via this slot.\

After this function got called for all plugins, the object is removed from the scene with all nodes attached to it and all PerObjectData attached to it.
This slot will be executed on the main thread.

Parameters

  _id | Id of the object that is deleted.

Reimplemented in TypeLightPlugin, and TypeQtWidgetPlugin.

Definition at line 154 of file LoadSaveInterface.hh.

## ◆ save

virtual void LoadSaveInterface::save | ( | int | _id,
|  | QString | _filename
| ) |  |
| inline virtual signal

Save object to a file.

Parameters

  _id | Object to Save
  _filename | Filename to save it to (Leave as "" to automatically determine filename)

Definition at line 72 of file LoadSaveInterface.hh.

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

- OpenFlipper/BasePlugin/LoadSaveInterface.hh