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_;