mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 01:05:34 +08:00
Rename xbus to xswiftbus
Summary: I wanted to rename xbus because its relation to //swift// is not immediately clear from the name. xswiftbus seems reasonable. Reviewers: #swift_pilot_client, kbasan Reviewed By: kbasan Subscribers: kbasan, jenkins Tags: #swift_pilot_client Differential Revision: https://dev.swift-project.org/D14
This commit is contained in:
68
src/xswiftbus/plugin.h
Normal file
68
src/xswiftbus/plugin.h
Normal file
@@ -0,0 +1,68 @@
|
||||
/* Copyright (C) 2013
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef BLACKSIM_XSWIFTBUS_PLUGIN_H
|
||||
#define BLACKSIM_XSWIFTBUS_PLUGIN_H
|
||||
|
||||
//! \file
|
||||
|
||||
/*!
|
||||
* \namespace XSwiftBus
|
||||
* Plugin loaded by X-Plane which publishes a DBus service
|
||||
*/
|
||||
|
||||
#ifndef NOMINMAX
|
||||
#define NOMINMAX
|
||||
#endif
|
||||
#include "menus.h"
|
||||
|
||||
#pragma push_macro("interface")
|
||||
#undef interface
|
||||
#include "blackmisc/dbusserver.h"
|
||||
#pragma pop_macro("interface")
|
||||
|
||||
#include <QVector>
|
||||
|
||||
namespace XSwiftBus
|
||||
{
|
||||
class CService;
|
||||
class CTraffic;
|
||||
class CWeather;
|
||||
|
||||
/*!
|
||||
* Main plugin class
|
||||
*/
|
||||
class CPlugin : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
//! Constructor
|
||||
CPlugin();
|
||||
|
||||
//! Called by XPluginReceiveMessage when the model is changed
|
||||
void onAircraftModelChanged();
|
||||
|
||||
//! Called by XPluginReceiveMessage when the aircraft is positioned at an airport
|
||||
void onAircraftRepositioned();
|
||||
|
||||
private:
|
||||
BlackMisc::CDBusServer *m_server = nullptr;
|
||||
CService *m_service = nullptr;
|
||||
CTraffic *m_traffic = nullptr;
|
||||
CWeather *m_weather = nullptr;
|
||||
CMenu m_menu;
|
||||
QVector<CMenuItem> m_startServerMenuItems;
|
||||
|
||||
void startServer(const QString &address);
|
||||
void tryStartServer(const QString &address);
|
||||
};
|
||||
}
|
||||
|
||||
#endif // guard
|
||||
Reference in New Issue
Block a user