Ref T111, swift driver config plugin

This commit is contained in:
Klaus Basan
2017-07-26 15:18:27 +02:00
committed by Mathew Sutcliffe
parent d00c0c0519
commit c8d6ebb318
7 changed files with 212 additions and 0 deletions

View 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);
}
}
}

View 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

View File

@@ -0,0 +1,3 @@
{
"identifier" : "org.swift-project.plugins.simulator.swift.config"
}

View 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)

View 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

View 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

View 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>