28#include <MemoryX/gui-plugins/SceneEditor/ui_LoadSnapshotDialog.h>
35 connect(ui->buttonBox, SIGNAL(accepted()),
this, SLOT(accepted()));
44gui::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(
58 groupName + std::to_string(suffix)) != NULL)
63 groupName = groupName + std::to_string(suffix);
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);
89gui::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);
A operation to add a object to a existing group.
static const int UNDOABLE
A flag to save the executed operations to the history.
static const int EXECUTE_ON_SCENE
A flag to execute operations on the Scene.
A operation to create a new group.
LoadSnapshotDialog(controller::ControllerPtr control, QWidget *parent=0)
Constructor.
~LoadSnapshotDialog() override
Destructor.
void retranslate()
Translates all translatable strings in this dialog.
This file is part of ArmarX.
std::shared_ptr< Controller > ControllerPtr
std::shared_ptr< Operation > OperationPtr