BackupPlugin.cc 14.3 KB
Newer Older
Jan Möbius's avatar
Jan Möbius committed
1
/*===========================================================================*\
Jan Möbius's avatar
Jan Möbius committed
2
3
*                                                                            *
*                              OpenFlipper                                   *
Jan Möbius's avatar
Jan Möbius committed
4
*      Copyright (C) 2001-2011 by Computer Graphics Group, RWTH Aachen       *
Jan Möbius's avatar
Jan Möbius committed
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
*                           www.openflipper.org                              *
*                                                                            *
*--------------------------------------------------------------------------- *
*  This file is part of OpenFlipper.                                         *
*                                                                            *
*  OpenFlipper is free software: you can redistribute it and/or modify       *
*  it under the terms of the GNU Lesser General Public License as            *
*  published by the Free Software Foundation, either version 3 of            *
*  the License, or (at your option) any later version with the               *
*  following exceptions:                                                     *
*                                                                            *
*  If other files instantiate templates or use macros                        *
*  or inline functions from this file, or you compile this file and          *
*  link it with other files to produce an executable, this file does         *
*  not by itself cause the resulting executable to be covered by the         *
*  GNU Lesser General Public License. This exception does not however        *
*  invalidate any other reasons why the executable file might be             *
*  covered by the GNU Lesser General Public License.                         *
*                                                                            *
*  OpenFlipper is distributed in the hope that it will be useful,            *
*  but WITHOUT ANY WARRANTY; without even the implied warranty of            *
*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the             *
*  GNU Lesser General Public License for more details.                       *
*                                                                            *
*  You should have received a copy of the GNU LesserGeneral Public           *
*  License along with OpenFlipper. If not,                                   *
*  see <http://www.gnu.org/licenses/>.                                       *
*                                                                            *
Jan Möbius's avatar
Jan Möbius committed
33
34
35
\*===========================================================================*/

/*===========================================================================*\
Jan Möbius's avatar
Jan Möbius committed
36
37
38
39
40
*                                                                            *
*   $Revision$                                                       *
*   $LastChangedBy$                                                *
*   $Date$                     *
*                                                                            *
Jan Möbius's avatar
Jan Möbius committed
41
\*===========================================================================*/
Jan Möbius's avatar
 
Jan Möbius committed
42
43
44
45
46
47
48

#include <QtGui>
#include "BackupPlugin.hh"
#include <iostream>
#include <OpenFlipper/BasePlugin/PluginFunctions.hh>
#include <OpenFlipper/common/GlobalOptions.hh>

Dirk Wilden's avatar
Dirk Wilden committed
49
#include "GroupBackup.hh"
Jan Möbius's avatar
 
Jan Möbius committed
50

51
52
53
54
55
56
57
58
59
60
61
62
63
64
//-----------------------------------------------------------------------------
BackupPlugin::BackupPlugin():
backupMenu_(0),
backupsEnabledAction_(0),
undoMenuAction_(0),
redoMenuAction_(0),
undoToolAction_(0),
redoToolAction_(0),
undoContextAction_(0),
redoContextAction_(0)
{

}

Dirk Wilden's avatar
Dirk Wilden committed
65
//-----------------------------------------------------------------------------
Jan Möbius's avatar
 
Jan Möbius committed
66
67
68
69
70
71
72

void BackupPlugin::pluginsInitialized() {

  // Create Backup menu
  emit getMenubarMenu(tr("&Backup"), backupMenu_, true );

  if ( OpenFlipper::Options::gui() ) {
Dirk Wilden's avatar
Dirk Wilden committed
73
    //construct the menu
Jan Möbius's avatar
 
Jan Möbius committed
74
75
76
    backupsEnabledAction_ = new QAction("Backups Enabled",0);
    backupsEnabledAction_->setCheckable(true);
    connect (backupsEnabledAction_, SIGNAL(triggered(bool)), this, SLOT(slotEnableDisableBackups()) );
77

Dirk Wilden's avatar
Dirk Wilden committed
78
79
80
81
    undoMenuAction_ = new QAction(tr("&Undo"), this);
    undoMenuAction_->setEnabled(false);
    undoMenuAction_->setStatusTip(tr("Undo the last action."));
    undoMenuAction_->setIcon(QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"edit-undo.png") );
82
    connect(undoMenuAction_, SIGNAL(triggered()), this, SIGNAL( undo() ) );
83

Dirk Wilden's avatar
Dirk Wilden committed
84
85
86
87
    redoMenuAction_ = new QAction(tr("&Redo"), this);
    redoMenuAction_->setEnabled(false);
    redoMenuAction_->setStatusTip(tr("Redo the last action"));
    redoMenuAction_->setIcon(QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"edit-redo.png") );
88
    connect(redoMenuAction_, SIGNAL(triggered()), this, SIGNAL( redo() ) );
Dirk Wilden's avatar
Dirk Wilden committed
89
90
91
92
93

    backupMenu_->addAction(undoMenuAction_);
    backupMenu_->addAction(redoMenuAction_);
    backupMenu_->addSeparator();
    backupMenu_->addAction(backupsEnabledAction_);
Jan Möbius's avatar
 
Jan Möbius committed
94
95
96

    // Add a backup Toolbar
    QToolBar* toolbar = new QToolBar("Backup Toolbar");
97

Jan Möbius's avatar
 
Jan Möbius committed
98
    //Undo
Dirk Wilden's avatar
Dirk Wilden committed
99
100
101
102
    undoToolAction_ = new QAction(tr("&Undo"), this);
    undoToolAction_->setEnabled(false);
    undoToolAction_->setStatusTip(tr("Undo the last action."));
    undoToolAction_->setIcon(QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"edit-undo.png") );
103
    connect(undoToolAction_, SIGNAL(triggered()), this, SIGNAL( undo() ) );
Dirk Wilden's avatar
Dirk Wilden committed
104
    toolbar->addAction(undoToolAction_);
105

Jan Möbius's avatar
 
Jan Möbius committed
106
    //Redo
Dirk Wilden's avatar
Dirk Wilden committed
107
108
109
110
    redoToolAction_ = new QAction(tr("&Redo"), this);
    redoToolAction_->setEnabled(false);
    redoToolAction_->setStatusTip(tr("Redo the last action"));
    redoToolAction_->setIcon(QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"edit-redo.png") );
111
    connect(redoToolAction_, SIGNAL(triggered()), this, SIGNAL( redo() ) );
Dirk Wilden's avatar
Dirk Wilden committed
112
    toolbar->addAction(redoToolAction_);
113

Jan Möbius's avatar
 
Jan Möbius committed
114
    emit addToolbar( toolbar );
115

Jan Möbius's avatar
 
Jan Möbius committed
116
117
118
    //the release event does not contain the modifier
    emit registerKey(Qt::Key_Z,  Qt::ControlModifier, tr("Undo Action"));
    emit registerKey(Qt::Key_Z, (Qt::ControlModifier | Qt::ShiftModifier),   tr("Redo Action"));
119

Dirk Wilden's avatar
Dirk Wilden committed
120
121
122
123
124
125
126
127
128
129
130
131
132
133
    //add actions for the context menu
    undoContextAction_ = new QAction(tr("&Undo"), this);
    undoContextAction_->setEnabled(false);
    undoContextAction_->setStatusTip(tr("Undo the last action."));
    undoContextAction_->setIcon(QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"edit-undo.png") );
    connect(undoContextAction_, SIGNAL(triggered()), this, SLOT(slotObjectUndo()) );
    emit addContextMenuItem(undoContextAction_, DATA_ALL, CONTEXTOBJECTMENU);

    redoContextAction_ = new QAction(tr("&Redo"), this);
    redoContextAction_->setEnabled(false);
    redoContextAction_->setStatusTip(tr("Redo the last action"));
    redoContextAction_->setIcon(QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"edit-redo.png") );
    connect(redoContextAction_, SIGNAL(triggered()), this, SLOT(slotObjectRedo()) );
    emit addContextMenuItem(redoContextAction_, DATA_ALL, CONTEXTOBJECTMENU);
Jan Möbius's avatar
 
Jan Möbius committed
134
135
136
  }
}

Dirk Wilden's avatar
Dirk Wilden committed
137
138
//-----------------------------------------------------------------------------

Jan Möbius's avatar
 
Jan Möbius committed
139
void BackupPlugin::slotAllCleared(){
Dirk Wilden's avatar
Dirk Wilden committed
140
141
  globalBackup_.clear();
}
Jan Möbius's avatar
 
Jan Möbius committed
142

Dirk Wilden's avatar
Dirk Wilden committed
143
144
145
//-----------------------------------------------------------------------------

void BackupPlugin::updateButtons() {
146

Dirk Wilden's avatar
Dirk Wilden committed
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
  if ( globalBackup_.undoAvailable() ){
    undoMenuAction_->setText( tr("Undo '%1'").arg( globalBackup_.undoName() ) );
    undoMenuAction_->setEnabled(true);
    undoToolAction_->setText( tr("Undo '%1'").arg( globalBackup_.undoName() ) );
    undoToolAction_->setEnabled(true);
  } else {
    undoMenuAction_->setText( tr("Undo") );
    undoMenuAction_->setEnabled(false);
    undoToolAction_->setText( tr("Undo") );
    undoToolAction_->setEnabled(false);
  }

  if ( globalBackup_.redoAvailable() ){
    redoMenuAction_->setText( tr("Redo '%1'").arg( globalBackup_.redoName() ) );
    redoMenuAction_->setEnabled(true);
    redoToolAction_->setText( tr("Redo '%1'").arg( globalBackup_.redoName() ) );
    redoToolAction_->setEnabled(true);
  } else {
    redoMenuAction_->setText( tr("Redo") );
    redoMenuAction_->setEnabled(false);
    redoToolAction_->setText( tr("Redo") );
    redoToolAction_->setEnabled(false);
  }
Jan Möbius's avatar
 
Jan Möbius committed
170

Dirk Wilden's avatar
Dirk Wilden committed
171
  backupsEnabledAction_->setChecked( OpenFlipper::Options::backupEnabled() );
Jan Möbius's avatar
 
Jan Möbius committed
172
173
}

Dirk Wilden's avatar
Dirk Wilden committed
174
175
//-----------------------------------------------------------------------------

Jan Möbius's avatar
 
Jan Möbius committed
176
177
178
179
void BackupPlugin::slotEnableDisableBackups() {
  OpenFlipper::Options::enableBackup(backupsEnabledAction_->isChecked());
}

Dirk Wilden's avatar
Dirk Wilden committed
180
181
//-----------------------------------------------------------------------------

Jan Möbius's avatar
 
Jan Möbius committed
182
183
184
185
186
void BackupPlugin::slotKeyEvent( QKeyEvent* _event ){
   switch (_event->key())
   {
      case Qt::Key_Z :
         if ( _event->modifiers() == Qt::ControlModifier )
Dirk Wilden's avatar
Dirk Wilden committed
187
           emit undo();
Jan Möbius's avatar
 
Jan Möbius committed
188
         else if ( _event->modifiers() == (Qt::ControlModifier | Qt::ShiftModifier) )
Dirk Wilden's avatar
Dirk Wilden committed
189
           emit redo();
Jan Möbius's avatar
 
Jan Möbius committed
190
191
192
193
194
195
         break;
      default:
         break;
  }
}

Dirk Wilden's avatar
Dirk Wilden committed
196
197
//-----------------------------------------------------------------------------

Jan Möbius's avatar
 
Jan Möbius committed
198
199
200
void BackupPlugin::objectDeleted(int _objectid) {
}

Dirk Wilden's avatar
Dirk Wilden committed
201
//-----------------------------------------------------------------------------
Jan Möbius's avatar
 
Jan Möbius committed
202

Dirk Wilden's avatar
Dirk Wilden committed
203
void BackupPlugin::slotUpdateContextMenu( int _objectId ){
Jan Möbius's avatar
 
Jan Möbius committed
204

Dirk Wilden's avatar
Dirk Wilden committed
205
206
207
208
209
  //disable everything
  undoContextAction_->setText( tr("Undo") );
  undoContextAction_->setEnabled(false);
  redoContextAction_->setText( tr("Redo") );
  redoContextAction_->setEnabled(false);
Jan Möbius's avatar
 
Jan Möbius committed
210

Dirk Wilden's avatar
Dirk Wilden committed
211
212
213
  //get backup data
  BaseObjectData* object = 0;
  PluginFunctions::getObject(_objectId, object);
Jan Möbius's avatar
 
Jan Möbius committed
214

Dirk Wilden's avatar
Dirk Wilden committed
215
  if ( object != 0 ){
Jan Möbius's avatar
 
Jan Möbius committed
216

Dirk Wilden's avatar
Dirk Wilden committed
217
218
    //get backup object data
    BackupData* backupData = 0;
Jan Möbius's avatar
 
Jan Möbius committed
219

Dirk Wilden's avatar
Dirk Wilden committed
220
221
    if ( object->hasObjectData( OBJECT_BACKUPS ) ){
      backupData = dynamic_cast< BackupData* >(object->objectData(OBJECT_BACKUPS));
Jan Möbius's avatar
 
Jan Möbius committed
222

Dirk Wilden's avatar
Dirk Wilden committed
223
224
225
226
227
      if ( backupData->undoAvailable() ){
        undoContextAction_->setData(_objectId);
        undoContextAction_->setText( tr("Undo '%1'").arg( backupData->undoName() ) );
        undoContextAction_->setEnabled( !backupData->undoBlocked() );
      }
Jan Möbius's avatar
 
Jan Möbius committed
228

Dirk Wilden's avatar
Dirk Wilden committed
229
230
231
232
      if ( backupData->redoAvailable() ){
        redoContextAction_->setData(_objectId);
        redoContextAction_->setText( tr("Redo '%1'").arg( backupData->redoName() ) );
        redoContextAction_->setEnabled( !backupData->redoBlocked() );
Jan Möbius's avatar
 
Jan Möbius committed
233
234
235
      }
    }
  }
Dirk Wilden's avatar
Dirk Wilden committed
236

Jan Möbius's avatar
 
Jan Möbius committed
237
238
}

Dirk Wilden's avatar
Dirk Wilden committed
239
//-----------------------------------------------------------------------------
Jan Möbius's avatar
 
Jan Möbius committed
240

Dirk Wilden's avatar
Dirk Wilden committed
241
void BackupPlugin::slotObjectUndo(){
242

Dirk Wilden's avatar
Dirk Wilden committed
243
244
  int id = undoContextAction_->data().toInt();
  emit undo(id);
Jan Möbius's avatar
 
Jan Möbius committed
245
246
}

Dirk Wilden's avatar
Dirk Wilden committed
247
//-----------------------------------------------------------------------------
Jan Möbius's avatar
 
Jan Möbius committed
248

Dirk Wilden's avatar
Dirk Wilden committed
249
void BackupPlugin::slotObjectRedo(){
250

Dirk Wilden's avatar
Dirk Wilden committed
251
252
253
  int id = undoContextAction_->data().toInt();
  emit redo(id);
}
Jan Möbius's avatar
 
Jan Möbius committed
254

Dirk Wilden's avatar
Dirk Wilden committed
255
//-----------------------------------------------------------------------------
Jan Möbius's avatar
 
Jan Möbius committed
256

Dirk Wilden's avatar
Dirk Wilden committed
257
void BackupPlugin::slotCreateBackup( int _objectid, QString _name, UpdateType _type){
258

Dirk Wilden's avatar
Dirk Wilden committed
259
260
  if ( !OpenFlipper::Options::backupEnabled() )
    return;
Jan Möbius's avatar
 
Jan Möbius committed
261

Dirk Wilden's avatar
Dirk Wilden committed
262
  BaseObjectData* object;
Jan Möbius's avatar
 
Jan Möbius committed
263

Dirk Wilden's avatar
Dirk Wilden committed
264
265
266
267
  if ( !PluginFunctions::getObject(_objectid,object) ){
    emit log(LOGWARN,"Unable to find backup object with id " + QString::number(_objectid));
    return;
  }
Jan Möbius's avatar
 
Jan Möbius committed
268

Dirk Wilden's avatar
Dirk Wilden committed
269
270
  //tell TypePlugin to Backup
  emit generateBackup( _objectid, _name, _type );
Jan Möbius's avatar
 
Jan Möbius committed
271

Dirk Wilden's avatar
Dirk Wilden committed
272
273
274
  //add global backup
  IdList groupIds;
  groupIds.push_back( _objectid );
Jan Möbius's avatar
 
Jan Möbius committed
275

Dirk Wilden's avatar
Dirk Wilden committed
276
  bool skipBackup = false;
Jan Möbius's avatar
 
Jan Möbius committed
277

Dirk Wilden's avatar
Dirk Wilden committed
278
279
280
  if ( globalBackup_.undoAvailable() ){
    //skip 'Original Object' Backups in global view
    BackupData* backupData = dynamic_cast< BackupData* >(object->objectData(OBJECT_BACKUPS));
Jan Möbius's avatar
 
Jan Möbius committed
281

Dirk Wilden's avatar
Dirk Wilden committed
282
283
284
    if ( backupData != 0 )
      skipBackup = !backupData->undoAvailable();
  }
Jan Möbius's avatar
 
Jan Möbius committed
285

Dirk Wilden's avatar
Dirk Wilden committed
286
287
288
289
  if ( !skipBackup ){
    GroupBackup* backup = new GroupBackup(groupIds, _name);
    globalBackup_.storeBackup( backup );
  }
Jan Möbius's avatar
 
Jan Möbius committed
290

Dirk Wilden's avatar
Dirk Wilden committed
291
292
293
  updateButtons();
  emit log(LOGOUT,"Created backup for " + QString::number(_objectid)+ " , Name : '" + _name + "'" );
}
Jan Möbius's avatar
 
Jan Möbius committed
294

Dirk Wilden's avatar
Dirk Wilden committed
295
//-----------------------------------------------------------------------------
Jan Möbius's avatar
 
Jan Möbius committed
296

Dirk Wilden's avatar
Dirk Wilden committed
297
void BackupPlugin::slotCreateBackup( IdList _objectids , QString _name, std::vector<UpdateType> _types){
Jan Möbius's avatar
 
Jan Möbius committed
298

Dirk Wilden's avatar
Dirk Wilden committed
299
300
  if ( !OpenFlipper::Options::backupEnabled() )
    return;
Jan Möbius's avatar
 
Jan Möbius committed
301

Dirk Wilden's avatar
Dirk Wilden committed
302
  IdList groupIds;
303

Dirk Wilden's avatar
Dirk Wilden committed
304
305
  if ( _objectids.size() != _types.size() ){
    emit log(LOGWARN,"Unable to create backup sizes of ids and updateTypes do not match!");
Jan Möbius's avatar
 
Jan Möbius committed
306
307
308
    return;
  }

Dirk Wilden's avatar
Dirk Wilden committed
309
310
  //generate backups on all objects
  for (unsigned int i=0; i < _objectids.size(); ++i){
Jan Möbius's avatar
 
Jan Möbius committed
311

Dirk Wilden's avatar
Dirk Wilden committed
312
    BaseObjectData* object;
Jan Möbius's avatar
 
Jan Möbius committed
313

Dirk Wilden's avatar
Dirk Wilden committed
314
315
316
317
    if ( !PluginFunctions::getObject(_objectids[i],object) ){
      emit log(LOGWARN,"Unable to find backup object with id " + QString::number(_objectids[i]));
      continue;
    }
Jan Möbius's avatar
 
Jan Möbius committed
318

Dirk Wilden's avatar
Dirk Wilden committed
319
320
321
322
    //tell TypePlugin to generate a backup
    emit generateBackup( _objectids[i], _name, _types[i] );
    groupIds.push_back(  _objectids[i] );
  }
Jan Möbius's avatar
 
Jan Möbius committed
323

Dirk Wilden's avatar
Dirk Wilden committed
324
  //add global backup
Jan Möbius's avatar
Typo    
Jan Möbius committed
325
  if ( ! groupIds.empty() ){
326

Dirk Wilden's avatar
Dirk Wilden committed
327
328
    GroupBackup* backup = new GroupBackup(groupIds, _name);
    globalBackup_.storeBackup( backup );
Jan Möbius's avatar
 
Jan Möbius committed
329

Dirk Wilden's avatar
Dirk Wilden committed
330
331
    updateButtons();
    emit log(LOGOUT,"Created grouped backup, Name : '" + _name + "'" );
Jan Möbius's avatar
 
Jan Möbius committed
332
333
334
  }
}

Dirk Wilden's avatar
Dirk Wilden committed
335
//-----------------------------------------------------------------------------
336

Dirk Wilden's avatar
Dirk Wilden committed
337
void BackupPlugin::slotUndo(int _objectid){
338

339
  emit aboutToRestore(_objectid);
Dirk Wilden's avatar
Dirk Wilden committed
340
  globalBackup_.undo(_objectid);
341
  emit restored(_objectid);
Dirk Wilden's avatar
Dirk Wilden committed
342
  emit updatedObject(_objectid, UPDATE_ALL);
343

Dirk Wilden's avatar
Dirk Wilden committed
344
  updateButtons();
Jan Möbius's avatar
 
Jan Möbius committed
345
346
}

Dirk Wilden's avatar
Dirk Wilden committed
347
//-----------------------------------------------------------------------------
Jan Möbius's avatar
 
Jan Möbius committed
348

Dirk Wilden's avatar
Dirk Wilden committed
349
void BackupPlugin::slotUndo(){
350
351
  GroupBackup* group = dynamic_cast< GroupBackup* >( globalBackup_.currentState() );

Isaak Lim's avatar
Isaak Lim committed
352
353
354
355
356
  if (group) {
    IdList ids = group->objectIDs();
    IdList::const_iterator it, end;
    for (it = ids.begin(), end = ids.end(); it != end; ++it)
      emit aboutToRestore(*it);
357

Isaak Lim's avatar
Isaak Lim committed
358
    globalBackup_.undo();
Jan Möbius's avatar
 
Jan Möbius committed
359

Dirk Wilden's avatar
Dirk Wilden committed
360
361
    for (unsigned int i=0; i < group->objectIDs().size(); i++)
      emit updatedObject(group->objectIDs()[i], UPDATE_ALL);
Jan Möbius's avatar
 
Jan Möbius committed
362

Isaak Lim's avatar
Isaak Lim committed
363
364
365
    updateButtons();
  } else
    emit log(LOGWARN,"Unable to find the current GroupBackup");
Dirk Wilden's avatar
Dirk Wilden committed
366
}
Jan Möbius's avatar
 
Jan Möbius committed
367

Dirk Wilden's avatar
Dirk Wilden committed
368
//-----------------------------------------------------------------------------
Jan Möbius's avatar
 
Jan Möbius committed
369

Dirk Wilden's avatar
Dirk Wilden committed
370
void BackupPlugin::slotRedo(int _objectid){
Jan Möbius's avatar
 
Jan Möbius committed
371

372
  emit aboutToRestore(_objectid);
Dirk Wilden's avatar
Dirk Wilden committed
373
  globalBackup_.redo(_objectid);
374
  emit restored(_objectid);
Dirk Wilden's avatar
Dirk Wilden committed
375
  emit updatedObject(_objectid, UPDATE_ALL);
Jan Möbius's avatar
 
Jan Möbius committed
376

Dirk Wilden's avatar
Dirk Wilden committed
377
  updateButtons();
Jan Möbius's avatar
 
Jan Möbius committed
378
379
}

Dirk Wilden's avatar
Dirk Wilden committed
380
//-----------------------------------------------------------------------------
Jan Möbius's avatar
 
Jan Möbius committed
381

Dirk Wilden's avatar
Dirk Wilden committed
382
383
void BackupPlugin::slotRedo(){
  globalBackup_.redo();
Jan Möbius's avatar
 
Jan Möbius committed
384

Dirk Wilden's avatar
Dirk Wilden committed
385
  GroupBackup* group = dynamic_cast< GroupBackup* >( globalBackup_.currentState() );
Jan Möbius's avatar
 
Jan Möbius committed
386

Dirk Wilden's avatar
Dirk Wilden committed
387
388
389
  if ( group != 0)
    for (unsigned int i=0; i < group->objectIDs().size(); i++)
      emit updatedObject(group->objectIDs()[i], UPDATE_ALL);
Jan Möbius's avatar
 
Jan Möbius committed
390

Dirk Wilden's avatar
Dirk Wilden committed
391
  updateButtons();
Jan Möbius's avatar
 
Jan Möbius committed
392
393
}

Dirk Wilden's avatar
Dirk Wilden committed
394
//-----------------------------------------------------------------------------
Jan Möbius's avatar
 
Jan Möbius committed
395
396
397

Q_EXPORT_PLUGIN2( backupplugin , BackupPlugin );