05Robot 3.0

- Main Page
- Modules
- Classes
- Files

- File List
- File Members

mainwindow.h
Go to the documentation of this file.
1 #ifndef MAINWINDOW_H
2 #define MAINWINDOW_H
3
4 #include <QMainWindow>
5 #include "CameraPreview.h"
6 #include "CameraCalibrationWindow.h"
7 #include "SyncThread.h"
8 #include "UR3Workspace.h"
9 #include "UR3CalibWidget.h"
10 #include "QPropertyEditorWidget.h"
11 #include "ceyetrackerfilter.h"
12 #include <QDockWidget>
13
14 #include "ObjectManipulationWindow.h"
15 #include "ObjectManipulationProperties.h"
16 #include <QElapsedTimer>
17 namespace Ui {
18 class MainWindow;
19 }
20
27 class MainWindow : public QMainWindow
28 {
29 Q_OBJECT
30 enum DeviceType { deviceImageFromFile, deviceDataFromFile, deviceBasler_GigE };
31 enum ProcessorType { processorCameraCalibration, processorPlaneCalibration, processorObjectExtraction};
32 public:
38 explicit MainWindow(QWidget *parent = 0);
50 bool init(const QString &configFilename="config.xml", const QString& logFilename="", int is_gestures_used=-1);
51
52 ~MainWindow();
53 private slots:
54 void connectDevice();
55 bool refreshDeviceList();
56 void connectDevice(QListWidgetItem *selectedDev);
62 void displayInfo(const QString &s);
63
64 void acquisitionStart();
65 void acquisitionStop();
66 void updateWindowLists();
67 void disconnectDevice(CameraPreview* pWindow);
68 void removeProcessor(ProcessorWindow* pWindow);
69
70 bool openFile(QString fileName="");
71 bool saveFile(QString fileName="");
72
73 void robot_connected(bool connected);
74 void robot_disconnected();
75
76 /* UI */
77
78 void on_action_config_open_default_triggered();
79 void on_action_config_open_triggered();
80 void on_action_config_save_triggered();
81 void on_action_config_save_as_triggered();
82 void on_action_view_user_interface_triggered();
83 void on_action_view_message_log_triggered();
84 void on_action_view_debug_triggered();
85 void on_action_robot_connect_disconnect_triggered();
86 void on_action_robot_calibration_triggered();
87 void on_action_robot_home_triggered();
88 void on_action_camera_calibration_triggered();
89 void on_action_camera_get_background_triggered();
90 void on_action_camera_start_triggered();
91 void on_action_camera_stop_triggered();
92
93 void complexGesturesMatcher(int id,QRect boundingBox,QPoint center,QString description);
94 void logEvent(ObjectManipulationWindow::interfaceLogEvents eventID, int selected_object, int param, QPointF point, QPointF size, float angle);
95 void logEvent(cEyeTrackerFilter::logSource source,int ID,int x, int y, QString info);
96
97 signals:
98 void syncThreadStart(int);
99 void syncThreadStop();
100 //
101 void connectCameraToSyncThread(CameraThread *);
102 void disconnectCameraFromSyncThread(CameraThread *);
103 //
104 void connectProcessorToSyncThread(ProcessorThread *);
105 void disconnectProcessorFromSyncThread(ProcessorThread *);
106 //
107 void writeInfo(QString);
108 private:
109 Ui::MainWindow *ui;
110
111 bool robot_connected_ = false;
112
113 SyncThread *syncThread;
114
115
116 QList<CameraPreview*> connectedDevices;
117 QList<ProcessorWindow*> connectedProcessors;
118
119 QVector<QDockWidget*> tabs;
120
121 UR3CalibWidget* UR3CalibWidget_ = NULL;
122 UR3Workspace* UR3Workspace_ = NULL;
123
124 Processor *PlaneCalibration_proc = NULL;
125 ProcessorObject *PlaneCalibration_po = NULL;
126 ProcessorThread *PlaneCalibration_pt = NULL;
127
128 Processor *ObjectExtraction_proc = NULL;
129 ProcessorObject *ObjectExtraction_po = NULL;
130 ProcessorThread *ObjectExtraction_pt = NULL;
131
132 ObjectManipulationWindow* objectManipulationWindow = NULL;
133 ObjectManipulationProperties* objectManipulationProperties = NULL;
134
135 cEyeTrackerFilter* gestureEventsFilter = NULL;
136 QFile file;
137 QTextStream stream;
138 QElapsedTimer logTimer;
139
140 QString configFilename_;
141 };
142
143 #endif // MAINWINDOW_H
UR3Workspace
Wraper over UR3Intermediator class. Represents a robot working space. Enables robot connection and ro...
Definition: UR3Workspace.h:50
ObjectManipulationProperties.h
UR3Workspace.h
cEyeTrackerFilter
The cEyeTrackerFilter class.
Definition: ceyetrackerfilter.h:213
ProcessorWindow
Generic camera processor window base class.
Definition: ProcessorWindow.h:32
SyncThread.h
ObjectManipulationWindow::interfaceLogEvents
interfaceLogEvents
Log event types.
Definition: ObjectManipulationWindow.h:38
Ui
Definition: mainwindow.h:17
Processor
Image processor base class.
Definition: Processor.h:28
CameraCalibrationWindow.h
CameraPreview.h
SyncThread
Definition: SyncThread.h:15
CameraThread
Wrapper object containing single camera working thread.
Definition: CameraThread.h:18
ProcessorObject
Wrapper object containing single processor, managing its processing and control pipelines, and properties.
Definition: ProcessorObject.h:28
ObjectManipulationProperties
Object manipulation properties.
Definition: ObjectManipulationProperties.h:24
CameraPreview
Camera preview widget.
Definition: CameraPreview.h:25
ObjectManipulationWindow.h
ProcessorThread
Wrapper object containing single processor working thread.
Definition: ProcessorThread.h:18
UR3CalibWidget
robot calibration user interface wizard for UR3Workspace class
Definition: UR3CalibWidget.h:50
ceyetrackerfilter.h
MainWindow
Example application window enabling object and image manipulation.
Definition: mainwindow.h:27
cEyeTrackerFilter::logSource
logSource
Definition: ceyetrackerfilter.h:335
ObjectManipulationWindow
Object manipulation window.
Definition: ObjectManipulationWindow.h:31
UR3CalibWidget.h