summaryrefslogtreecommitdiffhomepage
path: root/FaceTrackNoIR/FGServer.h
diff options
context:
space:
mode:
authorWim Vriend <facetracknoir@gmail.com>2010-11-19 14:55:47 +0000
committerWim Vriend <facetracknoir@gmail.com>2010-11-19 14:55:47 +0000
commitab77b86507c65c56ec8aeda181bb43cc96cebc18 (patch)
tree2dfebccb04ffd4bc8687e6101840f03a488d3bb4 /FaceTrackNoIR/FGServer.h
parent04ec6d036899a126e2d7fad1523c1c262442423d (diff)
Donation buttons and layout improved
git-svn-id: svn+ssh://svn.code.sf.net/p/facetracknoir/code@28 19e81ba0-9b1a-49c3-bd6c-561e1906d5fb
Diffstat (limited to 'FaceTrackNoIR/FGServer.h')
-rw-r--r--FaceTrackNoIR/FGServer.h34
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