32 Commits

Author SHA1 Message Date
Matthias Kuhn
c3e2adce83 Const fixes for QgsSearchWidgetWrapper 2017-11-01 22:20:17 +01: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
Matthias Kuhn
8efa9fa815 [FEATURE] Add "starts with" and "ends with" to multi attribute search 2017-09-05 14:15:38 +02:00
Nyall Dawson
78685e1a49 Qt5 style connects 2017-03-30 11:11:28 +10:00
Juergen E. Fischer
a10c890383 More QgsSettings updates:
* revives WMS
* QgsSettings::clear() added
* section added to QgsSettings::contains()
* type parameter added to sip binding of QgsSettings.value()
* TODO: customization & evis
2017-03-04 02:37:59 +01:00
Denis Rouzaud
e7079eead9 run astyle on src/gui 2017-03-03 09:09:37 +01:00
Matthias Kuhn
45f4a3e8b7 Automatically set focus on the line edit for attribute table filters
Because the obvious action after selecting a search field is to start
typing and not to click on the line edit with the mouse.
2017-01-20 10:41:42 +01:00
nirvn
f3d618a6ed Add between/not between to numerical fields in select by form 2016-12-27 16:20:06 +07: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
Matthias Kuhn
f4bc53695e Manage null representation value in QgsApplication::nullRepresentation() 2016-12-20 01:20:08 +01:00
Nyall Dawson
4166a3ea62 Fix most clazy qstring-unneeded-heap-allocations warnings
By flipping string literals to QStringLiteral/QLatin1String

see

https://woboq.com/blog/qstringliteral.html
2016-10-24 15:26:24 +10:00
Matthias Kuhn
b6779f63ff Rename QgsFields::fieldNameIndex() to lookupField()
To have two clearly different names for tolerant/intolerant index lookup
2016-10-01 15:39:03 +02:00
Nyall Dawson
6ef22eec6e Only show 'case sensitive' checkbox for string fields 2016-05-24 00:26:15 +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
383fc055ba Don't automatically turn column filter to extended filter
Now fields using text edit widgets will keep the column filter
as the entered text.

Additionally, the extended filter has been improved to always
take the initial filter from the current filter, even if it's
not an extended filter.

(fix #12422)
2016-05-24 00:26:15 +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
576875e998 Followup 320c696 use clang-modernize to replace 0/NULL use with nullptr 2015-12-15 11:24:51 +11:00
Matthias Kuhn
182dd8a369 Constification 2015-11-20 15:31:57 +01:00
Denis Rouzaud
7f556fd99d QgsValueRelationSearchW inherits QgsSearchW
and not QgsDefaultSearchW
also handles properly the (no selection) case
2015-11-13 09:01:18 +01:00
Nyall Dawson
b7e1cae4f0 Switch double quoted single character to single quotes for some
QString methods

Using single quotes is a significant performance boost. Rough
benchmarks indicate the QString single quote methods take
about 15% of the time the double quote variants take.
2015-11-02 17:55:08 +11:00
Nyall Dawson
1969e09b6f Also avoid detaching QgsFields and QgsAttributes where possible 2015-10-20 20:36:08 +11:00
Salvatore Larosa
c7e732b2c7 [widget editor][fix #13486] follow up #2316 and 5ac5217 2015-10-15 14:48:43 +02:00
Nyall Dawson
5ed3d1b73f Use QString::arg multi argument method to avoid extra heap allocations 2015-10-15 17:51:06 +11:00
Matthias Kuhn
5ac52173f9 Fix apply search filter from attribute table and minor fixes 2015-09-17 09:25:40 +02:00
Matthias Kuhn
4897cdf5ed Always emits the expression from the search widget when it changes 2015-09-16 22:11:54 +02:00
Matthias Kuhn
015622e98d Revert "followup 9acfe52: better way to emit the signal"
This reverts commit c823bcd63af18031e376a8e2db818b5fd9878ed8.
2015-09-16 22:10:35 +02:00
Salvatore Larosa
c823bcd63a followup 9acfe52: better way to emit the signal 2015-09-16 17:50:07 +02:00
Salvatore Larosa
9acfe52f82 [widget editor] enable returnPressed signal for the search widget 2015-09-16 17:37:38 +02:00
Matthias Kuhn
e832b2a28a Add QgsVectorLayer::fields() as alias to pendingFields()
pendingFields() is not very intuitive and leads to confusion for new developers.
2015-08-04 15:13:31 +02:00
Matthias Kuhn
de547adc19 Find a suitable editor widget if widget and config mismatch
If a .ui file is specified and the widget specified in the .ui file is not
supported by the widgetwrapper which is configured in the layer properties
the system will automatically try to find a better suitable widgetwrapper.

To do this, widgetwrappers (respectively their factories) can return a map of
supported widget types with priority values.
The widgetwrapper which offers the heighest priority for a certain widget type
will be used in case of a mismatch.

Sponsored by OPENGIS.ch special projects team (aka gis.se troubleshooting
section)
2015-07-23 12:04:18 +02:00
carolinux
b6ae2e7d1e Fixes for search widgets 2015-06-28 11:19:02 +02:00
carolinux
eff1357e2b New design compiles but does nothing 2015-06-26 15:13:42 +02:00