Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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)
- Loading branch information
1 parent
e00ea61
commit 383fc05
Showing
8 changed files
with
108 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/*************************************************************************** | ||
qgstexteditsearchwidgetwrapper.cpp | ||
--------------------------------- | ||
Date : 2016-05-23 | ||
Copyright : (C) 2016 Nyall Dawson | ||
Email : nyall dot dawson at gmail dot com | ||
*************************************************************************** | ||
* * | ||
* This program is free software; you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation; either version 2 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
***************************************************************************/ | ||
|
||
#include "qgstexteditsearchwidgetwrapper.h" | ||
|
||
#include "qgsfield.h" | ||
#include "qgsvectorlayer.h" | ||
|
||
QgsTextEditSearchWidgetWrapper::QgsTextEditSearchWidgetWrapper( QgsVectorLayer* vl, int fieldIdx, QWidget* parent ) | ||
: QgsDefaultSearchWidgetWrapper( vl, fieldIdx, parent ) | ||
{ | ||
} | ||
|
||
bool QgsTextEditSearchWidgetWrapper::applyDirectly() | ||
{ | ||
return true; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/*************************************************************************** | ||
qgstexteditsearchwidgetwrapper.h | ||
------------------------------- | ||
Date : 2016-05-23 | ||
Copyright : (C) 2016 Nyall Dawson | ||
Email : nyall dot dawson at gmail dot com | ||
*************************************************************************** | ||
* * | ||
* This program is free software; you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation; either version 2 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
***************************************************************************/ | ||
|
||
#ifndef QGSTEXTEDITSEARCHWIDGETWRAPPER_H | ||
#define QGSTEXTEDITSEARCHWIDGETWRAPPER_H | ||
|
||
#include "qgsdefaultsearchwidgetwrapper.h" | ||
|
||
class QgsTextEditWidgetFactory; | ||
|
||
/** \ingroup gui | ||
* \class QgsTextEditSearchWidgetWrapper | ||
* Wraps a text edit widget for searching. | ||
* \note Added in version 2.16 | ||
* \note not available in Python bindings | ||
*/ | ||
|
||
class GUI_EXPORT QgsTextEditSearchWidgetWrapper : public QgsDefaultSearchWidgetWrapper | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
|
||
/** Constructor for QgsTextEditSearchWidgetWrapper. | ||
* @param vl associated vector layer | ||
* @param fieldIdx index of associated field | ||
* @param parent parent widget | ||
*/ | ||
explicit QgsTextEditSearchWidgetWrapper( QgsVectorLayer* vl, int fieldIdx, QWidget* parent = nullptr ); | ||
|
||
bool applyDirectly() override; | ||
|
||
private: | ||
|
||
friend class QgsTextEditWidgetFactory; | ||
}; | ||
|
||
#endif // QGSTEXTEDITSEARCHWIDGETWRAPPER_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters