Ref T111, renamed dummy driver to CSimulatorEmulated

This commit is contained in:
Klaus Basan
2017-08-05 18:22:56 +02:00
committed by Mathew Sutcliffe
parent 2ede2633b8
commit b70fb70d60
22 changed files with 158 additions and 159 deletions

View File

@@ -0,0 +1,28 @@
load(common_pre)
QT += core widgets dbus network
TARGET = simulatoremulatedconfig
TEMPLATE = lib
CONFIG += plugin shared
CONFIG += blackmisc blackcore blackgui
DEPENDPATH += . $$SourceRoot/src
INCLUDEPATH += . $$SourceRoot/src
SOURCES += *.cpp
HEADERS += *.h
FORMS += *.ui
DISTFILES += simulatoremulatedconfig.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,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 "simulatoremulatedconfig.h"
#include "simulatoremulatedconfigwidget.h"
namespace BlackSimPlugin
{
namespace Emulated
{
CSimulatorEmulatedConfig::CSimulatorEmulatedConfig(QObject *parent) : QObject(parent)
{
// void
}
BlackGui::CPluginConfigWindow *CSimulatorEmulatedConfig::createConfigWindow(QWidget *parent)
{
return new CSimulatorEmulatedConfigWidget(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_EMULATED_SIMULATOREMULATEDCONFIG_H
#define BLACKSIMPLUGIN_EMULATED_SIMULATOREMULATEDCONFIG_H
#include "blackgui/pluginconfig.h"
namespace BlackSimPlugin
{
namespace Emulated
{
/*!
* Window for setting up the FSX plugin.
*/
class CSimulatorEmulatedConfig : public QObject, public BlackGui::IPluginConfig
{
Q_OBJECT
Q_PLUGIN_METADATA(IID "org.swift-project.blackgui.pluginconfiginterface" FILE "simulatoremulatedconfig.json")
Q_INTERFACES(BlackGui::IPluginConfig)
public:
//! Ctor
CSimulatorEmulatedConfig(QObject *parent = nullptr);
//! Dtor
virtual ~CSimulatorEmulatedConfig() {}
//! \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.emulated.config"
}

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 "simulatoremulatedconfigwidget.h"
#include "ui_simulatoremulatedconfigwidget.h"
using namespace BlackGui;
namespace BlackSimPlugin
{
namespace Emulated
{
CSimulatorEmulatedConfigWidget::CSimulatorEmulatedConfigWidget(QWidget *parent) :
BlackGui::CPluginConfigWindow(parent),
ui(new Ui::CSimulatorEmulatedConfigWidget)
{
ui->setupUi(this);
}
CSimulatorEmulatedConfigWidget::~CSimulatorEmulatedConfigWidget()
{ }
} // 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_EMULATED_SIMULATOREMULATEDCONFIGWIDGET_H
#define BLACKSIMPLUGIN_EMULATED_SIMULATOREMULATEDCONFIGWIDGET_H
#include <blackgui/pluginconfigwindow.h>
#include <QScopedPointer>
namespace Ui { class CSimulatorEmulatedConfigWidget; }
namespace BlackSimPlugin
{
namespace Emulated
{
/**
* Configuration window for CSimulatorEmulatedConfig
*/
class Q_DECL_EXPORT CSimulatorEmulatedConfigWidget : public BlackGui::CPluginConfigWindow
{
Q_OBJECT
public:
//! Ctor
explicit CSimulatorEmulatedConfigWidget(QWidget *parent = nullptr);
//! Dtor
virtual ~CSimulatorEmulatedConfigWidget();
private:
QScopedPointer <Ui::CSimulatorEmulatedConfigWidget> ui;
};
} // ns
} // ns
#endif // guard

View File

@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>CSimulatorEmulatedConfigWidget</class>
<widget class="QWidget" name="CSimulatorEmulatedConfigWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>320</width>
<height>200</height>
</rect>
</property>
<property name="windowTitle">
<string>emulated simulator 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>