Fork me on GitHub
2.15.20
FGx
A cross-platform launcher for FlightGear
networkwidget.h
Go to the documentation of this file.
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 <QHostInfo>
13 
14 
15 #include <QWidget>
16 #include <QTreeWidget>
17 #include <QGroupBox>
18 #include <QCheckBox>
19 #include <QLineEdit>
20 #include <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{
38  };
39 
40  explicit NetworkWidget(MainObject *mOb, QWidget *parent = 0);
41 
42  qint64 pid_fgcom;
43 
45 
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 
60  QLineEdit *txtFgComNo;
61  QLineEdit *txtFgComPort;
62 
63  QLineEdit *lineEditFgComPath;
64  QToolButton *buttonSetFgComPath;
67 
69  QLineEdit *txtTelnet;
70 
72  QLineEdit *txtHttp;
73 
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
QComboBox * comboLocalIpAddress
Definition: networkwidget.h:50
QString validate()
A QGroupBox with a QVBoxLyout layout.
Definition: xgroupboxes.h:19
QLabel * labelFgComProgram
Definition: networkwidget.h:65
void on_telnet_data(QString, QString)
NetworkWidget(MainObject *mOb, QWidget *parent=0)
void setx(QString option, bool enabled, QString value)
QLineEdit * txtFgComNo
Definition: networkwidget.h:60
XGroupHBox * grpScreenShot
Definition: networkwidget.h:74
QLineEdit * txtTelnet
Definition: networkwidget.h:69
The MainObject is an extended QObject, and the main "controller" for FGx.
Definition: mainobject.h:66
void on_fgcom_path(QString)
void load_local_addresses()
QComboBox * comboRemotePort
Definition: networkwidget.h:52
void fgcom_check_path()
QComboBox * comboHzIn
Definition: networkwidget.h:55
QTreeWidget * treeWidget
Definition: networkwidget.h:56
QLineEdit * txtHttp
Definition: networkwidget.h:72
QLineEdit * txtScreenShot
Definition: networkwidget.h:75
QLabel * labelFgComCheck
Definition: networkwidget.h:66
A QGroupBox with a QGridLayout layout.
Definition: xgroupboxes.h:59
A QGroupBox with a QHBoxLyout layout.
Definition: xgroupboxes.h:39
void on_upx(QString option, bool enabled, QString value)
void on_select_fgcombutton()
qint64 pid_fgcom
Definition: networkwidget.h:42
XGroupGBox * grpFgCom
Definition: networkwidget.h:59
QComboBox * comboHzOut
Definition: networkwidget.h:54
XGroupVBox * grpMpServerOut
Definition: networkwidget.h:47
QLineEdit * txtFgComPort
Definition: networkwidget.h:61
QToolButton * buttonSetFgComPath
Definition: networkwidget.h:64
XGroupHBox * grpTelnet
Definition: networkwidget.h:68
void on_dns_lookup_callback(const QHostInfo &hostInfo)
QComboBox * comboRemoteAddress
Definition: networkwidget.h:51
MainObject * mainObject
Definition: networkwidget.h:44
QLineEdit * lineEditFgComPath
Definition: networkwidget.h:63
XGroupHBox * grpMpServerIn
Definition: networkwidget.h:46
void populate_combo_hz(QComboBox *combo)
XGroupHBox * grpHttp
Definition: networkwidget.h:71
void on_browse_screenshot()
QComboBox * comboLocalPort
Definition: networkwidget.h:53