Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qdeclarativegeoroutemodel.cpp
Go to the documentation of this file.
1// Copyright (C) 2022 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
5#include "error_messages_p.h"
6
7#include <QtCore/QCoreApplication>
8#include <QtQml/QQmlEngine>
9#include <QtQml/qqmlinfo.h>
10#include <QtLocation/QGeoRoutingManager>
11#include <QtPositioning/QGeoRectangle>
12
14
86
96{
97 return routes_.count();
98}
99
109{
110 if (!routes_.isEmpty()) {
112 routes_.clear();
116 }
117
119 setError(NoError, QString());
121}
122
130{
132 setError(NoError, QString());
133 setStatus(routes_.isEmpty() ? Null : Ready);
134}
135
148{
149 if (index < 0 || index >= routes_.count()) {
150 qmlWarning(this) << QStringLiteral("Index '%1' out of range").arg(index);
151 return QGeoRoute();
152 }
153 return routes_.at(index);
154}
155
160{
161 complete_ = true;
162 if (autoUpdate_) {
163 update();
164 }
165}
166
171{
173 return routes_.count();
174}
175
180{
181 if (!index.isValid()) {
182 qmlWarning(this) << QStringLiteral("Error in indexing route model's data (invalid index).");
183 return QVariant();
184 }
185
186 if (index.row() >= routes_.count()) {
187 qmlWarning(this) << QStringLiteral("Fatal error in indexing route model's data (index overflow).");
188 return QVariant();
189 }
190
191 if (role == RouteRole)
192 return QVariant::fromValue(routes_.at(index.row()));
193 return QVariant();
194}
195
196QHash<int, QByteArray> QDeclarativeGeoRouteModel::roleNames() const
197{
198 QHash<int, QByteArray> roleNames = QAbstractListModel::roleNames();
199 roleNames.insert(RouteRole, "routeData");
200 return roleNames;
201}
202
207{
208 if (plugin_ == plugin)
209 return;
210
211 reset(); // reset the model
212
213 if (plugin_) {
216 }
217 if (plugin) {
220 }
221
222 plugin_ = plugin;
223
224 if (complete_)
226
227 if (!plugin)
228 return;
229
230 if (plugin_->isAttached()) {
231 pluginReady();
232 } else {
234 this, &QDeclarativeGeoRouteModel::pluginReady);
235 }
236}
237
241void QDeclarativeGeoRouteModel::pluginReady()
242{
243 QGeoServiceProvider *serviceProvider = plugin_->sharedGeoServiceProvider();
244 QGeoRoutingManager *routingManager = serviceProvider->routingManager();
245
246 if (serviceProvider->routingError() != QGeoServiceProvider::NoError) {
248 switch (serviceProvider->routingError()) {
250 newError = EngineNotSetError; break;
252 newError = UnknownParameterError; break;
254 newError = MissingRequiredParameterError; break;
256 newError = CommunicationError; break;
257 default:
258 break;
259 }
260
261 setError(newError, serviceProvider->routingErrorString());
262 return;
263 }
264
265 if (!routingManager) {
266 setError(EngineNotSetError, tr("Plugin does not support routing."));
267 return;
268 }
269
270 connect(routingManager, &QGeoRoutingManager::finished,
271 this, &QDeclarativeGeoRouteModel::routingFinished);
273 this, &QDeclarativeGeoRouteModel::routingError);
274}
275
279void QDeclarativeGeoRouteModel::queryDetailsChanged()
280{
281 if (autoUpdate_ && complete_)
282 update();
283}
284
302
307{
308 if (!query || query == routeQuery_)
309 return;
310 if (routeQuery_)
311 routeQuery_->disconnect(this);
312 routeQuery_ = query;
314 this, &QDeclarativeGeoRouteModel::queryDetailsChanged);
315 if (complete_) {
317 if (autoUpdate_)
318 update();
319 }
320}
321
331{
332 return routeQuery_;
333}
334
339{
340 if (autoUpdate_ == autoUpdate)
341 return;
342 autoUpdate_ = autoUpdate;
343 if (complete_)
345}
346
362{
363 return autoUpdate_;
364}
365
377{
378 if (!plugin_)
379 return;
380
381 QGeoServiceProvider *serviceProvider = plugin_->sharedGeoServiceProvider();
382 if (!serviceProvider)
383 return;
384
385 QGeoRoutingManager *routingManager = serviceProvider->routingManager();
386 if (!routingManager)
387 return;
388
389 if (routingManager->measurementSystem() == ms)
390 return;
391
392 routingManager->setMeasurementSystem(ms);
394}
395
397{
398 if (!plugin_)
399 return QLocale().measurementSystem();
400
401 QGeoServiceProvider *serviceProvider = plugin_->sharedGeoServiceProvider();
402 if (!serviceProvider) {
403 if (plugin_->locales().isEmpty())
404 return QLocale().measurementSystem();
405
406 return QLocale(plugin_->locales().first()).measurementSystem();
407 }
408
409 QGeoRoutingManager *routingManager = serviceProvider->routingManager();
410 if (!routingManager) {
411 if (plugin_->locales().isEmpty())
412 return QLocale().measurementSystem();
413
414 return QLocale(plugin_->locales().first()).measurementSystem();
415 }
416
417 return routingManager->measurementSystem();
418}
419
423void QDeclarativeGeoRouteModel::setStatus(QDeclarativeGeoRouteModel::Status status)
424{
425 if (status_ == status)
426 return;
427
428 status_ = status;
429
430 if (complete_)
432}
433
451
463{
464 return errorString_;
465}
466
490
491void QDeclarativeGeoRouteModel::setError(RouteError error, const QString& errorString)
492{
493 if (error_ == error && errorString_ == errorString)
494 return;
495 error_ = error;
496 errorString_ = errorString;
498}
499
508{
509 if (!complete_)
510 return;
511
512 if (!plugin_) {
513 setError(EngineNotSetError, tr("Cannot route, plugin not set."));
514 return;
515 }
516
517 QGeoServiceProvider *serviceProvider = plugin_->sharedGeoServiceProvider();
518 if (!serviceProvider)
519 return;
520
521 QGeoRoutingManager *routingManager = serviceProvider->routingManager();
522 if (!routingManager) {
523 setError(EngineNotSetError, tr("Cannot route, route manager not set."));
524 return;
525 }
526 if (!routeQuery_) {
527 setError(ParseError, tr("Cannot route, valid query not set."));
528 return;
529 }
530 emit abortRequested(); // Clear previous requests
531 QGeoRouteRequest request = routeQuery_->routeRequest();
532 if (request.waypoints().count() < 2) {
533 setError(ParseError,tr("Not enough waypoints for routing."));
534 return;
535 }
536
537 setError(NoError, QString());
538
539 QGeoRouteReply *reply = routingManager->calculateRoute(request);
541 if (!reply->isFinished()) {
543 } else {
545 routingFinished(reply);
546 } else {
547 routingError(reply, reply->error(), reply->errorString());
548 }
549 }
550}
551
555void QDeclarativeGeoRouteModel::routingFinished(QGeoRouteReply *reply)
556{
557 if (!reply)
558 return;
561 return;
562
564 const int oldCount = routes_.count();
565 routes_ = reply->routes();
567
568 setError(NoError, QString());
570
571 if (oldCount != 0 || routes_.count() != 0)
573 if (oldCount != routes_.count())
575}
576
580void QDeclarativeGeoRouteModel::routingError(QGeoRouteReply *reply,
582 const QString &errorString)
583{
584 if (!reply)
585 return;
589}
590
591
646
648 : QObject(parent), request_(request)
649{
650 // Extra params assumed to be already set in the request.
651 // Init waypoints
652 m_waypoints = request_.waypoints();
653}
654
658
663{
664 complete_ = true;
665}
666
690{
691 QList<int> list;
692
693 const auto featureTypes = request_.featureTypes();
694 for (const auto &featureType : featureTypes)
695 list.append(static_cast<int>(featureType));
696 return list;
697}
698
711
713{
715 return;
716
718
719 if (complete_) {
722 }
723}
724
738QList<QGeoCoordinate> QDeclarativeGeoRouteQuery::waypoints() const
739{
740 return m_waypoints;
741}
742
743void QDeclarativeGeoRouteQuery::setWaypoints(const QList<QGeoCoordinate> &value)
744{
745 if (m_waypoints == value)
746 return;
747
748 m_waypoints = value;
749 waypointChanged();
750}
751
763{
764 return request_.excludeAreas();
765}
766
767void QDeclarativeGeoRouteQuery::setExcludedAreas(const QList<QGeoRectangle> &value)
768{
769 if (request_.excludeAreas() == value)
770 return;
771
772 request_.setExcludeAreas(value);
773
774 if (complete_) {
777 }
778}
779
792{
793 if (!area.isValid())
794 return;
795
796 QList<QGeoRectangle> excludedAreas = request_.excludeAreas();
797
799 return;
800
802
804
805 if (complete_) {
808 }
809}
810
820{
821 if (!area.isValid())
822 return;
823
824 QList<QGeoRectangle> excludedAreas = request_.excludeAreas();
825
827 if (index == -1) {
828 qmlWarning(this) << QStringLiteral("Cannot remove nonexistent area.");
829 return;
830 }
833
834 if (complete_) {
837 }
838}
839
849{
850 if (request_.excludeAreas().isEmpty())
851 return;
852
853 request_.setExcludeAreas(QList<QGeoRectangle>());
854
855 if (complete_) {
858 }
859}
860
870{
871 if (!waypoint.isValid()) {
872 qmlWarning(this) << QStringLiteral("Invalid coordinate as waypoint");
873 return;
874 }
875
876 m_waypoints << waypoint;
877 waypointChanged();
878}
879
890{
891 if (!waypoint.isValid()) {
892 qmlWarning(this) << QStringLiteral("Invalid coordinate as waypoint");
893 return;
894 }
895
896 if (qsizetype idx = m_waypoints.lastIndexOf(waypoint); idx >= 0) {
897 m_waypoints.remove(idx);
898 waypointChanged();
899 } else {
900 qmlWarning(this) << QStringLiteral("Cannot remove nonexistent waypoint.");
901 }
902}
903
912{
913 if (m_waypoints.isEmpty())
914 return;
915
916 m_waypoints.clear();
917 waypointChanged();
918}
919
952{
953 if (featureType == NoFeature && !request_.featureTypes().isEmpty()) {
955 return;
956 }
957
958 // Check if the weight changes, as we need to signal it
959 FeatureWeight originalWeight = static_cast<FeatureWeight>(request_.featureWeight(static_cast<QGeoRouteRequest::FeatureType>(featureType)));
960 if (featureWeight == originalWeight)
961 return;
962
963 request_.setFeatureWeight(static_cast<QGeoRouteRequest::FeatureType>(featureType),
965 if (complete_ && ((originalWeight == NeutralFeatureWeight) || (featureWeight == NeutralFeatureWeight))) {
966 // featureTypes should now give a different list, because the original and new weight
967 // were not same, and other one was neutral weight
970 }
971}
972
981{
982 // reset all feature types.
983 const auto featureTypes = request_.featureTypes();
984 for (const auto &featureType : featureTypes)
986 if (complete_) {
989 }
990}
991
1001{
1002 return request_.featureWeight(static_cast<QGeoRouteRequest::FeatureType>(featureType));
1003}
1004
1008void QDeclarativeGeoRouteQuery::setTravelModes(QDeclarativeGeoRouteQuery::TravelModes travelModes)
1009{
1010 QGeoRouteRequest::TravelModes reqTravelModes;
1011
1013 reqTravelModes |= QGeoRouteRequest::CarTravel;
1015 reqTravelModes |= QGeoRouteRequest::PedestrianTravel;
1017 reqTravelModes |= QGeoRouteRequest::BicycleTravel;
1019 reqTravelModes |= QGeoRouteRequest::PublicTransitTravel;
1021 reqTravelModes |= QGeoRouteRequest::TruckTravel;
1022
1023 if (reqTravelModes == request_.travelModes())
1024 return;
1025
1026 request_.setTravelModes(reqTravelModes);
1027
1028 if (complete_) {
1031 }
1032}
1033
1034
1050{
1051 if (static_cast<QGeoRouteRequest::SegmentDetail>(segmentDetail) == request_.segmentDetail())
1052 return;
1054 if (complete_) {
1057 }
1058}
1059
1064
1080{
1081 if (static_cast<QGeoRouteRequest::ManeuverDetail>(maneuverDetail) == request_.maneuverDetail())
1082 return;
1084 if (complete_) {
1087 }
1088}
1089
1094
1119QDeclarativeGeoRouteQuery::TravelModes QDeclarativeGeoRouteQuery::travelModes() const
1120{
1121 QGeoRouteRequest::TravelModes reqTravelModes = request_.travelModes();
1122 QDeclarativeGeoRouteQuery::TravelModes travelModes;
1123
1124 if (reqTravelModes & QGeoRouteRequest::CarTravel)
1126 if (reqTravelModes & QGeoRouteRequest::PedestrianTravel)
1128 if (reqTravelModes & QGeoRouteRequest::BicycleTravel)
1130 if (reqTravelModes & QGeoRouteRequest::PublicTransitTravel)
1132 if (reqTravelModes & QGeoRouteRequest::TruckTravel)
1134
1135 return travelModes;
1136}
1137
1160QDeclarativeGeoRouteQuery::RouteOptimizations QDeclarativeGeoRouteQuery::routeOptimizations() const
1161{
1162 QGeoRouteRequest::RouteOptimizations reqOptimizations = request_.routeOptimization();
1163 QDeclarativeGeoRouteQuery::RouteOptimizations optimization;
1164
1165 if (reqOptimizations & QGeoRouteRequest::ShortestRoute)
1167 if (reqOptimizations & QGeoRouteRequest::FastestRoute)
1169 if (reqOptimizations & QGeoRouteRequest::MostEconomicRoute)
1171 if (reqOptimizations & QGeoRouteRequest::MostScenicRoute)
1173
1174 return optimization;
1175}
1176
1186{
1187 if (departureTime == request_.departureTime())
1188 return;
1189
1191 if (complete_) {
1194 }
1195}
1196
1198{
1199 return request_.departureTime();
1200}
1201
1202void QDeclarativeGeoRouteQuery::setRouteOptimizations(QDeclarativeGeoRouteQuery::RouteOptimizations optimization)
1203{
1204 QGeoRouteRequest::RouteOptimizations reqOptimizations;
1205
1207 reqOptimizations |= QGeoRouteRequest::ShortestRoute;
1208 if (optimization & QDeclarativeGeoRouteQuery::FastestRoute)
1209 reqOptimizations |= QGeoRouteRequest::FastestRoute;
1211 reqOptimizations |= QGeoRouteRequest::MostEconomicRoute;
1213 reqOptimizations |= QGeoRouteRequest::MostScenicRoute;
1214
1215 if (reqOptimizations == request_.routeOptimization())
1216 return;
1217
1218 request_.setRouteOptimization(reqOptimizations);
1219
1220 if (complete_) {
1223 }
1224}
1225
1230{
1231 if (m_waypointsChanged) {
1232 m_waypointsChanged = false;
1233 // Update waypoints and metadata into request
1234 request_.setWaypoints(m_waypoints);
1235 }
1236 return request_;
1237}
1238
1239void QDeclarativeGeoRouteQuery::excludedAreaCoordinateChanged()
1240{
1241 if (!m_excludedAreaCoordinateChanged) {
1242 m_excludedAreaCoordinateChanged = true;
1243 QMetaObject::invokeMethod(this, "doCoordinateChanged", Qt::QueuedConnection);
1244 }
1245}
1246
1247void QDeclarativeGeoRouteQuery::waypointChanged()
1248{
1249 m_waypointsChanged = true;
1250 if (complete_) {
1253 }
1254}
1255
1256void QDeclarativeGeoRouteQuery::doCoordinateChanged()
1257{
1258 m_excludedAreaCoordinateChanged = false;
1259 if (complete_)
1261}
1262
void endResetModel()
Completes a model reset operation.
virtual QHash< int, QByteArray > roleNames() const
void beginResetModel()
Begins a model reset operation.
QObject * parent() const
Returns a pointer to the parent object.
Definition qobject.h:346
\inmodule QtCore\reentrant
Definition qdatetime.h:283
void setQuery(QDeclarativeGeoRouteQuery *query)
Q_INVOKABLE QGeoRoute get(int index)
\qmlmethod route QtLocation::RouteModel::get(int index)
void update()
\qmlmethod void QtLocation::RouteModel::update()
Q_INVOKABLE void cancel()
\qmlmethod void QtLocation::RouteModel::cancel()
void setMeasurementSystem(QLocale::MeasurementSystem ms)
\qmlproperty Locale::MeasurementSystem QtLocation::RouteModel::measurementSystem
QVariant data(const QModelIndex &index, int role) const override
QLocale::MeasurementSystem measurementSystem
QHash< int, QByteArray > roleNames() const override
Q_INVOKABLE void reset()
\qmlmethod void QtLocation::RouteModel::reset()
QDeclarativeGeoRouteQuery * query
void setPlugin(QDeclarativeGeoServiceProvider *plugin)
QDeclarativeGeoRouteModel(QObject *parent=nullptr)
\qmltype RouteModel \instantiates QDeclarativeGeoRouteModel \inqmlmodule QtLocation
int rowCount(const QModelIndex &parent) const override
QDeclarativeGeoServiceProvider * plugin
void setDepartureTime(const QDateTime &departureTime)
\qmlproperty date RouteQuery::departureTime
Q_INVOKABLE void resetFeatureWeights()
\qmlmethod void QtLocation::RouteQuery::resetFeatureWeights()
Q_INVOKABLE void clearExcludedAreas()
\qmlmethod void QtLocation::RouteQuery::clearExcludedAreas()
void setExcludedAreas(const QList< QGeoRectangle > &value)
void setTravelModes(TravelModes travelModes)
QDeclarativeGeoRouteQuery(QObject *parent=nullptr)
\qmltype RouteQuery \instantiates QDeclarativeGeoRouteQuery \inqmlmodule QtLocation
Q_INVOKABLE void removeExcludedArea(const QGeoRectangle &area)
\qmlmethod void QtLocation::RouteQuery::removeExcludedArea(georectangle area)
void setSegmentDetail(SegmentDetail segmentDetail)
\qmlproperty enumeration RouteQuery::segmentDetail
void setWaypoints(const QList< QGeoCoordinate > &value)
void setRouteOptimizations(RouteOptimizations optimization)
void setNumberAlternativeRoutes(int numberAlternativeRoutes)
void setManeuverDetail(ManeuverDetail maneuverDetail)
\qmlproperty enumeration RouteQuery::maneuverDetail
Q_INVOKABLE void removeWaypoint(const QGeoCoordinate &waypoint)
\qmlmethod void QtLocation::RouteQuery::removeWaypoint(coordinate)
Q_INVOKABLE void clearWaypoints()
\qmlmethod void QtLocation::RouteQuery::clearWaypoints()
Q_INVOKABLE void addExcludedArea(const QGeoRectangle &area)
\qmlmethod void QtLocation::RouteQuery::addExcludedArea(georectangle area)
Q_INVOKABLE int featureWeight(FeatureType featureType)
\qmlmethod FeatureWeight QtLocation::RouteQuery::featureWeight(FeatureType featureType)
Q_INVOKABLE void setFeatureWeight(FeatureType featureType, FeatureWeight featureWeight)
\qmlmethod void QtLocation::RouteQuery::setFeatureWeight(FeatureType feature, FeatureWeight weight)
Q_INVOKABLE void addWaypoint(const QGeoCoordinate &w)
\qmlmethod void QtLocation::RouteQuery::addWaypoint(coordinate)
QGeoServiceProvider * sharedGeoServiceProvider() const
\inmodule QtPositioning
bool isValid
This property holds the validity of this geo coordinate.
\inmodule QtPositioning
\inmodule QtLocation
virtual void abort()
Cancels the operation immediately.
Error
Describes an error which prevented the completion of the operation.
\inmodule QtLocation
QDateTime departureTime() const
Returns the departure time in the request.
SegmentDetail segmentDetail() const
Returns the level of detail which will be used in the representation of routing segments.
void setManeuverDetail(ManeuverDetail maneuverDetail)
Sets the level of detail to use when representing routing maneuvers to maneuverDetail.
void setDepartureTime(const QDateTime &departureTime)
Sets the departure time departureTime for the route calculation.
void setRouteOptimization(RouteOptimizations optimization)
Sets the optimization criteria to use while planning the route to optimization.
void setSegmentDetail(SegmentDetail segmentDetail)
Sets the level of detail to use when representing routing segments to segmentDetail.
FeatureWeight
Defines the weight to associate with a feature during the planning of a route.
FeatureWeight featureWeight(FeatureType featureType) const
Returns the weight assigned to featureType in the planning of the route.
QList< FeatureType > featureTypes() const
Returns the list of features that will be considered when planning the route.
void setWaypoints(const QList< QGeoCoordinate > &waypoints)
Sets waypoints as the waypoints that the route should pass through.
TravelModes travelModes() const
Returns the travel modes which this request specifies should be considered during the planning of the...
RouteOptimizations routeOptimization() const
Returns the optimization criteria which this request specifies should be used while planning the rout...
QList< QGeoCoordinate > waypoints() const
Returns the waypoints that the route will pass through.
SegmentDetail
Defines the amount of route segment information that should be included with the route.
void setFeatureWeight(FeatureType featureType, FeatureWeight featureWeight)
Assigns the weight featureWeight to the feature featureType during the planning of the route.
void setNumberAlternativeRoutes(int alternatives)
Sets the number of alternative routes to request to alternatives.
void setTravelModes(TravelModes travelModes)
Sets the travel modes which should be considered during the planning of the route to travelModes.
ManeuverDetail
Defines the amount of maneuver information that should be included with the route.
int numberAlternativeRoutes() const
Returns the number of alternative routes which will be requested.
void setExcludeAreas(const QList< QGeoRectangle > &areas)
Sets areas as excluded areas that the route must not cross.
QList< QGeoRectangle > excludeAreas() const
Returns areas the route must not cross.
FeatureType
Defines a feature which is important to the planning of a route.
ManeuverDetail maneuverDetail() const
Returns the level of detail which will be used in the representation of routing maneuvers.
\inmodule QtLocation
Definition qgeoroute.h:24
\inmodule QtLocation
void finished(QGeoRouteReply *reply)
This signal is emitted when reply has finished processing.
void errorOccurred(QGeoRouteReply *reply, QGeoRouteReply::Error error, const QString &errorString=QString())
This signal is emitted when an error has been detected in the processing of reply.
QLocale::MeasurementSystem measurementSystem() const
Returns the measurement system used by this manager.
QGeoRouteReply * calculateRoute(const QGeoRouteRequest &request)
Begins the calculation of the route specified by request.
void setMeasurementSystem(QLocale::MeasurementSystem system)
Sets the measurement system used by this manager to system.
\inmodule QtLocation
Error routingError() const
Returns an error code describing the error which occurred during the last attempt to create a routing...
QString routingErrorString() const
Returns a string describing the error which occurred during the last attempt to create a routing mana...
QGeoRoutingManager * routingManager() const
Returns the QGeoRoutingManager made available by the service provider.
iterator insert(const Key &key, const T &value)
Inserts a new item with the key and a value of value.
Definition qhash.h:1303
QString errorString() const
Returns a human-readable description of the last device error that occurred.
bool isEmpty() const noexcept
Definition qlist.h:401
void removeAt(qsizetype i)
Definition qlist.h:590
const_reference at(qsizetype i) const noexcept
Definition qlist.h:446
void remove(qsizetype i, qsizetype n=1)
Definition qlist.h:794
qsizetype count() const noexcept
Definition qlist.h:398
void append(parameter_type t)
Definition qlist.h:458
void clear()
Definition qlist.h:434
MeasurementSystem
Definition qlocale.h:867
MeasurementSystem measurementSystem() const
Definition qlocale.cpp:3326
\inmodule QtCore
bool isFinished() const
NetworkError error() const
Returns the error that was found during the processing of this request.
\inmodule QtCore
Definition qobject.h:103
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
Definition qobject.cpp:2960
static bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *member)
\threadsafe
Definition qobject.cpp:3236
void deleteLater()
\threadsafe
Definition qobject.cpp:2435
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
\inmodule QtCore
Definition qvariant.h:65
static auto fromValue(T &&value) noexcept(std::is_nothrow_copy_constructible_v< T > &&Private::CanUseInternalSpace< T >) -> std::enable_if_t< std::conjunction_v< std::is_copy_constructible< T >, std::is_destructible< T > >, QVariant >
Definition qvariant.h:536
Combined button and popup list for selecting options.
@ QueuedConnection
DBusConnection const char DBusError * error
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
static int area(const QSize &s)
Definition qicon.cpp:153
GLuint index
[2]
GLenum query
Q_QML_EXPORT QQmlInfo qmlWarning(const QObject *me)
#define QStringLiteral(str)
#define tr(X)
#define emit
#define Q_UNUSED(x)
ptrdiff_t qsizetype
Definition qtypes.h:165
QList< int > list
[14]
myObject disconnect()
[26]
QNetworkRequest request(url)
QNetworkReply * reply
bool contains(const AT &t) const noexcept
Definition qlist.h:45
qsizetype lastIndexOf(const AT &t, qsizetype from=-1) const noexcept
Definition qlist.h:969
static bool invokeMethod(QObject *obj, const char *member, Qt::ConnectionType, QGenericReturnArgument ret, QGenericArgument val0=QGenericArgument(nullptr), QGenericArgument val1=QGenericArgument(), QGenericArgument val2=QGenericArgument(), QGenericArgument val3=QGenericArgument(), QGenericArgument val4=QGenericArgument(), QGenericArgument val5=QGenericArgument(), QGenericArgument val6=QGenericArgument(), QGenericArgument val7=QGenericArgument(), QGenericArgument val8=QGenericArgument(), QGenericArgument val9=QGenericArgument())
\threadsafe This is an overloaded member function, provided for convenience. It differs from the abov...