75 Commits

Author SHA1 Message Date
Nyall Dawson
0108041c68 Add query log 2022-04-26 14:02:27 +02:00
Nyall Dawson
0aad51c6d4 Base default image cache size on system memory
Instead of always defaulting to 100mb, then base the cache size
on the system memory:

- > 32gb, use 500mb
- 16-32gb, use 250mb
- else 100mb

The larger sizes can make a big difference to rendering speed for
complex projects, so let's let powerful systems utilise all that
memory!

(Only supported on linux for now)
2022-04-04 19:12:11 +10:00
Nyall Dawson
dd368a4289 When processing is initialized in external scripts, ensure the GRASS,
SAGA and OTB providers are included by default

Fixes #45935
2022-02-01 18:14:48 +10:00
Matthias Kuhn
28fac71bb4
Merge pull request #46419 from Joonalai/improve-format-datetimes 2021-12-09 13:41:20 +01:00
Joonalai
8ba472b1e7 Format date and datetime fields based on locale (#45617) 2021-12-09 13:17:14 +02:00
Joonalai
74ae3ded1c Emit localeChanged signal when locale is changed (#45617) 2021-12-09 09:00:49 +02:00
Nyall Dawson
d4d3652ea8 Add docs 2021-12-01 09:53:38 +10:00
Nyall Dawson
2ce70c5975 Default to "external" for QgsApplication::platformName(), and only
use "desktop" when actually run from the desktop. Also add
"qgis_process" platform.
2021-12-01 09:09:34 +10:00
Nyall Dawson
db4b0fed86 Move to core 2021-09-24 15:47:10 +10:00
Nyall Dawson
612af1fb7b Add a registry for GPSbabel formats 2021-07-31 10:12:16 +10:00
Julien Cabieces
6967b1cd2b [External Storage] Define API 2021-07-30 10:16:45 +02:00
nirvn
f55fe4e1fb Add note 2021-07-14 13:19:50 +07:00
nirvn
a580968983 Remove QgsApplication::shortNameRegExp altogether, document API break 2021-07-14 10:36:47 +07:00
nirvn
03d99a4202 Migrate away from QRegExp in the core application class 2021-07-14 08:42:36 +07:00
Sandro Mani
a29ce541a4 Add QgsApplication::translation as counterpart to QgsApplication::setTranslation 2021-06-22 08:33:04 +10:00
Nyall Dawson
cd6aa7f665 Add parameterized color support to QgsApplication::getThemeIcon
Adds framework to allow for icons which can have dynamic coloring
2021-05-17 10:54:44 +10:00
Damiano
810af987d3 Removed setting entries from the python api 2021-04-29 11:18:55 +02:00
Damiano
95dfe0f45c Removed settings struct 2021-04-26 15:07:21 +02:00
Damiano
00a7936389 Moved most core settings to SettingsEntry 2021-04-26 15:04:07 +02:00
Nyall Dawson
ffa99b7b64 Fix doxygen blocks which don't use the * prefix on all lines, which
prevents the auto format and sipify scripts from doing their full
formatting magic
2021-04-19 12:54:13 +10:00
Damiano
21c19aba9c static inline settings 2021-04-01 09:38:56 +02:00
Denis Rouzaud
ba8a445850 run sipify 2021-03-22 21:13:52 +01:00
Nyall Dawson
50b9beaad6 [sipify] Catch more class references and insert :py:class: annotations 2021-01-31 05:41:22 +10:00
Nyall Dawson
149925043c Add a new QgsCoordinateReferenceSystemRegistry singleton attached
to QgsApplication

In the long term all methods for retrieving available CRS details
should be moved here (instead of being scattered all over the place,
as they are now). But for now the logic for saving and updating
user CRS definitions has been moved here only.

The initial motivation is to create a central place where objects
can connect to in order to listen for when a user makes changes
to their custom projections.

Refs #40704
2021-01-28 02:25:09 +10:00
Martin Dobias
0cf985f671 Peter's review 2021-01-20 18:30:02 +01:00
Martin Dobias
302469450f Singleton, code cleanups, more tests, error reporting 2021-01-20 18:30:02 +01:00
Matthias Kuhn
af709503d5 Cache svg paths
Rebuilding them for each access from the settings is costly
2020-12-24 10:13:12 +07:00
Nyall Dawson
a6d61c000a Start on registry for 2d point cloud renderers 2020-11-13 02:59:05 +10:00
nirvn
c606cf8b61 Only apply device pixel ratio in scaleIconSize for tested use 2020-10-16 13:05:38 +07:00
nirvn
0607504202 Move and unify scaleIconSize into QgsApplication::scaleIconSize 2020-10-15 11:48:09 +07:00
Nyall Dawson
56b349479b Spelling 2020-10-13 10:47:21 +10:00
Nyall Dawson
b02d7b33bd Add option to apply parameterized colors to SVGs returned by
QgsApplication::getThemePixmap
2020-10-13 10:47:21 +10:00
Nyall Dawson
f496173bd7 Fix messy doxygen blocks which mess with sipify script
Fixes #38291
2020-08-20 17:01:35 +10:00
Nyall Dawson
ca384b2452 Address review comments 2020-08-05 16:27:09 +10:00
Nyall Dawson
fe5b423e33 Hookup initial marker item in registry 2020-08-05 16:27:09 +10:00
Nyall Dawson
a34eabd1fb [api] Add a proper registry for 3D symbol types 2020-07-23 07:53:20 +10:00
nirvn
80627eb740 Add QgsSourceCache 2020-07-18 13:01:18 +07:00
Nyall Dawson
81a9db9f57 [sipify] Fix creation of cross references 2020-06-15 13:43:58 +10:00
Denis Rouzaud
360827ade0 rename QgsBasemapPathRegistry to QgsLocalizedDataPathRegistry 2020-05-19 14:21:55 +02:00
Denis Rouzaud
75a991c09b add the registry to QgsApplication 2020-05-19 14:21:03 +02:00
Nyall Dawson
b45203a6c4 Make a proper registry for scalebar renderers 2020-03-21 03:45:24 +10:00
Nyall Dawson
40d5efce9b Add QgsConnectionRegistry
This registry provides a convenient place to add API relating
to generic connection fetching and handling methods

Currently contains a single method, which allows for retrieving
matching connections using a "provider://name" format (e.g.
"postgres://my connection")
2020-03-16 19:34:25 +10:00
Nyall Dawson
d0b5a01729 [api] Add registry and interface for QgsNumericFormats
QgsNumericFormat subclasses provide a means to format a numeric value
as a string, applying various formatting options. E.g. a default
string to value formatter (included here) includes settings for
controlling the number of decimal places, whether a thousands separator
should be shown, whether a leading + sign should be shown, whether
trailing zeros should be shown.

This PR also includes a formatter for bearings, allowing various
formats of numeric bearings to be applied (e.g. control over decimal
places, etc + control over whether direction E/W suffixes are shown,
or whether values should be limited to either the +/- 180 range or
0-360 degree range)

When formatting values, a QgsNumericFormatContext class is used
to provide context. Currently, this includes the thousands and
decimal separators to apply when formatting (which are taken by
default from the user's locale).

A registry of formatters is included to allow easy addition of
other formats in future (e.g. currencies, percentages, scientific
notation, etc...) and to allow plugin based formats.

The intention is to follow this up with gui configuration widgets
for the formats, and then expose them in various places through
the qgis ui (e.g. in the range editor widget for fields, in scalebar
numbers, as an option for formatting numeric labels, etc)
2020-01-08 16:20:43 +13:00
Alessandro Pasotti
381a57433c Drop const and fix duplicated "Source" 2019-10-26 08:13:47 +10:00
Alessandro Pasotti
1bc7ece06a Add styleSheetType to application reportStyleSheet 2019-10-26 08:13:47 +10:00
Even Rouault
d7f5bd0ea3
Application options: defer disabling of drivers after application restart (relates to #29212)
This is a follow-up of https://github.com/qgis/QGIS/pull/31772

Driver de-registration is now defered after application restart to avoid
any risk of potential crashes if a dataset using a disabled driver was
already in use.
2019-10-08 20:31:39 +02:00
Nyall Dawson
6b1e96c180 Make a shared instance of QgsStyleModel for the default application style
This allows shared caching of symbol icons, greatly speeding up display
of views which use style models
2019-09-07 15:56:40 +10:00
Nyall Dawson
5db08f0c75 Attach a global bookmark manager to QgsApplication 2019-09-04 14:19:47 +10:00
Denis Rouzaud
41495058d1 run sipify 2019-08-30 12:45:37 +02:00
Nyall Dawson
b10fc70d37 Don't get distracted... 2019-07-11 13:03:12 +10:00