Fork me on GitHub
2.15.20
FGx
A cross-platform launcher for FlightGear
pilotswidget.h
Go to the documentation of this file.
1 // -=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-
2 // FGx FlightGear Launcher // pilotswidget.h
3 // -=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-
4 // (c) 2010-201
5 // Yves Sablonier, Pete Morgan
6 // Geoff McLane
7 // GNU GPLv2, see main.cpp and shipped licence.txt for further information
8 
9 #ifndef PILOTSWIDGET_H
10 #define PILOTSWIDGET_H
11 
12 
13 #include <QNetworkAccessManager>
14 #include <QNetworkReply>
15 
16 #include <QDomDocument>
17 
18 #include <QWidget>
19 #include <QTreeWidget>
20 #include <QStatusBar>
21 #include <QCheckBox>
22 #include <QComboBox>
23 
24 
25 #include "xobjects/mainobject.h"
26 class MainObject;
27 
28 #include "map/openlayerwidget.h"
29 
30 #include "aircraft/xaero.h"
31 
32 class PilotsWidget : public QWidget
33 {
34 Q_OBJECT
35 public:
36  explicit PilotsWidget(MainObject *mob, QWidget *parent = 0);
37 
38  enum COLS{
42  C_HEADING = 3,
43  C_PITCH = 4,
44  C_LAT = 5,
45  C_LON = 6,
46  C_FLAG = 7,
47  C_COUNT = 8
48  };
49 
51 
53  QDomDocument dom;
54 
55  QNetworkAccessManager *netMan;
56  QNetworkReply *reply;
57  QString server_string;
58 
60 
61  QCheckBox *checkBoxAutoRefresh;
62  QComboBox *comboBoxHz;
63 
64  QTreeWidget *tree;
65 
66  QStatusBar *statusBar;
67 
68  QButtonGroup *buttonGroupCols;
69 
70  void set_map_widget(OpenLayerWidget *mapWidget);
71 
72 signals:
73 
74  //void radar(QString callsign, QString lat, QString lon, QString heading, QString altitude, bool is_tower);
75  //void clear_radar();
76  void aircraft_selected(XAero aero);
77 
78 public slots:
79 
80  void fetch_pilots();
81 
82  void on_server_error(QNetworkReply::NetworkError);
83  void on_server_ready_read();
85 
86  void on_check_autorefresh(int);
87  void on_combo_changed(int);
89 
90  void on_show_cols(QAbstractButton*);
91 
92 };
93 
94 #endif // PILOTSWIDGET_H
QComboBox * comboBoxHz
Definition: pilotswidget.h:62
QNetworkReply * reply
Definition: pilotswidget.h:56
void on_item_doubled_clicked(QTreeWidgetItem *, int)
The MainObject is an extended QObject, and the main "controller" for FGx.
Definition: mainobject.h:66
QString server_string
Definition: pilotswidget.h:57
void on_server_error(QNetworkReply::NetworkError)
void aircraft_selected(XAero aero)
QCheckBox * checkBoxAutoRefresh
Definition: pilotswidget.h:61
void on_server_read_finished()
void set_map_widget(OpenLayerWidget *mapWidget)
QButtonGroup * buttonGroupCols
Definition: pilotswidget.h:68
QCheckBox * checkBoxFollowSelected
Definition: pilotswidget.h:59
QNetworkAccessManager * netMan
Definition: pilotswidget.h:55
void on_show_cols(QAbstractButton *)
QDomDocument dom
Definition: pilotswidget.h:53
OpenLayerWidget * mapWidget
Definition: pilotswidget.h:52
void on_check_autorefresh(int)
void on_combo_changed(int)
QTreeWidget * tree
Definition: pilotswidget.h:64
void on_server_ready_read()
Definition: xaero.h:14
void fetch_pilots()
PilotsWidget(MainObject *mob, QWidget *parent=0)
MainObject * mainObject
Definition: pilotswidget.h:50
QStatusBar * statusBar
Definition: pilotswidget.h:66