2753 Commits

Author SHA1 Message Date
Nyall Dawson
090afdd636 Initial shell for QgsPointCloudRendererWidget 2020-11-16 19:38:07 +10:00
Even Rouault
a1c09b3eea qgsquerybuilder.h: add missing documentation on existing methods 2020-11-16 11:09:06 +10:00
Even Rouault
24eb319af2 [FEATURE] Add a subset string editor provider concept and registry
The aim of this work is to be able to provide custom subset string editor
GUI according to the layer. Typically, so that a WFS layer uses the same
editor than in its select source, or that a plugin can provide a custom
editor.

* Add QgsSubsetStringEditorInterface: abstract interface to define a dialog
  that can edit a subset string
* Make QgsQueryBuilder implement QgsSubsetStringEditorInterface
* Add QgsSubsetStringEditorProvider: interface for thos who want to provide
  a dialog to edit a subset string.
* Add QgsSubsetStringEditorProviderRegistry: keeps a list of subset string
  editor providers. Transposed from QgsDataItemGuiProviderRegistry
* Add QgsGui::subsetStringEditorProviderRegistry()
2020-11-16 11:09:06 +10:00
Even Rouault
b878ac9c85
QgsQueryBuilder: improvements for easier subclassing
- Make test() method virtual so it can be overriden in a derived class
- Make enabling/disabling of "use unfiltered layer" checkbox automatic
  when layer's subsetString is changed (for example by an overriden
  test() implementation)
- Add a codeEditorWidget() method that returns the sql editor widget,
  so that custom behavior can be added.
2020-11-14 13:22:36 +01:00
Alessandro Pasotti
3f11294dfd
Merge pull request #39778 from elpaso/bugfix-gh39757-shared-locale-sort
Bugfix gh39757 shared locale sort
2020-11-13 10:38:49 +01:00
Nyall Dawson
3798f14673 Add filtering by attribute type to QgsPointCloudAttributeComboBox 2020-11-12 17:33:37 +10:00
Luigi Pirelli
c4306e18e8 Fix crash due to style cache issue in QT<5.12.4. Fixes #39693 #39725 2020-11-12 08:14:57 +07:00
Nyall Dawson
00b9da6474 Private 2020-11-10 02:17:10 +10:00
Nyall Dawson
59601bf17d Add QgsPointCloudAttributeComboBox widget
A reusable widget for selecting an attribute from a point cloud layer
2020-11-10 02:17:10 +10:00
Alessandro Pasotti
02552e489a Raster shader: store label precision 2020-11-09 15:40:43 +01:00
nirvn
dcc53852c4 [temporal] Update the identify tool to take temporal range context into account 2020-11-09 13:10:55 +07:00
Alessandro Pasotti
3e398e2ab4
Merge pull request #39577 from elpaso/hidden-layers
Hidden layers
2020-11-05 16:13:10 +01:00
Alessandro Pasotti
26a9cdf5fd Hidden layers -> Private layers 2020-11-05 12:59:27 +01:00
Alessandro Pasotti
414d938117 Fix raster paletted and pseudocolor various issues 2020-11-05 12:11:24 +01:00
Alessandro Pasotti
dec0af6b65 Store unmodified double value in widget items
Also add a custom delegate.

Try to fix #39757
2020-11-03 12:18:15 +01:00
Nyall Dawson
9935bbe05e Add adapter class QgsGeocoderLocatorFilter
This class implements the required logic to bridge a
class which implements the QgsGeocoderInterface interface to a
QgsLocatorFilter. It allows easy creation of a locator filter
from a geocoder.

E.g.

    class GoogleGeocoder(QgsGeocoderInterface):
      ... class which implements QgsGeocoderInterface...

    my_google_geocoder = GoogleGeocoder(api_key)
    my_google_locator_filter = QgsGeocoderLocatorFilter('google', 'Google Maps', 'google', my_google_geocoder, iface.mapCanvas())
    iface.registerLocatorFilter(my_google_locator_filter)

Note:

There's an abstract base class QgsAbstractGeocoderLocatorFilter which
lives in core. This base class has the guts of the geocoder to filter
adapter logic, but it does NOT implement the part which actually zooms
the canvas to the geocode results (because it's in core!)

This abstract base class is in place for applications like QField,
where the GUI library and QgsMapCanvas is NOT used. Those applications
can then implement their own concrete class based on QgsAbstractGeocoderLocatorFilter
with the correct logic to zoom their interface to a region. Ultimately,
a single QgsGeocoderInterface could be usable across QGIS desktop, QField,
with almost all logic shared via the common abstract adapter class.
2020-11-02 11:22:48 +10:00
Alessandro Pasotti
884bd9a42e Fix crash on nested dataChanged from set current index
Add new methods and tests, try to make it clear when
a method expects a model index and when it expects
a proxy model index.
2020-10-29 14:31:38 +01:00
Will Cohen
8172c5ed9d Revert ordering of PreviewMode's Grayscale/Mono 2020-10-27 16:41:22 +10:00
Will Cohen
da5bc3068c PreviewGrayScale->PreviewModeGrayscale, captions 2020-10-27 16:41:22 +10:00
Will Cohen
ea628e3129 Revert CVD function names to avoid API breakage 2020-10-27 16:41:22 +10:00
Will Cohen
7bd81dfc60 [FEATURE] Improved color vision deficiency sim
This modifies the previous support for grayscale
and LMS-based simulation for protanopia and
deuteranopia, and brings it in line with the
methodology currently used in Chromium and Firefox
(https://bugs.chromium.org/p/chromium/issues/detail?id=1003700,
https://bugzilla.mozilla.org/show_bug.cgi?id=1655053).

QGIS now uses updated grayscale luminance
calculations (renamed to achromatopsia), a
precomputed protanopia matrix (renamed from
protanope), a precomputed deuteranopia matrix
(renamed from deuteranope), and an additional mode
for tritanopia using a similarly precomputed matrix.

This commit addresses issue #29760.
2020-10-27 16:41:22 +10:00
Peter Petrik
b796dbb07b add some basic skelet for point cloud data providers 2020-10-27 05:29:14 +10:00
Peter Petrik
9c27d4ae91 bunch of other file skeletons 2020-10-27 05:29:14 +10:00
Peter Petrik
de6f4d6ad8 hook point cloud layer type to the rest of the code 2020-10-27 05:29:14 +10:00
Alessandro Pasotti
8924596e62 Leftover 2020-10-26 15:01:25 +01:00
Matthias Kuhn
a720a18006
Merge pull request #39540 from m-kuhn/test_doxy_layout
Test doxy layout
2020-10-24 16:45:21 +02:00
Alessandro Pasotti
6aa537c778 Doxy 2020-10-23 18:16:49 +02:00
Alessandro Pasotti
1318a90c02 Adapt tests 2020-10-23 12:53:36 +02:00
Nyall Dawson
e0321be23f Add iface method and new class for delegating all responsibility
and logic for activating a custom map tool and ensuring it can
only be enabled in the right circumstances to QGIS app

If a plugin has to do this, it's a nightmare of code and hacks (partly
because of the number of changing circumstances it needs to respond
to, and partly because a lot of the useful functions available
for handling this behavior is locked away in private methods
in qgisapp.cpp)

So instead make an abstract base class for map tool handlers and
an iface method for register/unregistering them.

From the dox:

An abstract base class for map tool handlers which automatically handle all the necessary
logic for toggling the map tool and enabling/disabling the associated action
when the QGIS application is in a state permissible for the tool.

Creating these handlers avoids a lot of complex setup code and manual connections
which are otherwise necessary to ensure that a map tool is correctly activated and
deactivated when the state of the QGIS application changes (e.g. when the active
layer is changed, when edit modes are toggled, when other map tools are switched
to, etc).

- ### Example

\code{.py}
  class MyMapTool(QgsMapTool):
     ...

  class MyMapToolHandler(QgsAbstractMapToolHandler):

     def __init__(self, tool, action):
         super().__init__(tool, action)

     def isCompatibleWithLayer(self, layer, context):
         # this tool can only be activated when an editable vector layer is selected
         return isinstance(layer, QgsVectorLayer) and layer.isEditable()

  my_tool = MyMapTool()
  my_action = QAction('My Map Tool')

  my_handler = MyMapToolHandler(my_tool, my_action)
  iface.registerMapToolHandler(my_handler)
\endcode
2020-10-23 19:03:51 +10:00
Matthias Kuhn
6ec342b4c0 Fix dox 2020-10-22 21:09:49 +02:00
Matthias Kuhn
42af1efa18 Fix a bunch of doc issues 2020-10-22 20:42:14 +02:00
Nyall Dawson
abacccb7e9 Add mapToolActionGroup to iface object
Any actions added by plugins for toggling a map tool should also
be added to this action group so that they behave identically
to the native, in-built map tool actions.
2020-10-23 03:57:34 +10:00
Alessandro Pasotti
13db03e099 Crashing! 2020-10-22 18:45:27 +02:00
Alessandro Pasotti
165dcb6719 Not working yet 2020-10-22 15:58:05 +02:00
Nyall Dawson
7186c802b4 tree wip 2020-10-22 15:32:21 +02:00
Denis Rouzaud
22b622b163
also use SVG selector in SVG fill symbology (#39524) 2020-10-21 13:46:27 +02:00
Denis Rouzaud
2d82ef91d3
fix buttons in SVG source line edit (#39519) 2020-10-21 12:17:01 +02:00
Denis Rouzaud
139be61b29
Merge pull request #39421 from 3nids/svg-browser
make the SVG selector collapsible (+ remove duplicated code)
2020-10-21 06:10:06 +02:00
Nyall Dawson
5565a6858d Some doxygen grammar fixes 2020-10-21 09:32:15 +10:00
Nyall Dawson
d3adc10ec3 Move some todos so they don't sit between member doxygen and declaration
Sipify doesn't handle this, and drops off the docstring from the python method
2020-10-21 09:32:15 +10:00
Nyall Dawson
9482b1be70 Correctly expose metadata tab for mesh layers
Just like all other map layer types, meshes CAN have metadata set,
so expose this via a metadata tab in their layer properties window
just like any other layer type.
2020-10-20 19:15:18 +10:00
vcloarec
abc112befc typo and spelling 2020-10-19 14:53:08 +10:00
Nyall Dawson
b637b14d07 Remove a lot of duplicate hardcoded strings for color ramp types and use static method instead 2020-10-19 11:47:35 +10:00
Nyall Dawson
34fb646f7a Fix trying to create new color ramp from first page in style
manager dialog does nothing
2020-10-19 11:47:35 +10:00
Denis Rouzaud
07280da2b0 fix doygen 2020-10-18 12:03:13 +02:00
Alessandro Pasotti
a0711d710d
Merge pull request #39368 from elpaso/wfs-t-1.1
Fix WFS-T 1.1.0 support
2020-10-17 21:45:58 +02:00
Denis Rouzaud
29b76f44b1 reuse existing SVG selector widget in QgsSvgMarkerSymbolLayerWidget 2020-10-16 15:48:31 +02:00
Denis Rouzaud
29382d0608 move SVG browser to a dedicated class
defer loading of SVG icons to only show them when the widget is made visible
2020-10-16 10:06:24 +02:00
Nyall Dawson
746ee315bd Fix boolean literal presentation in dox/PyQGIS docs 2020-10-16 16:03:26 +10:00
Ivan Ivanov
b7ff23aa33
Scroll to newly added feature in the attribute table view
Refs #37847
2020-10-16 10:44:35 +10:00