From 0bc78d53028f5ac68b9ab454347b8ad453988c08 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 7 Apr 2017 21:36:10 +0200 Subject: rename several protocols from abbreviated names --- proto-fg/CMakeLists.txt | 1 - proto-fg/fg-protocol.qrc | 5 - proto-fg/ftnoir_fgcontrols.ui | 208 --------------------------------- proto-fg/ftnoir_protocol_fg.cpp | 33 ------ proto-fg/ftnoir_protocol_fg.h | 76 ------------ proto-fg/ftnoir_protocol_fg_dialog.cpp | 58 --------- proto-fg/images/flightgear.png | Bin 979 -> 0 bytes proto-fg/lang/nl_NL.ts | 38 ------ proto-fg/lang/ru_RU.ts | 38 ------ proto-fg/lang/stub.ts | 38 ------ 10 files changed, 495 deletions(-) delete mode 100644 proto-fg/CMakeLists.txt delete mode 100644 proto-fg/fg-protocol.qrc delete mode 100644 proto-fg/ftnoir_fgcontrols.ui delete mode 100644 proto-fg/ftnoir_protocol_fg.cpp delete mode 100644 proto-fg/ftnoir_protocol_fg.h delete mode 100644 proto-fg/ftnoir_protocol_fg_dialog.cpp delete mode 100644 proto-fg/images/flightgear.png delete mode 100644 proto-fg/lang/nl_NL.ts delete mode 100644 proto-fg/lang/ru_RU.ts delete mode 100644 proto-fg/lang/stub.ts (limited to 'proto-fg') diff --git a/proto-fg/CMakeLists.txt b/proto-fg/CMakeLists.txt deleted file mode 100644 index cdfe18a6..00000000 --- a/proto-fg/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -otr_module(proto-fgfs) diff --git a/proto-fg/fg-protocol.qrc b/proto-fg/fg-protocol.qrc deleted file mode 100644 index 1c685437..00000000 --- a/proto-fg/fg-protocol.qrc +++ /dev/null @@ -1,5 +0,0 @@ - - - images/flightgear.png - - diff --git a/proto-fg/ftnoir_fgcontrols.ui b/proto-fg/ftnoir_fgcontrols.ui deleted file mode 100644 index 4c0a8314..00000000 --- a/proto-fg/ftnoir_fgcontrols.ui +++ /dev/null @@ -1,208 +0,0 @@ - - - UICFGControls - - - Qt::NonModal - - - - 0 - 0 - 342 - 100 - - - - FlightGear protocol settings - - - Qt::LeftToRight - - - false - - - - 0 - - - 2 - - - - - QFrame::Raised - - - - 0 - - - - - - 0 - 0 - - - - IP address - - - - - - - - 0 - 0 - - - - - 60 - 16777215 - - - - 255 - - - 1 - - - - - - - - 0 - 0 - - - - - 60 - 16777215 - - - - 255 - - - 1 - - - - - - - - 0 - 0 - - - - - 60 - 16777215 - - - - 255 - - - 1 - - - - - - - - 0 - 0 - - - - - 60 - 16777215 - - - - 255 - - - 1 - - - - - - - - - - QFrame::Raised - - - - 4 - - - - - - 10 - 0 - - - - Port - - - - - - - - 3 - 0 - - - - 1000 - - - 10000 - - - - - - - - - - - 0 - 0 - - - - QDialogButtonBox::Cancel|QDialogButtonBox::Help|QDialogButtonBox::Ok - - - - - - - - - startEngineClicked() - stopEngineClicked() - cameraSettingsClicked() - - diff --git a/proto-fg/ftnoir_protocol_fg.cpp b/proto-fg/ftnoir_protocol_fg.cpp deleted file mode 100644 index 3e0f955c..00000000 --- a/proto-fg/ftnoir_protocol_fg.cpp +++ /dev/null @@ -1,33 +0,0 @@ -/* Homepage http://facetracknoir.sourceforge.net/home/default.htm * - * * - * ISC License (ISC) * - * * - * Copyright (c) 2015, Wim Vriend * - * * - * Permission to use, copy, modify, and/or distribute this software for any * - * purpose with or without fee is hereby granted, provided that the above * - * copyright notice and this permission notice appear in all copies. * - */ -#include "ftnoir_protocol_fg.h" -#include "api/plugin-api.hpp" - -// For Todd and Arda Kutlu - -void flightgear::pose(const double* headpose) { - FlightData.x = -headpose[TX] * 1e-2; - FlightData.y = headpose[TY] * 1e-2; - FlightData.z = headpose[TZ] * 1e-2; - FlightData.p = headpose[Pitch]; - FlightData.h = -headpose[Yaw]; - FlightData.r = -headpose[Roll]; - FlightData.status = 1; - QHostAddress destIP(quint32(s.ip1 << 24 | s.ip2 << 16 | s.ip3 << 8 | s.ip4)); - (void) outSocket.writeDatagram(reinterpret_cast(&FlightData), sizeof(FlightData), destIP, static_cast(s.port)); -} - -bool flightgear::correct() -{ - return outSocket.bind(QHostAddress::Any, 0, QUdpSocket::ShareAddress | QUdpSocket::ReuseAddressHint); -} - -OPENTRACK_DECLARE_PROTOCOL(flightgear, FGControls, flightgearDll) diff --git a/proto-fg/ftnoir_protocol_fg.h b/proto-fg/ftnoir_protocol_fg.h deleted file mode 100644 index 48e5f1c1..00000000 --- a/proto-fg/ftnoir_protocol_fg.h +++ /dev/null @@ -1,76 +0,0 @@ -/* Homepage http://facetracknoir.sourceforge.net/home/default.htm * - * * - * ISC License (ISC) * - * * - * Copyright (c) 2015, Wim Vriend * - * * - * Permission to use, copy, modify, and/or distribute this software for any * - * purpose with or without fee is hereby granted, provided that the above * - * copyright notice and this permission notice appear in all copies. * - */ -#pragma once -#include "ui_ftnoir_fgcontrols.h" -#include -#include -#include -#include "api/plugin-api.hpp" -#include "options/options.hpp" -using namespace options; - -// x,y,z position in meters, heading, pitch and roll in degrees -#pragma pack(push, 1) -struct flightgear_datagram { - double x, y, z, h, p, r; - int status; -}; -#pragma pack(pop) - -struct settings : opts { - value ip1, ip2, ip3, ip4; - value port; - settings() : - opts("flightgear-proto"), - ip1(b, "ip1", 127), - ip2(b, "ip2", 0), - ip3(b, "ip3", 0), - ip4(b, "ip4", 1), - port(b, "port", 5542) - {} -}; - -class flightgear : public IProtocol -{ -public: - bool correct(); - void pose(const double *headpose); - QString game_name() { - return QCoreApplication::translate("flightgear", "FlightGear"); - } -private: - settings s; - flightgear_datagram FlightData; - QUdpSocket outSocket; -}; - -// Widget that has controls for FTNoIR protocol client-settings. -class FGControls: public IProtocolDialog -{ - Q_OBJECT -public: - FGControls(); - void register_protocol(IProtocol *) {} - void unregister_protocol() {} -private: - Ui::UICFGControls ui; - settings s; -private slots: - void doOK(); - void doCancel(); -}; - -class flightgearDll : public Metadata -{ -public: - QString name() { return QString(QCoreApplication::translate("flightgearDll", "FlightGear")); } - QIcon icon() { return QIcon(":/images/flightgear.png"); } -}; diff --git a/proto-fg/ftnoir_protocol_fg_dialog.cpp b/proto-fg/ftnoir_protocol_fg_dialog.cpp deleted file mode 100644 index 43a702f6..00000000 --- a/proto-fg/ftnoir_protocol_fg_dialog.cpp +++ /dev/null @@ -1,58 +0,0 @@ -/* Homepage http://facetracknoir.sourceforge.net/home/default.htm * - * * - * ISC License (ISC) * - * * - * Copyright (c) 2015, Wim Vriend * - * * - * Permission to use, copy, modify, and/or distribute this software for any * - * purpose with or without fee is hereby granted, provided that the above * - * copyright notice and this permission notice appear in all copies. * - */ -#include "ftnoir_protocol_fg.h" -#include "api/plugin-api.hpp" -#include "opentrack-library-path.h" - -#include -#include -#include -#include - -//******************************************************************************************************* -// FaceTrackNoIR Client Settings-dialog. -//******************************************************************************************************* - -// -// Constructor for server-settings-dialog -// -FGControls::FGControls() -{ - ui.setupUi( this ); - - tie_setting(s.ip1, ui.spinIPFirstNibble); - tie_setting(s.ip2, ui.spinIPSecondNibble); - tie_setting(s.ip3, ui.spinIPThirdNibble); - tie_setting(s.ip4, ui.spinIPFourthNibble); - tie_setting(s.port, ui.spinPortNumber); - - connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(doOK())); - connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(doCancel())); - connect(ui.buttonBox, &QDialogButtonBox::helpRequested, - ui.buttonBox, []() - { - static const QString contrib_dir = "file:///" + QDir::toNativeSeparators(QStringLiteral("%1/%2/%3"). - arg(OPENTRACK_BASE_PATH, OPENTRACK_CONTRIB_PATH, "FlightGear")); - QDesktopServices::openUrl(contrib_dir); - }); -} - -void FGControls::doOK() -{ - s.b->save(); - close(); -} - -void FGControls::doCancel() -{ - close(); -} - diff --git a/proto-fg/images/flightgear.png b/proto-fg/images/flightgear.png deleted file mode 100644 index 2a546642..00000000 Binary files a/proto-fg/images/flightgear.png and /dev/null differ diff --git a/proto-fg/lang/nl_NL.ts b/proto-fg/lang/nl_NL.ts deleted file mode 100644 index 35ab5431..00000000 --- a/proto-fg/lang/nl_NL.ts +++ /dev/null @@ -1,38 +0,0 @@ - - - - - UICFGControls - - - FlightGear protocol settings - - - - - IP-address remote PC - - - - - Port-number - - - - - flightgear - - - FlightGear - - - - - flightgearDll - - - FlightGear - - - - diff --git a/proto-fg/lang/ru_RU.ts b/proto-fg/lang/ru_RU.ts deleted file mode 100644 index 916f5e2d..00000000 --- a/proto-fg/lang/ru_RU.ts +++ /dev/null @@ -1,38 +0,0 @@ - - - - - UICFGControls - - - FlightGear protocol settings - - - - - IP-address remote PC - - - - - Port-number - - - - - flightgear - - - FlightGear - - - - - flightgearDll - - - FlightGear - - - - diff --git a/proto-fg/lang/stub.ts b/proto-fg/lang/stub.ts deleted file mode 100644 index e94d44f2..00000000 --- a/proto-fg/lang/stub.ts +++ /dev/null @@ -1,38 +0,0 @@ - - - - - UICFGControls - - - FlightGear protocol settings - - - - - IP-address remote PC - - - - - Port-number - - - - - flightgear - - - FlightGear - - - - - flightgearDll - - - FlightGear - - - - -- cgit v1.2.3