8 exportDialog =
new QDialog;
9 ui.setupUi(exportDialog);
10 fps = ui.selcetFPS->value();
11 ARMARX_INFO <<
"RobotTrajectoryDesigner: ExportDialogController on init";
16 QObject::connect(ui.cancel, SIGNAL(clicked()), exportDialog, SLOT(reject()));
17 QObject::connect(ui.exportMMM, SIGNAL(clicked()), exportDialog, SLOT(accept()));
19 QObject::connect(ui.selcetFPS, SIGNAL(valueChanged(
int)),
this, SLOT(
setFPS(
int)));
24 ARMARX_INFO <<
"RobotTrajectoryDesigner: ExportDialogController on disconnect";
29 ARMARX_INFO <<
"RobotTrajectoryDesigner: ExportDialogController on exit";
41 exportDialog->setModal(
true);
52 this->trajectories = trajectories;
57 if (environment == NULL)
65 if (trajectories.empty())
67 QMessageBox* exportMMMfailed =
new QMessageBox();
68 exportMMMfailed->setWindowTitle(QString::fromStdString(
"Error Message"));
69 exportMMMfailed->setText(QString::fromStdString(
"Export failed.\nNo trajectory is implemented."));
70 exportMMMfailed->exec();
73 QString file = saveToFile();
80 exporter->exportTrajectory(trajectories, file.toStdString());
84 ARMARX_INFO <<
"Export to MMM failed (file.isEmpty)";
120 throw armarx::NotImplementedYetException();
125 this->environment = environment;
128 QString ExportDialogController::saveToFile()
130 QFileDialog dialog(0);
131 dialog.setFileMode(QFileDialog::AnyFile);
132 dialog.setAcceptMode(QFileDialog::AcceptSave);
133 dialog.setDefaultSuffix(QString::fromStdString(
"xml"));
134 dialog.setNameFilter(tr(
"XML (*.xml)"));
139 if (dialog.selectedFiles().size() != 0)
141 filepath = dialog.selectedFiles()[0];