BackupPlugin.cc 14.4 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-2014 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

Matthias Möller's avatar
Matthias Möller committed
43
44
45
46
47
48
49

#if QT_VERSION >= 0x050000 
  #include <QtWidgets>
#else
  #include <QtGui>
#endif

Jan Möbius's avatar
 
Jan Möbius committed
50
51
52
53
54
#include "BackupPlugin.hh"
#include <iostream>
#include <OpenFlipper/BasePlugin/PluginFunctions.hh>
#include <OpenFlipper/common/GlobalOptions.hh>

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

57
58
59
60
61
62
63
64
65
66
67
68
69
70
//-----------------------------------------------------------------------------
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
71
//-----------------------------------------------------------------------------
Jan Möbius's avatar
 
Jan Möbius committed
72
73
74
75
76
77
78

void BackupPlugin::pluginsInitialized() {

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

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

Dirk Wilden's avatar
Dirk Wilden committed
84
85
86
87
    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") );
88
    connect(undoMenuAction_, SIGNAL(triggered()), this, SIGNAL( undo() ) );
89

Dirk Wilden's avatar
Dirk Wilden committed
90
91
92
93
    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") );
94
    connect(redoMenuAction_, SIGNAL(triggered()), this, SIGNAL( redo() ) );
Dirk Wilden's avatar
Dirk Wilden committed
95
96
97
98
99

    backupMenu_->addAction(undoMenuAction_);
    backupMenu_->addAction(redoMenuAction_);
    backupMenu_->addSeparator();
    backupMenu_->addAction(backupsEnabledAction_);
Jan Möbius's avatar
 
Jan Möbius committed
100
101
102

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

Jan Möbius's avatar
 
Jan Möbius committed
104
    //Undo
Dirk Wilden's avatar
Dirk Wilden committed
105
106
107
108
    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") );
109
    connect(undoToolAction_, SIGNAL(triggered()), this, SIGNAL( undo() ) );
Dirk Wilden's avatar
Dirk Wilden committed
110
    toolbar->addAction(undoToolAction_);
111

Jan Möbius's avatar
 
Jan Möbius committed
112
    //Redo
Dirk Wilden's avatar
Dirk Wilden committed
113
114
115
116
    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") );
117
    connect(redoToolAction_, SIGNAL(triggered()), this, SIGNAL( redo() ) );
Dirk Wilden's avatar
Dirk Wilden committed
118
    toolbar->addAction(redoToolAction_);
119

Jan Möbius's avatar
 
Jan Möbius committed
120
    emit addToolbar( toolbar );
121

Jan Möbius's avatar
 
Jan Möbius committed
122
123
124
    //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"));
125

Dirk Wilden's avatar
Dirk Wilden committed
126
127
128
129
130
131
132
133
134
135
136
137
138
139
    //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
140
141
142
  }
}

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

Jan Möbius's avatar
 
Jan Möbius committed
145
void BackupPlugin::slotAllCleared(){
Dirk Wilden's avatar
Dirk Wilden committed
146
147
  globalBackup_.clear();
}
Jan Möbius's avatar
 
Jan Möbius committed
148

Dirk Wilden's avatar
Dirk Wilden committed
149
150
151
//-----------------------------------------------------------------------------

void BackupPlugin::updateButtons() {
152

Dirk Wilden's avatar
Dirk Wilden committed
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
  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
176

Dirk Wilden's avatar
Dirk Wilden committed
177
  backupsEnabledAction_->setChecked( OpenFlipper::Options::backupEnabled() );
Jan Möbius's avatar
 
Jan Möbius committed
178
179
}

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

Jan Möbius's avatar
 
Jan Möbius committed
182
183
184
185
void BackupPlugin::slotEnableDisableBackups() {
  OpenFlipper::Options::enableBackup(backupsEnabledAction_->isChecked());
}

Dirk Wilden's avatar
Dirk Wilden committed
186
187
//-----------------------------------------------------------------------------

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

Dirk Wilden's avatar
Dirk Wilden committed
202
203
//-----------------------------------------------------------------------------

Jan Möbius's avatar
 
Jan Möbius committed
204
205
206
void BackupPlugin::objectDeleted(int _objectid) {
}

Dirk Wilden's avatar
Dirk Wilden committed
207
//-----------------------------------------------------------------------------
Jan Möbius's avatar
 
Jan Möbius committed
208

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

Dirk Wilden's avatar
Dirk Wilden committed
211
212
213
214
215
  //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
216

Dirk Wilden's avatar
Dirk Wilden committed
217
218
219
  //get backup data
  BaseObjectData* object = 0;
  PluginFunctions::getObject(_objectId, object);
Jan Möbius's avatar
 
Jan Möbius committed
220

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

Dirk Wilden's avatar
Dirk Wilden committed
223
    if ( object->hasObjectData( OBJECT_BACKUPS ) ){
Jan Möbius's avatar
Jan Möbius committed
224
225
226

      //get backup object data
      BackupData* backupData = dynamic_cast< BackupData* >(object->objectData(OBJECT_BACKUPS));
Jan Möbius's avatar
 
Jan Möbius committed
227

Dirk Wilden's avatar
Dirk Wilden committed
228
229
230
231
232
      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
233

Dirk Wilden's avatar
Dirk Wilden committed
234
235
236
237
      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
238
239
240
      }
    }
  }
Dirk Wilden's avatar
Dirk Wilden committed
241

Jan Möbius's avatar
 
Jan Möbius committed
242
243
}

Dirk Wilden's avatar
Dirk Wilden committed
244
//-----------------------------------------------------------------------------
Jan Möbius's avatar
 
Jan Möbius committed
245

Dirk Wilden's avatar
Dirk Wilden committed
246
void BackupPlugin::slotObjectUndo(){
247

Dirk Wilden's avatar
Dirk Wilden committed
248
249
  int id = undoContextAction_->data().toInt();
  emit undo(id);
Jan Möbius's avatar
 
Jan Möbius committed
250
251
}

Dirk Wilden's avatar
Dirk Wilden committed
252
//-----------------------------------------------------------------------------
Jan Möbius's avatar
 
Jan Möbius committed
253

Dirk Wilden's avatar
Dirk Wilden committed
254
void BackupPlugin::slotObjectRedo(){
255

Dirk Wilden's avatar
Dirk Wilden committed
256
257
258
  int id = undoContextAction_->data().toInt();
  emit redo(id);
}
Jan Möbius's avatar
 
Jan Möbius committed
259

Dirk Wilden's avatar
Dirk Wilden committed
260
//-----------------------------------------------------------------------------
Jan Möbius's avatar
 
Jan Möbius committed
261

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

Dirk Wilden's avatar
Dirk Wilden committed
264
265
  if ( !OpenFlipper::Options::backupEnabled() )
    return;
Jan Möbius's avatar
 
Jan Möbius committed
266

Dirk Wilden's avatar
Dirk Wilden committed
267
  BaseObjectData* object;
Jan Möbius's avatar
 
Jan Möbius committed
268

Dirk Wilden's avatar
Dirk Wilden committed
269
270
271
272
  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
273

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

Dirk Wilden's avatar
Dirk Wilden committed
277
278
279
  //add global backup
  IdList groupIds;
  groupIds.push_back( _objectid );
Jan Möbius's avatar
 
Jan Möbius committed
280

Dirk Wilden's avatar
Dirk Wilden committed
281
  bool skipBackup = false;
Jan Möbius's avatar
 
Jan Möbius committed
282

Dirk Wilden's avatar
Dirk Wilden committed
283
284
285
  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
286

Dirk Wilden's avatar
Dirk Wilden committed
287
288
289
    if ( backupData != 0 )
      skipBackup = !backupData->undoAvailable();
  }
Jan Möbius's avatar
 
Jan Möbius committed
290

Dirk Wilden's avatar
Dirk Wilden committed
291
292
293
294
  if ( !skipBackup ){
    GroupBackup* backup = new GroupBackup(groupIds, _name);
    globalBackup_.storeBackup( backup );
  }
Jan Möbius's avatar
 
Jan Möbius committed
295

Dirk Wilden's avatar
Dirk Wilden committed
296
297
298
  updateButtons();
  emit log(LOGOUT,"Created backup for " + QString::number(_objectid)+ " , Name : '" + _name + "'" );
}
Jan Möbius's avatar
 
Jan Möbius committed
299

Dirk Wilden's avatar
Dirk Wilden committed
300
//-----------------------------------------------------------------------------
Jan Möbius's avatar
 
Jan Möbius committed
301

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

Dirk Wilden's avatar
Dirk Wilden committed
304
305
  if ( !OpenFlipper::Options::backupEnabled() )
    return;
Jan Möbius's avatar
 
Jan Möbius committed
306

Dirk Wilden's avatar
Dirk Wilden committed
307
  IdList groupIds;
308

Dirk Wilden's avatar
Dirk Wilden committed
309
310
  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
311
312
313
    return;
  }

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

Dirk Wilden's avatar
Dirk Wilden committed
317
    BaseObjectData* object;
Jan Möbius's avatar
 
Jan Möbius committed
318

Dirk Wilden's avatar
Dirk Wilden committed
319
320
321
322
    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
323

Dirk Wilden's avatar
Dirk Wilden committed
324
325
326
327
    //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
328

Dirk Wilden's avatar
Dirk Wilden committed
329
  //add global backup
Jan Möbius's avatar
Typo    
Jan Möbius committed
330
  if ( ! groupIds.empty() ){
331

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

Dirk Wilden's avatar
Dirk Wilden committed
335
336
    updateButtons();
    emit log(LOGOUT,"Created grouped backup, Name : '" + _name + "'" );
Jan Möbius's avatar
 
Jan Möbius committed
337
338
339
  }
}

Dirk Wilden's avatar
Dirk Wilden committed
340
//-----------------------------------------------------------------------------
341

Dirk Wilden's avatar
Dirk Wilden committed
342
void BackupPlugin::slotUndo(int _objectid){
343

344
  emit aboutToRestore(_objectid);
Dirk Wilden's avatar
Dirk Wilden committed
345
  globalBackup_.undo(_objectid);
346
  emit restored(_objectid);
Dirk Wilden's avatar
Dirk Wilden committed
347
  emit updatedObject(_objectid, UPDATE_ALL);
348

Dirk Wilden's avatar
Dirk Wilden committed
349
  updateButtons();
Jan Möbius's avatar
 
Jan Möbius committed
350
351
}

Dirk Wilden's avatar
Dirk Wilden committed
352
//-----------------------------------------------------------------------------
Jan Möbius's avatar
 
Jan Möbius committed
353

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

Isaak Lim's avatar
Isaak Lim committed
357
358
359
360
361
  if (group) {
    IdList ids = group->objectIDs();
    IdList::const_iterator it, end;
    for (it = ids.begin(), end = ids.end(); it != end; ++it)
      emit aboutToRestore(*it);
362

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

Dirk Wilden's avatar
Dirk Wilden committed
365
366
    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
367

Isaak Lim's avatar
Isaak Lim committed
368
369
370
    updateButtons();
  } else
    emit log(LOGWARN,"Unable to find the current GroupBackup");
Dirk Wilden's avatar
Dirk Wilden committed
371
}
Jan Möbius's avatar
 
Jan Möbius committed
372

Dirk Wilden's avatar
Dirk Wilden committed
373
//-----------------------------------------------------------------------------
Jan Möbius's avatar
 
Jan Möbius committed
374

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

377
  emit aboutToRestore(_objectid);
Dirk Wilden's avatar
Dirk Wilden committed
378
  globalBackup_.redo(_objectid);
379
  emit restored(_objectid);
Dirk Wilden's avatar
Dirk Wilden committed
380
  emit updatedObject(_objectid, UPDATE_ALL);
Jan Möbius's avatar
 
Jan Möbius committed
381

Dirk Wilden's avatar
Dirk Wilden committed
382
  updateButtons();
Jan Möbius's avatar
 
Jan Möbius committed
383
384
}

Dirk Wilden's avatar
Dirk Wilden committed
385
//-----------------------------------------------------------------------------
Jan Möbius's avatar
 
Jan Möbius committed
386

Dirk Wilden's avatar
Dirk Wilden committed
387
388
void BackupPlugin::slotRedo(){
  globalBackup_.redo();
Jan Möbius's avatar
 
Jan Möbius committed
389

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

Dirk Wilden's avatar
Dirk Wilden committed
392
393
394
  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
395

Dirk Wilden's avatar
Dirk Wilden committed
396
  updateButtons();
Jan Möbius's avatar
 
Jan Möbius committed
397
398
}

Dirk Wilden's avatar
Dirk Wilden committed
399
//-----------------------------------------------------------------------------
Jan Möbius's avatar
 
Jan Möbius committed
400

Matthias Möller's avatar
Matthias Möller committed
401
#if QT_VERSION < 0x050000
Jan Möbius's avatar
 
Jan Möbius committed
402
Q_EXPORT_PLUGIN2( backupplugin , BackupPlugin );
Matthias Möller's avatar
Matthias Möller committed
403
#endif
Jan Möbius's avatar
 
Jan Möbius committed
404