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/FaceTrackNoIR.cpp | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) (limited to 'FaceTrackNoIR/FaceTrackNoIR.cpp') diff --git a/FaceTrackNoIR/FaceTrackNoIR.cpp b/FaceTrackNoIR/FaceTrackNoIR.cpp index 3a259cba..cbed2ffd 100644 --- a/FaceTrackNoIR/FaceTrackNoIR.cpp +++ b/FaceTrackNoIR/FaceTrackNoIR.cpp @@ -27,6 +27,7 @@ #include "PPJoyServer.h" #include "FSUIPCServer.h" #include "FTIRServer.h" +#include "FGServer.h" using namespace sm::faceapi; using namespace sm::faceapi::qt; @@ -85,6 +86,9 @@ void FaceTrackNoIR::setupFaceTrackNoIR() { connect(ui.actionCurve_Configuration, SIGNAL(triggered()), this, SLOT(showCurveConfiguration())); connect(ui.btnEditCurves, SIGNAL(clicked()), this, SLOT(showCurveConfiguration())); + connect(ui.actionSupport, SIGNAL(triggered()), this, SLOT(openurl_support())); + connect(ui.actionYour_Support, SIGNAL(triggered()), this, SLOT(openurl_donation())); + connect(ui.btnDonate, SIGNAL(clicked()), this, SLOT(openurl_donation())); connect(ui.actionAbout, SIGNAL(triggered()), this, SLOT(about())); connect(ui.actionVideoWidget, SIGNAL(triggered()), this, SLOT(showVideoWidget())); @@ -359,7 +363,7 @@ void FaceTrackNoIR::saveAs() save(); // Put the filename in the window-title - setWindowTitle ( "FaceTrackNoIR (1.4) - " + newFileInfo.fileName() ); + setWindowTitle ( "FaceTrackNoIR (1.5) - " + newFileInfo.fileName() ); } } @@ -402,10 +406,21 @@ void FaceTrackNoIR::loadSettings() { // Put the filename in the window-title QFileInfo pathInfo ( currentFile ); - setWindowTitle ( "FaceTrackNoIR (1.4) - " + pathInfo.fileName() ); + setWindowTitle ( "FaceTrackNoIR (1.5) - " + pathInfo.fileName() ); } +/** show support page in web-browser **/ +void FaceTrackNoIR::openurl_support() { + QDesktopServices::openUrl(QUrl("http://facetracknoir.sourceforge.net/manual/manual.htm", QUrl::TolerantMode)); +} + +/** show donations page in web-browser **/ +void FaceTrackNoIR::openurl_donation() { + QDesktopServices::openUrl(QUrl("http://facetracknoir.sourceforge.net/information_links/donate.htm", QUrl::TolerantMode)); +} + + /** show about dialog **/ void FaceTrackNoIR::about() { aboutDialog.move(this->width()/2-135, @@ -669,7 +684,6 @@ void FaceTrackNoIR::showServerControls() { // Show the appropriate Protocol-server Settings switch (ui.iconcomboBox->currentIndex()) { case FREE_TRACK: - case FLIGHTGEAR: case FTNOIR: case SIMCONNECT: break; @@ -682,6 +696,9 @@ void FaceTrackNoIR::showServerControls() { case TRACKIR: _server_controls = new FTIRControls( this, Qt::Dialog ); break; + case FLIGHTGEAR: + _server_controls = new FGControls( this, Qt::Dialog ); + break; default: break; } @@ -821,7 +838,6 @@ void FaceTrackNoIR::setIcon(int index) // Enable/disable Protocol-server Settings switch (ui.iconcomboBox->currentIndex()) { case FREE_TRACK: - case FLIGHTGEAR: case FTNOIR: case SIMCONNECT: ui.btnShowServerControls->hide(); @@ -829,6 +845,7 @@ void FaceTrackNoIR::setIcon(int index) case PPJOY: case FSUIPC: case TRACKIR: + case FLIGHTGEAR: ui.btnShowServerControls->show(); ui.btnShowServerControls->setEnabled ( true ); break; -- cgit v1.2.3