diff options
Diffstat (limited to 'FaceTrackNoIR/FGServer.h')
-rw-r--r-- | FaceTrackNoIR/FGServer.h | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/FaceTrackNoIR/FGServer.h b/FaceTrackNoIR/FGServer.h index bd849c80..c4d8d516 100644 --- a/FaceTrackNoIR/FGServer.h +++ b/FaceTrackNoIR/FGServer.h @@ -43,6 +43,8 @@ using namespace std;
+#include "ui_FTNoIR_FGcontrols.h"
+
class Tracker; // pre-define parent-class to avoid circular includes
class FGServer : public QThread {
@@ -72,7 +74,9 @@ private: QUdpSocket *inSocket; // Receive from FligthGear
QUdpSocket *outSocket; // Send to FligthGear
qint32 fg_cmd; // Command from FlightGear
-
+ QHostAddress destIP; // Destination IP-address
+ int destPort; // Destination port-number
+
/** member variables for saving the head pose **/
float virtPosX;
float virtPosY;
@@ -82,6 +86,8 @@ private: float virtRotY;
float virtRotZ;
+ void loadSettings();
+
public:
void setVirtRotX(float rot) { virtRotX = rot; }
void setVirtRotY(float rot) { virtRotY = rot; }
@@ -92,6 +98,32 @@ public: };
+// Widget that has controls for FG server-settings.
+class FGControls: public QWidget, public Ui::UICFGControls
+{
+ Q_OBJECT
+public:
+
+ explicit FGControls( QWidget *parent=0, Qt::WindowFlags f=0 );
+ virtual ~FGControls();
+ void showEvent ( QShowEvent * event );
+
+private:
+ Ui::UICFGControls ui;
+ void loadSettings();
+ void save();
+
+ /** helper **/
+ bool settingsDirty;
+
+private slots:
+ void doOK();
+ void doCancel();
+ void chkLocalPCOnlyChanged();
+ void settingChanged() { settingsDirty = true; };
+};
+
+
#endif//INCLUDED_FGSERVER_H
//END
|