8#include <QPluginLoader>
10#include <QCryptographicHash>
11#include <QtCore/private/qfactoryloader_p.h>
12#include <QtCore/private/qthread_p.h>
19 (
"org.qt-project.qt.position.sourcefactory/6.0",
83 QObject *instance = loader()->instance(idx);
86 return qobject_cast<QGeoPositionInfoSourceFactory *>(instance);
91 static QMultiHash<QString, QCborMap>
plugins;
92 static bool alreadyDiscovered =
false;
95 alreadyDiscovered =
false;
97 if (!alreadyDiscovered) {
99 alreadyDiscovered =
true;
107 if (
p1.contains(prio) && !
p2.contains(prio))
109 if (!
p1.contains(prio) &&
p2.contains(prio))
111 if (
p1.value(prio).isDouble() && !
p2.value(prio).isDouble())
113 if (!
p1.value(prio).isDouble() &&
p2.value(prio).isDouble())
115 return (
p1.value(prio).toDouble() >
p2.value(prio).toDouble());
128 QList<QPluginParsedMetaData> meta = l->
metaData();
132 if (!
obj.value(testableKey).toBool(
true)) {
149 qRegisterMetaType<QGeoPositionInfo>();
170 return d->sourceName;
244 return d->interval.value();
250 return QBindable<int>(&
d->interval);
279 d->methods.removeBindingUnlessInWrapper();
284 const auto prevMethods =
d->methods.valueBypassingBindings();
288 if (
d->methods.valueBypassingBindings() == 0) {
292 d->methods.setValueBypassingBindings(
methods);
294 if (prevMethods !=
d->methods.valueBypassingBindings())
301 return d->methods.value();
304QBindable<QGeoPositionInfoSource::PositioningMethods>
308 return QBindable<PositioningMethods>(&
d->methods);
413 qRegisterMetaType<QGeoPositionInfo>();
415 d->interval.setValueBypassingBindings(0);
605#include "moc_qgeopositioninfosource.cpp"
static JNINativeMethod methods[]
\inmodule QtCore\reentrant
QCborValue value(qint64 key) const
Returns the QCborValue element in this map that corresponds to key key, if there is one.
QString toString(const QString &defaultValue={}) const
Returns the string value stored in this QCborValue, if it is of the string type.
double toDouble(double defaultValue=0) const
Returns the floating point value stored in this QCborValue, if it is of the Double type.
MetaDataList metaData() const
static void loadPluginMetadata(QMultiHash< QString, QCborMap > &list)
static QMultiHash< QString, QCborMap > plugins(bool reload=false)
static QList< QCborMap > pluginsSorted()
static QGeoPositionInfoSourceFactory * loadFactory(const QCborMap &meta)
static QGeoPositionInfoSource * createSourceReal(const QCborMap &meta, const QVariantMap ¶meters, QObject *parent)
virtual QVariant backendProperty(const QString &name) const
Returns the value of the backend-specific property named name, if present.
int updateInterval
This property holds the requested interval in milliseconds between each update.
virtual PositioningMethods supportedPositioningMethods() const =0
Returns the positioning methods available to this source.
virtual bool setBackendProperty(const QString &name, const QVariant &value)
Sets the backend-specific property named name to value.
static QGeoPositionInfoSource * createDefaultSource(QObject *parent)
Creates and returns a position source with the given parent that reads from the system's default sour...
QBindable< PositioningMethods > bindablePreferredPositioningMethods()
QBindable< int > bindableUpdateInterval()
virtual void setPreferredPositioningMethods(PositioningMethods methods)
QString sourceName
This property holds the unique name of the position source implementation in use.
static QStringList availableSources()
Returns a list of available source plugins.
virtual ~QGeoPositionInfoSource()
Destroys the position source.
QGeoPositionInfoSource(QObject *parent)
Creates a position source with the specified parent.
static QGeoPositionInfoSource * createSource(const QString &sourceName, QObject *parent)
Creates and returns a position source with the given parent, by loading the plugin named sourceName.
virtual void setUpdateInterval(int msec)
PositioningMethods preferredPositioningMethods
Sets the preferred positioning methods for this source.
QObject * parent() const
Returns a pointer to the parent object.
const_iterator cbegin() const noexcept
\macro QT_RESTRICTED_CAST_FROM_ASCII
QSet< QString >::iterator it
Combined button and popup list for selecting options.
QMap< QString, QVariant > QVariantMap
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
static bool pluginComparator(const QCborMap &p1, const QCborMap &p2)
#define Q_GLOBAL_STATIC_WITH_ARGS(TYPE, NAME, ARGS)
GLsizei GLsizei GLchar * source
QLatin1StringView QLatin1String
#define QStringLiteral(str)
Q_CORE_EXPORT bool qEnvironmentVariableIsSet(const char *varName) noexcept
QItemEditorFactory * factory
char * toString(const MyType &t)
[31]