198 Commits

Author SHA1 Message Date
Nyall Dawson
c8f597983b Fix crash in attribute form after adding field
Fixes #18507
2018-03-22 16:23:51 +10:00
Denis Rouzaud
4c1e19c080 fix constraints not checked when they should be (#6550) 2018-03-14 07:49:37 -04:00
David
1875d4ad18 intagrated enumvalue IdentifyMode
used like SingleEditMode here
2018-02-23 11:03:12 +00:00
Harrissou Sant-anna
28e282ac02 Fix message box title 2018-02-18 13:28:04 +01:00
Nyall Dawson
9da5fd325e Always save newly created features, even if no attributes are
modified in the form popup after feature creation

Fixes #18056
2018-02-09 11:44:48 +11:00
Denis Rouzaud
3205c96af6
Merge pull request #6275 from 3nids/messagelevel
unite QgsMessageLog::Level and QgsMessageBar::MessageLevel in Qgis::MessageLevel
2018-02-06 05:28:17 -09:00
Denis Rouzaud
3dc3d9d1b2 unite QgsMessageLog::Level and QgsMessageBar::MessageLevel in Qgis::MessageLevel
make enum items lower case
remove unused QgsMessageLog::None and All
2018-02-06 08:56:40 -04:00
Nyall Dawson
9621f38330 Use QMessageBox::question instead of information when asking a question
And where appropriate use Yes/No choices instead of Ok/Cancel
2018-02-06 16:03:35 +11:00
Nyall Dawson
ef7e7c5432 Fix clazy QString multi-arg warnings 2018-02-02 19:52:01 +11:00
Alessandro Pasotti
4895c2c3f6
Merge pull request #6191 from dgoedkoop/attributeformonchanged
[bugfix] Add dirty bit to attribute form
2018-02-02 08:04:29 +01:00
Blottiere Paul
c1fac42518 Update all attributes in a single transaction
Fixes #17869
2018-01-29 07:17:32 +00:00
Daan Goedkoop
37fa41b03a [bugfix] Add dirty bit to attribute form
In some cases it is difficult to prevent that an edit widget doesn't
return the original value, even if the user didn't change anything.
So rather than just comparing values to check if they have been
modified, a dirty bit has been added which is set whenever the user
actually edits the data in an edit widget. This is part of the fix
for #17878.
2018-01-28 11:01:41 +01:00
Matthias Kuhn
3c702c07a0
Fix crash with constraint results and custom .ui
Fix #17564
2017-11-27 17:36:22 +01:00
Matthias Kuhn
fdd00870ee [FEATURE] Search widget for relations using aggregates
For each child relations, the subform is visible.

Each attribute of the children has a tool button option to define to which
aggregate the specified value should be compared. This allows for searching
things like

 * Each city where the highest building is more than 300 m
 * Each sensor where the median value is lower than 50 ppm
 * Each feature with a child with a missing value
 * ...
2017-11-20 20:31:38 +01:00
Matthias Kuhn
f5559b5143 Add QgsAttributeFormWidget 2017-11-20 20:31:38 +01:00
Matthias Kuhn
30ed315392
Merge pull request #5614 from signedav/constraintindicators
Constraint result not displayed in non editable mode
2017-11-20 07:13:39 +01:00
David
995003153a member variable for constraint result visability
...as we had it for for constraint result (status).
now the setter are called when setting the editable mode changes.
and the getter to have the current visibility status.
2017-11-16 11:50:15 +01:00
David
c2f68d6f7b background color on constraint fields reset on toggle edit
if editable, the backgroundcolor should be set according the constraint result
if not editable, the backgroundcolor should be empty anyway
so it has to be reseted when synchronizeEditableState...
2017-11-13 10:49:44 +01:00
David
53d642cecc Constraint Result Indicator invisible when not in editable mode
The icon for the constraint result indicator cross/tipp disappears when not in editable mode
this is made by the new method setconstraintresult.
2017-11-13 10:49:26 +01:00
Nyall Dawson
5a6c222e87 Fix Coverity null pointer dereference issues 2017-11-11 16:00:19 +10:00
Matthias Kuhn
8abc892ea2 Typo 2017-11-09 14:35:20 +01:00
Matthias Kuhn
61b2f74aae Do not assume edit widget value changes on every signal
Widgets may on initialisation send out a notification that the value changed (from invalid to something sensible).

The attribute form should however only tell the rest of the world, that a value changed if the new value doesn't
correspond to the one in the cached QgsFeature.

Fix #17425
2017-11-09 02:18:11 +01:00
Matthias Kuhn
295a578e2e Make text translatable 2017-11-01 22:20:17 +01:00
Matthias Kuhn
4c7eb8327b
Fix crash when accessing out of bounds field 2017-10-27 15:15:50 +02:00
Matthias Kuhn
6829a92e79 Merge pull request #5468 from m-kuhn/unobtrusiveConstraints
[FEATURE] Make constraint reporting less obtrusive
2017-10-27 12:47:21 +02:00
Matthias Kuhn
93395950b3 Convert some Q_FOREACHes to for-in 2017-10-26 23:04:32 +02:00
Matthias Kuhn
3eefe0dba9 Make constraint reporting less obtrusive 2017-10-26 23:04:31 +02:00
Matthias Kuhn
869fc604b0
Show comments as tooltips on form
Let's face it, where we need the information is not in the layer
properties configuration, it's when we enter the data.
2017-10-26 20:03:16 +02:00
Blottiere Paul
0dcfd56cdf Rowid column from ogr provider is ignored thanks to a blacklist join option 2017-10-09 05:01:34 +01:00
Nyall Dawson
3e9fa726ed [FEATURE] Flash features in canvas
This adds:
- API call to QgsMapCanvas to flash a set of features
- A right click menu option in the attribute table to flash
the clicked feature
- An option in the Search by Form dialog to flash matching
features

When triggered, the features flash allowing easy identification
without having to alter the current selection or map extent
2017-10-02 09:52:18 +10:00
Nyall Dawson
a87d352bd7 Run clang-tidy modernize-use-default-member-init to move member
initialization to headers (c++11 style)
2017-09-27 05:02:34 +10:00
Matthias Kuhn
a0819053fd
Fix N:M Relations
Fix #17143 (https://issues.qgis.org/issues/17143)
2017-09-15 12:03:14 +02:00
Nyall Dawson
ba64e3e533 Remove redundant initializations
Fixes when a member is initialized both in the header and
source to the same initial value

(via clang-tidy modernize-use-default-member-init fixit)
2017-09-11 17:09:35 +10:00
Nyall Dawson
e7ddfff09d Fix some Coverity null pointer dereference warnings 2017-09-01 07:54:20 +10:00
Nyall Dawson
be5d2979b9 Fix some Clazy detaching container warnings
(not all are valid, but at worst this flips some more
Q_FOREACH uses to c++11 for loops)
2017-08-29 18:04:29 +10:00
Blottiere Paul
19ce33f011 Add a safety guard 2017-08-28 14:09:58 +01:00
Blottiere Paul
500348eec3 Add some const 2017-08-28 14:09:57 +01:00
Blottiere Paul
5c5006c755 Add icons for joins status in attribute form 2017-08-28 14:09:57 +01:00
Blottiere Paul
477775a5d7 [FEATURE] Joined fields are editable if the option is activated 2017-08-28 14:09:55 +01:00
Blottiere Paul
588fe49aee Constraints fail on non existent joined fields 2017-07-24 14:45:46 +01:00
Blottiere Paul
1811a39654 [FEATURE] Constraints are updated on joined fields when dynamic form option is enabled 2017-07-24 14:45:46 +01:00
Matthias Kuhn
632eca6079 Merge pull request #4795 from pblottiere/dynamicform
[FEATURE] Dynamic form for joined fields
2017-07-07 08:22:18 +02:00
Blottiere Paul
e5eda5f889 Add a hint on widgets for non existent joined features 2017-07-06 21:27:37 +02:00
Blottiere Paul
5253aa80e2 Fields of non existent joined features are set to NULL 2017-07-03 19:19:32 +02:00
Harrissou Sant-anna
59e9f79658 ok is spelled OK 2017-07-03 08:49:50 +02:00
Blottiere Paul
3e2d9c5445 Add consistency between ptrs and ref 2017-07-02 16:58:54 +02:00
Blottiere Paul
6a1c141f10 Q_FOREACH use to iterate over fields 2017-06-30 08:22:27 +01:00
Blottiere Paul
c6ffd54170 Joined fields are updated according to the target field name in form 2017-06-30 06:46:22 +01:00
Matthias Kuhn
cb1f98f020 Replace QString::null with QString()
Deprecated sind Qt 5.9
2017-06-16 16:27:45 +02:00
Hugo Mercier
1f22df7813 Fix attribute form python cleanup 2017-05-29 14:25:11 +02:00