FGx  1
 All Classes Files Functions Variables Enumerations Enumerator Macros Pages
networkwidget.h
1 // -=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-
2 // FGx FlightGear Launcher // networkwidget.h
3 // -=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-
4 // (c) 2010-2012
5 // Yves Sablonier, Pete Morgan
6 // Geoff McLane
7 // GNU GPLv2, see main.cpp and shipped licence.txt for further information
8 
9 #ifndef NETWORKWIDGET_H
10 #define NETWORKWIDGET_H
11 
12 #include <QtNetwork/QHostInfo>
13 
14 
15 #include <QWidget>
16 #include <QtGui/QTreeWidget>
17 #include <QtGui/QGroupBox>
18 #include <QtGui/QCheckBox>
19 #include <QtGui/QLineEdit>
20 #include <QtGui/QComboBox>
21 
22 #include "xobjects/mainobject.h"
23 #include "xwidgets/xgroupboxes.h"
24 
25 class MainObject;
26 
27 class NetworkWidget : public QWidget
28 {
29 Q_OBJECT
30 public:
31 
32  enum COLS{
33  C_SERVER_NAME,
34  C_DOMAIN,
35  C_PILOTS_COUNT,
36  C_IP_ADDRESS,
37  C_FLAG
38  };
39 
40  explicit NetworkWidget(MainObject *mOb, QWidget *parent = 0);
41 
42  qint64 pid_fgcom;
43 
44  MainObject *mainObject;
45 
46  XGroupHBox *grpMpServerIn;
47  XGroupVBox *grpMpServerOut;
48 
49 
50  QComboBox *comboLocalIpAddress;
51  QComboBox *comboRemoteAddress;
52  QComboBox *comboRemotePort;
53  QComboBox *comboLocalPort;
54  QComboBox *comboHzOut;
55  QComboBox *comboHzIn;
56  QTreeWidget *treeWidget;
57 
58 
59  XGroupGBox *grpFgCom;
60  QLineEdit *txtFgComNo;
61  QLineEdit *txtFgComPort;
62 
63  QLineEdit *lineEditFgComPath;
64  QToolButton *buttonSetFgComPath;
65  QLabel *labelFgComProgram;
66  QLabel *labelFgComCheck;
67 
68  XGroupHBox *grpTelnet;
69  QLineEdit *txtTelnet;
70 
71  XGroupHBox *grpHttp;
72  QLineEdit *txtHttp;
73 
74  XGroupHBox *grpScreenShot;
75  QLineEdit *txtScreenShot;
76 
77 
78  void load_local_addresses();
79  void populate_combo_hz(QComboBox *combo);
80 
81  QString validate();
82 
83 
84 signals:
85  void setx(QString option, bool enabled, QString value);
86 
87 public slots:
88  void dns_lookup();
89  void on_dns_lookup_callback(const QHostInfo &hostInfo);
90  void on_telnet_data(QString, QString);
91 
92  void set_mp_server();
93  void set_fgcom();
94 
95  void fgcom_check_path();
96  void fgcom_set_path();
97  void on_fgcom_path(QString);
98  void on_select_fgcombutton();
99 
100  void on_http();
101  void on_telnet();
102  void on_screenshot();
103 
104  void on_browse_http();
105  void on_browse_screenshot();
106  void on_open_telnet();
107 
108  void on_upx(QString option, bool enabled, QString value);
109 
110 };
111 
112 #endif // NETWORKWIDGET_H
A QGroupBox with a QVBoxLyout layout.
Definition: xgroupboxes.h:19
Definition: networkwidget.h:27
The MainObject is an extended QObject, and the main "controller" for FGx.
Definition: mainobject.h:61
A QGroupBox with a QGridLayout layout.
Definition: xgroupboxes.h:59
A QGroupBox with a QHBoxLyout layout.
Definition: xgroupboxes.h:39