2831 Commits

Author SHA1 Message Date
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
Alessandro Pasotti
9c0a620fa8 Add option for ServerPrefersCoordinatesForTransactions_1_1 2020-10-15 21:26:35 +02:00
Nyall Dawson
8d3e028d15 Cleanup raw margin manipulation used to hide holding controls, use proper methods 2020-10-13 14:14:53 +10:00
Nyall Dawson
1ac59415ec Cleanup handling of margins in QgsCodeEditor and subclasses 2020-10-13 14:14:53 +10:00
Nyall Dawson
0a3f40a191 Allow error indicator colors to be controlled for code editor color scheme 2020-10-13 10:47:21 +10:00
Nyall Dawson
5c8013df61 [console] Fix exception when running scripts (followup cce7aa7)
and move responsibility for showing warning messages to QgsCodeEditor
base class, so that the same code can be used by other dialog script editors
2020-10-12 13:06:34 +10:00
Nyall Dawson
aaa813a15a Split indentation guide color from edge color in code editor settings
Reusing the same color resulted in too subtle indentation guides
2020-10-12 11:53:34 +10:00
Nyall Dawson
4ee9feb56b Sipify 2020-10-09 11:20:09 +10:00
Nyall Dawson
c9fb3620db Fix fold icon colors in code editors -- allow these to be set so that
they can match the editor theme
2020-10-07 15:06:02 +10:00
Nyall Dawson
3f40dbfb10 Fix rendering of CSS comments in QgsCodeEditorCSS
Refs https://www.riverbankcomputing.com/pipermail/qscintilla/2019-July/001414.html
2020-10-07 13:13:17 +10:00
Nyall Dawson
3098fa5906 Move code editor color scheme tracking to dedicated registry,
QgsCodeEditorColorSchemeRegistry

This cleans up the code, and makes it possible for creation of plugins
which add new code editor color schemes!
2020-10-06 17:11:34 +10:00
Nyall Dawson
1bafa2f66f Code shuffle: move QgsCodeEditor classes to their own folder 2020-10-06 17:11:34 +10:00
Nyall Dawson
df6c8d74cd Allow plugins and scripts to register custom logic to prevent
the QGIS application from exiting

This interface allows plugins to implement custom logic to determine whether it is safe
for the application to exit, e.g. by checking whether the plugin or script has any
unsaved changes which should be saved or discarded before allowing QGIS to exit.
2020-10-06 17:04:49 +10:00
Nyall Dawson
ec2b21001e Ensure autocomplete correctly works for all QgsCodeEditorPython instances 2020-10-06 03:57:50 +10:00
Nyall Dawson
f5cd52f81b Show a code editor preview widget in the code editor settings panel
Allows instant preview of changes
2020-10-05 13:24:46 +10:00
Nyall Dawson
d9782a12f5 Move more code to QgsCodeEditorPython base class 2020-10-05 13:24:46 +10:00
Nyall Dawson
96db7ad4f3 Ensure that all open code editors respond immediately to color/font changes 2020-10-05 13:24:46 +10:00
Nyall Dawson
527e8850ef Add universal last-resort signal QgsGui::optionsChanged()
This signal is emitted whenever the application options have been changed.

This signal is a "blanket" signal, and will be emitted whenever the options dialog
has been accepted regardless of whether or not individual settings are changed.
It is designed as a "last resort" fallback only, allowing widgets to respond
to possible settings changes.
2020-10-05 13:24:46 +10:00
Nyall Dawson
47236421af [needs-docs] Move Python Console settings for font colors and family
to new "Code Editor" tab in options dialog

These settings apply to more than just the Python console editors -
rather they apply to all code editors across QGIS (including expression
editors)
2020-10-05 13:24:46 +10:00
Nyall Dawson
6078fe4842 Cleanup color handling in QgsCodeEditor classes
Remove a bunch of duplicate default color definitions, and ensure
that all subclasses correctly respect any user defined color overrides,
yet that we still default to following the application theme's matching
color schemes.
2020-10-03 19:58:50 +10:00
Nyall Dawson
ab6bbfda1d Fix all remaining Qt QFlags deprecated constructor warnings 2020-10-02 13:04:49 +10:00
Alessandro Pasotti
83525abd5c Respect scale lock when panning/zooming the map
Fixes #38953 and #38417
2020-09-24 09:04:36 +10:00
Nyall Dawson
c3a26db4ba [layouts] When selecting a CRS for a map item, don't show misleading
"no crs" option at the top of the dialog.

Instead, correctly label this option as "Use project CRS", which
is what it actually means.
2020-09-23 14:13:35 +10:00