From ab77b86507c65c56ec8aeda181bb43cc96cebc18 Mon Sep 17 00:00:00 2001 From: Wim Vriend Date: Fri, 19 Nov 2010 14:55:47 +0000 Subject: Donation buttons and layout improved git-svn-id: svn+ssh://svn.code.sf.net/p/facetracknoir/code@28 19e81ba0-9b1a-49c3-bd6c-561e1906d5fb --- FaceTrackNoIR/FGServer.h | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) (limited to 'FaceTrackNoIR/FGServer.h') 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 -- cgit v1.2.3