26 #include "../../controller/AddToGroupOperation.h"
27 #include "../../controller/CreateGroupOperation.h"
28 #include <MemoryX/gui-plugins/SceneEditor/ui_LoadSnapshotDialog.h>
35 connect(ui->buttonBox, SIGNAL(accepted()),
this, SLOT(accepted()));
44 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 =
55 controller->getMemoryXController()->loadSnapshot(snapshotName.toStdString());
57 while (
controller->getScene()->getGroupManager()->getGroupById(
64 std::shared_ptr<std::vector<controller::OperationPtr>> operations(
65 new std::vector<controller::OperationPtr>());
68 operations->push_back(operation);
70 for (std::vector<std::string>::iterator it = allIds.begin(); it != allIds.end(); ++it)
72 std::string objectId = *it;
78 operations->push_back(operation);
89 gui::dialog::LoadSnapshotDialog::showEvent(QShowEvent*)
93 ui->comboBoxSnapshots->clear();
94 std::vector<std::string> allSnapshotsVector =
95 controller->getMemoryXController()->getAllSnapshots();
97 for (std::vector<std::string>::iterator it = allSnapshotsVector.begin();
98 it != allSnapshotsVector.end();
101 ui->comboBoxSnapshots->insertItem(ui->comboBoxSnapshots->count(),
102 QString::fromStdString(*it));
110 this->ui->retranslateUi(
this);