991 Commits

Author SHA1 Message Date
Nyall Dawson
41fe33551c Add missing python bindings 2017-01-30 17:40:41 +10:00
Nyall Dawson
c853f4fe89 Refactor annotations
Splits the rendering component of annotations out from map
canvas item component.

A new core abstract base class QgsAnnotation handles the
management of the common properties associated with an
annotation, and handles rendering the annotation onto a
QgsRenderContext destination.

Existing annotation classes have been ported to this, and
with the exception of the form annotation moved into core.
Form annotations are dependant on editor widgets and must
remain in GUI.

A new QgsMapCanvasAnnotationItem item class implements
a QgsMapCanvasItem which draws an annotation inside the
canvas, and handles synchronising the position and size
of the canvas item with the QgsAnnotation position/size.

This allows annotations to be safely used in a multi-canvas
environment, with a single QgsAnnotation being displayed
in multiple canvases (even if the canvases have different
extent/crs/etc).

Additionally it allows annotations to be directly rendered
to a map (eg in composer) without going through the
gui based Qt graphics scene framework.

Also removes lots of duplicate code, and adds some basic
unit tests for annotations.
2017-01-30 08:36:19 +10:00
Juergen E. Fischer
a64f909474 spelling fixes 2017-01-25 16:53:34 +01:00
Nyall Dawson
b41f3a7860 [composer] Don't use canvas map settings to determine canvas layers
Instead make the layer tree canvas bridge advise on layer set
changes, and tie this into composer. So now composer acts
as a go-between to sync the composer map item's layer set to
the layer tree/canvas layers.

It's not an ideal solution, but avoids the hard link between
compositions and the map canvas.
2017-01-24 12:24:33 +10:00
Juergen E. Fischer
6a56cb0dd0 updates and fixes for windows qt5/py3 build 2017-01-24 01:25:59 +01:00
Nyall Dawson
b833c247dc Add missing sip bindings 2017-01-23 12:45:22 +10:00
Nyall Dawson
d5664ed635 Clean up GUI for properties 2017-01-23 12:45:21 +10:00
Nyall Dawson
ffaa40edc4 Refactor properties
Remove QgsAbstractProperty and subclasses, and instead use a single
QgsProperty class which covers the use of QgsAbstractProperty
and its subclasses. This simplifies the API and avoids pointer
handling. QgsProperty is implicitly shared for memory efficiency
and inexpensive copies.
2017-01-23 12:45:21 +10:00
Nyall Dawson
90e80c1353 Stronger definitions of properties in collections
Instead of defining the suitable field types and values for
properties when registering them to a data defined button,
now properties are fully defined when the valid
property keys are defined.
2017-01-23 12:45:21 +10:00
Nyall Dawson
ad2324021d Port symbology and composer to properties framework 2017-01-23 12:45:21 +10:00
Nyall Dawson
710a12cabd Avoid use of composition map settings to set initial composer map extent 2017-01-18 12:30:47 +10:00
Denis Rouzaud
b119744773 replace cancelling, cancelled and cancellation by canceling, canceled and cancelation, respectively (#4000)
* replace cancelling and cancelled by canceling and canceled, respectively

see https://github.com/qgis/qgis3_UIX_discussion/issues/19

* replace cancellation by cancelation
2017-01-16 22:27:14 +01:00
Denis Rouzaud
0a63d1f2c2 [spellcheck] properly look into various cases and add more fixes" 2017-01-16 16:39:20 +01:00
Nyall Dawson
b5480633e4 Standardise names for static variables
All non-const variables are prefixed with "s", all const
statics are ALL_CAPS
2017-01-14 16:40:24 +10:00
Nyall Dawson
231f6af0e1 Don't return const references to implicitly shared Qt classes
Instead return the inexpensive copies. Should provide extra safety
against issues like #14822

(refs #14822)
2017-01-14 15:53:45 +10:00
Denis Rouzaud
6c74e4ea5d spelling fixes 2017-01-12 22:01:50 +01:00
Denis Rouzaud
748be8de71 [spelling] replace behaviour by behavior 2017-01-11 11:35:19 +01:00
Alexander Bruy
b74aefd3c9 move QgsHelp to gui 2017-01-10 17:55:51 +02:00
Alexander Bruy
85d40937b9 skip malformed key-values pairs
add options example in docs
2017-01-07 10:02:13 +02:00
Alexander Bruy
d718eb0f18 fix indentation 2017-01-07 10:02:13 +02:00
Alexander Bruy
60cb517845 add method to set raster options in QgsRasterFormatOptionsWidget 2017-01-07 10:00:53 +02:00
Martin Dobias
660867cb4e Explicitly pass QgsProject object when dealing with expression contexts
Continued effort to reduce number of uses of QgsProject as singleton...
2017-01-06 11:34:55 +08:00
Even Rouault
f67cdc3965 Merge pull request #3935 from rouault/group_visibility
[FEATURE] Change of ergonomy of the visibility of layers inside groups
2017-01-04 15:22:48 +01:00
Martin Dobias
6c5956b22b QgsProject: cleanup of read/write method + removal of unused bad layer handler class 2017-01-04 20:29:53 +08:00
Even Rouault
60a1701377 [FEATURE] Change of ergonomy of the visibility of layers inside groups
See https://github.com/qgis/QGIS-Enhancement-Proposals/issues/86

- Checking/unchecking a group doesn't change the check state of its children.
A node is visible if and only if it is checked and all its parents too.
- There is no more a semi-checked state for a group
- Ctrl-clic on a unchecked group will check the group and all its descendants.
- Ctrl-clic on a unchecked layer will check the lager and all its parents.
- Ctrl-clic on a checked group will uncheck the group and all its descendants.
- Ctrl-clic on a checked layer will uncheck the layer and all its parents.
- Those actions are available in contextual menu items in the tree view.
- Invisible layers because they or their parent(s) is unchecked are greyed out.
2017-01-02 13:25:25 +01:00
Harrissou Sant-anna
ef85cdcf83 Replace "eg" by "e.g." or "for example" 2016-12-30 00:03:22 +01:00
Nyall Dawson
4b1cf807ec Merge pull request #3909 from nyalldawson/select_in_edit_menu
Tweak edit/view menus
2016-12-28 16:11:25 +10:00
Mathieu Pellerin
efaf5ea926 [ui] select by form/expression harmonization and feature parity (#3912) 2016-12-28 11:16:55 +07:00
Nyall Dawson
4f73c28c5f [FEATURE] Hide Deselected Layers action
Allows you to quickly hide all deselected layers. This is very handy
when you have a large project and want to quickly hide all except
for a couple of layers
2016-12-28 10:50:05 +10:00
nirvn
181f84b86f [raster] move pseudocolor renderer classification out of gui into core 2016-12-27 10:16:51 +07:00
Nyall Dawson
80b757b6db [FEATURE] Add zoom to features shortcut in select by form dialog
Allows very quick navigation to features which match the criteria
in the form
2016-12-23 05:44:38 +10:00
Nyall Dawson
0bfc9bb6e3 [FEATURE] Show field values in autocompleter in form filter mode
This adds a new gui widget QgsFieldValuesLineEdit which includes
an autocompleter populated with current field values.

The autocompleter is nicely updated in the background so that
the gui remains nice and responsive, even if there's millions
of records in the associated table.

It's now used as a search widget for text fields, so can be seen
in the browser window if you set the filter to a text field, or
if you launch the form based select/filter by selecting a layer
and pressing F3.
2016-12-23 05:44:38 +10:00
Nyall Dawson
e27822bf39 Small cleanups to QgsFloatingWidget 2016-12-23 05:44:38 +10:00
Matthias Kuhn
33abb78ac5 Pass variable values as QVariant 2016-12-22 20:21:21 +01:00
Matthias Kuhn
928f360c77 Make attribute table aware of disappearing field formatters 2016-12-20 01:20:08 +01:00
Matthias Kuhn
930ce545a8 Fix failing tests 2016-12-20 01:20:08 +01:00
Matthias Kuhn
c9f8ac2afe Remove editor widget project loading code from gui 2016-12-20 01:20:08 +01:00
Matthias Kuhn
9fd0802939 Remove QgsEditorWidgetConfig
This is replaced with a QVariantMap. It was never really more than this in the
past and with the switch to QgsConfigurationProperties, there is really no
longer any reason to assume that this will change.
2016-12-20 01:20:08 +01:00
Matthias Kuhn
82d1871f8c Put field kit into use 2016-12-20 01:20:08 +01:00
Matthias Kuhn
9a53b7df06 Add field kits for a lot of common field types 2016-12-20 01:20:08 +01:00
Even Rouault
532eb58d1f [FEATURE] Implement raster auto-stretching when updating canvas
This commit implements the improvements described at:
https://lists.osgeo.org/pipermail/qgis-developer/2016-September/044393.html

The QgsRasterMinMaxWidget now offers a seetting to specify that the statistics
should be computed each time the canvas extent changes.

Other changes:
- the content of the QgsRasterMinMaxWidget is now persistant.
- there is no longer any Load button. The global Apply / OK button of the raster
  properties dialog has this effect.
- the default "limits" for single band raster is now MinMax and not CumulativeCut
- the default "limits" can be configured for single band, multi band single byte and
  multi band multi byte
- "Strech using current extent" honours the "limits" instead of forcing min/max.
2016-12-16 12:36:06 +01:00
Martin Dobias
899ea38d02 Make doc coverage test happy 2016-12-11 17:09:19 +08:00
Martin Dobias
2c9f1ff579 Make map canvas independent from overview canvas, simplify QgsMapCanvas API 2016-12-11 16:41:07 +08:00
Martin Dobias
c143be7a73 QgsMapSettings and QgsComposerMap store layers for rendering as weak pointers
... instead of using layer IDs which need to be resolved using QgsProject
2016-12-10 18:50:52 +08:00
Harrissou Sant-anna
f9578bf60b Replace selectedFeaturesIds by selectedFeatureIds 2016-12-07 00:19:11 +01:00
Nyall Dawson
a24690d6db Task manager GUI cleanups 2016-12-05 14:08:11 +10:00
Nyall Dawson
466b0b96b7 Tasks are treated as progressless until they first report a progress 2016-12-05 14:08:11 +10:00
Nyall Dawson
d270b4f9c2 Improvements to task manager ui 2016-12-05 14:08:11 +10:00
Nyall Dawson
5da25136a6 New QgsFloatingWidget widget for easy creation of widgets which "float"
above a layout.

Supports setting another widget as a anchor point for the widget, eg
the floating widget could be set so that it's always placed to the
top-right of the anchor widget.
2016-12-05 14:08:11 +10:00
Nyall Dawson
e29dd79432 Api + test cleanups 2016-12-05 14:08:10 +10:00