| 1 |
/* |
| 2 |
* Copyright 2013 Canonical Ltd. |
| 3 |
* |
| 4 |
* This program is free software; you can redistribute it and/or modify |
| 5 |
* it under the terms of the GNU Lesser General Public License as published by |
| 6 |
* the Free Software Foundation; version 3. |
| 7 |
* |
| 8 |
* This program is distributed in the hope that it will be useful, |
| 9 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 |
* GNU Lesser General Public License for more details. |
| 12 |
* |
| 13 |
* You should have received a copy of the GNU Lesser General Public License |
| 14 |
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 15 |
* |
| 16 |
* Author: Thomas Voß <[email protected]> |
| 17 |
*/ |
| 18 |
|
| 19 |
#ifndef CORE_GEO_POSITION_INFO_SOURCE_FACTORY_H |
| 20 |
#define CORE_GEO_POSITION_INFO_SOURCE_FACTORY_H |
| 21 |
|
| 22 |
#include <QObject> |
| 23 |
#include "qgeopositioninfosource.h" |
| 24 |
#include "qgeopositioninfosourcefactory.h" |
| 25 |
|
| 26 |
namespace core |
| 27 |
{ |
| 28 |
class GeoPositionInfoSourceFactory |
| 29 |
: public QObject, |
| 30 |
public QGeoPositionInfoSourceFactory |
| 31 |
{ |
| 32 |
Q_OBJECT |
| 33 |
#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) |
| 34 |
Q_PLUGIN_METADATA(IID "org.qt-project.qt.position.sourcefactory/5.0" |
| 35 |
FILE "plugin.json") |
| 36 |
#else |
| 37 |
Q_PLUGIN_METADATA(IID "org.qt-project.qt.position.sourcefactory/6.0" |
| 38 |
FILE "plugin.json") |
| 39 |
#endif |
| 40 |
Q_INTERFACES(QGeoPositionInfoSourceFactory) |
| 41 |
|
| 42 |
public: |
| 43 |
#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) |
| 44 |
QGeoPositionInfoSource *positionInfoSource(QObject *parent); |
| 45 |
QGeoSatelliteInfoSource *satelliteInfoSource(QObject *parent); |
| 46 |
QGeoAreaMonitorSource *areaMonitor(QObject *parent); |
| 47 |
#else |
| 48 |
QGeoPositionInfoSource *positionInfoSource(QObject *parent, const QVariantMap ¶meters) override; |
| 49 |
QGeoSatelliteInfoSource *satelliteInfoSource(QObject *parent, const QVariantMap ¶meters) override; |
| 50 |
QGeoAreaMonitorSource *areaMonitor(QObject *parent, const QVariantMap ¶meters) override; |
| 51 |
#endif |
| 52 |
}; |
| 53 |
} |
| 54 |
|
| 55 |
#endif // CORE_GEO_POSITION_INFO_SOURCE_FACTORY_H |