Skip to content
Permalink
Browse files

[DB Manager]Allow preset query combobox to expand

  • Loading branch information
DelazJ committed Jan 29, 2018
1 parent a781abe commit eb6d7613d335f3e812fe21277525ab1c53c74099
Showing with 152 additions and 141 deletions.
  1. +152 −141 python/plugins/db_manager/ui/DlgSqlWindow.ui
@@ -6,10 +6,16 @@
<rect>
<x>0</x>
<y>0</y>
<width>626</width>
<width>679</width>
<height>525</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="windowTitle">
<string>SQL window</string>
</property>
@@ -32,131 +38,70 @@
<bool>true</bool>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<item row="0" column="0" colspan="2">
<widget class="QWidget" name="loadAsLayerWidget" native="true">
<layout class="QGridLayout" name="gridLayout_3">
<property name="margin">
<property name="leftMargin">
<number>0</number>
</property>
<item row="2" 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="loadLayerBtn">
<property name="text">
<string>Load now!</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="0" 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
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item row="0" column="3">
<widget class="QPushButton" name="getColumnsBtn">
<property name="text">
<string>Retrieve
columns</string>
</property>
</widget>
</item>
</layout>
</property>
</widget>
</item>
<item row="2" column="1">
<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="1" 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="2" column="3">
<widget class="QPushButton" name="loadLayerBtn">
<property name="text">
<string>Load now!</string>
</property>
</widget>
</item>
<item row="2" column="0">
<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="1" column="0">
<item row="1" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_7">
<item>
<widget class="QLabel" name="label_5">
@@ -217,33 +162,67 @@ 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="0" column="0" colspan="2">
<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>
@@ -286,12 +265,19 @@ columns</string>
<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">
@@ -302,6 +288,12 @@ columns</string>
</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>
@@ -408,9 +400,28 @@ 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>btnCreateView</tabstop>
<tabstop>btnClear</tabstop>
<tabstop>viewResult</tabstop>
<tabstop>loadAsLayerGroup</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>loadLayerBtn</tabstop>
</tabstops>
<resources/>
<connections>

0 comments on commit eb6d761

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