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

Last change on this file since 81 was 81, checked in by Thomas Fuhrmann, 5 years ago

Add lat, lon and alt fields + adapt processing of MissionSend?

File size: 2.9 KB
RevLine 
[71]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;
[77]37  class Label;
[71]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;
[77]54  virtual void MissionResume() = 0;
55  virtual void MissionSend() = 0;
[71]56
[77]57  std::string MissionCmdGet();
58
[71]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;
[77]68  flair::gui::PushButton* btnResumeMission;
[71]69 
[77]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;
[81]79  flair::gui::DoubleSpinBox* param3Field;
80  flair::gui::DoubleSpinBox* latitudeField;
81  flair::gui::DoubleSpinBox* longitudeField;
82  flair::gui::DoubleSpinBox* altitudeField;
[77]83  flair::gui::PushButton* btnAddMissionCmd;
84  flair::gui::PushButton* btnDelMissionCmd;
85  flair::gui::PushButton* btnSendMission;
[71]86
87  // Show wpt groupbox
[77]88  flair::gui::GroupBox* showItemsGroupBox;
89  flair::gui::ListWidget* listMissionItems;
90  // flair::gui::ListWidget* listEntranceWpt;
91  // flair::gui::ListWidget* listExitWpt;
92  // flair::gui::PushButton* btnRemoveMissionWpt;
93  // flair::gui::PushButton* btnRemoveEntranceWpt;
94  // flair::gui::PushButton* btnRemoveExitWpt; 
[71]95
96  // Action wpt groupbox
[77]97  // flair::gui::GroupBox* actionWptGroupBox;
98  // flair::gui::PushButton* btnSendWpt;
99  // flair::gui::PushButton* btnClearWpt;
100  // flair::gui::PushButton* btnLoop;
[71]101
102  // Socket to send commands
103  flair::core::Socket* sendSocket;
104
105  //TODO : think if useful to have private members
[77]106 
107private:
108  const std::vector<std::string> commandsAvailable = {"WAYPOINT", "TAKEOFF", "LAND", "RETURN", "JUMP"};
[71]109};
110
111#endif // MAVPLANNER_GUI_INTERFACE_H
Note: See TracBrowser for help on using the repository browser.