Developer Documentation

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
List of all members
BackupInterface Class Reference

Interface class for backup handling. More...

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

Inheritance diagram for BackupInterface:

## Interface definition for general Plugins
virtual void | createBackup (int _objectid, QString _name, UpdateType _type=UPDATE_ALL)
| Tell Backup Plugin to create a backup. More...
virtual void | createBackup (IdList _objectids, QString _name, std::vector< UpdateType > _types)
| Tell Backup Plugin to create a group backup. More...
virtual void | undo (int _objectid)
| Tell Backup Plugin to undo the last action of an object. More...
virtual void | redo (int _objectid)
| Tell Backup Plugin to redo the last action on an object. More...
virtual void | undo ()
| Tell Backup Plugin to undo the last action. More...
virtual void | redo ()
| Tell Backup Plugin to redo the last action. More...
virtual | ~BackupInterface ()
| Destructor.
virtual void | slotCreateBackup (int _objectid, QString _name, UpdateType _type=UPDATE_ALL)
| Backup for an object requested. More...
virtual void | slotCreateBackup (IdList _objectids, QString _name, std::vector< UpdateType > _types)
| Backup for an object requested. More...
virtual void | slotAboutToRestore (int _objectid)
| A given object will be restored. More...
virtual void | slotRestored (int _objectid)
| Object fully restored. More...

## Interface definition for Backup Plugins
These signals and slots have to be implemented if you create a plugin managing Backups ( A Backup plugin is already provided by OpenFlipper so you don't need to use these funcions).
virtual void | aboutToRestore (int _objectid)
| Backup Plugin tells other Plugins that a restore will happen. More...
virtual void | generateBackup (int _id, QString _name, UpdateType _type)
| This signal is emitted by a BackupPlugin and tells a TypePlugin to generate a backup. More...
virtual void | restored (int _objectid)
| Backup Plugin tells other Plugins that a restore has happened. More...
virtual void | slotUndo (int _objectid)
| Undo the last action of an object. More...
virtual void | slotRedo (int _objectid)
| Redo the last action on an object. More...
virtual void | slotUndo ()
| Undo the last action. More...
virtual void | slotRedo ()
| Redo the last action. More...

## Detailed Description

Interface class for backup handling.

Detailed description
This interface defines functions to implement backup and restore for objects or object groups.

Definition at line 75 of file BackupInterface.hh.

## Member Function Documentation

virtual void BackupInterface::aboutToRestore | ( | int | _objectid | ) |
| inline virtual signal

Backup Plugin tells other Plugins that a restore will happen.

Definition at line 207 of file BackupInterface.hh.

virtual void BackupInterface::createBackup | ( | int | _objectid,
|  | QString | _name,
|  | UpdateType | _type = `UPDATE_ALL`
| ) |  |
| inline virtual signal

Tell Backup Plugin to create a backup.

Plugins which supports backups can call this function if they want to create backups.
A Backup control Plugin will do the rest.

Parameters

  _objectid | Identifier of the object to create the backup
  _name | Name of the Backup, to show the user what can be recovered
  _type | The type of the backup (e.g. UPDATE_SELECTION)

Reimplemented in BackupPlugin.

Definition at line 93 of file BackupInterface.hh.

virtual void BackupInterface::createBackup | ( | IdList | _objectids,
|  | QString | _name,
|  | std::vector< UpdateType > | _types
| ) |  |
| inline virtual

Tell Backup Plugin to create a group backup.

Plugins which supports backups can call this function if they want to create group backups.
The backups specified here will be grouped together. They can only be reverted as one block and not one by one. They combine backups on multiple objects to a single backup set.

A Backup control Plugin will do the rest.

Parameters

  _objectids | Identifier of the object to create the backup
  _name | Name of the Backup, to show the user what can be recovered
  _types | The types of the backups (e.g. UPDATE_SELECTION)

Definition at line 107 of file BackupInterface.hh.

virtual void BackupInterface::generateBackup | ( | int | _id,
|  | QString | _name,
|  | UpdateType | _type
| ) |  |
| inline virtual signal

This signal is emitted by a BackupPlugin and tells a TypePlugin to generate a backup.

Parameters

  _id | Id of the added object
  _name | Name of the backup to generate
  _type | the type of backup that needs to be done

Definition at line 264 of file BackupInterface.hh.

virtual void BackupInterface::redo | ( | int | _objectid | ) |
| inline virtual

Tell Backup Plugin to redo the last action on an object.

Plugins which supports backups can call this function if they want to restore backups.
A Backup control Plugin will do the rest.

Parameters

  _objectid | Identifier of the object to restore

Definition at line 123 of file BackupInterface.hh.

virtual void BackupInterface::redo | ( |  | ) |
| inline virtual

Tell Backup Plugin to redo the last action.

Plugins which supports backups can call this function if they want to restore backups.
A Backup control Plugin will do the rest.

Definition at line 137 of file BackupInterface.hh.

virtual void BackupInterface::restored | ( | int | _objectid | ) |
| inline virtual

Backup Plugin tells other Plugins that a restore has happened.

Definition at line 212 of file BackupInterface.hh.

virtual void BackupInterface::slotAboutToRestore | ( | int | _objectid | ) |
| inline private virtual

A given object will be restored.

This function is called before an object is restored from a backup. perObjectDatas and the object will be reset to the backup state after this function is called for all plugins.

If you have any pointers or references to the given object you have to clean them up here.

Parameters

  _objectid | Identifier of the object which is about to be restored

Definition at line 174 of file BackupInterface.hh.

virtual void BackupInterface::slotCreateBackup | ( | int | _objectid,
|  | QString | _name,
|  | UpdateType | _type = `UPDATE_ALL`
| ) |  |
| inline private virtual slot

Backup for an object requested.

This function will be called if a plugin requests a backup. You can also react on this event if you reimplement this function in your plugin.

Parameters

  _objectid | Identifier of the object to create the backup
  _name | Name of the Backup, to show the user what can be recovered
  _type | What has been updated (This can be used to restrict the backup to certain parts of the object)

Definition at line 150 of file BackupInterface.hh.

virtual void BackupInterface::slotCreateBackup | ( | IdList | _objectids,
|  | QString | _name,
|  | std::vector< UpdateType > | _types
| ) |  |
| inline private virtual

Backup for an object requested.

This function will be called if a plugin requests a backup. You can also react on this event if you reimplement this function in your plugin.

Parameters

  _objectids | Identifiers of the object to create the backup
  _name | Name of the Backup, to show the user what can be recovered
  _types | What has been updated (This can be used to restrict the backup to certain parts of the objects)

Definition at line 161 of file BackupInterface.hh.

virtual void BackupInterface::slotRedo | ( | int | _objectid | ) |
| inline private virtual

Redo the last action on an object.

This function has to be implemented in the backup management plugin. Normally this function is provided by the default backup plugin and should not be used! To restore data in your plugin use the slotRestore above.

Parameters

  _objectid | Identifier of the object to restore

Definition at line 236 of file BackupInterface.hh.

virtual void BackupInterface::slotRedo | ( |  | ) |
| inline private virtual

Redo the last action.

This function has to be implemented in the backup management plugin. Normally this function is provided by the default backup plugin and should not be used! To restore data in your plugin use the slotRestore above.

Definition at line 254 of file BackupInterface.hh.

virtual void BackupInterface::slotRestored | ( | int | _objectid | ) |
| inline private virtual

Object fully restored.

This function is called after an object and all data from other plugins is restored from a backup.

perObjectDatas and the object have been reset to the backup state.

Parameters

  _objectid | Identifier of the object which is about to be restored

Definition at line 185 of file BackupInterface.hh.

virtual void BackupInterface::slotUndo | ( | int | _objectid | ) |
| inline private virtual slot

Undo the last action of an object.

This function has to be implemented in the backup management plugin. Normally this function is provided by the default backup plugin and should not be used! To restore data in your plugin use the slotRestore above.

Parameters

  _objectid | Identifier of the object to restore

Definition at line 226 of file BackupInterface.hh.

virtual void BackupInterface::slotUndo | ( |  | ) |
| inline private virtual

Undo the last action.

This function has to be implemented in the backup management plugin. Normally this function is provided by the default backup plugin and should not be used! To restore data in your plugin use the slotRestore above.

Definition at line 245 of file BackupInterface.hh.

virtual void BackupInterface::undo | ( | int | _objectid | ) |
| inline virtual

Tell Backup Plugin to undo the last action of an object.

Plugins which supports backups can call this function if they want to restore backups.
A Backup control Plugin will do the rest.

Parameters

  _objectid | Identifier of the object to restore

Definition at line 115 of file BackupInterface.hh.

virtual void BackupInterface::undo | ( |  | ) |
| inline virtual

Tell Backup Plugin to undo the last action.

Plugins which supports backups can call this function if they want to restore backups.
A Backup control Plugin will do the rest.

Definition at line 130 of file BackupInterface.hh.

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

- OpenFlipper/BasePlugin/BackupInterface.hh