25 #include <MemoryX/gui-plugins/SceneEditor/ui_LoadSnapshotDialog.h>
27 #include "../../controller/CreateGroupOperation.h"
28 #include "../../controller/AddToGroupOperation.h"
36 connect(ui->buttonBox, SIGNAL(accepted()),
this, SLOT(accepted()));
44 void gui::dialog::LoadSnapshotDialog::accepted()
48 QString snapshotName = ui->comboBoxSnapshots->currentText();
50 if (snapshotName !=
"")
52 std::string groupName = snapshotName.toStdString();
54 std::vector<std::string> allIds =
controller->getMemoryXController()->loadSnapshot(snapshotName.toStdString());
62 std::shared_ptr<std::vector<controller::OperationPtr> > operations(
new std::vector<controller::OperationPtr>());
66 operations->push_back(operation);
68 for (std::vector<std::string>::iterator it = allIds.begin(); it != allIds.end(); ++it)
70 std::string objectId = *it;
75 operations->push_back(operation);
83 void gui::dialog::LoadSnapshotDialog::showEvent(QShowEvent*)
87 ui->comboBoxSnapshots->clear();
88 std::vector<std::string> allSnapshotsVector =
controller->getMemoryXController()->getAllSnapshots();
90 for (std::vector<std::string>::iterator it = allSnapshotsVector.begin(); it != allSnapshotsVector.end(); ++it)
92 ui->comboBoxSnapshots->insertItem(ui->comboBoxSnapshots->count(), QString::fromStdString(*it));
99 this->ui->retranslateUi(
this);