@@ -250,36 +250,43 @@ void QgsQueryBuilder::reject()
250
250
void QgsQueryBuilder::on_btnEqual_clicked ()
251
251
{
252
252
txtSQL->insertPlainText ( " = " );
253
+ txtSQL->setFocus ();
253
254
}
254
255
255
256
void QgsQueryBuilder::on_btnLessThan_clicked ()
256
257
{
257
258
txtSQL->insertPlainText ( " < " );
259
+ txtSQL->setFocus ();
258
260
}
259
261
260
262
void QgsQueryBuilder::on_btnGreaterThan_clicked ()
261
263
{
262
264
txtSQL->insertPlainText ( " > " );
265
+ txtSQL->setFocus ();
263
266
}
264
267
265
268
void QgsQueryBuilder::on_btnPct_clicked ()
266
269
{
267
270
txtSQL->insertPlainText ( " %" );
271
+ txtSQL->setFocus ();
268
272
}
269
273
270
274
void QgsQueryBuilder::on_btnIn_clicked ()
271
275
{
272
276
txtSQL->insertPlainText ( " IN " );
277
+ txtSQL->setFocus ();
273
278
}
274
279
275
280
void QgsQueryBuilder::on_btnNotIn_clicked ()
276
281
{
277
282
txtSQL->insertPlainText ( " NOT IN " );
283
+ txtSQL->setFocus ();
278
284
}
279
285
280
286
void QgsQueryBuilder::on_btnLike_clicked ()
281
287
{
282
288
txtSQL->insertPlainText ( " LIKE " );
289
+ txtSQL->setFocus ();
283
290
}
284
291
285
292
QString QgsQueryBuilder::sql ()
@@ -308,6 +315,7 @@ void QgsQueryBuilder::on_lstFields_clicked( const QModelIndex &index )
308
315
void QgsQueryBuilder::on_lstFields_doubleClicked ( const QModelIndex &index )
309
316
{
310
317
txtSQL->insertPlainText ( " \" " + mLayer ->pendingFields ()[ mModelFields ->data ( index , Qt::UserRole+1 ).toInt ()].name () + " \" " );
318
+ txtSQL->setFocus ();
311
319
}
312
320
313
321
void QgsQueryBuilder::on_lstValues_doubleClicked ( const QModelIndex &index )
@@ -321,36 +329,44 @@ void QgsQueryBuilder::on_lstValues_doubleClicked( const QModelIndex &index )
321
329
txtSQL->insertPlainText ( value.toString () );
322
330
else
323
331
txtSQL->insertPlainText ( " '" + value.toString ().replace ( " '" , " ''" ) + " '" );
332
+
333
+ txtSQL->setFocus ();
324
334
}
325
335
326
336
void QgsQueryBuilder::on_btnLessEqual_clicked ()
327
337
{
328
338
txtSQL->insertPlainText ( " <= " );
339
+ txtSQL->setFocus ();
329
340
}
330
341
331
342
void QgsQueryBuilder::on_btnGreaterEqual_clicked ()
332
343
{
333
344
txtSQL->insertPlainText ( " >= " );
345
+ txtSQL->setFocus ();
334
346
}
335
347
336
348
void QgsQueryBuilder::on_btnNotEqual_clicked ()
337
349
{
338
350
txtSQL->insertPlainText ( " != " );
351
+ txtSQL->setFocus ();
339
352
}
340
353
341
354
void QgsQueryBuilder::on_btnAnd_clicked ()
342
355
{
343
356
txtSQL->insertPlainText ( " AND " );
357
+ txtSQL->setFocus ();
344
358
}
345
359
346
360
void QgsQueryBuilder::on_btnNot_clicked ()
347
361
{
348
362
txtSQL->insertPlainText ( " NOT " );
363
+ txtSQL->setFocus ();
349
364
}
350
365
351
366
void QgsQueryBuilder::on_btnOr_clicked ()
352
367
{
353
368
txtSQL->insertPlainText ( " OR " );
369
+ txtSQL->setFocus ();
354
370
}
355
371
356
372
void QgsQueryBuilder::clear ()
@@ -363,6 +379,7 @@ void QgsQueryBuilder::clear()
363
379
void QgsQueryBuilder::on_btnILike_clicked ()
364
380
{
365
381
txtSQL->insertPlainText ( " ILIKE " );
382
+ txtSQL->setFocus ();
366
383
}
367
384
368
385
void QgsQueryBuilder::setDatasourceDescription ( QString uri )
0 commit comments