Skip to content
Permalink
Browse files

[DB Manager]Allow preset query combobox to expand

  • Loading branch information
DelazJ committed Jan 29, 2018
1 parent e8f077f commit a781abe50196d0991775aab4d5e10ac1302fc660
Showing with 143 additions and 140 deletions.
  1. +143 −140 python/plugins/db_manager/ui/DlgSqlLayerWindow.ui
@@ -14,41 +14,55 @@
<string>SQL window</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="1" column="3">
<widget class="QPushButton" name="getColumnsBtn">
<property name="text">
<string>Retrieve
columns</string>
</property>
</widget>
</item>
<item row="3" column="3">
<widget class="QPushButton" name="updateLayerBtn">
<property name="text">
<string>Update</string>
</property>
</widget>
</item>
<item row="2" column="3">
<widget class="QPushButton" name="btnSetFilter">
<property name="text">
<string>Set filter</string>
</property>
<property name="autoDefault">
<bool>false</bool>
</property>
</widget>
</item>
<item row="3" column="2">
<spacer name="horizontalSpacer_2">
<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 row="3" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QCheckBox" name="avoidSelectById">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Avoid selecting feature by id. Sometimes - especially when running expensive queries/views - fetching the data sequentially instead of fetching features by id can be much quicker.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Avoid selecting by feature id</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<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="QPushButton" name="updateLayerBtn">
<property name="text">
<string>Update</string>
</property>
</widget>
</item>
</layout>
<widget class="QCheckBox" name="avoidSelectById">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Avoid selecting feature by id. Sometimes - especially when running expensive queries/views - fetching the data sequentially instead of fetching features by id can be much quicker.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Avoid selecting by feature id</string>
</property>
</widget>
</item>
<item row="0" column="0">
<item row="0" column="0" colspan="4">
<widget class="QSplitter" name="splitter">
<property name="orientation">
<enum>Qt::Vertical</enum>
@@ -80,12 +94,19 @@
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>Saved query:</string>
<string>Saved query</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="presetCombo"/>
<widget class="QComboBox" name="presetCombo">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_2">
@@ -96,6 +117,12 @@
</item>
<item>
<widget class="QLineEdit" name="presetName">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string notr="true"/>
</property>
@@ -185,91 +212,7 @@
</widget>
</widget>
</item>
<item row="1" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_6">
<item>
<widget class="QCheckBox" name="uniqueColumnCheck">
<property name="text">
<string>Column(s) with
unique values</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="uniqueCombo">
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="editable">
<bool>true</bool>
</property>
<property name="insertPolicy">
<enum>QComboBox::NoInsert</enum>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="hasGeometryCol">
<property name="text">
<string>Geometry column</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
<property name="tristate">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="geomCombo">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="editable">
<bool>true</bool>
</property>
<property name="insertPolicy">
<enum>QComboBox::NoInsert</enum>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_5">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="getColumnsBtn">
<property name="text">
<string>Retrieve
columns</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="2" column="0">
<item row="2" column="0" colspan="3">
<layout class="QHBoxLayout" name="horizontalLayout_7">
<item>
<widget class="QLabel" name="label_5">
@@ -294,7 +237,16 @@ columns</string>
<item>
<widget class="QWidget" name="layerTypeWidget" native="true">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="margin">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
@@ -324,35 +276,69 @@ columns</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_6">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
</layout>
</item>
<item row="1" column="0" colspan="3">
<layout class="QHBoxLayout" name="horizontalLayout_6">
<item>
<widget class="QPushButton" name="btnSetFilter">
<widget class="QCheckBox" name="uniqueColumnCheck">
<property name="text">
<string>Set filter</string>
<string>Column(s) with
unique values</string>
</property>
<property name="autoDefault">
</widget>
</item>
<item>
<widget class="QComboBox" name="uniqueCombo">
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="editable">
<bool>true</bool>
</property>
<property name="insertPolicy">
<enum>QComboBox::NoInsert</enum>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="hasGeometryCol">
<property name="text">
<string>Geometry column</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
<property name="tristate">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="geomCombo">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="editable">
<bool>true</bool>
</property>
<property name="insertPolicy">
<enum>QComboBox::NoInsert</enum>
</property>
</widget>
</item>
</layout>
</item>
</layout>
@@ -365,9 +351,26 @@ columns</string>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>queryBuilderBtn</tabstop>
<tabstop>presetCombo</tabstop>
<tabstop>presetName</tabstop>
<tabstop>presetStore</tabstop>
<tabstop>presetDelete</tabstop>
<tabstop>editSql</tabstop>
<tabstop>btnExecute</tabstop>
<tabstop>btnClear</tabstop>
<tabstop>viewResult</tabstop>
<tabstop>uniqueColumnCheck</tabstop>
<tabstop>uniqueCombo</tabstop>
<tabstop>hasGeometryCol</tabstop>
<tabstop>geomCombo</tabstop>
<tabstop>getColumnsBtn</tabstop>
<tabstop>layerNameEdit</tabstop>
<tabstop>vectorRadio</tabstop>
<tabstop>rasterRadio</tabstop>
<tabstop>btnSetFilter</tabstop>
<tabstop>avoidSelectById</tabstop>
<tabstop>updateLayerBtn</tabstop>
</tabstops>
<resources/>
<connections>

0 comments on commit a781abe

Please sign in to comment.
You can’t perform that action at this time.