37 Commits

Author SHA1 Message Date
Nyall Dawson
8e9bb6d2f9 Put search icon on left of QgsFilterLineEdit 2018-02-05 03:39:11 -09:00
Denis Rouzaud
279785302d fix QAction constr call 2018-01-16 10:22:20 -04:00
Denis Rouzaud
9bf943a777 [QgsFilterLineEdit] use QLineEdit::addAction instead of hacking paintEvent
this gets much more simple
2018-01-16 10:22:20 -04:00
Nyall Dawson
60a56c372a Fix slightly oversized filter clear icons
And make sure on low-dpi screens the icon size is 16px for
pixel-snapped rendering of the svg
2017-11-27 10:16:47 +10:00
Alessandro Pasotti
a7ffde6c95 [ui][bugfix] lineedit add margin for X icon
Fixes #17262

Needs backporting
2017-11-23 09:54:59 +01:00
Alessandro Pasotti
fe933d2de3 [ui][hidpi] Form line edit: compute icon size instead of hardcoding 2017-11-23 09:45:03 +01:00
Matthias Kuhn
7ec35e0859
Add a selectOnFocus property to QgsFilterLineEdit 2017-10-26 16:29:46 +02:00
Matthias Kuhn
435fab1169 Remove unrequired include 2017-10-25 01:18:00 +02:00
Matthias Kuhn
e9d6e38796 Add a spinner icon to QgsFilterLineEdit 2017-10-25 00:45:54 +02: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
cb1f98f020 Replace QString::null with QString()
Deprecated sind Qt 5.9
2017-06-16 16:27:45 +02:00
Nyall Dawson
ae59e35dac Complete daily allocation of Qt5 connect transitions 2017-04-04 09:40:25 +10:00
Denis Rouzaud
e7079eead9 run astyle on src/gui 2017-03-03 09:09:37 +01:00
Denis Rouzaud
f3102bbf8f option to show a search icon in QgsFilterLineEdit 2017-02-11 22:36:20 +01:00
Nyall Dawson
21f885aa7a Select all text after reset line edit to null 2016-11-02 11:07:07 +10: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
Nyall Dawson
59583e97de Fix constant background CPU usage 2016-09-17 13:31:53 +10:00
Nyall Dawson
228ff23d81 Fix cursor not always reset when clearing widget 2016-09-08 21:48:25 +10:00
Nyall Dawson
d959384c8b Allow hiding clear button in QgsFilterLineEdit 2016-09-08 21:48:25 +10:00
Nyall Dawson
d71453d84a Add ability to set default values for QgsFilterLineEdit
and have clearing the widget reset to default rather than
null
2016-09-08 21:48:25 +10:00
Nyall Dawson
edcc247c3e Add unit tests for QgsFilterLineEdit, improve docs, add clearValue slot 2016-09-08 21:48:25 +10:00
Nyall Dawson
0f5f09401e Remove min size from QgsFilterLineEdit
Now the widget gracefully handles shrinking
2016-09-08 21:48:25 +10:00
Nyall Dawson
98f25f59e7 Rework QgsFilterLineEdit handling of clear button
Don't use a child button but instead paint the icon when
required. Improves interaction with the widget/clear
button.
2016-09-06 16:45:32 +10:00
Nyall Dawson
c49b5b777f Change a lot of arguments to const references in core/gui
Rationale:
- there was a lot of large objects passed by value, so potentially
there's a speed bump from this
- even for implicitly shared classes like QString/QList there's still
a (small) cost for copying the objects when there's no reason to
- it's the right thing to do!
2015-10-07 12:02:04 +11:00
Denis Rouzaud
9e3183c63f Revert "sort includes"
This reverts commit 2b7d3d3c73b50ba6dc74abec6dd652ff1b87c0ec.
2015-06-10 14:54:47 +02:00
Denis Rouzaud
2b7d3d3c73 sort includes 2015-06-10 13:59:08 +02:00
Matthias Kuhn
f3cf09f4ec Fix selection after focus-in by mouse in QgsFilterLineEdit
After focusing a QgsFilterLineEdit with the mouse, the end of the selection was
"attached" to the end of the content.
This was caused by overwriting Qt's mousePressEvent, that is responsible for
handling the selection without handing back the responsibility after the focus
in event was finished.

Fix #11373
2014-10-13 10:31:22 +02:00
Denis Rouzaud
1f8584c77b setReadOnly will call paintEvent, followup ce486da41ea29f54406934d366c1bf00a205278d 2014-09-24 08:54:50 +02:00
Denis Rouzaud
ce486da41e line edit: do not display clear icon when read only 2014-09-24 08:30:30 +02:00
Matthias Kuhn
72a33ea78f QgsFilterLineEdit: Hide clear button when read only 2014-09-23 09:28:34 +02:00
Matthias Kuhn
b1474c828c Add better Null support to QgsFilterLineEdit 2014-09-22 18:22:26 +02:00
Andreas Neumann
7990ec48ce replace brush icon for clearing fields with more abstract icon 2013-04-13 17:27:07 +02:00
Juergen E. Fischer
ef008138f7 fix #7499 2013-04-04 00:58:55 +02:00
Juergen E. Fischer
7e598f7fa4 hide clear button in filter line edit, when widget is disabled 2013-03-14 22:28:34 +01:00
Juergen E. Fischer
2c4ac0807b [FEATURE] attribute editing extension
- allow resetting of fields to NULL by button
- use user defined date formats in forms, identify results and attribute table
- add support for date type in postgres provider
2013-03-13 23:35:07 +01:00
Etienne Tourigny
dbe54d080b browser dock filter: use QgsFilterLineEdit, ui and code cleanup ; add QgsFilterLineEdit::cleared() signal 2012-11-03 19:19:15 -02:00
Alexander Bruy
8694cb8cd5 [FEATURE] add lineedit with builtin clear button 2012-11-02 19:13:31 +02:00