125 Commits

Author SHA1 Message Date
Denis Rouzaud
d8cc285fd2 fix NULL constraint on date/time widget with allow NULL
the issue was that widget wrapper was using parent QDateTimeEdit::dateTimeChanged signal. It was connected both internally to QgsDateTimeEdit::changed and in the form to detect changes. When QgsAttributeForm was recreating the updated feature it was calling QgsDateTimeEdit::value() before changed() could update the value (i.e. setting mIsNull to false).

fix #17790
2018-01-04 20:38:51 -04:00
Denis Rouzaud
230e91c44b [date time widget] do not use minimumDateTime for NULL values
fixes issue when setting min and max values for the widget
2018-01-02 20:41:24 -04:00
Denis Rouzaud
39b183fef4 remove include and forward declarations left-overs 2018-01-01 20:09:46 -04:00
Denis Rouzaud
7237dab6ec [QDateTimeEdit] use QLineEdit::addAction
instead of custom tool button
this seems to solve many issues :)
kudos to @nyalldawson for pointing to it
and a happy new year!
2018-01-01 20:09:46 -04:00
Denis Rouzaud
86feed4955 [QgsDateTimeEdit] use special value text to handle NULL values
the widget now uses a special value text to display NULL rather than painting a QLineEdit on top

a press on the spinbox buttons (non-calendar mode) is catch to set to current date to avoid starting at the minimum date
2018-01-01 20:09:46 -04:00
Denis Rouzaud
90e5196996 run sipify 2017-12-19 14:55:46 -04:00
Denis Rouzaud
c604d2dda6 run sipify 2017-12-15 22:13:44 -04:00
Nyall Dawson
4da1ce8404 Drop redundant virtual keywords on overrides
Run clang-tidy modernize-use-override to remove all the redundant
virtual keywords from overridden methods, and add some missing
overrides.

Another benefit is that this has also added the overrides
on destructors, which will cause a build failure if a base
class is missing a virtual destructor.
2017-12-16 08:49:36 +10:00
Denis Rouzaud
f2b3ed0a9b run sipify 2017-12-15 11:12:19 -04:00
Nyall Dawson
a15b54d997 Swap missing 0->nullptr and add missing overrides 2017-12-12 21:14:58 +11:00
Denis Rouzaud
e48cf98edb run sipify 2017-12-06 07:19:50 -04:00
Matthias Kuhn
81b475d21c Adjust version number 2017-11-21 08:32:53 +01:00
Matthias Kuhn
ddca8b6550 SipConvertToSubClass code for QgsSearchWidgetToolButton 2017-11-20 20:31:39 +01:00
Matthias Kuhn
f084fc0ac0 API documentation all over 2017-11-20 20:31:38 +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
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
Matthias Kuhn
5d2c39bbfb Add doxymentation 2017-11-01 22:20:17 +01:00
Matthias Kuhn
c3e2adce83 Const fixes for QgsSearchWidgetWrapper 2017-11-01 22:20:17 +01:00
Denis Rouzaud
6e14854f90 [sipify] remove redundant private sections 2017-10-09 09:51:40 +02:00
Nyall Dawson
49b426d951 Make doxygen_space script convert multiline //! comments
Because:
- the /** format is much more prevalent throughout QGIS
- sipify works correctly with /**
2017-10-06 07:55:52 +10:00
Matthias Kuhn
8efa9fa815 [FEATURE] Add "starts with" and "ends with" to multi attribute search 2017-09-05 14:15:38 +02:00
Hugo Mercier
d19b4aa2bf Merge pull request #4905 from pblottiere/bugfix_scrolllocked
Fixes value relation widget to keep scrollbar activated, fixes #16654
2017-07-26 10:52:55 +02:00
Blottiere Paul
0dca126c55 Update sip binding 2017-07-24 14:45:46 +01:00
Blottiere Paul
e6eeacf7fa Update sip binding 2017-07-21 16:58:18 +01:00
Matthias Kuhn
e2c84f1a50 Merge pull request #4669 from nyalldawson/spinbox_ctrl
When holding ctrl while mouse wheeling on spin box, increase in smaller amounts
2017-07-08 10:37:00 +02: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
Harrissou Sant-anna
35cbfa0087 Replace check box by checkbox 2017-07-02 23:25:40 +02:00
Denis Rouzaud
54c6291378 script to write include SIP files 2017-06-28 10:45:51 +02:00
Nyall Dawson
df9344e344 When holding ctrl while mouse wheeling on spin box, increase
in smaller amounts

Default Qt behavior is to increase step size 10x when ctrl
is held while mouse wheel - but everywhere else in QGIS
UI we use the ctrl modifier as a "finer" increment with
the mouse wheel (e.g. ctrl+wheel = fine zoom into map/composer).

So override Qt's behavior and instead make ctrl modifier result
in 1/10th usual increment for spin boxes.
2017-06-02 09:02:11 +10: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