Skip to content
Permalink
Browse files
[UX] improve searching UX when filtering DB tables
  • Loading branch information
3nids committed Nov 9, 2021
1 parent 90f9541 commit e8ae3b5df8715a14221fe4901de395e72b5ac784
Showing with 84 additions and 215 deletions.
  1. +84 −215 src/ui/qgsdbsourceselectbase.ui
@@ -24,6 +24,79 @@
<bool>true</bool>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="7" column="0">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="standardButtons">
<set>QDialogButtonBox::Help</set>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QTreeView" name="mTablesTreeView">
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
</property>
<property name="alternatingRowColors">
<bool>true</bool>
</property>
<property name="selectionMode">
<enum>QAbstractItemView::ExtendedSelection</enum>
</property>
</widget>
</item>
<item row="5" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QToolButton" name="mSearchSettingsButton">
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset resource="../../images/images.qrc">
<normaloff>:/images/themes/default/propertyicons/settings.svg</normaloff>:/images/themes/default/propertyicons/settings.svg</iconset>
</property>
<property name="popupMode">
<enum>QToolButton::MenuButtonPopup</enum>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QgsFilterLineEdit" name="mSearchTableEdit">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
<property name="showSearchIcon" stdset="0">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item row="0" column="0">
<widget class="QGroupBox" name="connectionsGroupBox">
<property name="title">
@@ -110,20 +183,7 @@
</layout>
</widget>
</item>
<item row="1" column="0">
<widget class="QTreeView" name="mTablesTreeView">
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
</property>
<property name="alternatingRowColors">
<bool>true</bool>
</property>
<property name="selectionMode">
<enum>QAbstractItemView::ExtendedSelection</enum>
</property>
</widget>
</item>
<item row="2" column="0">
<item row="6" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QCheckBox" name="cbxAllowGeometrylessTables">
@@ -154,109 +214,16 @@
</item>
</layout>
</item>
<item row="3" column="0">
<widget class="QGroupBox" name="mSearchGroupBox">
<property name="title">
<string>Search options</string>
</property>
<property name="flat">
<bool>true</bool>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
<layout class="QGridLayout">
<property name="leftMargin">
<number>9</number>
</property>
<property name="topMargin">
<number>9</number>
</property>
<property name="rightMargin">
<number>9</number>
</property>
<property name="bottomMargin">
<number>9</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="mSearchLabel">
<property name="enabled">
<bool>true</bool>
</property>
<property name="text">
<string>Search</string>
</property>
<property name="buddy">
<cstring>mSearchTableEdit</cstring>
</property>
</widget>
</item>
<item row="2" column="0" colspan="2">
<widget class="QLabel" name="mSearchModeLabel">
<property name="enabled">
<bool>true</bool>
</property>
<property name="text">
<string>Search mode</string>
</property>
<property name="buddy">
<cstring>mSearchModeComboBox</cstring>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QComboBox" name="mSearchModeComboBox">
<property name="enabled">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0" colspan="2">
<widget class="QLabel" name="mSearchColumnsLabel">
<property name="enabled">
<bool>true</bool>
</property>
<property name="text">
<string>Search in columns</string>
</property>
<property name="buddy">
<cstring>mSearchColumnComboBox</cstring>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QComboBox" name="mSearchColumnComboBox">
<property name="enabled">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="1" colspan="2">
<widget class="QLineEdit" name="mSearchTableEdit">
<property name="enabled">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="4" column="0">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="standardButtons">
<set>QDialogButtonBox::Help</set>
</property>
</widget>
</item>
</layout>
</widget>
<layoutdefault spacing="6" margin="11"/>
<customwidgets>
<customwidget>
<class>QgsFilterLineEdit</class>
<extends>QLineEdit</extends>
<header>qgsfilterlineedit.h</header>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>cmbConnections</tabstop>
<tabstop>btnConnect</tabstop>
@@ -268,13 +235,11 @@
<tabstop>mTablesTreeView</tabstop>
<tabstop>cbxAllowGeometrylessTables</tabstop>
<tabstop>mHoldDialogOpen</tabstop>
<tabstop>mSearchGroupBox</tabstop>
<tabstop>mSearchTableEdit</tabstop>
<tabstop>mSearchColumnComboBox</tabstop>
<tabstop>mSearchModeComboBox</tabstop>
<tabstop>buttonBox</tabstop>
</tabstops>
<resources/>
<resources>
<include location="../../images/images.qrc"/>
</resources>
<connections>
<connection>
<sender>buttonBox</sender>
@@ -292,101 +257,5 @@
</hint>
</hints>
</connection>
<connection>
<sender>mSearchGroupBox</sender>
<signal>toggled(bool)</signal>
<receiver>mSearchTableEdit</receiver>
<slot>setVisible(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>94</x>
<y>437</y>
</hint>
<hint type="destinationlabel">
<x>177</x>
<y>360</y>
</hint>
</hints>
</connection>
<connection>
<sender>mSearchGroupBox</sender>
<signal>toggled(bool)</signal>
<receiver>mSearchColumnComboBox</receiver>
<slot>setVisible(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>97</x>
<y>437</y>
</hint>
<hint type="destinationlabel">
<x>343</x>
<y>402</y>
</hint>
</hints>
</connection>
<connection>
<sender>mSearchGroupBox</sender>
<signal>toggled(bool)</signal>
<receiver>mSearchModeComboBox</receiver>
<slot>setVisible(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>115</x>
<y>437</y>
</hint>
<hint type="destinationlabel">
<x>281</x>
<y>410</y>
</hint>
</hints>
</connection>
<connection>
<sender>mSearchGroupBox</sender>
<signal>toggled(bool)</signal>
<receiver>mSearchLabel</receiver>
<slot>setVisible(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>133</x>
<y>437</y>
</hint>
<hint type="destinationlabel">
<x>58</x>
<y>360</y>
</hint>
</hints>
</connection>
<connection>
<sender>mSearchGroupBox</sender>
<signal>toggled(bool)</signal>
<receiver>mSearchColumnsLabel</receiver>
<slot>setVisible(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>51</x>
<y>437</y>
</hint>
<hint type="destinationlabel">
<x>57</x>
<y>402</y>
</hint>
</hints>
</connection>
<connection>
<sender>mSearchGroupBox</sender>
<signal>toggled(bool)</signal>
<receiver>mSearchModeLabel</receiver>
<slot>setVisible(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>82</x>
<y>437</y>
</hint>
<hint type="destinationlabel">
<x>68</x>
<y>411</y>
</hint>
</hints>
</connection>
</connections>
</ui>

0 comments on commit e8ae3b5

Please sign in to comment.