mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 04:25:35 +08:00
Ref T111, swift driver config plugin
This commit is contained in:
committed by
Mathew Sutcliffe
parent
d00c0c0519
commit
c8d6ebb318
27
src/plugins/simulator/swiftconfig/simulatorswiftconfig.cpp
Normal file
27
src/plugins/simulator/swiftconfig/simulatorswiftconfig.cpp
Normal file
@@ -0,0 +1,27 @@
|
||||
/* Copyright (C) 2015
|
||||
* swift project Community / Contributors
|
||||
*
|
||||
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
|
||||
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
|
||||
* including this file, may be copied, modified, propagated, or distributed except according to the terms
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "simulatorswiftconfig.h"
|
||||
#include "swiftconfigwidget.h"
|
||||
|
||||
namespace BlackSimPlugin
|
||||
{
|
||||
namespace Swift
|
||||
{
|
||||
CSimulatorSwiftConfig::CSimulatorSwiftConfig(QObject *parent) : QObject(parent)
|
||||
{
|
||||
// void
|
||||
}
|
||||
|
||||
BlackGui::CPluginConfigWindow *CSimulatorSwiftConfig::createConfigWindow(QWidget *parent)
|
||||
{
|
||||
return new CSwiftConfigWidget(parent);
|
||||
}
|
||||
}
|
||||
}
|
||||
43
src/plugins/simulator/swiftconfig/simulatorswiftconfig.h
Normal file
43
src/plugins/simulator/swiftconfig/simulatorswiftconfig.h
Normal file
@@ -0,0 +1,43 @@
|
||||
/* Copyright (C) 2017
|
||||
* swift project Community / Contributors
|
||||
*
|
||||
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
|
||||
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
|
||||
* including this file, may be copied, modified, propagated, or distributed except according to the terms
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
//! \file
|
||||
|
||||
#ifndef BLACKSIMPLUGIN_SIMULATOR_SWIFT_CONFIG_H
|
||||
#define BLACKSIMPLUGIN_SIMULATOR_SWIFT_CONFIG_H
|
||||
|
||||
#include "blackgui/pluginconfig.h"
|
||||
|
||||
namespace BlackSimPlugin
|
||||
{
|
||||
namespace Swift
|
||||
{
|
||||
/*!
|
||||
* Window for setting up the FSX plugin.
|
||||
*/
|
||||
class CSimulatorSwiftConfig : public QObject, public BlackGui::IPluginConfig
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PLUGIN_METADATA(IID "org.swift-project.blackgui.pluginconfiginterface" FILE "simulatorswiftconfig.json")
|
||||
Q_INTERFACES(BlackGui::IPluginConfig)
|
||||
|
||||
public:
|
||||
//! Ctor
|
||||
CSimulatorSwiftConfig(QObject *parent = nullptr);
|
||||
|
||||
//! Dtor
|
||||
virtual ~CSimulatorSwiftConfig() {}
|
||||
|
||||
//! \copydoc BlackGui::IPluginConfig::createConfigWindow()
|
||||
BlackGui::CPluginConfigWindow *createConfigWindow(QWidget *parent) override;
|
||||
};
|
||||
} // ns
|
||||
} // ns
|
||||
|
||||
#endif // guard
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"identifier" : "org.swift-project.plugins.simulator.swift.config"
|
||||
}
|
||||
28
src/plugins/simulator/swiftconfig/swiftconfig.pro
Normal file
28
src/plugins/simulator/swiftconfig/swiftconfig.pro
Normal file
@@ -0,0 +1,28 @@
|
||||
load(common_pre)
|
||||
|
||||
QT += core widgets dbus network
|
||||
|
||||
TARGET = simulatorswiftconfig
|
||||
TEMPLATE = lib
|
||||
CONFIG += plugin shared
|
||||
CONFIG += blackmisc blackcore blackgui
|
||||
|
||||
DEPENDPATH += . $$SourceRoot/src
|
||||
INCLUDEPATH += . $$SourceRoot/src
|
||||
|
||||
SOURCES += *.cpp
|
||||
HEADERS += *.h
|
||||
FORMS += *.ui
|
||||
|
||||
DISTFILES += simulatorswiftconfig.json
|
||||
DESTDIR = $$DestRoot/bin/plugins/simulator
|
||||
|
||||
win32 {
|
||||
dlltarget.path = $$PREFIX/bin/plugins/simulator
|
||||
INSTALLS += dlltarget
|
||||
} else {
|
||||
target.path = $$PREFIX/bin/plugins/simulator
|
||||
INSTALLS += target
|
||||
}
|
||||
|
||||
load(common_post)
|
||||
29
src/plugins/simulator/swiftconfig/swiftconfigwidget.cpp
Normal file
29
src/plugins/simulator/swiftconfig/swiftconfigwidget.cpp
Normal file
@@ -0,0 +1,29 @@
|
||||
/* Copyright (C) 2017
|
||||
* swift Project Community / Contributors
|
||||
*
|
||||
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
|
||||
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
|
||||
* including this file, may be copied, modified, propagated, or distributed except according to the terms
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "swiftconfigwidget.h"
|
||||
#include "ui_swiftconfigwidget.h"
|
||||
|
||||
using namespace BlackGui;
|
||||
|
||||
namespace BlackSimPlugin
|
||||
{
|
||||
namespace Swift
|
||||
{
|
||||
CSwiftConfigWidget::CSwiftConfigWidget(QWidget *parent) :
|
||||
BlackGui::CPluginConfigWindow(parent),
|
||||
ui(new Ui::CSwiftConfigWidget)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
CSwiftConfigWidget::~CSwiftConfigWidget()
|
||||
{ }
|
||||
} // ns
|
||||
} // ns
|
||||
43
src/plugins/simulator/swiftconfig/swiftconfigwidget.h
Normal file
43
src/plugins/simulator/swiftconfig/swiftconfigwidget.h
Normal file
@@ -0,0 +1,43 @@
|
||||
/* Copyright (C) 2017
|
||||
* swift Project Community / Contributors
|
||||
*
|
||||
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
|
||||
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
|
||||
* including this file, may be copied, modified, propagated, or distributed except according to the terms
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
//! \file
|
||||
|
||||
#ifndef BLACKSIMPLUGIN_SWIFT_SWIFTCONFIGWIDGET_H
|
||||
#define BLACKSIMPLUGIN_SWIFT_SWIFTCONFIGWIDGET_H
|
||||
|
||||
#include <blackgui/pluginconfigwindow.h>
|
||||
#include <QScopedPointer>
|
||||
|
||||
namespace Ui { class CSwiftConfigWidget; }
|
||||
namespace BlackSimPlugin
|
||||
{
|
||||
namespace Swift
|
||||
{
|
||||
/**
|
||||
* Configuration window for CSimulatorSwiftConfig
|
||||
*/
|
||||
class Q_DECL_EXPORT CSwiftConfigWidget : public BlackGui::CPluginConfigWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
//! Ctor
|
||||
explicit CSwiftConfigWidget(QWidget *parent = nullptr);
|
||||
|
||||
//! Dtor
|
||||
virtual ~CSwiftConfigWidget();
|
||||
|
||||
private:
|
||||
QScopedPointer <Ui::CSwiftConfigWidget> ui;
|
||||
};
|
||||
} // ns
|
||||
} // ns
|
||||
|
||||
#endif // guard
|
||||
39
src/plugins/simulator/swiftconfig/swiftconfigwidget.ui
Normal file
39
src/plugins/simulator/swiftconfig/swiftconfigwidget.ui
Normal file
@@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>CSwiftConfigWidget</class>
|
||||
<widget class="QWidget" name="CSwiftConfigWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>320</width>
|
||||
<height>200</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>swift pseudo driver</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="BlackGui::Components::CSettingsSwiftPlugin" name="comp_Settings">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>BlackGui::Components::CSettingsSwiftPlugin</class>
|
||||
<extends>QFrame</extends>
|
||||
<header>blackgui/components/settingsswiftplugin.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
Reference in New Issue
Block a user