mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-11-29 07:24:13 +01:00
GCS-Export uploader functions
This commit is contained in:
parent
8c2a5e9d06
commit
2c4f50c4f5
@ -42,8 +42,10 @@
|
||||
#include "devicedescriptorstruct.h"
|
||||
#include <QDir>
|
||||
#include <QCoreApplication>
|
||||
#include "uploader_global.h"
|
||||
|
||||
using namespace OP_DFU;
|
||||
class deviceWidget : public QWidget
|
||||
class UPLOADER_EXPORT deviceWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
@ -39,8 +39,9 @@
|
||||
#include "uavobjectmanager.h"
|
||||
#include "uavobject.h"
|
||||
#include "uavobjectutilmanager.h"
|
||||
#include "uploader_global.h"
|
||||
|
||||
class runningDeviceWidget : public QWidget
|
||||
class UPLOADER_EXPORT runningDeviceWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
3
ground/openpilotgcs/src/plugins/uploader/uploader.pri
Normal file
3
ground/openpilotgcs/src/plugins/uploader/uploader.pri
Normal file
@ -0,0 +1,3 @@
|
||||
include(uploader_dependencies.pri)
|
||||
|
||||
LIBS *= -l$$qtLibraryName(Uploader)
|
@ -1,12 +1,8 @@
|
||||
TEMPLATE = lib
|
||||
TARGET = Uploader
|
||||
DEFINES += UPLOADER_LIBRARY
|
||||
QT += svg
|
||||
include(../../openpilotgcsplugin.pri)
|
||||
include(../../plugins/coreplugin/coreplugin.pri)
|
||||
include(../../plugins/uavobjects/uavobjects.pri)
|
||||
include(../../plugins/uavtalk/uavtalk.pri)
|
||||
include(../../plugins/rawhid/rawhid.pri)
|
||||
include(../../plugins/uavobjectutil/uavobjectutil.pri)
|
||||
include(uploader_dependencies.pri)
|
||||
INCLUDEPATH += ../../libs/qextserialport/src
|
||||
|
||||
HEADERS += uploadergadget.h \
|
||||
@ -22,7 +18,9 @@ HEADERS += uploadergadget.h \
|
||||
SSP/qssp.h \
|
||||
SSP/qsspt.h \
|
||||
SSP/common.h \
|
||||
runningdevicewidget.h
|
||||
runningdevicewidget.h \
|
||||
uploader_global.h \
|
||||
enums.h
|
||||
SOURCES += uploadergadget.cpp \
|
||||
uploadergadgetconfiguration.cpp \
|
||||
uploadergadgetfactory.cpp \
|
||||
@ -36,7 +34,7 @@ SOURCES += uploadergadget.cpp \
|
||||
SSP/qssp.cpp \
|
||||
SSP/qsspt.cpp \
|
||||
runningdevicewidget.cpp
|
||||
OTHER_FILES += Uploader.pluginspec
|
||||
OTHER_FILES += Uploader.pluginspec \
|
||||
|
||||
FORMS += \
|
||||
uploader.ui \
|
||||
|
@ -0,0 +1,6 @@
|
||||
include(../../openpilotgcsplugin.pri)
|
||||
include(../../plugins/coreplugin/coreplugin.pri)
|
||||
include(../../plugins/uavobjects/uavobjects.pri)
|
||||
include(../../plugins/uavtalk/uavtalk.pri)
|
||||
include(../../plugins/rawhid/rawhid.pri)
|
||||
include(../../plugins/uavobjectutil/uavobjectutil.pri)
|
40
ground/openpilotgcs/src/plugins/uploader/uploader_global.h
Normal file
40
ground/openpilotgcs/src/plugins/uploader/uploader_global.h
Normal file
@ -0,0 +1,40 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
*
|
||||
* @file uploader_global.h
|
||||
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
|
||||
* @see The GNU Public License (GPL) Version 3
|
||||
* @addtogroup GCSPlugins GCS Plugins
|
||||
* @{
|
||||
* @addtogroup
|
||||
* @{
|
||||
* @brief
|
||||
*****************************************************************************/
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef UPLOADER_GLOBAL_H
|
||||
#define UPLOADER_GLOBAL_H
|
||||
|
||||
#include <QtCore/qglobal.h>
|
||||
|
||||
#if defined(UPLOADER_LIBRARY)
|
||||
# define UPLOADER_EXPORT Q_DECL_EXPORT
|
||||
#else
|
||||
# define UPLOADER_EXPORT Q_DECL_IMPORT
|
||||
#endif
|
||||
|
||||
#endif
|
@ -30,6 +30,7 @@
|
||||
|
||||
#include <coreplugin/iuavgadget.h>
|
||||
#include "uploadergadgetwidget.h"
|
||||
#include "uploader_global.h"
|
||||
|
||||
class IUAVGadget;
|
||||
class QWidget;
|
||||
@ -38,7 +39,7 @@ class UploaderGadgetWidget;
|
||||
|
||||
using namespace Core;
|
||||
|
||||
class UploaderGadget : public Core::IUAVGadget
|
||||
class UPLOADER_EXPORT UploaderGadget : public Core::IUAVGadget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
@ -30,10 +30,11 @@
|
||||
|
||||
#include <coreplugin/iuavgadgetconfiguration.h>
|
||||
#include <qextserialport/src/qextserialport.h>
|
||||
#include "uploader_global.h"
|
||||
|
||||
using namespace Core;
|
||||
|
||||
class UploaderGadgetConfiguration : public IUAVGadgetConfiguration
|
||||
class UPLOADER_EXPORT UploaderGadgetConfiguration : public IUAVGadgetConfiguration
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
@ -26,11 +26,11 @@
|
||||
*/
|
||||
|
||||
#include "uploadergadgetfactory.h"
|
||||
#include "uploadergadgetwidget.h"
|
||||
#include "uploadergadget.h"
|
||||
#include "uploadergadgetconfiguration.h"
|
||||
#include "uploadergadgetoptionspage.h"
|
||||
#include <coreplugin/iuavgadget.h>
|
||||
#include "uploadergadgetwidget.h"
|
||||
|
||||
UploaderGadgetFactory::UploaderGadgetFactory(QObject *parent) :
|
||||
IUAVGadgetFactory(QString("Uploader"), tr("Uploader"), parent)
|
||||
@ -44,6 +44,8 @@ UploaderGadgetFactory::~UploaderGadgetFactory()
|
||||
Core::IUAVGadget* UploaderGadgetFactory::createGadget(QWidget *parent)
|
||||
{
|
||||
UploaderGadgetWidget* gadgetWidget = new UploaderGadgetWidget(parent);
|
||||
connect(this,SIGNAL(autoUpdate()),gadgetWidget,SLOT(autoUpdate()));
|
||||
connect(gadgetWidget,SIGNAL(autoUpdateSignal(uploader::AutoUpdateStep,QVariant)),this,SIGNAL(autoUpdateSignal(uploader::AutoUpdateStep,QVariant)));
|
||||
return new UploaderGadget(QString("Uploader"), gadgetWidget, parent);
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,8 @@
|
||||
#define UPLOADERGADGETFACTORY_H
|
||||
|
||||
#include <coreplugin/iuavgadgetfactory.h>
|
||||
|
||||
#include "uploader_global.h"
|
||||
#include "enums.h"
|
||||
namespace Core {
|
||||
class IUAVGadget;
|
||||
class IUAVGadgetFactory;
|
||||
@ -37,7 +38,7 @@ class IUAVGadgetFactory;
|
||||
|
||||
using namespace Core;
|
||||
|
||||
class UploaderGadgetFactory : public Core::IUAVGadgetFactory
|
||||
class UPLOADER_EXPORT UploaderGadgetFactory : public Core::IUAVGadgetFactory
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@ -46,6 +47,9 @@ public:
|
||||
|
||||
Core::IUAVGadget *createGadget(QWidget *parent);
|
||||
IUAVGadgetConfiguration *createConfiguration(QSettings* qSettings);
|
||||
signals:
|
||||
void autoUpdateSignal(uploader::AutoUpdateStep,QVariant);
|
||||
void autoUpdate();
|
||||
};
|
||||
|
||||
#endif // UPLOADERGADGETFACTORY_H
|
||||
|
@ -32,6 +32,7 @@
|
||||
#include "QString"
|
||||
#include <QStringList>
|
||||
#include <QDebug>
|
||||
#include "uploader_global.h"
|
||||
|
||||
namespace Core {
|
||||
class IUAVGadgetConfiguration;
|
||||
@ -43,7 +44,7 @@ class QSpinBox;
|
||||
|
||||
using namespace Core;
|
||||
|
||||
class UploaderGadgetOptionsPage : public IOptionsPage
|
||||
class UPLOADER_EXPORT UploaderGadgetOptionsPage : public IOptionsPage
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
@ -56,12 +56,12 @@
|
||||
#include <QProgressDialog>
|
||||
#include <QErrorMessage>
|
||||
#include <QDesktopServices>
|
||||
#include "uploader_global.h"
|
||||
#include "enums.h"
|
||||
using namespace OP_DFU;
|
||||
using namespace uploader;
|
||||
|
||||
|
||||
class UploaderGadgetWidget : public QWidget
|
||||
class UPLOADER_EXPORT UploaderGadgetWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
@ -29,10 +29,11 @@
|
||||
#define UPLOADERPLUGIN_H
|
||||
|
||||
#include <extensionsystem/iplugin.h>
|
||||
#include "uploader_global.h"
|
||||
|
||||
class UploaderGadgetFactory;
|
||||
|
||||
class UploaderPlugin : public ExtensionSystem::IPlugin
|
||||
class UPLOADER_EXPORT UploaderPlugin : public ExtensionSystem::IPlugin
|
||||
{
|
||||
public:
|
||||
UploaderPlugin();
|
||||
|
Loading…
Reference in New Issue
Block a user