Skip to content

Commit 5e59df4

Browse files
author
timlinux
committedJan 11, 2008
Committed patch from ticket #897 - port pg and attribute search dialogs to qt4
git-svn-id: http://svn.osgeo.org/qgis/trunk@7933 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent a53cc5d commit 5e59df4

File tree

5 files changed

+235
-94
lines changed

5 files changed

+235
-94
lines changed
 

‎src/app/qgspgquerybuilder.cpp

Lines changed: 63 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
***************************************************************************/
1515
/* $Id$ */
1616
#include <iostream>
17-
#include <q3listbox.h>
1817
#include <QMessageBox>
18+
#include <QListView>
1919
#include "qgspgquerybuilder.h"
2020
#include <qgslogger.h>
2121
#include <QRegExp>
@@ -24,6 +24,7 @@ QgsPgQueryBuilder::QgsPgQueryBuilder(QWidget *parent, Qt::WFlags fl)
2424
: QDialog(parent, fl)
2525
{
2626
setupUi(this);
27+
setupListViews();
2728
}
2829
// constructor used when the query builder must make its own
2930
// connection to the database
@@ -32,6 +33,7 @@ QgsPgQueryBuilder::QgsPgQueryBuilder(QgsDataSourceURI *uri,
3233
: QDialog(parent, fl), mUri(uri)
3334
{
3435
setupUi(this);
36+
setupListViews();
3537
// The query builder must make its own connection to the database when
3638
// using this constructor
3739
QString connInfo = mUri->connInfo();
@@ -69,6 +71,7 @@ QgsPgQueryBuilder::QgsPgQueryBuilder(QString tableName, PGconn *con,
6971
: QDialog(parent, fl), mPgConnection(con)
7072
{
7173
setupUi(this);
74+
setupListViews();
7275
mOwnConnection = false; // we don't own this connection since it was passed to us
7376
mUri = new QgsDataSourceURI( "table=" + tableName);
7477
QString datasource = QString(tr("Table <b>%1</b> in database <b>%2</b> on host <b>%3</b>, user <b>%4</b>"))
@@ -133,7 +136,9 @@ void QgsPgQueryBuilder::populateFields()
133136
#endif
134137
QVariant::Type type = QVariant::String; // TODO: should be set correctly [MD]
135138
mFieldMap[fieldName] = QgsField(fieldName, type, fieldType);
136-
lstFields->insertItem(fieldName);
139+
QStandardItem *myItem = new QStandardItem(fieldName);
140+
myItem->setEditable(false);
141+
mModelFields->insertRow(mModelFields->rowCount(),myItem);
137142
}
138143
}
139144
else
@@ -143,21 +148,39 @@ void QgsPgQueryBuilder::populateFields()
143148
PQclear(result);
144149
}
145150

151+
void QgsPgQueryBuilder::setupListViews()
152+
{
153+
//Models
154+
mModelFields = new QStandardItemModel();
155+
mModelValues = new QStandardItemModel();
156+
lstFields->setModel(mModelFields);
157+
lstValues->setModel(mModelValues);
158+
// Modes
159+
lstFields->setViewMode(QListView::ListMode);
160+
lstValues->setViewMode(QListView::ListMode);
161+
lstFields->setSelectionBehavior(QAbstractItemView::SelectRows);
162+
lstValues->setSelectionBehavior(QAbstractItemView::SelectRows);
163+
// Performance tip since Qt 4.1
164+
lstFields->setUniformItemSizes(true);
165+
lstValues->setUniformItemSizes(true);
166+
}
167+
146168
void QgsPgQueryBuilder::on_btnSampleValues_clicked()
147169
{
148-
if (lstFields->currentText().isEmpty())
170+
QString myFieldName = mModelFields->data(lstFields->currentIndex()).toString();
171+
if (myFieldName.isEmpty())
149172
return;
150173

151-
QString sql = "SELECT DISTINCT \"" + lstFields->currentText() + "\" " +
152-
"FROM (SELECT \"" + lstFields->currentText() + "\" " +
174+
QString sql = "SELECT DISTINCT \"" + myFieldName + "\" " +
175+
"FROM (SELECT \"" + myFieldName + "\" " +
153176
"FROM " + mUri->quotedTablename() + " " +
154177
"LIMIT 5000) AS foo " +
155-
"ORDER BY \"" + lstFields->currentText() + "\" "+
178+
"ORDER BY \"" + myFieldName + "\" "+
156179
"LIMIT 25";
157180
// clear the values list
158-
lstValues->clear();
181+
mModelValues->clear();
159182
// determine the field type
160-
QgsField field = mFieldMap[lstFields->currentText()];
183+
QgsField field = mFieldMap[myFieldName];
161184
bool isCharField = field.typeName().find("char") > -1;
162185
PGresult *result = PQexec(mPgConnection, (const char *) (sql.utf8()));
163186

@@ -169,14 +192,12 @@ void QgsPgQueryBuilder::on_btnSampleValues_clicked()
169192
QString value = QString::fromUtf8(PQgetvalue(result, i, 0));
170193
if(isCharField)
171194
{
172-
lstValues->insertItem("'" + value + "'");
173-
}
174-
else
175-
{
176-
lstValues->insertItem(value);
195+
value = "'" + value + "'";
177196
}
197+
QStandardItem *myItem = new QStandardItem(value);
198+
myItem->setEditable(false);
199+
mModelValues->insertRow(mModelValues->rowCount(),myItem);
178200
}
179-
180201
}else
181202
{
182203
QMessageBox::warning(this, tr("Database error"), tr("<p>Failed to get sample of field values using SQL:</p><p>") + sql + "</p><p>Error message was: "+ QString(PQerrorMessage(mPgConnection)) + "</p>");
@@ -187,36 +208,48 @@ void QgsPgQueryBuilder::on_btnSampleValues_clicked()
187208

188209
void QgsPgQueryBuilder::on_btnGetAllValues_clicked()
189210
{
190-
if (lstFields->currentText().isEmpty())
211+
QString myFieldName = mModelFields->data(lstFields->currentIndex()).toString();
212+
if (myFieldName.isEmpty())
191213
return;
192214

193-
QString sql = "select distinct \"" + lstFields->currentText()
194-
+ "\" from " + mUri->quotedTablename() + " order by \"" + lstFields->currentText() + "\"";
215+
QString sql = "select distinct \"" + myFieldName
216+
+ "\" from " + mUri->quotedTablename() + " order by \"" + myFieldName + "\"";
195217
// clear the values list
196-
lstValues->clear();
218+
mModelValues->clear();
197219
// determine the field type
198-
QgsField field = mFieldMap[lstFields->currentText()];
220+
QgsField field = mFieldMap[myFieldName];
199221
bool isCharField = field.typeName().find("char") > -1;
200222

201223
PGresult *result = PQexec(mPgConnection, (const char *) (sql.utf8()));
202224

203225
if (PQresultStatus(result) == PGRES_TUPLES_OK)
204226
{
205227
int rowCount = PQntuples(result);
228+
229+
lstValues->setCursor(Qt::WaitCursor);
230+
// Block for better performance
231+
mModelValues->blockSignals(true);
232+
lstValues->setUpdatesEnabled(false);
233+
206234
for(int i=0; i < rowCount; i++)
207235
{
208236
QString value = QString::fromUtf8(PQgetvalue(result, i, 0));
209-
210237
if(isCharField)
211238
{
212-
lstValues->insertItem("'" + value + "'");
213-
}
214-
else
215-
{
216-
lstValues->insertItem(value);
239+
value = "'" + value + "'";
217240
}
241+
QStandardItem *myItem = new QStandardItem(value);
242+
myItem->setEditable(false);
243+
mModelValues->insertRow(mModelValues->rowCount(),myItem);
218244
}
219-
245+
246+
// Unblock for normal use
247+
mModelValues->blockSignals(false);
248+
lstValues->setUpdatesEnabled(true);
249+
// TODO: already sorted, signal emit to refresh model
250+
mModelValues->sort(0);
251+
lstValues->setCursor(Qt::ArrowCursor);
252+
220253
}else
221254
{
222255
QMessageBox::warning(this, tr("Database error"), tr("Failed to get sample of field values") + QString(PQerrorMessage(mPgConnection)) );
@@ -365,14 +398,14 @@ void QgsPgQueryBuilder::setSql( QString sqlStatement)
365398
txtSQL->setText(sqlStatement);
366399
}
367400

368-
void QgsPgQueryBuilder::on_lstFields_doubleClicked( Q3ListBoxItem *item )
401+
void QgsPgQueryBuilder::on_lstFields_doubleClicked( const QModelIndex &index )
369402
{
370-
txtSQL->insert("\"" + item->text() + "\"");
403+
txtSQL->insert("\"" + mModelFields->data(index).toString() + "\"");
371404
}
372405

373-
void QgsPgQueryBuilder::on_lstValues_doubleClicked( Q3ListBoxItem *item )
406+
void QgsPgQueryBuilder::on_lstValues_doubleClicked( const QModelIndex &index )
374407
{
375-
txtSQL->insert(item->text());
408+
txtSQL->insert(mModelValues->data(index).toString());
376409
}
377410

378411
void QgsPgQueryBuilder::on_btnLessEqual_clicked()

‎src/app/qgspgquerybuilder.h

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ extern "C"
2020
{
2121
#include <libpq-fe.h>
2222
}
23-
23+
#include <QStandardItemModel>
24+
#include <QStandardItem>
25+
#include <QModelIndex>
2426
#include "ui_qgspgquerybuilderbase.h"
2527
#include "qgisgui.h"
2628
#include "qgsfield.h"
@@ -85,8 +87,8 @@ class QgsPgQueryBuilder : public QDialog, private Ui::QgsPgQueryBuilderBase {
8587
void on_btnILike_clicked();
8688
QString sql();
8789
void setSql( QString sqlStatement);
88-
void on_lstFields_doubleClicked( Q3ListBoxItem *item );
89-
void on_lstValues_doubleClicked( Q3ListBoxItem *item );
90+
void on_lstFields_doubleClicked( const QModelIndex &index );
91+
void on_lstValues_doubleClicked( const QModelIndex &index );
9092
void on_btnLessEqual_clicked();
9193
void on_btnGreaterEqual_clicked();
9294
void on_btnNotEqual_clicked();
@@ -118,6 +120,10 @@ class QgsPgQueryBuilder : public QDialog, private Ui::QgsPgQueryBuilderBase {
118120
* Populate the field list for the selected table
119121
*/
120122
void populateFields();
123+
/*!
124+
* Setup models for listviews
125+
*/
126+
void setupListViews();
121127

122128
/*! Get the number of records that would be returned by the current SQL
123129
* @return Number of records or -1 if an error was encountered
@@ -139,6 +145,9 @@ class QgsPgQueryBuilder : public QDialog, private Ui::QgsPgQueryBuilderBase {
139145
QString mPgErrorMessage;
140146
//! Flag to indicate if the class owns the connection to the pg database
141147
bool mOwnConnection;
142-
148+
//! Model for fields ListView
149+
QStandardItemModel *mModelFields;
150+
//! Model for values ListView
151+
QStandardItemModel *mModelValues;
143152
};
144153
#endif //QGSPGQUERYBUILDER_H

‎src/app/qgssearchquerybuilder.cpp

Lines changed: 54 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@
1515
/* $Id$ */
1616

1717
#include <iostream>
18-
#include <q3listbox.h>
18+
#include <QListView>
1919
#include <QMessageBox>
20+
#include <QStandardItem>
2021
#include "qgsfeature.h"
2122
#include "qgsfield.h"
2223
#include "qgssearchquerybuilder.h"
@@ -31,6 +32,7 @@ QgsSearchQueryBuilder::QgsSearchQueryBuilder(QgsVectorLayer* layer,
3132
: QDialog(parent, fl), mLayer(layer)
3233
{
3334
setupUi(this);
35+
setupListViews();
3436

3537
setWindowTitle(tr("Search query builder"));
3638

@@ -53,25 +55,49 @@ QgsSearchQueryBuilder::~QgsSearchQueryBuilder()
5355

5456
void QgsSearchQueryBuilder::populateFields()
5557
{
58+
#ifdef QGISDEBUG
59+
std::cout << "QgsSearchQueryBuilder::populateFields" << std::endl;
60+
#endif
5661
const QgsFieldMap& fields = mLayer->getDataProvider()->fields();
5762
for (QgsFieldMap::const_iterator it = fields.begin(); it != fields.end(); ++it)
5863
{
5964
QString fieldName = it->name();
60-
6165
mFieldMap[fieldName] = it.key();
62-
lstFields->insertItem(fieldName);
66+
QStandardItem *myItem = new QStandardItem(fieldName);
67+
myItem->setEditable(false);
68+
mModelFields->insertRow(mModelFields->rowCount(),myItem);
6369
}
6470
}
6571

72+
void QgsSearchQueryBuilder::setupListViews()
73+
{
74+
#ifdef QGISDEBUG
75+
std::cout << "QgsSearchQueryBuilder::setupListViews" << std::endl;
76+
#endif
77+
//Models
78+
mModelFields = new QStandardItemModel();
79+
mModelValues = new QStandardItemModel();
80+
lstFields->setModel(mModelFields);
81+
lstValues->setModel(mModelValues);
82+
// Modes
83+
lstFields->setViewMode(QListView::ListMode);
84+
lstValues->setViewMode(QListView::ListMode);
85+
lstFields->setSelectionBehavior(QAbstractItemView::SelectRows);
86+
lstValues->setSelectionBehavior(QAbstractItemView::SelectRows);
87+
// Performance tip since Qt 4.1
88+
lstFields->setUniformItemSizes(true);
89+
lstValues->setUniformItemSizes(true);
90+
}
91+
6692
void QgsSearchQueryBuilder::getFieldValues(uint limit)
6793
{
6894
// clear the values list
69-
lstValues->clear();
95+
mModelValues->clear();
7096

7197
QgsVectorDataProvider* provider = mLayer->getDataProvider();
7298

7399
// determine the field type
74-
QString fieldName = lstFields->currentText();
100+
QString fieldName = mModelFields->data(lstFields->currentIndex()).toString();
75101
int fieldIndex = mFieldMap[fieldName];
76102
QgsField field = provider->fields()[fieldIndex];
77103
bool numeric = (field.type() == QVariant::Int || field.type() == QVariant::Double);
@@ -84,8 +110,13 @@ void QgsSearchQueryBuilder::getFieldValues(uint limit)
84110

85111
provider->select(attrs, QgsRect(), false);
86112

113+
lstValues->setCursor(Qt::WaitCursor);
114+
// Block for better performance
115+
mModelValues->blockSignals(true);
116+
lstValues->setUpdatesEnabled(false);
117+
87118
while (provider->getNextFeature(feat) &&
88-
(limit == 0 || lstValues->count() != limit))
119+
(limit == 0 || mModelValues->rowCount() != limit))
89120
{
90121
const QgsAttributeMap& attributes = feat.attributeMap();
91122
value = attributes[fieldIndex].toString();
@@ -97,10 +128,20 @@ void QgsSearchQueryBuilder::getFieldValues(uint limit)
97128
}
98129

99130
// add item only if it's not there already
100-
if (lstValues->findItem(value) == 0)
101-
lstValues->insertItem(value);
102-
131+
QList<QStandardItem *> items = mModelValues->findItems(value);
132+
if (items.isEmpty())
133+
{
134+
QStandardItem *myItem = new QStandardItem(value);
135+
myItem->setEditable(false);
136+
mModelValues->insertRow(mModelValues->rowCount(),myItem);
137+
}
103138
}
139+
// Unblock for normal use
140+
mModelValues->blockSignals(false);
141+
lstValues->setUpdatesEnabled(true);
142+
// TODO: already sorted, signal emit to refresh model
143+
mModelValues->sort(0);
144+
lstValues->setCursor(Qt::ArrowCursor);
104145
}
105146

106147
void QgsSearchQueryBuilder::on_btnSampleValues_clicked()
@@ -245,14 +286,14 @@ void QgsSearchQueryBuilder::setSearchString(QString searchString)
245286
txtSQL->setText(searchString);
246287
}
247288

248-
void QgsSearchQueryBuilder::on_lstFields_doubleClicked( Q3ListBoxItem *item )
289+
void QgsSearchQueryBuilder::on_lstFields_doubleClicked( const QModelIndex &index )
249290
{
250-
txtSQL->insert(item->text());
291+
txtSQL->insert(mModelFields->data(index).toString());
251292
}
252293

253-
void QgsSearchQueryBuilder::on_lstValues_doubleClicked( Q3ListBoxItem *item )
294+
void QgsSearchQueryBuilder::on_lstValues_doubleClicked( const QModelIndex &index )
254295
{
255-
txtSQL->insert(item->text());
296+
txtSQL->insert(mModelValues->data(index).toString());
256297
}
257298

258299
void QgsSearchQueryBuilder::on_btnLessEqual_clicked()

‎src/app/qgssearchquerybuilder.h

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919

2020
#include <map>
2121
#include <vector>
22+
#include <QStandardItemModel>
23+
#include <QModelIndex>
2224

2325
#include "ui_qgspgquerybuilderbase.h"
2426
#include "qgisgui.h"
@@ -59,8 +61,8 @@ class QgsSearchQueryBuilder : public QDialog, private Ui::QgsPgQueryBuilderBase
5961
void on_btnLike_clicked();
6062
void on_btnILike_clicked();
6163

62-
void on_lstFields_doubleClicked( Q3ListBoxItem *item );
63-
void on_lstValues_doubleClicked( Q3ListBoxItem *item );
64+
void on_lstFields_doubleClicked( const QModelIndex &index );
65+
void on_lstValues_doubleClicked( const QModelIndex &index );
6466
void on_btnLessEqual_clicked();
6567
void on_btnGreaterEqual_clicked();
6668
void on_btnNotEqual_clicked();
@@ -93,7 +95,11 @@ class QgsSearchQueryBuilder : public QDialog, private Ui::QgsPgQueryBuilderBase
9395
/*!
9496
* Populate the field list for the selected table
9597
*/
96-
void populateFields();
98+
void populateFields();
99+
/*!
100+
* Setup models for listviews
101+
*/
102+
void setupListViews();
97103

98104
/*! Get the number of records that would be returned by the current SQL
99105
* @return Number of records or -1 if an error was encountered
@@ -109,10 +115,12 @@ class QgsSearchQueryBuilder : public QDialog, private Ui::QgsPgQueryBuilderBase
109115
private:
110116

111117
//! Layer for which is the query builder opened
112-
QgsVectorLayer* mLayer;
113-
118+
QgsVectorLayer* mLayer;
114119
//! Map that holds field information, keyed by field name
115120
QMap<QString, int> mFieldMap;
116-
121+
//! Model for fields ListView
122+
QStandardItemModel *mModelFields;
123+
//! Model for values ListView
124+
QStandardItemModel *mModelValues;
117125
};
118126
#endif //QGSSEARCHQUERYBUILDER_H

‎src/ui/qgspgquerybuilderbase.ui

Lines changed: 91 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@
1212
</rect>
1313
</property>
1414
<property name="sizePolicy" >
15-
<sizepolicy>
16-
<hsizetype>7</hsizetype>
17-
<vsizetype>7</vsizetype>
15+
<sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
1816
<horstretch>0</horstretch>
1917
<verstretch>0</verstretch>
2018
</sizepolicy>
@@ -29,10 +27,22 @@
2927
<bool>true</bool>
3028
</property>
3129
<layout class="QGridLayout" >
32-
<property name="margin" >
30+
<property name="leftMargin" >
3331
<number>9</number>
3432
</property>
35-
<property name="spacing" >
33+
<property name="topMargin" >
34+
<number>9</number>
35+
</property>
36+
<property name="rightMargin" >
37+
<number>9</number>
38+
</property>
39+
<property name="bottomMargin" >
40+
<number>9</number>
41+
</property>
42+
<property name="horizontalSpacing" >
43+
<number>6</number>
44+
</property>
45+
<property name="verticalSpacing" >
3646
<number>6</number>
3747
</property>
3848
<item row="2" column="0" colspan="2" >
@@ -41,10 +51,22 @@
4151
<string>Operators</string>
4252
</property>
4353
<layout class="QGridLayout" >
44-
<property name="margin" >
54+
<property name="leftMargin" >
55+
<number>11</number>
56+
</property>
57+
<property name="topMargin" >
58+
<number>11</number>
59+
</property>
60+
<property name="rightMargin" >
61+
<number>11</number>
62+
</property>
63+
<property name="bottomMargin" >
4564
<number>11</number>
4665
</property>
47-
<property name="spacing" >
66+
<property name="horizontalSpacing" >
67+
<number>10</number>
68+
</property>
69+
<property name="verticalSpacing" >
4870
<number>10</number>
4971
</property>
5072
<item row="0" column="0" >
@@ -150,12 +172,21 @@
150172
</item>
151173
<item row="4" column="0" colspan="2" >
152174
<layout class="QHBoxLayout" >
153-
<property name="margin" >
154-
<number>0</number>
155-
</property>
156175
<property name="spacing" >
157176
<number>6</number>
158177
</property>
178+
<property name="leftMargin" >
179+
<number>0</number>
180+
</property>
181+
<property name="topMargin" >
182+
<number>0</number>
183+
</property>
184+
<property name="rightMargin" >
185+
<number>0</number>
186+
</property>
187+
<property name="bottomMargin" >
188+
<number>0</number>
189+
</property>
159190
<item>
160191
<spacer>
161192
<property name="orientation" >
@@ -230,9 +261,7 @@
230261
<item row="1" column="1" >
231262
<widget class="QGroupBox" name="groupBox2" >
232263
<property name="sizePolicy" >
233-
<sizepolicy>
234-
<hsizetype>7</hsizetype>
235-
<vsizetype>7</vsizetype>
264+
<sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
236265
<horstretch>0</horstretch>
237266
<verstretch>0</verstretch>
238267
</sizepolicy>
@@ -241,29 +270,41 @@
241270
<string>Values</string>
242271
</property>
243272
<layout class="QGridLayout" >
244-
<property name="margin" >
273+
<property name="leftMargin" >
274+
<number>10</number>
275+
</property>
276+
<property name="topMargin" >
277+
<number>10</number>
278+
</property>
279+
<property name="rightMargin" >
245280
<number>10</number>
246281
</property>
247-
<property name="spacing" >
282+
<property name="bottomMargin" >
283+
<number>10</number>
284+
</property>
285+
<property name="horizontalSpacing" >
248286
<number>6</number>
249287
</property>
250-
<item row="1" column="1" >
288+
<property name="verticalSpacing" >
289+
<number>6</number>
290+
</property>
291+
<item row="2" column="1" >
251292
<widget class="QPushButton" name="btnGetAllValues" >
252293
<property name="text" >
253294
<string>All</string>
254295
</property>
255296
</widget>
256297
</item>
257-
<item row="0" column="0" colspan="2" >
258-
<widget class="Q3ListBox" name="lstValues" />
259-
</item>
260-
<item row="1" column="0" >
298+
<item row="2" column="0" >
261299
<widget class="QPushButton" name="btnSampleValues" >
262300
<property name="text" >
263301
<string>Sample</string>
264302
</property>
265303
</widget>
266304
</item>
305+
<item rowspan="2" row="0" column="0" colspan="2" >
306+
<widget class="QListView" name="lstValues" />
307+
</item>
267308
</layout>
268309
</widget>
269310
</item>
@@ -273,14 +314,26 @@
273314
<string>Fields</string>
274315
</property>
275316
<layout class="QGridLayout" >
276-
<property name="margin" >
317+
<property name="leftMargin" >
277318
<number>10</number>
278319
</property>
279-
<property name="spacing" >
320+
<property name="topMargin" >
321+
<number>10</number>
322+
</property>
323+
<property name="rightMargin" >
324+
<number>10</number>
325+
</property>
326+
<property name="bottomMargin" >
327+
<number>10</number>
328+
</property>
329+
<property name="horizontalSpacing" >
330+
<number>6</number>
331+
</property>
332+
<property name="verticalSpacing" >
280333
<number>6</number>
281334
</property>
282335
<item row="0" column="0" >
283-
<widget class="Q3ListBox" name="lstFields" />
336+
<widget class="QListView" name="lstFields" />
284337
</item>
285338
</layout>
286339
</widget>
@@ -304,36 +357,34 @@
304357
<string>SQL where clause</string>
305358
</property>
306359
<layout class="QGridLayout" >
307-
<property name="margin" >
360+
<property name="leftMargin" >
361+
<number>10</number>
362+
</property>
363+
<property name="topMargin" >
308364
<number>10</number>
309365
</property>
310-
<property name="spacing" >
366+
<property name="rightMargin" >
367+
<number>10</number>
368+
</property>
369+
<property name="bottomMargin" >
370+
<number>10</number>
371+
</property>
372+
<property name="horizontalSpacing" >
373+
<number>6</number>
374+
</property>
375+
<property name="verticalSpacing" >
311376
<number>6</number>
312377
</property>
313378
<item row="0" column="0" >
314-
<widget class="Q3TextEdit" name="txtSQL" />
379+
<widget class="QTextEdit" name="txtSQL" />
315380
</item>
316381
</layout>
317382
</widget>
318383
</item>
319384
</layout>
320385
</widget>
321386
<layoutdefault spacing="6" margin="11" />
322-
<customwidgets>
323-
<customwidget>
324-
<class>Q3ListBox</class>
325-
<extends>Q3Frame</extends>
326-
<header>q3listbox.h</header>
327-
</customwidget>
328-
<customwidget>
329-
<class>Q3TextEdit</class>
330-
<extends>Q3Frame</extends>
331-
<header>q3textedit.h</header>
332-
</customwidget>
333-
</customwidgets>
334387
<tabstops>
335-
<tabstop>lstFields</tabstop>
336-
<tabstop>lstValues</tabstop>
337388
<tabstop>btnSampleValues</tabstop>
338389
<tabstop>btnGetAllValues</tabstop>
339390
<tabstop>btnEqual</tabstop>
@@ -350,7 +401,6 @@
350401
<tabstop>btnAnd</tabstop>
351402
<tabstop>btnOr</tabstop>
352403
<tabstop>btnNot</tabstop>
353-
<tabstop>txtSQL</tabstop>
354404
<tabstop>btnClear</tabstop>
355405
<tabstop>btnTest</tabstop>
356406
<tabstop>btnOk</tabstop>

0 commit comments

Comments
 (0)
Please sign in to comment.