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-ftn/CMakeLists.txt | 1 - proto-ftn/ftnoir_ftncontrols.ui | 266 ------------------------------- proto-ftn/ftnoir_protocol_ftn.cpp | 34 ---- proto-ftn/ftnoir_protocol_ftn.h | 69 -------- proto-ftn/ftnoir_protocol_ftn_dialog.cpp | 42 ----- proto-ftn/lang/nl_NL.ts | 58 ------- proto-ftn/lang/ru_RU.ts | 58 ------- proto-ftn/lang/stub.ts | 58 ------- 8 files changed, 586 deletions(-) delete mode 100644 proto-ftn/CMakeLists.txt delete mode 100644 proto-ftn/ftnoir_ftncontrols.ui delete mode 100644 proto-ftn/ftnoir_protocol_ftn.cpp delete mode 100644 proto-ftn/ftnoir_protocol_ftn.h delete mode 100644 proto-ftn/ftnoir_protocol_ftn_dialog.cpp delete mode 100644 proto-ftn/lang/nl_NL.ts delete mode 100644 proto-ftn/lang/ru_RU.ts delete mode 100644 proto-ftn/lang/stub.ts (limited to 'proto-ftn') diff --git a/proto-ftn/CMakeLists.txt b/proto-ftn/CMakeLists.txt deleted file mode 100644 index abba4f52..00000000 --- a/proto-ftn/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -otr_module(proto-udp) diff --git a/proto-ftn/ftnoir_ftncontrols.ui b/proto-ftn/ftnoir_ftncontrols.ui deleted file mode 100644 index 28f8ccdf..00000000 --- a/proto-ftn/ftnoir_ftncontrols.ui +++ /dev/null @@ -1,266 +0,0 @@ - - - UICFTNControls - - - Qt::NonModal - - - - 0 - 0 - 411 - 169 - - - - UDP protocol settings - - - - :/images/facetracknoir.png:/images/facetracknoir.png - - - Qt::LeftToRight - - - false - - - - - - - - - 60 - 16777215 - - - - 255 - - - 1 - - - - - - - - 60 - 16777215 - - - - 255 - - - 1 - - - - - - - - 60 - 16777215 - - - - 255 - - - 1 - - - - - - - - 60 - 16777215 - - - - 255 - - - 1 - - - - - - - IP-address remote PC - - - - - - - Port-number - - - - - - - 1000 - - - 10000 - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - Enter IP-address and port-number for the remote PC. - - - true - - - - - - - Remember: you may have to change firewall-settings too! - - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - QLayout::SetDefaultConstraint - - - - - - 0 - 0 - - - - - 100 - 0 - - - - - 100 - 16777215 - - - - OK - - - - - - - - 0 - 0 - - - - - 100 - 0 - - - - - 100 - 16777215 - - - - Cancel - - - - - - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 10 - 20 - - - - - - - - - - spinIPFirstNibble - spinIPSecondNibble - spinIPThirdNibble - spinIPFourthNibble - spinPortNumber - btnOK - btnCancel - - - - - - - startEngineClicked() - stopEngineClicked() - cameraSettingsClicked() - - diff --git a/proto-ftn/ftnoir_protocol_ftn.cpp b/proto-ftn/ftnoir_protocol_ftn.cpp deleted file mode 100644 index b659e3b5..00000000 --- a/proto-ftn/ftnoir_protocol_ftn.cpp +++ /dev/null @@ -1,34 +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_ftn.h" -#include -#include "api/plugin-api.hpp" - -udp::udp() -{ -} - -void udp::pose(const double *headpose) { - int destPort = s.port; - QHostAddress destIP(QString("%1.%2.%3.%4").arg( - QString::number(static_cast(s.ip1)), - QString::number(static_cast(s.ip2)), - QString::number(static_cast(s.ip3)), - QString::number(static_cast(s.ip4)))); - outSocket.writeDatagram((const char *) headpose, sizeof( double[6] ), destIP, destPort); -} - -bool udp::correct() -{ - return outSocket.bind(QHostAddress::Any, 0, QUdpSocket::ShareAddress | QUdpSocket::ReuseAddressHint); -} - -OPENTRACK_DECLARE_PROTOCOL(udp, FTNControls, udpDll) diff --git a/proto-ftn/ftnoir_protocol_ftn.h b/proto-ftn/ftnoir_protocol_ftn.h deleted file mode 100644 index 383b4ed7..00000000 --- a/proto-ftn/ftnoir_protocol_ftn.h +++ /dev/null @@ -1,69 +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_ftncontrols.h" -#include -#include -#include -#include -#include "api/plugin-api.hpp" -#include "options/options.hpp" -using namespace options; - -struct settings : opts { - value ip1, ip2, ip3, ip4, port; - settings() : - opts("udp-proto"), - ip1(b, "ip1", 192), - ip2(b, "ip2", 168), - ip3(b, "ip3", 0), - ip4(b, "ip4", 2), - port(b, "port", 4242) - {} -}; - -class udp : public IProtocol -{ -public: - udp(); - bool correct(); - void pose(const double *headpose); - QString game_name() { - return QCoreApplication::translate("udp", "UDP Tracker"); - } -private: - QUdpSocket outSocket; - settings s; -}; - -// Widget that has controls for FTNoIR protocol client-settings. -class FTNControls: public IProtocolDialog -{ - Q_OBJECT -public: - FTNControls(); - void register_protocol(IProtocol *) {} - void unregister_protocol() {} -private: - Ui::UICFTNControls ui; - settings s; -private slots: - void doOK(); - void doCancel(); -}; - -class udpDll : public Metadata -{ -public: - QString name() { return QString(QCoreApplication::translate("udpDll", "UDP receiver")); } - QIcon icon() { return QIcon(":/images/facetracknoir.png"); } -}; diff --git a/proto-ftn/ftnoir_protocol_ftn_dialog.cpp b/proto-ftn/ftnoir_protocol_ftn_dialog.cpp deleted file mode 100644 index 70416a69..00000000 --- a/proto-ftn/ftnoir_protocol_ftn_dialog.cpp +++ /dev/null @@ -1,42 +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_ftn.h" -#include "api/plugin-api.hpp" - -FTNControls::FTNControls() -{ - 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.btnOK, SIGNAL(clicked()), this, SLOT(doOK())); - connect(ui.btnCancel, SIGNAL(clicked()), this, SLOT(doCancel())); -} - -// -// OK clicked on server-dialog -// -void FTNControls::doOK() { - s.b->save(); - close(); -} - -// -// Cancel clicked on server-dialog -// -void FTNControls::doCancel() -{ - close(); -} diff --git a/proto-ftn/lang/nl_NL.ts b/proto-ftn/lang/nl_NL.ts deleted file mode 100644 index 989194c5..00000000 --- a/proto-ftn/lang/nl_NL.ts +++ /dev/null @@ -1,58 +0,0 @@ - - - - - UICFTNControls - - - UDP protocol settings - - - - - IP-address remote PC - - - - - Port-number - - - - - Enter IP-address and port-number for the remote PC. - - - - - Remember: you may have to change firewall-settings too! - - - - - OK - - - - - Cancel - - - - - udp - - - UDP Tracker - - - - - udpDll - - - UDP receiver - - - - diff --git a/proto-ftn/lang/ru_RU.ts b/proto-ftn/lang/ru_RU.ts deleted file mode 100644 index c489ebf5..00000000 --- a/proto-ftn/lang/ru_RU.ts +++ /dev/null @@ -1,58 +0,0 @@ - - - - - UICFTNControls - - - UDP protocol settings - - - - - IP-address remote PC - - - - - Port-number - - - - - Enter IP-address and port-number for the remote PC. - - - - - Remember: you may have to change firewall-settings too! - - - - - OK - - - - - Cancel - - - - - udp - - - UDP Tracker - - - - - udpDll - - - UDP receiver - - - - diff --git a/proto-ftn/lang/stub.ts b/proto-ftn/lang/stub.ts deleted file mode 100644 index 9ef5380e..00000000 --- a/proto-ftn/lang/stub.ts +++ /dev/null @@ -1,58 +0,0 @@ - - - - - UICFTNControls - - - UDP protocol settings - - - - - IP-address remote PC - - - - - Port-number - - - - - Enter IP-address and port-number for the remote PC. - - - - - Remember: you may have to change firewall-settings too! - - - - - OK - - - - - Cancel - - - - - udp - - - UDP Tracker - - - - - udpDll - - - UDP receiver - - - - -- cgit v1.2.3