Commit 8a1caf2a authored by Matthias Möller's avatar Matthias Möller
Browse files

add scripting and vsi funtion to create backups

git-svn-id: 383ad7c9-94d9-4d36-a494-682f7c89f535
parent a9864b6a
......@@ -137,6 +137,12 @@ void BackupPlugin::pluginsInitialized() {
connect(redoContextAction_, SIGNAL(triggered()), this, SLOT(slotObjectRedo()) );
emit addContextMenuItem(redoContextAction_, DATA_ALL, CONTEXTOBJECTMENU);
//createBackup(int _objectId, QString _name, UpdateType _type= UPDATE_ALL)
emit setSlotDescription("createBackup(int,QString)", tr("Creates a backup which can be restored via undo."),
QString("objectId,name").split(","), QString("Id of the object,name of the backup").split(","));
emit setSlotDescription("createBackup(int,QString,UpdateType)", tr("Creates a backup which can be restored via undo."),
QString("objectId,name,type").split(","), QString("Id of the object,name of the backup,updatetypes which are changed").split(","));
......@@ -397,6 +403,13 @@ void BackupPlugin::slotRedo(){
void BackupPlugin::createBackup(int _objectId, QString _name, UpdateType _type)
#if QT_VERSION < 0x050000
Q_EXPORT_PLUGIN2( backupplugin , BackupPlugin );
......@@ -78,6 +78,8 @@ signals:
// BaseInterface
void updateView();
void updatedObject(int _identifier, const UpdateType& _type);
void setSlotDescription(QString _slotName , QString _slotDescription,
QStringList _parameters , QStringList _descriptions);
// LoggingInterface
void log(Logtype _type, QString _message);
......@@ -142,6 +144,8 @@ private slots:
public slots:
QString version() { return QString("0.1"); };
void createBackup(int _objectId, QString _name, UpdateType _type= UPDATE_ALL);
~BackupPlugin() {};
include (plugin)
openflipper_plugin(INSTALLDATA VsiMetadata)
<element name="backup_createBackup">
<category>Object Manipulation</category>
<short>Create Backup</short>
<long>Creates a backup which can be restored via undo.</long>
<input name="obj" type="ObjectId">
<long>ID of an object</long>
<input name="name" type="String">
<long>Name of the backup</long>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment