ExportDialogController.h
Go to the documentation of this file.
1#ifndef EXPORTDIALOGCONTROLLER_H
2#define EXPORTDIALOGCONTROLLER_H
3#include <QDialog>
4#include <QErrorMessage>
5#include <QFile>
6#include <QFileDialog>
7#include <QString>
8
9#include "../Environment.h"
12#include "../View/ui_ExportDialog.h"
13#include "AbstractController.h"
14
15namespace armarx
16{
17 /**
18 * @class ExportDialogController
19 * @brief Subcontroller which handles all user interaction with the export
20 * dialog in the GUI, communicates with other controllers
21 * via signals and slots
22 */
24 {
25 Q_OBJECT
26
27 public:
28 /**
29 * @brief @see AbstractController
30 */
31 void onInitComponent() override;
32
33 /**
34 * @brief @see AbstractController
35 */
36 void onConnectComponent() override;
37
38 /**
39 * @brief @see AbstractController
40 */
41 void onDisconnectComponent() override;
42
43 /**
44 * @brief @see AbstractController
45 */
46 void onExitComponent() override;
47
48 /**
49 * @brief Creates a new ExportDialogController and assigns a designer
50 * exporter to handle
51 */
53
54 public slots:
55 /**
56 * @brief Opens an export dialog
57 */
58 void open();
59
60 /**
61 * @brief Sets the timed distribution of automatically generated waypoints
62 * by assigning how many waypoints there are per second
63 * @param value Number of waypoints per second
64 */
65 void setFPS(int fps);
66
67 /**
68 * @brief Exports the trajectory
69 * @param trajectory DesignerTrajectory fpr export
70 */
71 void exportTrajectory(std::vector<DesignerTrajectoryPtr> trajectories);
72
73 /**
74 * @brief Start export to MMM
75 */
76 void exportMMM();
77
78 /**
79 * @brief Start export to trajectory
80 */
81 void exportTrajectory();
82
83 /**
84 * @brief Set the enviroment
85 * @param The new enviroment
86 */
87 void environmentChanged(EnvironmentPtr environment);
88
89 signals:
90 /*
91 * Changed method name because 'export' is a keyword
92 */
93 /**
94 * @brief Requests a designer trajectory to a given index to export
95 * @param index Index of the trajectory
96 */
98
99 /**
100 * @brief Requests a designer trajectory to a given index to export
101 */
103
104 private:
105 QString saveToFile();
106 EnvironmentPtr environment;
107 //DesignerExporterPtr exporter;
108 QDialog* exportDialog;
109 Ui::ExportDialog ui;
110 std::vector<armarx::DesignerTrajectoryPtr> trajectories;
111 int fps;
112 };
113
114 using ExportDialogControllerPtr = std::shared_ptr<ExportDialogController>;
115} // namespace armarx
116
117#endif // EXPORTDIALOGCONTROLLER_H
Abstract controller providing a set of methods which must be implemented by every controller.
void environmentChanged(EnvironmentPtr environment)
Set the enviroment.
void exportDesignerTrajectory()
Requests a designer trajectory to a given index to export.
void exportDesignerTrajectory(int fps)
Requests a designer trajectory to a given index to export.
void setFPS(int fps)
Sets the timed distribution of automatically generated waypoints by assigning how many waypoints ther...
void exportTrajectory()
Start export to trajectory.
void open()
Opens an export dialog.
void exportMMM()
Start export to MMM.
ExportDialogController()
Creates a new ExportDialogController and assigns a designer exporter to handle.
This file offers overloads of toIce() and fromIce() functions for STL container types.
std::shared_ptr< Environment > EnvironmentPtr
Definition Environment.h:29
std::shared_ptr< ExportDialogController > ExportDialogControllerPtr