1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206
|
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgsapplication.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
class QgsApplication : QApplication
{
%Docstring(signature="appended")
Extends QApplication to provide access to QGIS specific resources such
as theme paths, database paths etc.
This is a subclass of QApplication and should be instantiated in place
of QApplication. Most methods are static in keeping with the design of
QApplication.
This class hides platform-specific path information and provides a
portable way of referencing specific files and directories. Ideally,
hard-coded paths should appear only here and not in other modules so
that platform-conditional code is minimized and paths are easier to
change due to centralization.
%End
%TypeHeaderCode
#include "qgsapplication.h"
%End
%TypeCode
// Convert a Python argv list to a conventional C argc count and argv array.
static char **qtgui_ArgvToC( PyObject *argvlist, int &argc )
{
char **argv;
argc = PyList_GET_SIZE( argvlist );
// Allocate space for two copies of the argument pointers, plus the
// terminating NULL.
if ( ( argv = ( char ** )sipMalloc( 2 * ( argc + 1 ) * sizeof( char * ) ) ) == NULL )
return NULL;
// Convert the list.
for ( int a = 0; a < argc; ++a )
{
char *arg;
// Get the argument and allocate memory for it.
if ( ( arg = PyBytes_AsString( PyList_GET_ITEM( argvlist, a ) ) ) == NULL ||
( argv[a] = ( char * )sipMalloc( strlen( arg ) + 1 ) ) == NULL )
return NULL;
// Copy the argument and save a pointer to it.
strcpy( argv[a], arg );
argv[a + argc + 1] = argv[a];
}
argv[argc + argc + 1] = argv[argc] = NULL;
return argv;
}
// Remove arguments from the Python argv list that have been removed from the
// C argv array.
static void qtgui_UpdatePyArgv( PyObject *argvlist, int argc, char **argv )
{
for ( int a = 0, na = 0; a < argc; ++a )
{
// See if it was removed.
if ( argv[na] == argv[a + argc + 1] )
++na;
else
PyList_SetSlice( argvlist, na, na + 1, NULL );
}
}
%End
public:
enum StyleSheetType /BaseType=IntEnum/
{
Qt,
WebBrowser,
};
static const char *QGIS_ORGANIZATION_NAME;
static const char *QGIS_ORGANIZATION_DOMAIN;
static const char *QGIS_APPLICATION_NAME;
QgsApplication( SIP_PYLIST argv, bool GUIenabled, QString profileFolder = QString(), QString platformName = "external" ) / PostHook = __pyQtQAppHook__ / [( int &argc, char **argv, bool GUIenabled, const QString &profileFolder = QString(), const QString &platformName = "desktop" )];
%Docstring
Constructor for QgsApplication.
:param argv: command line arguments
:param GUIenabled: set to ``True`` if a GUI application is required, or
``False`` for a console only application
:param profileFolder: optional string representing the profile to load
at startup
:param platformName: the QGIS platform name, e.g., "desktop", "server",
"qgis_process" or "external" (for external CLI
scripts)
%End
%MethodCode
// The Python interface is a list of argument strings that is modified.
int argc;
char **argv;
// Convert the list.
if ( ( argv = qtgui_ArgvToC( a0, argc ) ) == NULL )
sipIsErr = 1;
else
{
// Create it now the arguments are right.
static int nargc = argc;
sipCpp = new sipQgsApplication( nargc, argv, a1, *a2, *a3 );
// Now modify the original list.
qtgui_UpdatePyArgv( a0, argc, argv );
}
%End
~QgsApplication();
static QgsApplication *instance();
%Docstring
Returns the singleton instance of the QgsApplication.
%End
virtual bool event( QEvent *event );
%Docstring
Watch for QFileOpenEvent.
%End
virtual bool notify( QObject *receiver, QEvent *event );
%Docstring
Catch exceptions when sending event to receiver.
%End
static void setFileOpenEventReceiver( QObject *receiver );
%Docstring
Sets the FileOpen event receiver
%End
static void setThemeName( const QString &themeName );
%Docstring
Set the active theme to the specified theme. The theme name should be a
single word e.g. 'default','classic'. The theme search path usually will
be pkgDataPath + "/themes/" + themName + "/" but plugin writers etc can
use :py:func:`~QgsApplication.themeName` as a basis for searching for
resources in their own datastores e.g. a Qt4 resource bundle.
.. note::
A basic test will be carried out to ensure the theme search path
based on the supplied theme name exists. If it does not the theme name will
be reverted to 'default'.
%End
static QString resolvePkgPath();
%Docstring
Calculate the application pkg path
:return: the resolved pkg path
%End
static QString themeName();
%Docstring
Set the active theme to the specified theme. The theme name should be a
single word e.g. 'default','classic'. The theme search path usually will
be pkgDataPath + "/themes/" + themName + "/" but plugin writers etc can
use this method as a basis for searching for resources in their own
datastores e.g. a Qt4 resource bundle.
%End
static void setUITheme( const QString &themeName );
%Docstring
Set the current UI theme used to style the interface. Use
:py:func:`~QgsApplication.uiThemes` to find valid themes to use.
Variables found in variables.qss will be added to the stylesheet on
load.
:param themeName: The name of the theme.
.. note::
using an invalid theme name will reset to default
%End
static QHash<QString, QString> uiThemes();
%Docstring
All themes found in ~/.qgis3/themes folder. The path is to the root
folder for the theme
:return: A hash of theme name and theme path. Valid theme folders
contain style.qss
.. note::
Valid theme folders must contain a style.qss file.
%End
static QString authorsFilePath();
%Docstring
Returns the path to the authors file.
%End
static QString contributorsFilePath();
%Docstring
Returns the path to the contributors file. Contributors are people who
have submitted patches but don't have commit access.
%End
static QString developersMapFilePath();
%Docstring
Returns the path to the developers map file. The developers map was
created by using leaflet framework, it shows the contributors.json file.
%End
static QString sponsorsFilePath();
%Docstring
Returns the path to the sponsors file.
%End
static QString donorsFilePath();
%Docstring
Returns the path to the donors file.
%End
static QString serverResourcesPath();
%Docstring
Returns the path to the server resources directory.
%End
static QString translatorsFilePath();
%Docstring
Returns the path to the sponsors file.
%End
static QString licenceFilePath();
%Docstring
Returns the path to the licence file.
%End
static QString i18nPath();
%Docstring
Returns the path to the translation directory.
%End
static QString metadataPath();
%Docstring
Returns the path to the metadata directory.
%End
static QString qgisMasterDatabaseFilePath();
%Docstring
Returns the path to the master qgis.db file.
%End
static QString qgisSettingsDirPath();
%Docstring
Returns the path to the settings directory in user's home dir
%End
static QString qgisUserDatabaseFilePath();
%Docstring
Returns the path to the user qgis.db file.
%End
static QString qgisAuthDatabaseFilePath() /Deprecated/;
%Docstring
Returns the path to the user authentication database file: qgis-auth.db.
.. deprecated:: 3.30
Use :py:func:`~QgsApplication.qgisAuthDatabaseUri` instead.
%End
static QString qgisAuthDatabaseUri();
%Docstring
Returns the URI to the user authentication database. The URI is be in
the format:
\verbatim<DRIVER>://<USER>:<PASSWORD>@<HOST>:<PORT>/<DATABASE>[?OPTIONS]\endverbatim
where DATABASE is just the path to the file for SQLite databases. If
DRIVER is omitted, PSQLITE is assumed. Optional SCHEMA can be specified
as a query parameter.
.. versionadded:: 3.40
%End
static QString splashPath();
%Docstring
Returns the path to the splash screen image directory.
%End
static QString iconsPath();
%Docstring
Returns the path to the icons image directory.
%End
static QString srsDatabaseFilePath();
%Docstring
Returns the path to the srs.db file.
%End
static void setSvgPaths( const QStringList &svgPaths );
%Docstring
Sets the paths to svg directories and invalidates the svg path list
cache.
.. versionadded:: 3.18
%End
static QStringList svgPaths();
%Docstring
Returns the paths to svg directories.
%End
static QStringList layoutTemplatePaths();
%Docstring
Returns the paths to layout template directories.
%End
static QMap<QString, QString> systemEnvVars();
%Docstring
Returns the system environment variables passed to application.
%End
static QString prefixPath();
%Docstring
Returns the path to the application prefix directory.
%End
static QString pluginPath();
%Docstring
Returns the path to the application plugin directory.
%End
static QString pkgDataPath();
%Docstring
Returns the common root path of all application data directories.
%End
static QString activeThemePath();
%Docstring
Returns the path to the currently active theme directory.
%End
static QString defaultThemePath();
%Docstring
Returns the path to the default theme directory.
%End
static QString iconPath( const QString &iconFile );
%Docstring
Returns path to the desired icon file. First it tries to use the active
theme path, then default theme path
%End
static QIcon getThemeIcon( const QString &name, const QColor &fillColor = QColor(), const QColor &strokeColor = QColor() );
%Docstring
Helper to get a theme icon. It will fall back to the default theme if
the active theme does not have the required icon.
Since QGIS 3.20, the optional ``fillColor`` and ``strokeColor``
arguments can be used to control the color of parameter based SVG icons.
%End
enum Cursor /BaseType=IntEnum/
{
ZoomIn,
ZoomOut,
Identify,
CrossHair,
CapturePoint,
Select,
Sampler,
};
static QCursor getThemeCursor( Cursor cursor );
%Docstring
Helper to get a theme cursor. It will fall back to the default theme if
the active theme does not have the required icon. Cursors are
automatically scaled to look like a 16px cursor on 96dpi screens.
%End
static QPixmap getThemePixmap( const QString &name, const QColor &foreColor = QColor(), const QColor &backColor = QColor(), int size = 16 );
%Docstring
Helper to get a theme icon as a pixmap. It will fall back to the default
theme if the active theme does not have the required icon.
If ``foreColor`` or ``backColor`` are specified, then these colors will
be used for parametrized colors in SVG files wherever available. If
colors are specified then the ``size`` argument also must be set.
%End
static QString userStylePath();
%Docstring
Returns the path to user's style.
%End
static QRegularExpression shortNameRegularExpression();
%Docstring
Returns the short name regular expression for line edit validator
.. note::
This functionality was previously available as `shortNameRegExp` for QGIS <= 3.20
.. versionadded:: 3.22
%End
static QString userLoginName();
%Docstring
Returns the user's operating system login account name.
.. seealso:: :py:func:`userFullName`
%End
static QString userFullName();
%Docstring
Returns the user's operating system login account full display name.
.. seealso:: :py:func:`userLoginName`
%End
static QString osName();
%Docstring
Returns a string name of the operating system QGIS is running on.
.. seealso:: :py:func:`platform`
%End
static int systemMemorySizeMb();
%Docstring
Returns the size of the system memory (RAM) in megabytes.
This is only supported on some platforms, and will return -1 if not
supported.
.. versionadded:: 3.26
%End
static QString platform();
%Docstring
Returns the QGIS platform name, e.g., "desktop", "server",
"qgis_process" or "external" (for external CLI scripts).
.. seealso:: :py:func:`osName`
%End
static QString applicationFullName();
%Docstring
Returns the QGIS application full name.
It can be defined by the environment variable QGIS_APPLICATION_FULL_NAME
or the /qgis/application_full_name in the QGIS config file.
By default it is equal to :py:func:`~QgsApplication.applicationName`+'
'+:py:func:`~QgsApplication.platform`
.. seealso:: :py:func:`platform`
.. versionadded:: 3.30
%End
static QString locale();
%Docstring
Returns the QGIS locale.
%End
static void setLocale( const QLocale &locale );
%Docstring
Sets the QGIS locale - used mainly by 3rd party apps and tests. In QGIS
this is internally triggered by the application in startup.
.. versionadded:: 3.22.2
%End
static QString userThemesFolder();
%Docstring
Returns the path to user's themes folder
%End
static QString defaultStylePath();
%Docstring
Returns the path to default style (works as a starting point).
%End
static QString defaultThemesFolder();
%Docstring
Returns the path to default themes folder from install (works as a
starting point).
%End
static QString libraryPath();
%Docstring
Returns the path containing qgis_core, qgis_gui, qgispython (and other)
libraries
%End
static QString libexecPath();
%Docstring
Returns the path with utility executables (help viewer, crssync, ...)
%End
static QString qmlImportPath();
%Docstring
Returns the path where QML components are installed for QGIS Quick
library. Returns empty string when QGIS is built without Quick support
.. versionadded:: 3.2
%End
static void setPrefixPath( const QString &prefixPath, bool useDefaultPaths = false );
%Docstring
Alters prefix path - used by 3rd party apps
%End
static void setPluginPath( const QString &pluginPath );
%Docstring
Alters plugin path - used by 3rd party apps
%End
static void setPkgDataPath( const QString &pkgDataPath );
%Docstring
Alters pkg data path - used by 3rd party apps
%End
static void setDefaultSvgPaths( const QStringList &pathList );
%Docstring
Alters default svg paths - used by 3rd party apps.
%End
static void setAuthDatabaseDirPath( const QString &authDbDirPath );
%Docstring
Alters authentication data base directory path - used by 3rd party apps
%End
static void initQgis();
%Docstring
loads providers
%End
static bool createDatabase( QString *errorMessage = 0 );
%Docstring
initialize qgis.db
%End
static bool createThemeFolder();
%Docstring
Create the users theme folder
%End
static void exitQgis();
%Docstring
deletes provider registry and map layer registry
%End
static QString appIconPath();
%Docstring
Gets application icon
%End
enum endian_t /BaseType=IntEnum/
{
XDR,
NDR
};
static endian_t endian();
%Docstring
Returns whether this machine uses big or little endian
%End
static QString reportStyleSheet( QgsApplication::StyleSheetType styleSheetType = QgsApplication::StyleSheetType::Qt );
%Docstring
Returns a css style sheet for reports, the ``styleSheetType`` argument
determines what type of stylesheet is supported by the widget.
Typically you will use this method by doing: QString myStyle =
:py:func:`QgsApplication.reportStyleSheet()`;
textBrowserReport->:py:func:`~QgsApplication.document`->setDefaultStyleSheet(myStyle);
if you are using a :py:class:`QgsWebView` you will need to manually
inject the CSS into a head -> script tag instead.
:return: the stylesheet CSS rules.
.. note::
if styleSheetType equals StyleSheetType.Qt you can use the special Qt extensions too,
for example the gradient fills for backgrounds.
%End
static QString showSettings();
%Docstring
Convenience function to get a summary of the paths used in this
application instance useful for debugging mainly.
%End
static void registerOgrDrivers();
%Docstring
Register OGR drivers ensuring this only happens once. This is a
workaround for an issue with older gdal versions that caused duplicate
driver name entries to appear in the list of registered drivers when
QgsApplication.registerOgrDrivers was called multiple times.
%End
static QString absolutePathToRelativePath( const QString &apath, const QString &targetPath );
%Docstring
Converts absolute path to path relative to target
%End
static QString relativePathToAbsolutePath( const QString &rpath, const QString &targetPath );
%Docstring
Converts path relative to target to an absolute path
%End
static bool isRunningFromBuildDir();
%Docstring
Indicates whether running from build directory (not installed)
%End
static QString buildSourcePath();
%Docstring
Returns path to the source directory. Valid only when running from build
directory
%End
static QString buildOutputPath();
%Docstring
Returns path to the build output directory. Valid only when running from
build directory
%End
static void skipGdalDriver( const QString &driver );
%Docstring
Sets the GDAL_SKIP environment variable to include the specified driver
and then calls GDALDriverManager.AutoSkipDrivers() to unregister it. The
driver name should be the short format of the Gdal driver name e.g.
GTIFF.
%End
static void restoreGdalDriver( const QString &driver );
%Docstring
Sets the GDAL_SKIP environment variable to exclude the specified driver
and then calls GDALDriverManager.AutoSkipDrivers() to unregister it. The
driver name should be the short format of the Gdal driver name e.g.
GTIFF.
%End
static QStringList skippedGdalDrivers();
%Docstring
Returns the list of gdal drivers that should be skipped (based on
GDAL_SKIP environment variable)
%End
static void applyGdalSkippedDrivers();
%Docstring
Apply the skipped drivers list to gdal
.. seealso:: :py:func:`skipGdalDriver`
.. seealso:: :py:func:`restoreGdalDriver`
.. seealso:: :py:func:`skippedGdalDrivers`
%End
static void registerGdalDriversFromSettings();
%Docstring
Register gdal drivers, excluding the ones mentioned in "gdal/skipList"
setting.
.. versionadded:: 3.10
%End
static QStringList deferredSkippedGdalDrivers();
%Docstring
Returns the list of gdal drivers that have been disabled in the current
session, and thus, for safety, should not be disabled right now, but at
the next application restart.
.. versionadded:: 3.10
%End
static void setSkippedGdalDrivers( const QStringList &skippedGdalDrivers,
const QStringList &deferredSkippedGdalDrivers );
%Docstring
Sets the list of gdal drivers that should be disabled
(``skippedGdalDrivers``), but excludes for now the ones defines in
``deferredSkippedGdalDrivers``. This writes the "gdal/skipList" setting.
.. versionadded:: 3.10
%End
static int maxThreads();
%Docstring
Gets maximum concurrent thread count
%End
static void setMaxThreads( int maxThreads );
%Docstring
Set maximum concurrent thread count
.. note::
must be between 2 and \#cores, -1 means use all available cores
%End
static QgsTaskManager *taskManager();
%Docstring
Returns the application's task manager, used for managing application
wide background task handling.
%End
static QgsSettingsRegistryCore *settingsRegistryCore() /KeepReference,Deprecated/;
%Docstring
Returns the application's settings registry, used for managing
application settings.
.. versionadded:: 3.20
.. deprecated:: 3.30
Use :py:func:`QgsSettings.treeRoot()` instead.
%End
static QgsColorSchemeRegistry *colorSchemeRegistry() /KeepReference/;
%Docstring
Returns the application's color scheme registry, used for managing color
schemes.
%End
static QgsPaintEffectRegistry *paintEffectRegistry() /KeepReference/;
%Docstring
Returns the application's paint effect registry, used for managing paint
effects.
%End
static QgsRendererRegistry *rendererRegistry() /KeepReference/;
%Docstring
Returns the application's renderer registry, used for managing vector
layer renderers.
%End
static QgsPointCloudRendererRegistry *pointCloudRendererRegistry() /KeepReference/;
%Docstring
Returns the application's point cloud renderer registry, used for
managing point cloud layer 2D renderers.
.. versionadded:: 3.18
%End
static QgsTiledSceneRendererRegistry *tiledSceneRendererRegistry() /KeepReference/;
%Docstring
Returns the application's tiled scene renderer registry, used for
managing tiled scene layer 2D renderers.
.. versionadded:: 3.34
%End
static QgsDataItemProviderRegistry *dataItemProviderRegistry() /KeepReference/;
%Docstring
Returns the application's data item provider registry, which keeps a
list of data item providers that may add items to the browser tree.
%End
static QgsCoordinateReferenceSystemRegistry *coordinateReferenceSystemRegistry() /KeepReference/;
%Docstring
Returns the application's coordinate reference system (CRS) registry,
which handles known CRS definitions (including user-defined CRSes).
.. versionadded:: 3.18
%End
static QgsSvgCache *svgCache();
%Docstring
Returns the application's SVG cache, used for caching SVG images and
handling parameter replacement within SVG files.
.. seealso:: :py:func:`imageCache`
%End
static QgsImageCache *imageCache();
%Docstring
Returns the application's image cache, used for caching resampled
versions of raster images.
.. seealso:: :py:func:`svgCache`
.. versionadded:: 3.6
%End
static QgsSourceCache *sourceCache();
%Docstring
Returns the application's source cache, used for caching embedded and
remote source strings as local files
.. versionadded:: 3.16
%End
static QgsNetworkContentFetcherRegistry *networkContentFetcherRegistry() /KeepReference/;
%Docstring
Returns the application's network content registry used for fetching
temporary files during QGIS session
.. versionadded:: 3.2
%End
static QgsValidityCheckRegistry *validityCheckRegistry() /KeepReference/;
%Docstring
Returns the application's validity check registry, used for managing
validity checks.
.. versionadded:: 3.6
%End
static QgsSymbolLayerRegistry *symbolLayerRegistry() /KeepReference/;
%Docstring
Returns the application's symbol layer registry, used for managing
symbol layers.
%End
static QgsCalloutRegistry *calloutRegistry() /KeepReference/;
%Docstring
Returns the application's callout registry, used for managing callout
types.
.. versionadded:: 3.10
%End
static QgsLayoutItemRegistry *layoutItemRegistry() /KeepReference/;
%Docstring
Returns the application's layout item registry, used for layout item
types.
%End
static QgsAnnotationItemRegistry *annotationItemRegistry() /KeepReference/;
%Docstring
Returns the application's annotation item registry, used for annotation
item types.
.. versionadded:: 3.16
%End
static QgsGpsConnectionRegistry *gpsConnectionRegistry() /KeepReference/;
%Docstring
Returns the application's GPS connection registry, used for managing GPS
connections.
%End
static QgsBabelFormatRegistry *gpsBabelFormatRegistry() /KeepReference/;
%Docstring
Returns the application's GPSBabel format registry, used for managing
GPSBabel formats.
.. versionadded:: 3.22
%End
static QgsPluginLayerRegistry *pluginLayerRegistry() /KeepReference/;
%Docstring
Returns the application's plugin layer registry, used for managing
plugin layer types.
%End
static QgsClassificationMethodRegistry *classificationMethodRegistry() /KeepReference/;
%Docstring
Returns the application's classification methods registry, used in
graduated renderer
.. versionadded:: 3.10
%End
static QgsBookmarkManager *bookmarkManager();
%Docstring
Returns the application's bookmark manager, used for storing
installation-wide bookmarks.
.. versionadded:: 3.10
%End
static QgsRecentStyleHandler *recentStyleHandler() /KeepReference/;
%Docstring
Returns the handler for recently used style items.
.. versionadded:: 3.22
%End
static QgsDatabaseQueryLog *databaseQueryLog() /KeepReference/;
%Docstring
Returns the database query log.
.. versionadded:: 3.24
%End
static QgsStyleModel *defaultStyleModel();
%Docstring
Returns a shared :py:class:`QgsStyleModel` containing the default style
library (see :py:func:`QgsStyle.defaultStyle()`).
Using this shared model instead of creating a new
:py:class:`QgsStyleModel` improves performance.
.. versionadded:: 3.10
%End
static QgsFontManager *fontManager() /KeepReference/;
%Docstring
Returns the application font manager, which manages available fonts and
font installation for the QGIS instance.
.. versionadded:: 3.28
%End
static QgsSensorRegistry *sensorRegistry() /KeepReference/;
%Docstring
Returns the application's sensor registry, used for sensor types.
.. versionadded:: 3.32
%End
static QgsMessageLog *messageLog();
%Docstring
Returns the application's message log.
%End
static QgsAuthManager *authManager();
%Docstring
Returns the application's authentication manager instance
.. note::
this can be ``None`` if called before initQgis
.. seealso:: :py:func:`initQgis`
%End
static QgsAuthConfigurationStorageRegistry *authConfigurationStorageRegistry();
%Docstring
Returns the application's authentication configuration storage registry
.. versionadded:: 3.40
%End
static QgsProcessingRegistry *processingRegistry();
%Docstring
Returns the application's processing registry, used for managing
processing providers, algorithms, and various parameters and outputs.
%End
static QgsPageSizeRegistry *pageSizeRegistry() /KeepReference/;
%Docstring
Returns the application's page size registry, used for managing layout
page sizes.
%End
static QgsActionScopeRegistry *actionScopeRegistry() /KeepReference/;
%Docstring
Returns the action scope registry.
%End
static QgsConnectionRegistry *connectionRegistry();
%Docstring
Returns the application's connection registry, used for managing saved
data provider connections.
.. versionadded:: 3.14
%End
static QgsRuntimeProfiler *profiler();
%Docstring
Returns the application runtime profiler.
%End
static QgsNumericFormatRegistry *numericFormatRegistry() /KeepReference/;
%Docstring
Gets the registry of available numeric formats.
.. versionadded:: 3.12
%End
static QgsFieldFormatterRegistry *fieldFormatterRegistry() /KeepReference/;
%Docstring
Gets the registry of available field formatters.
%End
static Qgs3DRendererRegistry *renderer3DRegistry() /KeepReference/;
%Docstring
Returns registry of available 3D renderers.
%End
static Qgs3DSymbolRegistry *symbol3DRegistry() /KeepReference/;
%Docstring
Returns registry of available 3D symbols.
.. versionadded:: 3.16
%End
static QgsScaleBarRendererRegistry *scaleBarRendererRegistry() /KeepReference/;
%Docstring
Gets the registry of available scalebar renderers.
.. versionadded:: 3.14
%End
static QgsLabelingEngineRuleRegistry *labelingEngineRuleRegistry() /KeepReference/;
%Docstring
Gets the registry of available labeling engine rules.
.. versionadded:: 3.40
%End
static QgsProjectStorageRegistry *projectStorageRegistry() /KeepReference/;
%Docstring
Returns registry of available project storage implementations.
.. versionadded:: 3.2
%End
static QgsLayerMetadataProviderRegistry *layerMetadataProviderRegistry() /KeepReference/;
%Docstring
Returns registry of available layer metadata provider implementations.
.. versionadded:: 3.28
%End
static QgsExternalStorageRegistry *externalStorageRegistry() /KeepReference/;
%Docstring
Returns registry of available external storage implementations.
.. versionadded:: 3.20
%End
static QgsProfileSourceRegistry *profileSourceRegistry() /KeepReference/;
%Docstring
Returns registry of available profile source implementations.
.. versionadded:: 3.38
%End
static QgsLocalizedDataPathRegistry *localizedDataPathRegistry() /KeepReference/;
%Docstring
Returns the registry of data repositories These are used as paths for
basemaps, logos, etc. which can be referenced differently across work
stations.
.. seealso:: :py:class:`QgsLocalizedDataPathRegistry`
.. versionadded:: 3.14
%End
static QString nullRepresentation();
%Docstring
Returns the string used to represent the value `NULL` throughout QGIS.
.. note::
In general, when passing values around, prefer to use an invalid QVariant.
The :py:func:`~QgsApplication.nullRepresentation` value should only be used in the final presentation step when showing values
in a widget or sending it to a web browser.
.. seealso:: :py:func:`setNullRepresentation`
.. seealso:: :py:func:`nullRepresentationChanged`
%End
static void setNullRepresentation( const QString &nullRepresentation );
%Docstring
Sets the string used to represent the value `NULL` throughout QGIS.
.. note::
In general, when passing values around, prefer to use an invalid QVariant.
The :py:func:`~QgsApplication.nullRepresentation` value should only be used in the final presentation step when showing values
in a widget or sending it to a web browser.
.. seealso:: :py:func:`nullRepresentation`
.. seealso:: :py:func:`nullRepresentationChanged`
%End
static QVariantMap customVariables();
%Docstring
Custom expression variables for this application. This does not include
generated variables (like system name, user name etc.)
.. seealso:: :py:func:`QgsExpressionContextUtils.globalScope`
%End
static void setCustomVariables( const QVariantMap &customVariables );
%Docstring
Custom expression variables for this application. Do not include
generated variables (like system name, user name etc.)
.. seealso:: :py:func:`QgsExpressionContextUtils.globalScope`
%End
static void setCustomVariable( const QString &name, const QVariant &value );
%Docstring
Set a single custom expression variable.
%End
static int scaleIconSize( int standardSize, bool applyDevicePixelRatio = false );
%Docstring
Scales an icon size to compensate for display pixel density, making the
icon size hi-dpi friendly, whilst still resulting in pixel-perfect sizes
for low-dpi displays.
``standardSize`` should be set to a standard icon size, e.g. 16, 24, 48,
etc.
.. versionadded:: 3.16
%End
int maxConcurrentConnectionsPerPool() const;
%Docstring
The maximum number of concurrent connections per connections pool.
.. note::
QGIS may in some situations allocate more than this amount
of connections to avoid deadlocks.
.. versionadded:: 3.4
%End
static void setTranslation( const QString &translation );
%Docstring
Set translation locale code
.. versionadded:: 3.4
%End
QString translation() const;
%Docstring
Returns the current application translation locale code
.. seealso:: :py:func:`setTranslation`
.. versionadded:: 3.22
%End
void collectTranslatableObjects( QgsTranslationContext *translationContext );
%Docstring
Emits the signal to collect all the strings of .qgs to be included in ts
file
.. versionadded:: 3.4
%End
%If (ANDROID)
//dummy method to workaround sip generation issue
bool x11EventFilter( XEvent *event );
%End
signals:
void customVariablesChanged();
%Docstring
Emitted whenever a custom global variable changes.
%End
void nullRepresentationChanged();
%Docstring
Emitted when the string representing the `NULL` value is changed.
.. seealso:: :py:func:`setNullRepresentation`
.. seealso:: :py:func:`nullRepresentation`
%End
void requestForTranslatableObjects( QgsTranslationContext *translationContext );
%Docstring
Emitted when project strings which require translation are being
collected for inclusion in a .ts file. In order to register translatable
strings, connect to this signal and register the strings within the
specified ``translationContext``.
.. versionadded:: 3.4
%End
void localeChanged();
%Docstring
Emitted when project locale has been changed.
.. versionadded:: 3.22.2
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgsapplication.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
|