source: flair-src/branches/mavlink/tools/Controller/Mavlink/src/GuiInterface.h@ 78

Last change on this file since 78 was 77, checked in by Thomas Fuhrmann, 8 years ago

Change the GUI of MavPlanner to match with mission planning (only GUI is working)

File size: 2.8 KB
Line 
1// %flair:license{
2// This file is part of the Flair framework distributed under the
3// CECILL-C License, Version 1.0.
4// %flair:license}
5// created: 2016/09/02
6// filename: GuiInterface.h
7//
8// authors: Thomas Fuhrmann
9// Copyright Heudiasyc UMR UTC/CNRS 7253
10//
11// version: $Id: $
12//
13// purpose: Create the GUI and give an abstract interface to it
14//
15//
16/*********************************************************************/
17
18#ifndef MAVPLANNER_GUI_INTERFACE_H
19#define MAVPLANNER_GUI_INTERFACE_H
20
21#include <string>
22#include <Thread.h>
23
24namespace flair {
25namespace core {
26 class FrameworkManager;
27 class Socket;
28}
29namespace gui {
30 class Tab;
31 class TabWidget;
32 class DoubleSpinBox;
33 class PushButton;
34 class ComboBox;
35 class GroupBox;
36 class ListWidget;
37 class Label;
38}
39}
40
41class GuiInterface : public flair::core::Thread {
42public:
43
44 GuiInterface(const flair::core::FrameworkManager *parent, std::string name);
45 ~GuiInterface();
46
47protected:
48 // reimplement the run of the Thread class
49 void Run();
50
51 // First tab callbacks
52 virtual void MissionStart() = 0;
53 virtual void MissionStop() = 0;
54 virtual void MissionResume() = 0;
55 virtual void MissionSend() = 0;
56
57 std::string MissionCmdGet();
58
59 // Main GUI
60 flair::gui::TabWidget* tabWidget;
61 flair::gui::Tab* mainTab;
62 flair::gui::Tab* settingsTab;
63
64 // Controls groupbox
65 flair::gui::GroupBox* controlsGroupBox;
66 flair::gui::PushButton* btnStartMission;
67 flair::gui::PushButton* btnStopMission;
68 flair::gui::PushButton* btnResumeMission;
69
70 // Add cmd groupbox
71 flair::gui::GroupBox* addCmdGroupBox;
72 // flair::gui::Label* commandLabel;
73 // flair::gui::Label* param1Label;
74 // flair::gui::Label* param2Label;
75 // flair::gui::Label* param3Label;
76 flair::gui::ComboBox* comboCmd;
77 flair::gui::DoubleSpinBox* param1Field;
78 flair::gui::DoubleSpinBox* param2Field;
79 flair::gui::DoubleSpinBox* param3Field;
80 flair::gui::PushButton* btnAddMissionCmd;
81 flair::gui::PushButton* btnDelMissionCmd;
82 flair::gui::PushButton* btnSendMission;
83
84 // Show wpt groupbox
85 flair::gui::GroupBox* showItemsGroupBox;
86 flair::gui::ListWidget* listMissionItems;
87 // flair::gui::ListWidget* listEntranceWpt;
88 // flair::gui::ListWidget* listExitWpt;
89 // flair::gui::PushButton* btnRemoveMissionWpt;
90 // flair::gui::PushButton* btnRemoveEntranceWpt;
91 // flair::gui::PushButton* btnRemoveExitWpt;
92
93 // Action wpt groupbox
94 // flair::gui::GroupBox* actionWptGroupBox;
95 // flair::gui::PushButton* btnSendWpt;
96 // flair::gui::PushButton* btnClearWpt;
97 // flair::gui::PushButton* btnLoop;
98
99 // Socket to send commands
100 flair::core::Socket* sendSocket;
101
102 //TODO : think if useful to have private members
103
104private:
105 const std::vector<std::string> commandsAvailable = {"WAYPOINT", "TAKEOFF", "LAND", "RETURN", "JUMP"};
106};
107
108#endif // MAVPLANNER_GUI_INTERFACE_H
Note: See TracBrowser for help on using the repository browser.