56 Commits

Author SHA1 Message Date
Nyall Dawson
4f41ba2fcb Fix see also link 2020-01-21 11:28:15 +10:00
Nyall Dawson
cfba5cff00 User standard capitalization 2020-01-21 11:28:15 +10:00
Nyall Dawson
8f1a5f7075 Add since version 2020-01-21 11:28:15 +10:00
Nyall Dawson
ea7cdbdf91 Sipify 2020-01-21 11:28:15 +10:00
Denis Rouzaud
18a7cd0659
[FEATURE] Add an option to set the default project file format (qgs/qgz) (#33872) 2020-01-17 12:12:02 +01:00
Nyall Dawson
410da5e358 New class QgsProjectDisplaySettings
This class (attached to a QgsProject object) provides a place to
store and retrieve settings related to project display behavior,
e.g. the numeric formats used for bearings and coordinates
2020-01-09 17:10:30 +13:00
Nyall Dawson
65490ab13e Move QgsProject map scales settings to a new class, QgsProjectViewSettings
attached to QgsProject

And deprecate old getters/setters

The goal here is to create a place for project view related settings (e.g.
map scales, default extent, possibly future things like a fixed project
maximum area of interest, etc). Currently these are all handled in an
ad-hoc way, e.g. sometimes in project custom keys, sometimes inside
xml saved and restored by map canvases. But both these approaches break
important use case for plugins, e.g. creating a project from scratch
which will zoom to a desired extent on load. That's totally impossible
in the current API, unless you resort to extremely fragile manual
xml crafting...
2019-10-31 14:59:39 +10:00
Denis Rouzaud
758d7cff4a run sipify to update deprecation annotations 2019-10-15 13:17:38 +02:00
nirvn
23cc659a05 [projects] Add signals for background color and selection color change 2019-10-07 15:47:30 +07:00
nirvn
6bc83965a8 [projects] Serve selection color through a proper API 2019-10-07 15:47:30 +07:00
nirvn
5863f63ae1 [projects] Serve default canvas background color through a proper API 2019-10-07 15:47:30 +07:00
Nyall Dawson
d0ed374662 Add QgsProject flag to avoid loading print layouts when reading a project file
Speeds up project read time when these aren't needed, and also potentially
avoids issues caused by non-thread-safety in layouts (since some items rely
on classes which can only be used in the main thread e.g. QWebPage)
2019-10-04 05:10:45 +10:00
Nyall Dawson
387272d441 QgsProject documentation improvements 2019-10-03 20:12:28 +10:00
Nyall Dawson
e7e41e1cb9 Add stable api for setting/retrieving project custom scales
Previously this was all done through raw project key manipulation,
but there's a use case for exposing this nicely for use by plugins.
2019-10-03 14:15:19 +10:00
Nyall Dawson
d94329a788 Make QgsProject responsible for project expression context creation,
and cache the project expression context as much as possible

This scope can be expensive to create upfront, but is cheap to copy
2019-09-07 15:56:40 +10:00
Nyall Dawson
d8300987e8 [FEATURE][API] New class QgsBookmarkManager
Attached to QgsProject, this provides a stable, supported method
of managing project bookmarks (vs the old undocumented, not stable
approach of directly manipulating project keys)
2019-09-04 14:19:47 +10:00
Nyall Dawson
65a3f81486 Add some missing Python repr overloads 2019-09-02 16:40:46 +10:00
Alessandro Pasotti
92ac7a2e93
[server] Server api and WFS3 (#10016)
Implementation of OGC API and WFS3 core draft specification
2019-08-06 16:38:21 +02:00
Matthias Kuhn
ce8004446a Update the project ellipsoid if CRS is taken from first layer
Fix #30815
2019-07-19 11:08:39 +02:00
Nyall Dawson
0cdad2307b Add api to allow reading a QgsProject file without loading any layers
This causes the project to be read, but no data providers created for
layers (i.e. the same result as loading a project in the app and
choosing to leave bad layers in the project).

It's intended for occasions when you want to efficiently access properties
of a project without the (often very expensive) cost of actually
loading layers. E.g. to just read project metadata, parse the
layer tree structure, extract print layouts or renderer properties, etc.
2019-07-10 08:10:49 +10:00
Nyall Dawson
590d1aae9d [FEATURE][API] Visitor API for style entities
Adds a new visitor pattern API for creation of visitors which visit
all the style entities (symbols, color ramps, text formats, and
label styles) associated with different objects. Can be used on a
renderer, map layer, or project wide level.

E.g. on a project wide level, allows collection of ALL the style
symbols/color ramps/text settings inside a project, including those
in layouts or annotations!
2019-07-06 12:36:54 +10:00
Alessandro Pasotti
75defad55c Remove warning 2019-07-05 13:33:27 +02:00
Matthias Kuhn
6eb5b3e770 Add a template list to the welcome screen 2019-05-27 14:57:35 +02:00
Matthias Kuhn
00d31f6003 Revert "Merge pull request #10002 from m-kuhn/qgz-attachments"
This reverts commit 0804e342c863455fe7114e4fa84d8b9931656f8c, reversing
changes made to e07741f00b7d69cada35521f10d3703ff404083f.
2019-05-16 13:15:07 +02:00
Matthias Kuhn
a55c25bbeb Allow adding attachments in qgz files 2019-05-15 08:21:49 +02:00
Nyall Dawson
107b48a430 Add NULLPTR macro for use in doxygen comments
For the c++ api dox this expands to "\c nullptr" (the
\c directive indicates a code literal value), and for sipify/Python
it expands to ``None`` (`` is sphinx annotation for literal values)

Makes for nicer dox for both c++ and Python!
2019-02-27 09:41:11 +10:00
Nyall Dawson
a7ca08784c Nullptr consistency in dox 2019-02-27 09:41:11 +10:00
Nyall Dawson
b6d66becab Sipify 2019-02-27 09:41:11 +10:00
Matthias Kuhn
2fb37042a5
Fix TODO and docstrings 2019-02-07 14:36:43 +01:00
Nyall Dawson
f7745c94d9 Add a signal to QgsProject for when project color scheme changes 2019-01-12 18:11:44 +10:00
Matthias Kuhn
e32c739b47
Make use of QgsProject::mapLayer<QgsVectorLayer *> template 2019-01-09 16:25:45 +01:00
Denis Rouzaud
c20b5b2f75 fix multine removal for SIP_PYARGREOMVEq 2018-12-18 21:54:38 -04:00
Denis Rouzaud
edfb7e1465 run sipify 2018-12-18 17:17:25 -04:00
Alessandro Pasotti
2bd90da9c1 Added a validOnly flag to mapLayers to filter for valid layers only 2018-11-05 10:24:35 +01:00
Alessandro Pasotti
497a7da9de Added API methods to retrieve only valid maplayers
... and to count them

Tests updated accordingly, note that from now on
the assumption that a layer store or a layer project
contains only valid layers will not be true anymore.

To be honest it has never been true, because a
layer can become invalid at any time during
its life cycle, so better never assume that a
layer from the store or from the project is vaid.
2018-11-05 10:24:35 +01:00
Denis Rouzaud
89830f614e
create QgsMapLayer::LayerFlags for Searchable, Identifiable and Removable (#7815)
* create QgsMapLayer::LayerFlags for Searchable, Identifiable and Removable

this brings back the information previously saved in the project node back to the layer node
this will allow to embed this information in layer styles

* skip unexisting flag node to avoid setting wrong value for flag

* mark QgsProject::(set)requiredLayers as deprecated

* better API docs

* use new API in current code

* more docs and more old API fixes

* fix bad conversion

* more old API fix

* add missing SIP_OUT

* s/testFlags/testFlag

* fix var name

* adapt project test to test flags

* remove debug calls

* fixeS
2018-09-08 07:54:21 -04:00
signedav
ad086dc474 layermaptest and fixes
after feedback - mostly doc stuff or code style
2018-08-07 14:33:34 +02:00
signedav
519e91e626 missing parameter documentation 2018-08-07 14:32:47 +02:00
signedav
caa88429d8 spelling 2018-08-07 14:32:46 +02:00
signedav
442c7323f7 sip files and some improvements
like make a list copy before go through for loop and log messages
2018-08-07 14:32:46 +02:00
signedav
1bccedd1d1 working translation of project from qm file
Translated objects and tests included:
- [x] layer names
- [x] layer group names
- [x] relation names
- [x] attribute alias (if no alias, then the field translation)
- [x] forms group box titles
- [x] forms sub group box titles

included restructured with QTranslator object.

Updated test-data used for the test.
2018-08-07 14:31:17 +02:00
signedav
2bfe2296e5 tests, project store and other
not yet working all translations
project handling can be improved
project store after translation working
and fix some errors
tests not ready yet
2018-08-07 14:31:17 +02:00
Nyall Dawson
00f0583325 Fix doc test 2018-06-18 23:14:45 +10:00
Nyall Dawson
68b38b2daf Add a signal when a project is cleared 2018-06-18 23:14:45 +10:00
Nyall Dawson
ce6ea18280 Dox and indentation updates 2018-06-11 12:55:20 +10:00
Nyall Dawson
798408b6ba Silence a clazy warning 2018-06-11 12:55:20 +10:00
Nyall Dawson
3b89ee07ce Update dox, bindings 2018-06-11 12:55:20 +10:00
Denis Rouzaud
65bb60e96c run sipify 2018-05-28 10:39:34 -08:00
Nyall Dawson
f8bc97030b Remove extra space added before first line of docstring 2018-05-28 08:22:11 +10:00
Nyall Dawson
9f650fead9 Fix incorrect param docstring when doxygen \param has extra
trailing spaces or uses tabs
2018-05-27 18:54:09 +10:00