95 Commits

Author SHA1 Message Date
Denis Rouzaud
54c6291378 script to write include SIP files 2017-06-28 10:45:51 +02:00
Denis Rouzaud
922b162b86 attachment widget: data defined button for document type 2017-05-15 17:57:25 +02:00
Nyall Dawson
14882058ba Sipify update 2017-05-15 07:34:14 +10:00
Nyall Dawson
4a5c9a7ba3 Make a new global QgsGui singleton
Move QgsEditorWidgetRegistry from being a singleton itself to
instead being a member of the QgsGui singleton
2017-05-15 07:32:01 +10:00
Denis Rouzaud
97866f4a20 [sip] add missing ConvertToClassCode
This was causing an issue if you tried to access widgets in a form using findChildren
widgets could not be casted to QGIs native types

also sipify QgsFilterLineEdit and QgsRelationEditorWidget
2017-05-10 14:40:31 +02:00
Denis Rouzaud
0824280296 sipify gui editor widgets 2017-05-09 08:59:07 +02:00
Denis Rouzaud
85f3b81b55 remove double spaces in sip files
fix indentation
2017-05-03 08:02:14 +02:00
Denis Rouzaud
7d459149c7 [sip] align missing bits and replace nullptr by 0 2017-05-02 08:09:53 +02:00
Denis Rouzaud
7b60d89d6c align pointer and reference in sip files batch 2 2017-05-01 20:00:51 +02:00
Nyall Dawson
6ea616ef4b Fix compilation error on Travis 2017-03-30 11:38:16 +10:00
Nyall Dawson
c11ef583ce Generalise editor widget config saving/restoring props from gui 2017-03-10 11:02:16 +01:00
Matthias Kuhn
0170580019 Save QgsProperty related objects via QVariants 2017-03-09 20:54:44 +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
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
748be8de71 [spelling] replace behaviour by behavior 2017-01-11 11:35:19 +01:00
Harrissou Sant-anna
ef85cdcf83 Replace "eg" by "e.g." or "for example" 2016-12-30 00:03:22 +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
Patrick Valsecchi
91e4b24a39 Better reading/writting of editor widget config.
Avoid saving config parameters that are not set and support not
having them in the XML.
2016-11-07 09:00:17 +01:00
Nyall Dawson
3f2a7810cf Respect non-enforced constraints when editing/adding features
Warnings are shown, but features can be committed. Fields which
fail an unenforced constraint are now shaded in yellow to differentiate
from the red failure for enforced constraints.
2016-11-02 13:42:22 +10:00
Nyall Dawson
1cecf37b40 Enforce unique constraints in attribute form 2016-11-02 11:07:07 +10:00
Nyall Dawson
44289084e9 Optimise passing of variables by ref/value 2016-10-24 10:36:23 +10:00
Nyall Dawson
a3968a29bd Fix clazy qmap-with-pointer-key warnings
From the clazy docs:

Finds cases where you're using QMap<K,T> and K is a pointer.

QMap has the particularity of sorting it's keys, but sorting
by memory address makes no sense. Use QHash instead, which
provides faster lookups.
2016-10-22 22:46:16 +10:00
Matthias Kuhn
8069154aad [Feature] Allow configuring link/unlink feature buttons on relation editor widget 2016-09-21 21:16:28 +02:00
Patrick Valsecchi
57d00949f7 Add an editor widget for QVariantList 2016-09-13 09:16:17 +02:00
Nyall Dawson
f16b3870fa Use QgsFilterLineEdit for Qgs(Double)SpinBox
Fixes issues with the current approach:
- poor appearance on certain environments (esp OSX)
- large area on spin boxes' right which "swallows" clicks
and blocks interactivity

Fix #12920
2016-09-08 22:10:36 +10:00
Patrick Valsecchi
7169079f91 Smarter default edit widgets with plugins to pick them
Now the widgets factories can give a score on how good they could handle
a widget.

Additionaly, plugins can be added to choose a widget factory in function
of an external information. One of them uses a table in PostgresQL to
allow specification of the widget type and configuration.

I took the opportunity to remove a few deprecated method in relation to
this.
2016-09-05 14:22:17 +02:00
Nyall Dawson
99405864ca Add a changed signal to QgsEditorConfigWidget
And update default value expression preview whenever editor
config changes

Sponsored by DB Fahrwegdienste GmbH
2016-08-30 12:40:52 +10:00
Matthias Kuhn
a529b448e7 Revert "Merge pull request #3338 from pvalsecc/editor_widgets_selection"
This reverts commit bbafbf48872eda48a2be8876cc89a0770552c6ad, reversing
changes made to 13ac0434e10fc7edd1eca665ea7c8b6cb5fd212d.
2016-08-29 19:22:04 +02:00
Patrick Valsecchi
24bde35ce6 Smarter default edit widgets with plugins to pick them
Now the widgets factories can give a score on how good they could handle
a widget.

Additionaly, plugins can be added to choose a widget factory in function
of an external information. One of them uses a table in PostgresQL to
allow specification of the widget type and configuration.

I took the opportunity to remove a few deprecated method in relation to
this.
2016-08-29 07:42:50 +02:00
Matthias Kuhn
6ae2daa145 Respect the "showLabel" flag on attribute editor elements 2016-08-19 14:50:22 +02:00
Matthias Kuhn
56a0af5bd8 Sort attribute table by representation value where useful
Fix #15096
And aligns some edge-cases of sort behavior
2016-07-07 16:39:13 +02:00
Matthias Kuhn
437cb85cd5 Left align mapped values
Fix #15101
2016-06-23 12:50:38 +02:00
Juergen E. Fischer
006b581870 fix warnings 2016-06-02 12:27:40 +02:00
Matthias Kuhn
c68eaeb929 Refactor widget constraints to keep variables private 2016-06-02 08:51:03 +02:00
Blottiere Paul
8449e42ae0 add constraint description 2016-05-31 20:16:22 +02:00
Blottiere Paul
a636319af6 fix sip 2016-05-31 20:16:21 +02:00
Blottiere Paul
020d20a968 [FEATURE] constraints on widgets 2016-05-31 20:16:21 +02:00
Nyall Dawson
9f325df9c7 Search widget wrapper for relation reference widget 2016-05-25 15:41:04 +10:00
Nyall Dawson
1c4811fa12 Add Is Not Null and Is Not Between type search/filters 2016-05-24 00:26:15 +10:00
Nyall Dawson
e00ea61be6 Add missing docs 2016-05-24 00:26:15 +10:00
Nyall Dawson
02c0174d41 Add a "Between" type search/filter in filter form mode
When Between searches are selected, two search widget wrappers
will be created to allow entry of the minimum/maximum allowed
values.
2016-05-24 00:26:15 +10:00
Nyall Dawson
026e352cd9 [FEATURE] Add a search widget wrapper for datetime widgets 2016-05-24 00:26:15 +10:00
Nyall Dawson
6d868598f5 Add an interderminant "empty" state for QgsDateTimeEdit 2016-05-24 00:26:14 +10:00
Nyall Dawson
195b4dee5a [FEATURE] Add search widget wrapper for check box widget 2016-05-24 00:26:14 +10:00
Nyall Dawson
ca5c7e2cd4 [FEATURE] Form based select/filter in attribute table
This commit adds a new mode to the attribute table dialog for searching
and filtering features. When activated (using a button on the toolbar
or by pressng CTRL+F), the dialog will switch to form view and all
widgets are replaced with their search widget wrapper variant.

Alongside each widget is a tool button with options for controlling
the search/filter behaviour for that field, eg "equal to", "not equal
to", "is null", "greater than", etc.., with the options presented
matching themselves to the corresponding field and widget type.

New buttons appear at the bottom of the form for either selecting
matching features (with options for add to selection/remove from
selection/select within current selection) or filtering features
in the table (with options for adding features to a current filter
or further restricting a current filter).

Sponsored by SIGE
2016-05-24 00:26:14 +10:00
Nyall Dawson
66b51d4a81 [FEATURE] Edit attributes of multiple features simultaneously
This change allows the attributes of multiple features to be edited
simultaneously. It is enabled when the attribute table dialog is in
"form mode", via a new "multi edit" button on the toolbar.

In this mode, attribute value changes will apply to all selected
features. New widgets appear next to each editor widget allowing for
display of the current multi-edit state and for rolling back changes
on a field-by-field basis.

Changes are made as a single edit command, so pressing undo will
rollback the attribute changes for all selected features at once.

Multiedit mode is only available for auto generated and drag and
drop forms - it is not supported by custom ui forms.

Sponsored by Kanton Basel Stadt
2016-04-18 15:15:11 +10:00