source: flair-src/trunk/tools/Controller/Mavlink/src/GuiInterface.h@ 264

Last change on this file since 264 was 137, checked in by Sanahuja Guillaume, 8 years ago

singleton manager

File size: 2.9 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 Socket;
27}
28namespace gui {
29 class Tab;
30 class TabWidget;
31 class DoubleSpinBox;
32 class PushButton;
33 class ComboBox;
34 class GroupBox;
35 class ListWidget;
36 class Label;
37}
38}
39
40class GuiInterface : public flair::core::Thread {
41public:
42
43 GuiInterface(std::string name);
44 ~GuiInterface();
45
46protected:
47 // reimplement the run of the Thread class
48 void Run();
49
50 // First tab callbacks
51 virtual void MissionStart() = 0;
52 virtual void MissionStop() = 0;
53 virtual void MissionPause() = 0;
54 virtual void MissionSend() = 0;
55
56 std::string MissionCmdGet();
57
58 // Main GUI
59 flair::gui::TabWidget* tabWidget;
60 flair::gui::Tab* mainTab;
61 flair::gui::Tab* settingsTab;
62
63 // Controls groupbox
64 flair::gui::GroupBox* controlsGroupBox;
65 flair::gui::PushButton* btnStartMission;
66 flair::gui::PushButton* btnStopMission;
67 flair::gui::PushButton* btnPauseMission;
68
69 // Add cmd groupbox
70 flair::gui::GroupBox* addCmdGroupBox;
71 // flair::gui::Label* commandLabel;
72 // flair::gui::Label* param1Label;
73 // flair::gui::Label* param2Label;
74 // flair::gui::Label* param3Label;
75 flair::gui::ComboBox* comboCmd;
76 flair::gui::DoubleSpinBox* param1Field;
77 flair::gui::DoubleSpinBox* param2Field;
78 flair::gui::DoubleSpinBox* param3Field;
79 flair::gui::DoubleSpinBox* latitudeField;
80 flair::gui::DoubleSpinBox* longitudeField;
81 flair::gui::DoubleSpinBox* altitudeField;
82 flair::gui::PushButton* btnAddMissionCmd;
83 flair::gui::PushButton* btnDelMissionCmd;
84 flair::gui::PushButton* btnSendMission;
85
86 // Show wpt groupbox
87 flair::gui::GroupBox* showItemsGroupBox;
88 flair::gui::ListWidget* listMissionItems;
89 // flair::gui::ListWidget* listEntranceWpt;
90 // flair::gui::ListWidget* listExitWpt;
91 // flair::gui::PushButton* btnRemoveMissionWpt;
92 // flair::gui::PushButton* btnRemoveEntranceWpt;
93 // flair::gui::PushButton* btnRemoveExitWpt;
94
95 // Action wpt groupbox
96 // flair::gui::GroupBox* actionWptGroupBox;
97 // flair::gui::PushButton* btnSendWpt;
98 // flair::gui::PushButton* btnClearWpt;
99 // flair::gui::PushButton* btnLoop;
100
101 // Socket to send commands
102 flair::core::Socket* sendSocket;
103
104 //TODO : think if useful to have private members
105
106private:
107 const std::vector<std::string> commandsAvailable = {"WAYPOINT", "TAKEOFF", "LAND", "RETURN", "JUMP"};
108};
109
110#endif // MAVPLANNER_GUI_INTERFACE_H
Note: See TracBrowser for help on using the repository browser.