mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-20 04:25:42 +08:00
Ref T786, changed provider interface, addded identifier based version
* virtual void requestWeatherGrid(const BlackMisc::Geo::ICoordinateGeodetic &position, const BlackMisc::CIdentifier &identifier) * CWeatherGridAware function do not need to be virtual
This commit is contained in:
committed by
Mat Sutcliffe
parent
d5a81a349b
commit
cc77183b05
@@ -12,6 +12,12 @@ namespace BlackMisc
|
|||||||
{
|
{
|
||||||
namespace Weather
|
namespace Weather
|
||||||
{
|
{
|
||||||
|
void CWeatherGridAware::requestWeatherGrid(const Geo::ICoordinateGeodetic &position, const CIdentifier &identifier)
|
||||||
|
{
|
||||||
|
Q_ASSERT_X(this->hasProvider(), Q_FUNC_INFO, "No object available");
|
||||||
|
this->provider()->requestWeatherGrid(position, identifier);
|
||||||
|
}
|
||||||
|
|
||||||
void CWeatherGridAware::requestWeatherGrid(
|
void CWeatherGridAware::requestWeatherGrid(
|
||||||
const CWeatherGrid &weatherGrid,
|
const CWeatherGrid &weatherGrid,
|
||||||
const CSlot<void(const CWeatherGrid &)> &callback)
|
const CSlot<void(const CWeatherGrid &)> &callback)
|
||||||
|
|||||||
@@ -13,8 +13,8 @@
|
|||||||
|
|
||||||
#include "blackmisc/weather/weathergrid.h"
|
#include "blackmisc/weather/weathergrid.h"
|
||||||
#include "blackmisc/provider.h"
|
#include "blackmisc/provider.h"
|
||||||
#include "blackmisc/blackmiscexport.h"
|
|
||||||
#include "blackmisc/slot.h"
|
#include "blackmisc/slot.h"
|
||||||
|
#include "blackmisc/blackmiscexport.h"
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QtGlobal>
|
#include <QtGlobal>
|
||||||
@@ -39,9 +39,12 @@ namespace BlackMisc
|
|||||||
//! Destructor
|
//! Destructor
|
||||||
virtual ~IWeatherGridProvider() {}
|
virtual ~IWeatherGridProvider() {}
|
||||||
|
|
||||||
|
//! Request weather grid with identifier
|
||||||
|
virtual void requestWeatherGrid(const BlackMisc::Geo::ICoordinateGeodetic &position, const BlackMisc::CIdentifier &identifier) = 0;
|
||||||
|
|
||||||
//! Request weather grid
|
//! Request weather grid
|
||||||
virtual void requestWeatherGrid(const CWeatherGrid &weatherGrid,
|
//! \deprecated Use the position/identifier based version if possible. It will inject the result "in the simulator"
|
||||||
const CSlot<void(const CWeatherGrid &)> &callback) = 0;
|
virtual void requestWeatherGrid(const CWeatherGrid &weatherGrid, const CSlot<void(const CWeatherGrid &)> &callback) = 0;
|
||||||
|
|
||||||
//! Request weather grid from file
|
//! Request weather grid from file
|
||||||
virtual void requestWeatherGridFromFile(const QString &filePath,
|
virtual void requestWeatherGridFromFile(const QString &filePath,
|
||||||
@@ -54,8 +57,12 @@ namespace BlackMisc
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
//! \copydoc IWeatherGridProvider::requestWeatherGrid
|
//! \copydoc IWeatherGridProvider::requestWeatherGrid
|
||||||
virtual void requestWeatherGrid(const CWeatherGrid &weatherGrid,
|
void requestWeatherGrid(const BlackMisc::Geo::ICoordinateGeodetic &position, const BlackMisc::CIdentifier &identifier);
|
||||||
const CSlot<void(const CWeatherGrid &)> &callback);
|
|
||||||
|
//! \copydoc IWeatherGridProvider::requestWeatherGrid
|
||||||
|
//! \deprecated Use the position/identifier based version if possible. It will inject the result "in the simulator"
|
||||||
|
void requestWeatherGrid(const CWeatherGrid &weatherGrid, const CSlot<void(const CWeatherGrid &)> &callback);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
//! Constructor
|
//! Constructor
|
||||||
CWeatherGridAware(IWeatherGridProvider *weatherGridProvider) : IProviderAware(weatherGridProvider) { Q_ASSERT(weatherGridProvider); }
|
CWeatherGridAware(IWeatherGridProvider *weatherGridProvider) : IProviderAware(weatherGridProvider) { Q_ASSERT(weatherGridProvider); }
|
||||||
|
|||||||
Reference in New Issue
Block a user