20007 Commits

Author SHA1 Message Date
Nyall Dawson
4ff1e55a21 [api] Add method to retrieve the nodes for an annotation item
For now all nodes just directly represent vertices in the item,
but the intention here is that they can represent any form of handle
which can be used to manipulate an item (e.g. a bezier curve point,
some "smart shape" handle for resizing or rotating an item, etc)
2021-09-03 08:06:48 +10:00
Nyall Dawson
f5bd9ccaee
[annotations] Implement scale dependent bounding box calculation for marker items 2021-09-02 14:45:18 +10:00
Nyall Dawson
21699794bd [api] Allow annotation layers to be included in filtered map layer proxy models 2021-09-01 17:27:25 +10:00
Nyall Dawson
26b536b068 Add QgsRubberBand::copyPointsFrom to quickly copy all points from
one rubber band to another
2021-09-01 17:25:45 +10:00
nirvn
75c8eb7798 Add T test 2021-08-31 14:31:12 +07:00
Nyall Dawson
660433d9a9 [api] Add framework for collecting rendered item details during map
renderer operations

This follow a similar pattern as how labeling results could be collected
after a map render job, but generalises the API so that it can be
used for storing details of rendered items of any type.

It's currently used for storing details of rendered annotation items,
so that map tools can retrieve details of annotation items visible
in the canvas in an optimised way.
2021-08-31 11:04:29 +10:00
Nyall Dawson
b09994abcc Add a minimal data provider for annotation layers
Required for some nice things, like avoiding rendering slower
annotation layers in canvas preview jobs
2021-08-31 11:04:29 +10:00
Nyall Dawson
47bcf09af6 Rework annotation layer index handling
Because some annotation items have scale dependent bounding boxes,
we can only index items which have a fixed bounding box. Other
item bounds need to be dynamically determined based on a specific
render context. So rework the annotation layer index handling
to only index appropriate items and store other items in a non-indexed
item set.

This isn't ideal, because it means we need to clone ALL non-indexed
items upfront whenever we render an annotation layer (it's too expensive
to calculate their actual bounding box and selectively clone them,
as it's a process which blocks the main thread).

Hopefully we can think of an alternative approach to this down
the line so that we DO have some form of spatial index for scale
dependent items, unlocking better performance for annotation layers
with 10,000s of items. But we'll ignore that situation for now ;)
2021-08-31 11:04:29 +10:00
Nyall Dawson
b4acffbb31 Add flag for scale dependent bounding boes 2021-08-31 11:04:29 +10:00
Julien Cabieces
5c35b1cb82 Add external storage file widget drag'n drop support 2021-08-30 13:50:21 +10:00
Nyall Dawson
204af6f02f Fix a crash when destroying an extent widget while the "draw on canvas"
option is still active
2021-08-26 18:01:57 +10:00
Nyall Dawson
ff302ca075 Fix api 2021-08-26 12:56:45 +10:00
Nyall Dawson
136faab91f Fix system tables disappear from dialog after task runs 2021-08-26 12:56:45 +10:00
Nyall Dawson
f2f40096ab Add support for filtering system tables in QgsProviderSublayerProxyModel 2021-08-26 12:56:45 +10:00
Nyall Dawson
7f090f64d1 [api] Add flags to QgsProviderSublayerDetails, to indicate that
a sublayer is a system or internal table
2021-08-26 12:56:45 +10:00
Denis Rouzaud
3208b51102
Merge pull request #44709 from troopa81/feat_dms_connexion_webdav
[ExternalStorage] add WebDAV external storage implementation
2021-08-25 11:01:33 +02:00
Nyall Dawson
f3ffe7683d Add note to QgsFeatureRequest::setSubsetOfAttributes methods
to indicate that providers may ignore the subset in certain
circumstances

Refs #44621
2021-08-25 12:54:57 +10:00
Vincent Cloarec
bc192a60b2
Mesh expressions: add $vertex_as_point and $vertex_z functions (#44786)
* mesh expression $vertex_as_point $vertex_Z_value

* functions help

* SIP, doc and indentation

* fix SIP

* fix help file

* change function name and add Meshes group description

* fix typo

* fix strings and docs

* typo
2021-08-24 20:56:16 +02:00
Julien Cabieces
ff08ad4733 adds finished signal and deprecates downloadFinished 2021-08-24 11:04:26 +02:00
nirvn
2a2eace0e1 Move generalHtmlMetadata to QgsMapLayer class, guard from null data provider, harmonize looks and details ordering across map layer types 2021-08-24 14:52:40 +10:00
nirvn
0ab3442ead [FEATURE][ui] Show dataset file size and last modified information in the layer properties window 2021-08-24 14:52:40 +10:00
Germán Carrillo
a31af8b77a In installFromZipFile(), if plugin was active, no need to call startPlugin() before reloading it. This commit makes installFromZipFile() act like installPlugin(). 2021-08-24 12:37:42 +10:00
Germán Carrillo
926a1b6100 In uninstallPlugin(), remove plugin's QSetting (inside group 'PythonPlugins'), which says if a plugin is available 2021-08-24 12:37:42 +10:00
Julien Cabieces
0034f4922d fix spellcheck typos 2021-08-23 17:35:54 +02:00
Julien Cabieces
96eb75a118 [ExternalStorage] add WebDAV external storage implementation 2021-08-23 17:35:52 +02:00
Alexander Bruy
cfc72ca5f9 handle new point cloud parameter in description files (follow up
f801cb6816)
2021-08-23 09:18:35 +10:00
Alessandro Pasotti
a25f798d04
Merge pull request #44710 from elpaso/dd-form-actions
[feature] Drag & Drop designer form actions
2021-08-19 17:23:22 +02:00
Vincent Cloarec
bd6ac0e54d
save mesh from URI (#44758)
[mesh] fix saving a mesh frame with URI
2021-08-19 09:06:57 +02:00
Vincent Cloarec
2cdc666fb5
fix maximum vertices count per face for mesh editing (#44759)
fix writing UGRID format (mesh layer)
2021-08-19 09:05:15 +02:00
Nyall Dawson
aeb7d89a24 Use a spatial index to optimise annotation layer item retrieval 2021-08-19 13:26:36 +10:00
Nyall Dawson
e3b10ff5b1 Add method to retrieve a specific item from an annotation layer by id 2021-08-19 13:26:36 +10:00
Nyall Dawson
7c75c4cd7f Never try to create/render 0 pixel sized fonts
This throws Qt warnings, and results in large fonts being created
when they actually should be invisible
2021-08-19 05:58:08 +10:00
Alessandro Pasotti
cc8178821a Address PR comments 2021-08-18 15:45:05 +02:00
Denis Rouzaud
7c35e62fb6
Merge pull request #44636 from suricactus/offline_pk
[Offline editing] Store original PK and use transactions with QgsOfflineEditing::synchronize
2021-08-18 13:35:03 +02:00
Nyall Dawson
1925277b4e Use the new UsersCannotToggleEditing property to refine situations
when various actions and editing dependant states should be
reflected in qgis app

We don't want annotation layers (which are always editable) to
make things like the "cancel edits for all layers" action
to become enabled.
2021-08-18 12:32:41 +10:00
Nyall Dawson
3b2e640cee Add a new enum for inherent map layer properties, and add property
to annotation layers to reflect that while these are editable
users are not able to toggle edits on them (they are ALWAYS
editable!)

Note that we can't use the existing QgsMapLayer::LayerFlag enum here,
as that has a different meaning (flags which are set by users
at runtime)
2021-08-18 12:32:41 +10:00
Nyall Dawson
3f7fc069ae Annotation layers should return true to isEditable, supportsEditing 2021-08-18 12:32:41 +10:00
Ivan Ivanov
a5968fa7ad Address review 2021-08-17 23:42:30 +03:00
Alessandro Pasotti
915349dee0 Simplify code and support copy/paste 2021-08-17 19:32:11 +02:00
Sandro Mani
f67c071ed1 Remove unused include 2021-08-17 15:30:38 +02:00
Francesco Bursi
179cb1d951
[feature] virtual raster data provider (#44195)
* try to commit some changes in the branch

* addedd 3 file, cmake, vrp .h and .cpp

* updating VRP, no good results

* try to solve some issue to the virtual raster provider

* metadata class added, it should be developed

* registred in qgsproviderregistry the new VRP

* on line to test debug in the  new VRP

* chenge of 1_06

* minor change 2 06

* updating VRP, it can add some useless color to map canvas

* add baseclass test fro new provider

* Delete testqgsvirtualrasterprovider.cpp

* move VRP to src/providers

* Delete src/core/providers/virtualrasterprovider directory

* little change to cmake

* added as dynamic provider

* move the VRP to src/providers and let it work

* move the VRP to src/providers and let it work

* including qgis analysis

* updating block function with some calc tools

* delete block function, updating readblock function

* modified block method, used setValue --> to update with bits

* modified block method

* modified block method, adding takedata to the resultmatrix

* modified test for the new provider

* Add some checks in the block method, for raster entries

* tries for the calculator tool

* work on the hardcoded part and test

* work on the hardcoded test

* minor change in order to make the calc functionaltiy work

* minor change to the loop in which the computation occurs

* try to understand how qgsrastermatrixworks

* work on debugging new class

* work on debugging new class

* updating test and block method

* updating test and and block, now it works running in test mode

* updating test and and block, now it works running in test mode with bits

* updating test and and block, now it works running in test mode with bits

* update test

* update test and provider class

* add decodeuri and encodeui in metadata, at the moment they do nothing

* modify qgsrasterdataprovider by adding decoding and encoding uri methods

* workin on encode and decode funct

* work on encode/decode after Martin advices

* work on encode/decode after Martin advices, and update unit test

* work on encode/decode and update Cmakelist of provider test

* work on encode/decode and update Cmakelist and provider test

* work on encode/decode and update test + constructor

* work on encode/decode and constructor

* decode is now non trivial, he same as constructor

* working on encoding

* working on encoding/decoding

* change a little the code/decode mehods in order to return and get a struct as output/input

* change of decode method

* change the encode method, I should polish the code and optimize the encode for raster layers

* add flag ptr bool to decode mehod

* add flag ptr and modified the constructor of vrprovider

* work on the constructor and deconstructor, the flag does not work properly

* work on the constructor anf decoder

* work on the constructor and decoder

* work on the constructor and add some lines to popoluta mRasterEntries

* delete hardcoded data

* work on constructor and copy constructor 2

* add the parsing of the formula in the constructor, I should make a private var with calcnode

* add the parsing of the formula in the constructor, I should make a private var with calcnode2

* add some checks in the constructor2

* modify the copy constructor, add some code to adjust the qgsrasterdataprovider.sip

* modify checks in the constructor and in the decode method, in order to avoid nested if stat

* delete the logic in the decode method and add in the constructor

* delete the logic in the decode method and add in the constructor, add some redundant check in the constructor

* delete the logic in the decode method and add in the constructor, add some redundant check in the constructor 2

* test is now more general

* test is now more general2

* delete of a comment

* banned keywords check

* little error

* add copyright

* add copyright2

* add assignment operator= delete

* add documentation in qgsrasterprovider

* documentation

* modify qgsstringutils

* little modifications

* add the checkbox to the ui

* come back to old ui for raster calc

* adjust some qt::endl in the test of vrprovider

* start to work on the ui dialog

* layot of the code

* add some logic to the dialog of the raster calc

* add some test to qgisapp, need to modify the encoder and maybe put it in the qgrastercalcdialog

* modify some logic in rastercalcdialog and in the app, I should modify and move the encode method

* modify the comment

* add method to calcnode, modify the constructor of the provider and the open of the dialog

* add documentation

* some modifications according to the first review

* sadd some changes according to Martin's review

* change qgsrastercalcnode methods that returns raster names, small change to ui

* change the ui

* change the ui - using QString instead of QStringLiteral

* change the ui - using QString instead of QStringLiteral

* change name of subdirectory containing the virtual raster provider

* change name of subdirectory containing the virtual raster provider2

* change name of subdirectory containing the virtual raster provider3

* minor changes to makefiles

* minor change to dialog, to hide and show the output format and path

* provider key changed to the shorter virtualraster

* add some code to QgsRasterLayer::encodedSource and decodedSource

* delete some comments

* updating VRP, no good results

* made some change after the the second review

* delete the comments

* change some part of the code (delete of comments and cleaning the code)

* correct some layout errors

* change the mail contatct in my prvider

* change details on the method in qgsrastercalcnode

* change some method of the test class of my provider

* delete some leakage in the virtual raster provider

* modify some parts according to the review + change two lines of code for encoding/decoding methods

* modify a line of qgisapp.cpp

* small change according to the comments on th PR

* add a test method for second generation virtual raster and modify checks in qgisapp

* correction of the test method

Co-authored-by: franc <Franc-Brs>
2021-08-17 10:00:16 +02:00
Ivan Ivanov
e0738774b2 Offline editing fixes 2021-08-17 10:07:48 +03:00
Nyall Dawson
06b3b1650a Fix clazy, cppcheck warnings in expression builder widgets 2021-08-17 10:41:30 +10:00
Alessandro Pasotti
6de2f2dcc4 Fix setEnabled 2021-08-16 17:44:26 +02:00
Alessandro Pasotti
9772e95397 Doxy 2021-08-16 17:13:35 +02:00
Alessandro Pasotti
cd6cd2f6f3 Tests for form action widget 2021-08-16 15:14:31 +02:00
Denis Rouzaud
a0507ee324
Merge pull request #44533 from troopa81/feat_dms_connexion_widget
[ExternalStorage] Add widget to configure/edit and visualize external storage
2021-08-16 12:05:26 +02:00
Julien Cabieces
53e16e85c0 add external storage display name 2021-08-16 09:18:14 +02:00
Julien Cabieces
bbf2429d6b Fix sip incomplete type QgsExternalStorageFileWidget 2021-08-16 09:18:14 +02:00
Julien Cabieces
36813e737d Fix doc 2021-08-16 09:18:14 +02:00