QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
Go to the documentation of this file.
16 #ifndef QGSQUICKUTILS_H
17 #define QGSQUICKUTILS_H
23 #include <QtPositioning/QGeoCoordinate>
35 #include "qgis_quick.h"
67 Q_PROPERTY( qreal dp READ screenDensity CONSTANT )
76 qreal screenDensity()
const;
90 Q_INVOKABLE
static QgsPointXY pointXY(
double x,
double y );
97 Q_INVOKABLE
static QgsPoint point(
double x,
double y,
double z = std::numeric_limits<double>::quiet_NaN(),
double m = std::numeric_limits<double>::quiet_NaN() );
104 Q_INVOKABLE
static QgsPoint coordinateToPoint(
const QGeoCoordinate &coor );
119 Q_INVOKABLE
static double screenUnitsToMeters(
QgsQuickMapSettings *mapSettings,
int baseLengthPixels );
125 Q_INVOKABLE
static bool fileExists(
const QString &path );
134 Q_INVOKABLE
static QString getRelativePath(
const QString &path,
const QString &prefixPath );
139 Q_INVOKABLE
static void logMessage(
const QString &message,
140 const QString &tag = QString(
"QgsQuick" ),
157 Q_INVOKABLE
static const QUrl getThemeIcon(
const QString &name );
166 Q_INVOKABLE
static const QUrl getEditorComponentSource(
const QString &widgetName );
173 Q_INVOKABLE
static QString formatPoint(
196 Q_INVOKABLE
static QString formatDistance(
double distance,
209 Q_INVOKABLE
static bool removeFile(
const QString &filePath );
224 static void humanReadableDistance(
double srcDistance,
227 double &destDistance,
231 QString dumpScreenInfo()
const;
243 Q_INVOKABLE
static QVariantMap createValueRelationCache(
const QVariantMap &config,
const QgsFeature &formFeature =
QgsFeature() );
273 Q_INVOKABLE
static QString fieldType(
const QgsField &
field );
280 Q_INVOKABLE
static QString dateTimeFieldFormat(
const QString &fieldFormat );
283 static void formatToMetricDistance(
double srcDistance,
285 double &destDistance,
288 static void formatToImperialDistance(
double srcDistance,
290 double &destDistance,
293 static void formatToUSCSDistance(
double srcDistance,
295 double &destDistance,
299 static qreal calculateScreenDensity();
301 qreal mScreenDensity;
304 #endif // QGSQUICKUTILS_H
~QgsQuickUtils()=default
Destructor.
Contains information about the context in which a coordinate transform is executed.
Point geometry type, with support for z-dimension and m-values.
DistanceUnit
Units of distance.
SystemOfMeasurement
Systems of unit measurement.
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
The QgsQuickMapSettings class encapsulates QgsMapSettings class to offer settings of configuration of...
SelectBehavior
Selection behavior.
@ MetricSystem
International System of Units (SI)
This class represents a coordinate reference system (CRS).
A class to represent a 2D point.
@ SetSelection
Set selection, removing any existing selection.
MessageLevel
Level for messages This will be used both for message log and message bar in application.
Encapsulating the common utilities for QgsQuick library.
Represents a vector layer which manages a vector based data sets.
Pair of QgsFeature and QgsVectorLayer.
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
Encapsulate a field in an attribute table or data source.