60#include "GroupData.hh"
62class BackupPlugin :
public QObject,
BaseInterface ,
KeyInterface,
MenuInterface,
BackupInterface,
LoggingInterface,
ToolbarInterface,
LoadSaveInterface,
ContextMenuInterface,
OptionsInterface,
PythonInterface
76 Q_PLUGIN_METADATA(IID
"org.OpenFlipper.Plugins.Plugin-Backup")
81 void updatedObject(
int _identifier,
const UpdateType& _type);
82 void setSlotDescription(QString _slotName , QString _slotDescription,
83 QStringList _parameters , QStringList _descriptions);
86 void log(
Logtype _type, QString _message);
87 void log(QString _message);
90 void getMenubarMenu (QString _name, QMenu *& _menu,
bool _create);
93 void undo(
int _objectid);
95 void redo(
int _objectid);
97 void aboutToRestore(
int _objectid);
98 void restored(
int _objectid);
99 void generateBackup(
int _id, QString _name,
UpdateType _type);
102 void addToolbar(QToolBar* _toolbar);
103 void getToolBar( QString _name, QToolBar*& _toolbar);
106 void registerKey(
int _key, Qt::KeyboardModifiers _modifiers, QString _description,
bool _multiUse =
false);
114 void initializePlugin();
115 void pluginsInitialized();
117 void slotAllCleared();
120 void slotKeyEvent( QKeyEvent* _event );
123 void objectDeleted (
int _objectid);
127 void slotCreateBackup(
IdList _objectids , QString _name, std::vector<UpdateType> _types);
128 void slotUndo(
int _objectid);
129 void slotRedo(
int _objectid);
134 void slotUpdateContextMenu(
int _objectId );
137 bool initializeOptionsWidget(QWidget*& _widget);
142 void updateButtons();
147 void slotObjectUndo();
148 void slotObjectRedo();
151 QString version() {
return QString(
"0.1"); };
159 QString
name() {
return (QString(
"Backup")); };
160 QString
description( ) {
return (QString(
"Creates Backups of objects when supported by plugins")); };
162 void createBackupSimple(
int _objectId,
const QString &_name);
170 QAction* backupsEnabledAction_;
172 QAction* undoMenuAction_;
173 QAction* redoMenuAction_;
175 QAction* undoToolAction_;
176 QAction* redoToolAction_;
178 QAction* undoContextAction_;
179 QAction* redoContextAction_;
181 QSpinBox* maxBackupSpinBox_;
std::vector< int > IdList
Standard Type for id Lists used for scripting.
Logtype
Log types for Message Window.
Interface class for backup handling.
QString description()
Return a description of what the plugin is doing.
void slotEnableDisableBackups()
Backups enabled or disabled checkbox.
QMenu * backupMenu_
The backup Menu.
QString name()
Return a name for the plugin.
Interface class from which all plugins have to be created.
Class that is used to store global(group) backups.
Keyboard Event Interface.
Interface for all plugins which want to Load or Save files and create Objects.
Interface for all Plugins which do logging to the logging window of the framework.
Options Dialog interface.
Interface class for exporting functions to python.
const UpdateType UPDATE_ALL(UpdateTypeSet(1))
Identifier for all updates.