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

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

Add class for MavlinkPlanner

File size: 2.5 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}
38}
39
40class GuiInterface : public flair::core::Thread {
41public:
42
43 GuiInterface(const flair::core::FrameworkManager *parent, std::string name);
44 ~GuiInterface();
45
46protected:
47 // reimplement the run of the Thread class
48 void Run();
49
50 std::string GetWptLatLon();
51
52 // First tab callbacks
53 virtual void MissionInitialize() = 0;
54 virtual void MissionStart() = 0;
55 virtual void MissionStop() = 0;
56 virtual void MissionKill() = 0;
57 virtual void WptSend() = 0;
58 virtual void WptClear() = 0;
59 virtual void WptLoopSend() = 0;
60
61 // Main GUI
62 flair::gui::TabWidget* tabWidget;
63 flair::gui::Tab* mainTab;
64 flair::gui::Tab* settingsTab;
65
66 // Controls groupbox
67 flair::gui::GroupBox* controlsGroupBox;
68 flair::gui::PushButton* btnInitialize;
69 flair::gui::PushButton* btnStartMission;
70 flair::gui::PushButton* btnStopMission;
71 flair::gui::PushButton* btnKill;
72
73 // Add wpt groupbox
74 flair::gui::GroupBox* addWptGroupBox;
75 flair::gui::DoubleSpinBox* latField;
76 flair::gui::DoubleSpinBox* lonField;
77 flair::gui::PushButton* btnAddMissionWpt;
78 flair::gui::PushButton* btnAddEntranceWpt;
79 flair::gui::PushButton* btnAddExitWpt;
80
81 // Show wpt groupbox
82 flair::gui::GroupBox* showWptGroupBox;
83 flair::gui::ListWidget* listMissionWpt;
84 flair::gui::ListWidget* listEntranceWpt;
85 flair::gui::ListWidget* listExitWpt;
86 flair::gui::PushButton* btnRemoveMissionWpt;
87 flair::gui::PushButton* btnRemoveEntranceWpt;
88 flair::gui::PushButton* btnRemoveExitWpt;
89
90 // Action wpt groupbox
91 flair::gui::GroupBox* actionWptGroupBox;
92 flair::gui::PushButton* btnSendWpt;
93 flair::gui::PushButton* btnClearWpt;
94 flair::gui::PushButton* btnLoop;
95
96 // Socket to send commands
97 flair::core::Socket* sendSocket;
98
99 //TODO : think if useful to have private members
100};
101
102#endif // MAVPLANNER_GUI_INTERFACE_H
Note: See TracBrowser for help on using the repository browser.