62class BackupPlugin :
public QObject,
BaseInterface ,
KeyInterface,
MenuInterface,
BackupInterface,
LoggingInterface,
ToolbarInterface,
LoadSaveInterface,
ContextMenuInterface,
OptionsInterface,
PythonInterface
76 Q_PLUGIN_METADATA(IID
"org.OpenFlipper.Plugins.Plugin-Backup")
80 void updateView()
override;
81 void updatedObject(
int _identifier,
const UpdateType& _type)
override;
82 void setSlotDescription(QString _slotName , QString _slotDescription,
83 QStringList _parameters , QStringList _descriptions)
override;
86 void log(
Logtype _type, QString _message)
override;
87 void log(QString _message)
override;
90 void getMenubarMenu (QString _name, QMenu *& _menu,
bool _create)
override;
93 void undo(
int _objectid)
override;
95 void redo(
int _objectid)
override;
97 void aboutToRestore(
int _objectid)
override;
98 void restored(
int _objectid)
override;
99 void generateBackup(
int _id, QString _name,
UpdateType _type)
override;
102 void addToolbar(QToolBar* _toolbar)
override;
103 void getToolBar( QString _name, QToolBar*& _toolbar)
override;
106 void registerKey(
int _key, Qt::KeyboardModifiers _modifiers, QString _description,
bool _multiUse =
false)
override;
114 void initializePlugin()
override;
115 void pluginsInitialized()
override;
117 void slotAllCleared()
override;
120 void slotKeyEvent( QKeyEvent* _event )
override;
123 void objectDeleted (
int _objectid)
override;
127 void slotCreateBackup(
IdList _objectids , QString _name, std::vector<UpdateType> _types)
override;
128 void slotUndo(
int _objectid)
override;
129 void slotRedo(
int _objectid)
override;
130 void slotUndo()
override;
131 void slotRedo()
override;
134 void slotUpdateContextMenu(
int _objectId )
override;
137 bool initializeOptionsWidget(QWidget*& _widget)
override;
138 void applyOptions()
override;
142 void updateButtons();
147 void slotObjectUndo();
148 void slotObjectRedo();
151 QString version()
override {
return QString(
"0.1"); };
159 QString
name()
override {
return (QString(
"Backup")); };
160 QString
description( )
override {
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_;