mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-18 03:52:11 +01:00
OP-87 Rename TCPtelemetryconnection to ipconnection to reflect recent changes and ability to connect via TCP or UDP
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@912 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
parent
b121af6e95
commit
3e87388bcc
@ -1,4 +1,4 @@
|
||||
<plugin name="TCPtelemetry" version="1.0.0" compatVersion="1.0.0">
|
||||
<plugin name="IPconnection" version="1.0.1" compatVersion="1.0.1">
|
||||
<vendor>The OpenPilot Project</vendor>
|
||||
<copyright>(C) 2010 OpenPilot Project</copyright>
|
||||
<license>GNU Public License (GPL) Version 3</license>
|
3
ground/src/plugins/ipconnection/ipconnection.pri
Normal file
3
ground/src/plugins/ipconnection/ipconnection.pri
Normal file
@ -0,0 +1,3 @@
|
||||
include(ipconnection_dependencies.pri)
|
||||
|
||||
LIBS *= -l$$qtLibraryTarget(IPconnection)
|
16
ground/src/plugins/ipconnection/ipconnection.pro
Normal file
16
ground/src/plugins/ipconnection/ipconnection.pro
Normal file
@ -0,0 +1,16 @@
|
||||
TEMPLATE = lib
|
||||
TARGET = IPconnection
|
||||
include(../../openpilotgcsplugin.pri)
|
||||
include(ipconnection_dependencies.pri)
|
||||
HEADERS += ipconnectionplugin.h \
|
||||
ipconnection_global.h \
|
||||
ipconnectionconfiguration.h \
|
||||
ipconnectionoptionspage.h
|
||||
SOURCES += ipconnectionplugin.cpp \
|
||||
ipconnectionconfiguration.cpp \
|
||||
ipconnectionoptionspage.cpp
|
||||
FORMS += ipconnectionoptionspage.ui
|
||||
RESOURCES +=
|
||||
DEFINES += IPconnection_LIBRARY
|
||||
OTHER_FILES += IPconnection.pluginspec
|
||||
QT += network
|
@ -1,11 +1,11 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
*
|
||||
* @file TCPtelemetry_global.h
|
||||
* @file IPconnection_global.h
|
||||
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
|
||||
* @brief
|
||||
* @see The GNU Public License (GPL) Version 3
|
||||
* @defgroup TCPtelemetry_plugin
|
||||
* @defgroup IPconnection_plugin
|
||||
* @{
|
||||
*
|
||||
*****************************************************************************/
|
||||
@ -25,15 +25,15 @@
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef TCPtelemetry_GLOBAL_H
|
||||
#define TCPtelemetry_GLOBAL_H
|
||||
#ifndef IPconnection_GLOBAL_H
|
||||
#define IPconnection_GLOBAL_H
|
||||
|
||||
#include <QtCore/qglobal.h>
|
||||
|
||||
#if defined(TCPtelemetry_LIBRARY)
|
||||
# define TCPtelemetry_EXPORT Q_DECL_EXPORT
|
||||
#if defined(IPconnection_LIBRARY)
|
||||
# define IPconnection_EXPORT Q_DECL_EXPORT
|
||||
#else
|
||||
# define TCPtelemetry_EXPORT Q_DECL_IMPORT
|
||||
# define IPconnection_EXPORT Q_DECL_IMPORT
|
||||
#endif
|
||||
|
||||
#endif // TCPtelemetry_GLOBAL_H
|
||||
#endif // IPconnection_GLOBAL_H
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
*
|
||||
* @file TCPtelemetryconfiguration.cpp
|
||||
* @file IPconnectionconfiguration.cpp
|
||||
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
|
||||
* @brief
|
||||
* @see The GNU Public License (GPL) Version 3
|
||||
@ -25,11 +25,11 @@
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "tcptelemetryconfiguration.h"
|
||||
#include "ipconnectionconfiguration.h"
|
||||
#include <QtCore/QDataStream>
|
||||
#include <coreplugin/icore.h>
|
||||
|
||||
TCPtelemetryConfiguration::TCPtelemetryConfiguration(QString classId, const QByteArray &state, QObject *parent) :
|
||||
IPconnectionConfiguration::IPconnectionConfiguration(QString classId, const QByteArray &state, QObject *parent) :
|
||||
IUAVGadgetConfiguration(classId, parent),
|
||||
m_HostName("127.0.0.1"),
|
||||
m_Port(1000),
|
||||
@ -37,19 +37,19 @@ TCPtelemetryConfiguration::TCPtelemetryConfiguration(QString classId, const QByt
|
||||
{
|
||||
settings = Core::ICore::instance()->settings();
|
||||
}
|
||||
TCPtelemetryConfiguration::~TCPtelemetryConfiguration()
|
||||
IPconnectionConfiguration::~IPconnectionConfiguration()
|
||||
{
|
||||
}
|
||||
IUAVGadgetConfiguration *TCPtelemetryConfiguration::clone()
|
||||
IUAVGadgetConfiguration *IPconnectionConfiguration::clone()
|
||||
{
|
||||
TCPtelemetryConfiguration *m = new TCPtelemetryConfiguration(this->classId());
|
||||
IPconnectionConfiguration *m = new IPconnectionConfiguration(this->classId());
|
||||
m->m_Port = m_Port;
|
||||
m->m_HostName = m_HostName;
|
||||
m->m_UseTCP = m_UseTCP;
|
||||
return m;
|
||||
}
|
||||
|
||||
QByteArray TCPtelemetryConfiguration::saveState() const
|
||||
QByteArray IPconnectionConfiguration::saveState() const
|
||||
{
|
||||
QByteArray bytes;
|
||||
QDataStream stream(&bytes, QIODevice::WriteOnly);
|
||||
@ -61,9 +61,9 @@ QByteArray TCPtelemetryConfiguration::saveState() const
|
||||
}
|
||||
|
||||
|
||||
void TCPtelemetryConfiguration::savesettings() const
|
||||
void IPconnectionConfiguration::savesettings() const
|
||||
{
|
||||
settings->beginGroup(QLatin1String("TCPtelemetryconnection"));
|
||||
settings->beginGroup(QLatin1String("IPconnection"));
|
||||
|
||||
settings->beginWriteArray("Current");
|
||||
settings->setArrayIndex(0);
|
||||
@ -75,9 +75,9 @@ void TCPtelemetryConfiguration::savesettings() const
|
||||
}
|
||||
|
||||
|
||||
void TCPtelemetryConfiguration::restoresettings()
|
||||
void IPconnectionConfiguration::restoresettings()
|
||||
{
|
||||
settings->beginGroup(QLatin1String("TCPtelemetryconnection"));
|
||||
settings->beginGroup(QLatin1String("IPconnection"));
|
||||
|
||||
settings->beginReadArray("Current");
|
||||
settings->setArrayIndex(0);
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
*
|
||||
* @file TCPtelemetryconfiguration.h
|
||||
* @file IPconnectionconfiguration.h
|
||||
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
|
||||
* @brief
|
||||
* @see The GNU Public License (GPL) Version 3
|
||||
@ -25,8 +25,8 @@
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef TCPtelemetryCONFIGURATION_H
|
||||
#define TCPtelemetryCONFIGURATION_H
|
||||
#ifndef IPconnectionCONFIGURATION_H
|
||||
#define IPconnectionCONFIGURATION_H
|
||||
|
||||
#include <coreplugin/iuavgadgetconfiguration.h>
|
||||
#include <QtCore/QString>
|
||||
@ -34,7 +34,7 @@
|
||||
|
||||
using namespace Core;
|
||||
|
||||
class TCPtelemetryConfiguration : public IUAVGadgetConfiguration
|
||||
class IPconnectionConfiguration : public IUAVGadgetConfiguration
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(QString HostName READ HostName WRITE setHostName)
|
||||
@ -42,8 +42,8 @@ Q_PROPERTY(int Port READ Port WRITE setPort)
|
||||
Q_PROPERTY(int UseTCP READ UseTCP WRITE setUseTCP)
|
||||
|
||||
public:
|
||||
explicit TCPtelemetryConfiguration(QString classId, const QByteArray &state = 0, QObject *parent = 0);
|
||||
virtual ~TCPtelemetryConfiguration();
|
||||
explicit IPconnectionConfiguration(QString classId, const QByteArray &state = 0, QObject *parent = 0);
|
||||
virtual ~IPconnectionConfiguration();
|
||||
QByteArray saveState() const;
|
||||
//void savesettings(QSettings* settings) const;
|
||||
//void restoresettings(QSettings* settings);
|
||||
@ -70,4 +70,4 @@ private:
|
||||
|
||||
};
|
||||
|
||||
#endif // TCPtelemetryCONFIGURATION_H
|
||||
#endif // IPconnectionCONFIGURATION_H
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
*
|
||||
* @file TCPtelemetryoptionspage.cpp
|
||||
* @file IPconnectionoptionspage.cpp
|
||||
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
|
||||
* @brief
|
||||
* @see The GNU Public License (GPL) Version 3
|
||||
@ -25,8 +25,8 @@
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "tcptelemetryoptionspage.h"
|
||||
#include "tcptelemetryconfiguration.h"
|
||||
#include "ipconnectionoptionspage.h"
|
||||
#include "ipconnectionconfiguration.h"
|
||||
#include <QtGui/QLabel>
|
||||
#include <QtGui/QComboBox>
|
||||
#include <QtGui/QSpinBox>
|
||||
@ -35,22 +35,22 @@
|
||||
#include <QtGui/QHBoxLayout>
|
||||
#include <QtGui/QVBoxLayout>
|
||||
|
||||
#include "ui_tcptelemetryoptionspage.h"
|
||||
#include "ui_ipconnectionoptionspage.h"
|
||||
|
||||
|
||||
TCPtelemetryOptionsPage::TCPtelemetryOptionsPage(TCPtelemetryConfiguration *config, QObject *parent) :
|
||||
IPconnectionOptionsPage::IPconnectionOptionsPage(IPconnectionConfiguration *config, QObject *parent) :
|
||||
IOptionsPage(parent),
|
||||
m_config(config)
|
||||
{
|
||||
|
||||
}
|
||||
TCPtelemetryOptionsPage::~TCPtelemetryOptionsPage()
|
||||
IPconnectionOptionsPage::~IPconnectionOptionsPage()
|
||||
{
|
||||
}
|
||||
QWidget *TCPtelemetryOptionsPage::createPage(QWidget *parent)
|
||||
QWidget *IPconnectionOptionsPage::createPage(QWidget *parent)
|
||||
{
|
||||
|
||||
m_page = new Ui::TCPtelemetryOptionsPage();
|
||||
m_page = new Ui::IPconnectionOptionsPage();
|
||||
QWidget *w = new QWidget(parent);
|
||||
m_page->setupUi(w);
|
||||
|
||||
@ -62,7 +62,7 @@ QWidget *TCPtelemetryOptionsPage::createPage(QWidget *parent)
|
||||
return w;
|
||||
}
|
||||
|
||||
void TCPtelemetryOptionsPage::apply()
|
||||
void IPconnectionOptionsPage::apply()
|
||||
{
|
||||
m_config->setPort(m_page->Port->value());
|
||||
m_config->setHostName(m_page->HostName->text());
|
||||
@ -75,7 +75,7 @@ void TCPtelemetryOptionsPage::apply()
|
||||
|
||||
}
|
||||
|
||||
void TCPtelemetryOptionsPage::finish()
|
||||
void IPconnectionOptionsPage::finish()
|
||||
{
|
||||
delete m_page;
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
*
|
||||
* @file TCPtelemetryoptionspage.h
|
||||
* @file IPconnectionoptionspage.h
|
||||
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
|
||||
* @brief
|
||||
* @see The GNU Public License (GPL) Version 3
|
||||
@ -25,30 +25,29 @@
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef TCPtelemetryOPTIONSPAGE_H
|
||||
#define TCPtelemetryOPTIONSPAGE_H
|
||||
#ifndef IPconnectionOPTIONSPAGE_H
|
||||
#define IPconnectionOPTIONSPAGE_H
|
||||
|
||||
#include "coreplugin/dialogs/ioptionspage.h"
|
||||
//#include <QtCore/QSettings>
|
||||
|
||||
class TCPtelemetryConfiguration;
|
||||
class IPconnectionConfiguration;
|
||||
|
||||
namespace Core {
|
||||
class IUAVGadgetConfiguration;
|
||||
}
|
||||
|
||||
namespace Ui {
|
||||
class TCPtelemetryOptionsPage;
|
||||
class IPconnectionOptionsPage;
|
||||
}
|
||||
|
||||
using namespace Core;
|
||||
|
||||
class TCPtelemetryOptionsPage : public IOptionsPage
|
||||
class IPconnectionOptionsPage : public IOptionsPage
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit TCPtelemetryOptionsPage(TCPtelemetryConfiguration *config, QObject *parent = 0);
|
||||
virtual ~TCPtelemetryOptionsPage();
|
||||
explicit IPconnectionOptionsPage(IPconnectionConfiguration *config, QObject *parent = 0);
|
||||
virtual ~IPconnectionOptionsPage();
|
||||
|
||||
QString id() const { return QLatin1String("settings"); }
|
||||
QString trName() const { return tr("settings"); }
|
||||
@ -64,10 +63,9 @@ signals:
|
||||
|
||||
public slots:
|
||||
private:
|
||||
TCPtelemetryConfiguration *m_config;
|
||||
Ui::TCPtelemetryOptionsPage *m_page;
|
||||
//QSettings* settings;
|
||||
IPconnectionConfiguration *m_config;
|
||||
Ui::IPconnectionOptionsPage *m_page;
|
||||
|
||||
};
|
||||
|
||||
#endif // TCPtelemetryOPTIONSPAGE_H
|
||||
#endif // IPconnectionOPTIONSPAGE_H
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>TCPtelemetryOptionsPage</class>
|
||||
<widget class="QWidget" name="TCPtelemetryOptionsPage">
|
||||
<class>IPconnectionOptionsPage</class>
|
||||
<widget class="QWidget" name="IPconnectionOptionsPage">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
@ -1,11 +1,11 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
*
|
||||
* @file TCPtelemetryplugin.cpp
|
||||
* @file IPconnectionplugin.cpp
|
||||
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
|
||||
* @brief Register connection object for the core connection manager
|
||||
* @see The GNU Public License (GPL) Version 3
|
||||
* @defgroup TCPtelemetry_plugin
|
||||
* @defgroup IPconnection_plugin
|
||||
* @{
|
||||
*
|
||||
*****************************************************************************/
|
||||
@ -27,7 +27,7 @@
|
||||
|
||||
//The core of this plugin has been directly copied from the serial plugin and converted to work over a TCP link instead of a direct serial link
|
||||
|
||||
#include "tcptelemetryplugin.h"
|
||||
#include "ipconnectionplugin.h"
|
||||
|
||||
|
||||
#include <extensionsystem/pluginmanager.h>
|
||||
@ -42,13 +42,13 @@
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
TCPtelemetryConnection::TCPtelemetryConnection()
|
||||
IPconnectionConnection::IPconnectionConnection()
|
||||
{
|
||||
//create all our objects
|
||||
m_config = new TCPtelemetryConfiguration("IP Network Telemetry", NULL, this);
|
||||
m_config = new IPconnectionConfiguration("IP Network Telemetry", NULL, this);
|
||||
m_config->restoresettings();
|
||||
|
||||
m_optionspage = new TCPtelemetryOptionsPage(m_config,this);
|
||||
m_optionspage = new IPconnectionOptionsPage(m_config,this);
|
||||
|
||||
//just signal whenever we have a device event...
|
||||
QMainWindow *mw = Core::ICore::instance()->mainWindow();
|
||||
@ -58,20 +58,20 @@ TCPtelemetryConnection::TCPtelemetryConnection()
|
||||
this, SLOT(onEnumerationChanged()));
|
||||
}
|
||||
|
||||
TCPtelemetryConnection::~TCPtelemetryConnection()
|
||||
IPconnectionConnection::~IPconnectionConnection()
|
||||
{
|
||||
//tcpSocket->close ();
|
||||
//delete(tcpSocket);
|
||||
}
|
||||
|
||||
void TCPtelemetryConnection::onEnumerationChanged()
|
||||
void IPconnectionConnection::onEnumerationChanged()
|
||||
{//no change from serial plugin
|
||||
emit availableDevChanged(this);
|
||||
}
|
||||
|
||||
|
||||
|
||||
QStringList TCPtelemetryConnection::availableDevices()
|
||||
QStringList IPconnectionConnection::availableDevices()
|
||||
{
|
||||
QStringList list;
|
||||
|
||||
@ -81,7 +81,7 @@ QStringList TCPtelemetryConnection::availableDevices()
|
||||
return list;
|
||||
}
|
||||
|
||||
QIODevice *TCPtelemetryConnection::openDevice(const QString &deviceName)
|
||||
QIODevice *IPconnectionConnection::openDevice(const QString &deviceName)
|
||||
{
|
||||
const int Timeout = 5 * 1000;
|
||||
int state;
|
||||
@ -123,7 +123,7 @@ QIODevice *TCPtelemetryConnection::openDevice(const QString &deviceName)
|
||||
return tcpSocket;
|
||||
}
|
||||
|
||||
void TCPtelemetryConnection::closeDevice(const QString &deviceName)
|
||||
void IPconnectionConnection::closeDevice(const QString &deviceName)
|
||||
{
|
||||
//still having problems with the app crashing when we reference the tcpsocket outside the openDevice function...
|
||||
//tcpSocket->close ();
|
||||
@ -134,12 +134,12 @@ void TCPtelemetryConnection::closeDevice(const QString &deviceName)
|
||||
}
|
||||
|
||||
|
||||
QString TCPtelemetryConnection::connectionName()
|
||||
QString IPconnectionConnection::connectionName()
|
||||
{//updated from serial plugin
|
||||
return QString("Network telemetry port");
|
||||
}
|
||||
|
||||
QString TCPtelemetryConnection::shortName()
|
||||
QString IPconnectionConnection::shortName()
|
||||
{//updated from serial plugin
|
||||
if (m_config->UseTCP()) {
|
||||
return QString("TCP");
|
||||
@ -149,25 +149,25 @@ QString TCPtelemetryConnection::shortName()
|
||||
}
|
||||
|
||||
|
||||
TCPtelemetryPlugin::TCPtelemetryPlugin()
|
||||
IPconnectionPlugin::IPconnectionPlugin()
|
||||
{//no change from serial plugin
|
||||
}
|
||||
|
||||
TCPtelemetryPlugin::~TCPtelemetryPlugin()
|
||||
IPconnectionPlugin::~IPconnectionPlugin()
|
||||
{//manually remove the options page object
|
||||
removeObject(m_connection->Optionspage());
|
||||
}
|
||||
|
||||
void TCPtelemetryPlugin::extensionsInitialized()
|
||||
void IPconnectionPlugin::extensionsInitialized()
|
||||
{
|
||||
addAutoReleasedObject(m_connection);
|
||||
}
|
||||
|
||||
bool TCPtelemetryPlugin::initialize(const QStringList &arguments, QString *errorString)
|
||||
bool IPconnectionPlugin::initialize(const QStringList &arguments, QString *errorString)
|
||||
{
|
||||
Q_UNUSED(arguments);
|
||||
Q_UNUSED(errorString);
|
||||
m_connection = new TCPtelemetryConnection();
|
||||
m_connection = new IPconnectionConnection();
|
||||
//must manage this registration of child object ourselves
|
||||
//if we use an autorelease here it causes the GCS to crash
|
||||
//as it is deleting objects as the app closes...
|
||||
@ -176,4 +176,4 @@ bool TCPtelemetryPlugin::initialize(const QStringList &arguments, QString *error
|
||||
return true;
|
||||
}
|
||||
|
||||
Q_EXPORT_PLUGIN(TCPtelemetryPlugin)
|
||||
Q_EXPORT_PLUGIN(IPconnectionPlugin)
|
@ -1,11 +1,11 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
*
|
||||
* @file TCPtelemetryplugin.h
|
||||
* @file IPconnectionplugin.h
|
||||
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
|
||||
* @brief
|
||||
* @see The GNU Public License (GPL) Version 3
|
||||
* @defgroup TCPtelemetry_plugin
|
||||
* @defgroup IPconnection_plugin
|
||||
* @{
|
||||
*
|
||||
*****************************************************************************/
|
||||
@ -25,13 +25,12 @@
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef TCPtelemetryPLUGIN_H
|
||||
#define TCPtelemetryPLUGIN_H
|
||||
#ifndef IPconnectionPLUGIN_H
|
||||
#define IPconnectionPLUGIN_H
|
||||
|
||||
#include "tcptelemetry_global.h"
|
||||
#include "tcptelemetryoptionspage.h"
|
||||
#include "tcptelemetryconfiguration.h"
|
||||
//#include "tcptelemetryfactory.h"
|
||||
#include "ipconnection_global.h"
|
||||
#include "ipconnectionoptionspage.h"
|
||||
#include "ipconnectionconfiguration.h"
|
||||
#include "coreplugin/iconnection.h"
|
||||
#include <extensionsystem/iplugin.h>
|
||||
//#include <QtCore/QSettings>
|
||||
@ -47,13 +46,13 @@ class IConnection;
|
||||
* Plugin will add a instance of this class to the pool,
|
||||
* so the connection manager can use it.
|
||||
*/
|
||||
class TCPtelemetry_EXPORT TCPtelemetryConnection
|
||||
class IPconnection_EXPORT IPconnectionConnection
|
||||
: public Core::IConnection
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
TCPtelemetryConnection();
|
||||
virtual ~TCPtelemetryConnection();
|
||||
IPconnectionConnection();
|
||||
virtual ~IPconnectionConnection();
|
||||
|
||||
virtual QStringList availableDevices();
|
||||
virtual QIODevice *openDevice(const QString &deviceName);
|
||||
@ -62,8 +61,8 @@ public:
|
||||
virtual QString connectionName();
|
||||
virtual QString shortName();
|
||||
|
||||
TCPtelemetryConfiguration * Config() const { return m_config; }
|
||||
TCPtelemetryOptionsPage * Optionspage() const { return m_optionspage; }
|
||||
IPconnectionConfiguration * Config() const { return m_config; }
|
||||
IPconnectionOptionsPage * Optionspage() const { return m_optionspage; }
|
||||
|
||||
|
||||
|
||||
@ -71,29 +70,29 @@ protected slots:
|
||||
void onEnumerationChanged();
|
||||
private:
|
||||
QAbstractSocket *tcpSocket;
|
||||
TCPtelemetryConfiguration *m_config;
|
||||
TCPtelemetryOptionsPage *m_optionspage;
|
||||
IPconnectionConfiguration *m_config;
|
||||
IPconnectionOptionsPage *m_optionspage;
|
||||
//QSettings* settings;
|
||||
|
||||
};
|
||||
|
||||
|
||||
class TCPtelemetry_EXPORT TCPtelemetryPlugin
|
||||
class IPconnection_EXPORT IPconnectionPlugin
|
||||
: public ExtensionSystem::IPlugin
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
TCPtelemetryPlugin();
|
||||
~TCPtelemetryPlugin();
|
||||
IPconnectionPlugin();
|
||||
~IPconnectionPlugin();
|
||||
|
||||
virtual bool initialize(const QStringList &arguments, QString *error_message);
|
||||
virtual void extensionsInitialized();
|
||||
|
||||
private:
|
||||
TCPtelemetryConnection *m_connection;
|
||||
IPconnectionConnection *m_connection;
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif // TCPtelemetryPLUGIN_H
|
||||
#endif // IPconnectionPLUGIN_H
|
@ -1,5 +1,5 @@
|
||||
/********************************************************************************
|
||||
** Form generated from reading UI file 'TCPtelemetryoptionspage.ui'
|
||||
** Form generated from reading UI file 'IPconnectionoptionspage.ui'
|
||||
**
|
||||
** Created: Sun Jun 27 12:45:24 2010
|
||||
** by: Qt User Interface Compiler version 4.6.2
|
||||
@ -25,7 +25,7 @@
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class Ui_TCPtelemetryOptionsPage
|
||||
class Ui_IPconnectionOptionsPage
|
||||
{
|
||||
public:
|
||||
QGridLayout *gridLayout;
|
||||
@ -37,69 +37,69 @@ public:
|
||||
QLineEdit *HostName;
|
||||
QLabel *label_2;
|
||||
|
||||
void setupUi(QWidget *TCPtelemetryOptionsPage)
|
||||
void setupUi(QWidget *IPconnectionOptionsPage)
|
||||
{
|
||||
if (TCPtelemetryOptionsPage->objectName().isEmpty())
|
||||
TCPtelemetryOptionsPage->setObjectName(QString::fromUtf8("TCPtelemetryOptionsPage"));
|
||||
TCPtelemetryOptionsPage->resize(388, 300);
|
||||
gridLayout = new QGridLayout(TCPtelemetryOptionsPage);
|
||||
if (IPconnectionOptionsPage->objectName().isEmpty())
|
||||
IPconnectionOptionsPage->setObjectName(QString::fromUtf8("IPconnectionOptionsPage"));
|
||||
IPconnectionOptionsPage->resize(388, 300);
|
||||
gridLayout = new QGridLayout(IPconnectionOptionsPage);
|
||||
gridLayout->setContentsMargins(0, 0, 0, 0);
|
||||
gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
|
||||
horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
|
||||
|
||||
gridLayout->addItem(horizontalSpacer, 0, 3, 1, 1);
|
||||
|
||||
UseTCP = new QRadioButton(TCPtelemetryOptionsPage);
|
||||
UseTCP = new QRadioButton(IPconnectionOptionsPage);
|
||||
UseTCP->setObjectName(QString::fromUtf8("UseTCP"));
|
||||
|
||||
gridLayout->addWidget(UseTCP, 2, 2, 1, 1);
|
||||
|
||||
UseUDP = new QRadioButton(TCPtelemetryOptionsPage);
|
||||
UseUDP = new QRadioButton(IPconnectionOptionsPage);
|
||||
UseUDP->setObjectName(QString::fromUtf8("UseUDP"));
|
||||
|
||||
gridLayout->addWidget(UseUDP, 3, 2, 1, 1);
|
||||
|
||||
Port = new QSpinBox(TCPtelemetryOptionsPage);
|
||||
Port = new QSpinBox(IPconnectionOptionsPage);
|
||||
Port->setObjectName(QString::fromUtf8("Port"));
|
||||
Port->setMinimum(1);
|
||||
Port->setMaximum(999999);
|
||||
|
||||
gridLayout->addWidget(Port, 4, 2, 1, 1);
|
||||
|
||||
label_3 = new QLabel(TCPtelemetryOptionsPage);
|
||||
label_3 = new QLabel(IPconnectionOptionsPage);
|
||||
label_3->setObjectName(QString::fromUtf8("label_3"));
|
||||
|
||||
gridLayout->addWidget(label_3, 4, 1, 1, 1);
|
||||
|
||||
HostName = new QLineEdit(TCPtelemetryOptionsPage);
|
||||
HostName = new QLineEdit(IPconnectionOptionsPage);
|
||||
HostName->setObjectName(QString::fromUtf8("HostName"));
|
||||
|
||||
gridLayout->addWidget(HostName, 0, 2, 1, 1);
|
||||
|
||||
label_2 = new QLabel(TCPtelemetryOptionsPage);
|
||||
label_2 = new QLabel(IPconnectionOptionsPage);
|
||||
label_2->setObjectName(QString::fromUtf8("label_2"));
|
||||
|
||||
gridLayout->addWidget(label_2, 0, 1, 1, 1);
|
||||
|
||||
|
||||
retranslateUi(TCPtelemetryOptionsPage);
|
||||
retranslateUi(IPconnectionOptionsPage);
|
||||
|
||||
QMetaObject::connectSlotsByName(TCPtelemetryOptionsPage);
|
||||
QMetaObject::connectSlotsByName(IPconnectionOptionsPage);
|
||||
} // setupUi
|
||||
|
||||
void retranslateUi(QWidget *TCPtelemetryOptionsPage)
|
||||
void retranslateUi(QWidget *IPconnectionOptionsPage)
|
||||
{
|
||||
TCPtelemetryOptionsPage->setWindowTitle(QApplication::translate("TCPtelemetryOptionsPage", "Form", 0, QApplication::UnicodeUTF8));
|
||||
UseTCP->setText(QApplication::translate("TCPtelemetryOptionsPage", "TCP connection", 0, QApplication::UnicodeUTF8));
|
||||
UseUDP->setText(QApplication::translate("TCPtelemetryOptionsPage", "UDP connection", 0, QApplication::UnicodeUTF8));
|
||||
label_3->setText(QApplication::translate("TCPtelemetryOptionsPage", "Port", 0, QApplication::UnicodeUTF8));
|
||||
label_2->setText(QApplication::translate("TCPtelemetryOptionsPage", "Host Name/Number", 0, QApplication::UnicodeUTF8));
|
||||
IPconnectionOptionsPage->setWindowTitle(QApplication::translate("IPconnectionOptionsPage", "Form", 0, QApplication::UnicodeUTF8));
|
||||
UseTCP->setText(QApplication::translate("IPconnectionOptionsPage", "TCP connection", 0, QApplication::UnicodeUTF8));
|
||||
UseUDP->setText(QApplication::translate("IPconnectionOptionsPage", "UDP connection", 0, QApplication::UnicodeUTF8));
|
||||
label_3->setText(QApplication::translate("IPconnectionOptionsPage", "Port", 0, QApplication::UnicodeUTF8));
|
||||
label_2->setText(QApplication::translate("IPconnectionOptionsPage", "Host Name/Number", 0, QApplication::UnicodeUTF8));
|
||||
} // retranslateUi
|
||||
|
||||
};
|
||||
|
||||
namespace Ui {
|
||||
class TCPtelemetryOptionsPage: public Ui_TCPtelemetryOptionsPage {};
|
||||
class IPconnectionOptionsPage: public Ui_IPconnectionOptionsPage {};
|
||||
} // namespace Ui
|
||||
|
||||
QT_END_NAMESPACE
|
@ -129,7 +129,7 @@ plugin_pfd.depends = plugin_uavobjects
|
||||
SUBDIRS += plugin_pfd
|
||||
|
||||
|
||||
#TCPtelemetry connection plugin
|
||||
plugin_tcptelemetry.subdir = tcptelemetryconnection
|
||||
plugin_tcptelemetry.depends = plugin_coreplugin
|
||||
SUBDIRS += plugin_tcptelemetry
|
||||
#IP connection plugin
|
||||
plugin_ipconnection.subdir = ipconnection
|
||||
plugin_ipconnection.depends = plugin_coreplugin
|
||||
SUBDIRS += plugin_ipconnection
|
||||
|
@ -1,3 +0,0 @@
|
||||
include(tcptelemetry_dependencies.pri)
|
||||
|
||||
LIBS *= -l$$qtLibraryTarget(TCPtelemetry)
|
@ -1,16 +0,0 @@
|
||||
TEMPLATE = lib
|
||||
TARGET = TCPtelemetry
|
||||
include(../../openpilotgcsplugin.pri)
|
||||
include(tcptelemetry_dependencies.pri)
|
||||
HEADERS += tcptelemetryplugin.h \
|
||||
tcptelemetry_global.h \
|
||||
tcptelemetryconfiguration.h \
|
||||
tcptelemetryoptionspage.h
|
||||
SOURCES += tcptelemetryplugin.cpp \
|
||||
tcptelemetryconfiguration.cpp \
|
||||
tcptelemetryoptionspage.cpp
|
||||
FORMS += tcptelemetryoptionspage.ui
|
||||
RESOURCES +=
|
||||
DEFINES += TCPtelemetry_LIBRARY
|
||||
OTHER_FILES += TCPtelemetry.pluginspec
|
||||
QT += network
|
Loading…
x
Reference in New Issue
Block a user