[QGIS Commit] r15137 - trunk/qgis/src/plugins/spatialquery

svn_qgis at osgeo.org svn_qgis at osgeo.org
Tue Feb 8 02:17:13 EST 2011


Author: timlinux
Date: 2011-02-07 23:17:12 -0800 (Mon, 07 Feb 2011)
New Revision: 15137

Added:
   trunk/qgis/src/plugins/spatialquery/selectall.png
Modified:
   trunk/qgis/src/plugins/spatialquery/qgsspatialquery.cpp
   trunk/qgis/src/plugins/spatialquery/qgsspatialquery.h
   trunk/qgis/src/plugins/spatialquery/qgsspatialquerydialog.cpp
   trunk/qgis/src/plugins/spatialquery/qgsspatialquerydialog.h
   trunk/qgis/src/plugins/spatialquery/qgsspatialquerydialogbase.qrc
   trunk/qgis/src/plugins/spatialquery/qgsspatialquerydialogbase.ui
Log:
Improvements to spatial select plugin from Luiz Motta (#2634)

Modified: trunk/qgis/src/plugins/spatialquery/qgsspatialquery.cpp
===================================================================
--- trunk/qgis/src/plugins/spatialquery/qgsspatialquery.cpp	2011-02-08 04:05:06 UTC (rev 15136)
+++ trunk/qgis/src/plugins/spatialquery/qgsspatialquery.cpp	2011-02-08 07:17:12 UTC (rev 15137)
@@ -15,7 +15,7 @@
  *   (at your option) any later version.                                   *
  *                                                                         *
  ***************************************************************************/
-/*  $Id$ */
+/*  $Id: qgsspatialquery.cpp 13447 2010-05-09 00:45:17Z jef $ */
 
 #include <QMessageBox>
 
@@ -50,7 +50,8 @@
 
 } // void QgsSpatialQuery::setSelectedFeaturesReference(bool useSelected)
 
-void QgsSpatialQuery::runQuery( QSet<int> & qsetIndexResult, int relation, QgsVectorLayer* lyrTarget, QgsVectorLayer* lyrReference )
+void QgsSpatialQuery::runQuery( QSet<int> & qsetIndexResult, QSet<int> & qsetIndexInvalidTarget, QSet<int> & qsetIndexInvalidReference,
+                                int relation, QgsVectorLayer* lyrTarget, QgsVectorLayer* lyrReference )
 {
   setQuery( lyrTarget, lyrReference );
 
@@ -60,7 +61,7 @@
                   ? mLayerReference->selectedFeatureCount()
                   : ( int )( mLayerReference->featureCount() );
   mPb->init( 1, totalStep );
-  setSpatialIndexReference(); // Need set mLayerReference before
+  setSpatialIndexReference( qsetIndexInvalidReference ); // Need set mLayerReference before
 
   // Make Query
   mPb->setFormat( QObject::tr( "Processing 2/2 - %p%" ) );
@@ -69,7 +70,7 @@
               : ( int )( mLayerTarget->featureCount() );
   mPb->init( 1, totalStep );
 
-  execQuery( qsetIndexResult, relation );
+  execQuery( qsetIndexResult, qsetIndexInvalidTarget, relation );
 
 } // QSet<int> QgsSpatialQuery::runQuery( int relation)
 
@@ -190,7 +191,7 @@
 
 } // bool QgsSpatialQuery::hasValidGeometry(QgsFeature &feature)
 
-void QgsSpatialQuery::setSpatialIndexReference()
+void QgsSpatialQuery::setSpatialIndexReference( QSet<int> & qsetIndexInvalidReference )
 {
   QgsReaderFeatures * readerFeaturesReference = new QgsReaderFeatures( mLayerReference, mUseReferenceSelection );
   QgsFeature feature;
@@ -201,6 +202,7 @@
 
     if ( ! hasValidGeometry( feature ) )
     {
+      qsetIndexInvalidReference.insert( feature.id() );
       continue;
     }
 
@@ -210,7 +212,7 @@
 
 } // void QgsSpatialQuery::setSpatialIndexReference()
 
-void QgsSpatialQuery::execQuery( QSet<int> & qsetIndexResult, int relation )
+void QgsSpatialQuery::execQuery( QSet<int> & qsetIndexResult, QSet<int> & qsetIndexInvalidTarget, int relation )
 {
   bool ( QgsGeometry::* operation )( QgsGeometry * );
   switch ( relation )
@@ -263,6 +265,7 @@
 
     if ( ! hasValidGeometry( featureTarget ) )
     {
+      qsetIndexInvalidTarget.insert( featureTarget.id() );
       continue;
     }
 

Modified: trunk/qgis/src/plugins/spatialquery/qgsspatialquery.h
===================================================================
--- trunk/qgis/src/plugins/spatialquery/qgsspatialquery.h	2011-02-08 04:05:06 UTC (rev 15136)
+++ trunk/qgis/src/plugins/spatialquery/qgsspatialquery.h	2011-02-08 07:17:12 UTC (rev 15137)
@@ -15,7 +15,7 @@
  *   (at your option) any later version.                                   *
  *                                                                         *
  ***************************************************************************/
-/*  $Id$ */
+/*  $Id: qgsspatialquery.h 13380 2010-04-25 12:51:49Z jef $ */
 #ifndef SPATIALQUERY_H
 #define SPATIALQUERY_H
 
@@ -82,7 +82,8 @@
     * \param lyrTarget          Pointer to Target Layer
     * \param lyrReference       Pointer to Reference Layer
     */
-    void runQuery( QSet<int> & qsetIndexResult, int relation, QgsVectorLayer* lyrTarget, QgsVectorLayer* lyrReference );
+    void runQuery( QSet<int> & qsetIndexResult, QSet<int> & qsetIndexInvalidTarget, QSet<int> & qsetIndexInvalidReference,
+                   int relation, QgsVectorLayer* lyrTarget, QgsVectorLayer* lyrReference );
 
     /**
     * \brief Gets the possible topologic relations
@@ -117,14 +118,14 @@
     /**
     * \brief Build the Spatial Index
     */
-    void setSpatialIndexReference();
+    void setSpatialIndexReference( QSet<int> & qsetIndexInvalidReference );
 
     /**
     * \brief Execute query
     * \param qsetIndexResult    Reference to QSet contains the result query
     * \param relation           Enum Topologic Relation
     */
-    void execQuery( QSet<int> & qsetIndexResult, int relation );
+    void execQuery( QSet<int> & qsetIndexResult, QSet<int> & qsetIndexInvalidTarget, int relation );
 
     /**
     * \brief Populate index Result

Modified: trunk/qgis/src/plugins/spatialquery/qgsspatialquerydialog.cpp
===================================================================
--- trunk/qgis/src/plugins/spatialquery/qgsspatialquerydialog.cpp	2011-02-08 04:05:06 UTC (rev 15136)
+++ trunk/qgis/src/plugins/spatialquery/qgsspatialquerydialog.cpp	2011-02-08 07:17:12 UTC (rev 15137)
@@ -15,7 +15,7 @@
  *   (at your option) any later version.                                   *
  *                                                                         *
  ***************************************************************************/
-/*  $Id$ */
+/*  $Id: qgsspatialquerydialog.cpp 13441 2010-05-08 19:07:12Z jef $ */
 
 #include <QMessageBox>
 #include <QDateTime>
@@ -36,12 +36,9 @@
 {
   setupUi( this );
 
-  grpResults->hide();
   mLayerReference = mLayerTarget = NULL;
-
   mIface = iface;
   mRubberSelectId = new QgsRubberSelectId( iface->mapCanvas() );
-  setColorRubberSelectId();
 
   initGui();
   connectAll();
@@ -56,9 +53,17 @@
   delete mRubberSelectId;
   mMapIdVectorLayers.clear();
   mFeatureResult.clear();
+  mFeatureInvalidTarget.clear();
+  mFeatureInvalidReference.clear();
 
 } // QgsSpatialQueryDialog::~QgsSpatialQueryDialog()
 
+void QgsSpatialQueryDialog::show()
+{
+  QDialog::show();
+  adjustSize();
+} // void QgsSpatialQueryDialog::show()
+
 void QgsSpatialQueryDialog::messageLayersLessTwo()
 {
   QString msgLayersLessTwo = tr( "The spatial query requires at least two layers" );
@@ -74,9 +79,10 @@
 void QgsSpatialQueryDialog::initGui()
 {
   showLogProcessing( false );
-  grpResults->hide();
-  buttonBox->button( QDialogButtonBox::Close )->hide();
+  setLayoutResultInvalid( false );
 
+  buttonBoxMain->button( QDialogButtonBox::Close )->hide();
+
   populateTargetLayerComboBox();
   if ( targetLayerComboBox->count() > 1 )
   {
@@ -89,21 +95,17 @@
   }
   else
   {
-    buttonBox->setEnabled( false );
+    buttonBoxMain->setEnabled( false );
     textEditStatus->append( mMsgLayersLessTwo );
   }
 
 } // QgsSpatialQueryDialog::initGui()
 
-void QgsSpatialQueryDialog::setColorRubberSelectId()
+void QgsSpatialQueryDialog::setColorRubberSelect()
 {
-  int myRedInt, myGreenInt, myBlueInt;
-  myRedInt = QgsProject::instance()->readNumEntry( "Gui", "/SelectionColorRedPart", 255 );
-  myGreenInt = QgsProject::instance()->readNumEntry( "Gui", "/SelectionColorGreenPart", 255 );
-  myBlueInt = QgsProject::instance()->readNumEntry( "Gui", "/SelectionColorBluePart", 0 );
-
-  mRubberSelectId->setColor( 255 - myRedInt, 255 - myGreenInt, 255 - myBlueInt, 0.5, 2 );
-
+  mRGBRubberSelect[0] = 255 - QgsProject::instance()->readNumEntry( "Gui", "/SelectionColorRedPart", 255 );
+  mRGBRubberSelect[1] = 255 - QgsProject::instance()->readNumEntry( "Gui", "/SelectionColorGreenPart", 255 );
+  mRGBRubberSelect[2] = 255 - QgsProject::instance()->readNumEntry( "Gui", "/SelectionColorBluePart", 0 );
 } // void QgsSpatialQueryDialog::setColorRubberSelectId()
 
 void QgsSpatialQueryDialog::setLayer( bool isTarget, int index )
@@ -160,7 +162,7 @@
 
 void QgsSpatialQueryDialog::runQuery()
 {
-  buttonBox->setEnabled( false );
+  buttonBoxMain->setEnabled( false );
   MngProgressBar* pb = new MngProgressBar( progressBarStatus );
   QgsSpatialQuery* spatialQuery = new QgsSpatialQuery( pb );
   if ( usingSelectedTargetCheckBox->isChecked() )
@@ -173,33 +175,40 @@
   }
   progressBarStatus->setTextVisible( true );
   mFeatureResult.clear();
+  mFeatureInvalidTarget.clear();
+  mFeatureInvalidReference.clear();
 
   int currentItem = operantionComboBox->currentIndex();
   bool isOk;
   int operation = operantionComboBox->itemData( currentItem ).toInt( &isOk );
-  spatialQuery->runQuery( mFeatureResult, operation, mLayerTarget, mLayerReference );
+  spatialQuery->runQuery( mFeatureResult, mFeatureInvalidTarget, mFeatureInvalidReference, operation, mLayerTarget, mLayerReference );
   delete spatialQuery;
   delete pb;
 
   progressBarStatus->setTextVisible( false );
-  buttonBox->setEnabled( true );
-
-  grpResults->show();
-  setInputsVisible( false );
+  buttonBoxMain->setEnabled( true );
+  setLayoutOperationVisible( false );
   progressBarStatus->hide();
-  buttonBox->button( QDialogButtonBox::Close )->show();
-  buttonBox->button( QDialogButtonBox::Cancel )->hide();
-  buttonBox->button( QDialogButtonBox::Ok )->hide();
-  adjustSize();
+  buttonBoxMain->button( QDialogButtonBox::Close )->show();
+  buttonBoxMain->button( QDialogButtonBox::Cancel )->hide();
+  buttonBoxMain->button( QDialogButtonBox::Ok )->hide();
 } // void QgsSpatialQueryDialog::runQuery()
 
-void QgsSpatialQueryDialog::setInputsVisible( bool show )
+void QgsSpatialQueryDialog::setLayoutOperationVisible( bool show )
 {
   grpTargetGroupBox->setVisible( show );
   grpReferenceGroupBox->setVisible( show );
   grpOperationGroupBox->setVisible( show );
-}
+} // void QgsSpatialQueryDialog::setLayoutOperationVisible( bool show )
 
+void QgsSpatialQueryDialog::setLayoutResultInvalid( bool show )
+{
+  grpResult->setVisible( show );
+  grpInvalid->setVisible( show );
+  ckboxLogProcessing->setVisible( show );
+  labelInfo->setVisible( show );
+} // void QgsSpatialQueryDialog::setLayoutResultInvalid( bool show )
+
 void QgsSpatialQueryDialog::showLogProcessing( bool hasShow )
 {
   static int heightDialogNoStatus = 0;
@@ -224,9 +233,7 @@
 
 void QgsSpatialQueryDialog::showResultQuery( QDateTime *datetimeStart, QDateTime *datetimeEnd )
 {
-  selectedFeatureListWidget->clear();
-  countSelectedFeats->setText( tr( "Total: %1" ).arg( mFeatureResult.size() ) );
-
+  // Report processing
   QString msg = tr( "<<-- Begin at [%L1] --" ).arg( datetimeStart->toString() );
   textEditStatus->append( msg );
   msg = tr( "Query:" );
@@ -243,20 +250,51 @@
   msg = tr( "-- Finish at [%L1] (processing time %L2 minutes) -->>" ).arg( datetimeEnd->toString() ).arg( timeProcess, 0, 'f', 2 );
   textEditStatus->append( msg );
 
+
+  mRubberSelectId->reset();
+
+  QString formatLabel("%1(%2)");
+  resultTargetLabel->setText( formatLabel.arg( mLayerTarget->name() ).arg( mFeatureResult.size() ) );
+  invalidTargetLabel->setText( formatLabel.arg( mLayerTarget->name() ).arg( mFeatureInvalidTarget.size() ) );
+  invalidReferenceLabel->setText( formatLabel.arg( mLayerReference->name() ).arg( mFeatureInvalidReference.size() ) );
+
+  // Result target
   if ( mFeatureResult.size() > 0 )
   {
-    populateQueryResult();
-    mLayerTarget->setSelectedFeatures( mFeatureResult );
+    pushButtonSelectResultTarget->setEnabled(true);
+    populateFeatureListWidget( resultFeatureTargetListWidget, mFeatureResult );
     evaluateCheckBox( true );
-
-    QString sIdFeat = selectedFeatureListWidget->currentItem()->text();
-    on_selectedFeatureListWidget_currentTextChanged( sIdFeat );
+    on_resultFeatureTargetListWidget_currentItemChanged( resultFeatureTargetListWidget->currentItem() );
   }
   else
   {
-    mRubberSelectId->reset();
+    pushButtonSelectResultTarget->setEnabled(false);
+    clearFeatureListWidget(resultFeatureTargetListWidget);
   }
-
+  // Invalid target
+  if ( mFeatureInvalidTarget.size() > 0 )
+  {
+    pushButtonSelectInvalidTarget->setEnabled(true);
+    populateFeatureListWidget( invalidFeatureTargetListWidget, mFeatureInvalidTarget, false );
+  }
+  else
+  {
+    pushButtonSelectInvalidTarget->setEnabled(false);
+    clearFeatureListWidget(invalidFeatureTargetListWidget);
+  }
+  // Invalid reference
+  if ( mFeatureInvalidReference.size() > 0 )
+  {
+    pushButtonSelectInvalidReference->setEnabled(true);
+    populateFeatureListWidget( invalidFeatureReferenceListWidget, mFeatureInvalidReference, false );
+  }
+  else
+  {
+    pushButtonSelectInvalidReference->setEnabled(false);
+    clearFeatureListWidget(invalidFeatureReferenceListWidget);
+  }
+  setLayoutResultInvalid( true );
+  adjustSize();
 } // void QgsSpatialQueryDialog::showResultQuery(QDateTime *datetimeStart, QDateTime *datetimeEnd)
 
 QString QgsSpatialQueryDialog::getDescriptionLayerShow( bool isTarget )
@@ -288,8 +326,8 @@
            this, SLOT( signal_qgis_layerWasAdded( QgsMapLayer* ) ) ) ;
   connect( QgsMapLayerRegistry::instance(), SIGNAL( layerWillBeRemoved( QString ) ),
            this, SLOT( signal_qgis_layerWillBeRemoved( QString ) ) );
-  connect( showLogProcessingCheckBox, SIGNAL( clicked( bool ) ),
-           this, SLOT( on_showLogProcessingCheckBox_clicked( bool ) ) );
+  connect( ckboxLogProcessing, SIGNAL( clicked( bool ) ),
+           this, SLOT( on_ckboxLogProcessing_clicked( bool ) ) );
 
 } // QgsSpatialQueryDialog::connectAll()
 
@@ -321,6 +359,8 @@
   mRubberSelectId->reset();
   mLayerTarget = mLayerReference = NULL;
   mFeatureResult.clear();
+  mFeatureInvalidTarget.clear();
+  mFeatureInvalidReference.clear();
   mMapIdVectorLayers.clear();
 
   QDialog::reject();
@@ -421,10 +461,8 @@
       evaluateCheckBox( isTarget );
       if ( isTarget )
       {
-        selectedFeatureListWidget->blockSignals( true );
-        selectedFeatureListWidget->clear();
-        selectedFeatureListWidget->blockSignals( false );
-        countSelectedFeats->setText( tr( "Total" ) + ": 0" );
+        clearFeatureListWidget( resultFeatureTargetListWidget );
+        resultTargetLabel->setText( tr( "Total" ) + ": 0" );
         mRubberSelectId->reset();
       }
     }
@@ -546,25 +584,63 @@
 
 } // QgsSpatialQueryDialog::populateOperantionComboBox()
 
-void QgsSpatialQueryDialog::populateQueryResult()
+void QgsSpatialQueryDialog::populateFeatureListWidget( QListWidget *listWidget, QSet<int> & setFeatures, bool hasSetRow)
 {
-  selectedFeatureListWidget->blockSignals( true );
-  selectedFeatureListWidget->clear();
-  selectedFeatureListWidget->setEnabled( false );
+  listWidget->blockSignals( true );
+  listWidget->clear();
+  listWidget->setEnabled( false );
 
-  QSetIterator <int>item( mFeatureResult );
+  QSetIterator <int>item( setFeatures );
   while ( item.hasNext() )
   {
-    selectedFeatureListWidget->addItem( QString::number( item.next() ) );
+    listWidget->addItem( QString::number( item.next() ) );
   }
-  selectedFeatureListWidget->setEnabled( true );
-  selectedFeatureListWidget->setCurrentRow( 0 );
-  selectedFeatureListWidget->blockSignals( false );
+  listWidget->setEnabled( true );
+  if (hasSetRow)
+  {
+    listWidget->setCurrentRow( 0 );
+  }
+  listWidget->blockSignals( false );
 
-} // QgsSpatialQueryDialog::populateQueryResult()
+} // void populateFeatureListWidget( QListWidget *listWidget, QSet<int> & setFeatures )
 
+void QgsSpatialQueryDialog::clearFeatureListWidget( QListWidget *listWidget )
+{
+   listWidget->blockSignals( true );
+   listWidget->clear();
+   listWidget->blockSignals( false );
+} // void QgsSpatialQueryDialog::clearFeatureListWidget( QListWidget *listWidget )
+
+void QgsSpatialQueryDialog::changeFeatureListWidget( QListWidget *listWidget, QgsVectorLayer* vectorLayer, const QString& currentText )
+{
+    listWidget->setEnabled( false );
+    bool ok;
+    int id = currentText.toInt( &ok );
+    showRubberFeature( vectorLayer, id );
+    listWidget->setEnabled( true );
+    listWidget->setFocus();
+} // void QgsSpatialQueryDialog::changeFeatureListWidget( QListWidget *listWidget, QgsVectorLayer* layer, const QString& currentText )
+
+void QgsSpatialQueryDialog::showRubberFeature( QgsVectorLayer* vectorLayer, int id )
+{
+  mRubberSelectId->reset();
+
+  Qt::CursorShape shapeCurrent = cursor().shape();
+
+  QCursor c;
+  c.setShape( Qt::WaitCursor );
+  setCursor( c );
+
+  mRubberSelectId->addFeature( vectorLayer, id );
+  mRubberSelectId->show();
+
+  c.setShape( shapeCurrent );
+  setCursor( c );
+} // void QgsSpatialQueryDialog::showRubberFeature( QgsVectorLayer* vectorLayer, int id )
+
+
 //! Slots for signs of Dialog
-void QgsSpatialQueryDialog::on_buttonBox_accepted()
+void QgsSpatialQueryDialog::on_buttonBoxMain_accepted()
 {
   if ( ! mLayerReference )
   {
@@ -580,27 +656,27 @@
   QDateTime datetimeStart = QDateTime::currentDateTime();
   runQuery();
   QDateTime datetimeEnd = QDateTime::currentDateTime();
-
   showResultQuery( &datetimeStart, &datetimeEnd );
+  adjustSize();
+} // QgsSpatialQueryDialog::on_buttonBoxMain_accepted()
 
-} // QgsSpatialQueryDialog::on_buttonBox_accepted()
-
-void QgsSpatialQueryDialog::on_buttonBox_rejected()
+void QgsSpatialQueryDialog::on_buttonBoxMain_rejected()
 {
-  if ( grpResults->isHidden() )
+  if ( grpResult->isHidden() )
   {
     reject();
   }
   else
   {
-    grpResults->hide();
-    setInputsVisible( true );
+    setLayoutResultInvalid( false );
+    setLayoutOperationVisible( true );
     progressBarStatus->show();
-    buttonBox->button( QDialogButtonBox::Close )->hide();
-    buttonBox->button( QDialogButtonBox::Cancel )->show();
-    buttonBox->button( QDialogButtonBox::Ok )->show();
+    buttonBoxMain->button( QDialogButtonBox::Close )->hide();
+    buttonBoxMain->button( QDialogButtonBox::Cancel )->show();
+    buttonBoxMain->button( QDialogButtonBox::Ok )->show();
   }
-} // void QgsSpatialQueryDialog::on_buttonBox_rejected()
+  adjustSize();
+} // void QgsSpatialQueryDialog::on_buttonBoxMain_rejected()
 
 void QgsSpatialQueryDialog::on_targetLayerComboBox_currentIndexChanged( int index )
 {
@@ -627,34 +703,86 @@
 
 } // QgsSpatialQueryDialog::on_referenceLayerComboBox_currentIndexChanged(int index);
 
-void QgsSpatialQueryDialog::on_selectedFeatureListWidget_currentTextChanged( const QString& currentText )
+void QgsSpatialQueryDialog::on_resultFeatureTargetListWidget_itemClicked( QListWidgetItem * item )
 {
-  mRubberSelectId->reset();
-  selectedFeatureListWidget->setEnabled( false );
+  if ( mCurrentFeatureWidget != FW_Result )
+  {
+    mCurrentFeatureWidget = FW_Result;
+    on_resultFeatureTargetListWidget_currentItemChanged(item);
+  }
+} // void QgsSpatialQueryDialog::on_resultFeatureTargetListWidget_itemClicked( QListWidgetItem * item )
 
-  QCursor c;
-  c.setShape( Qt::WaitCursor );
-  Qt::CursorShape shapeCurrent = cursor().shape();
-  setCursor( c );
-  c.setShape( shapeCurrent );
+void  QgsSpatialQueryDialog::on_resultFeatureTargetListWidget_currentItemChanged( QListWidgetItem * item )
+{
+  if ( mCurrentFeatureWidget != FW_Result )
+  {
+    mCurrentFeatureWidget = FW_Result;
+  }
+  mRubberSelectId->setColor( mRGBRubberSelect[0], mRGBRubberSelect[1], mRGBRubberSelect[2], 0.5, 2 );
+  changeFeatureListWidget( resultFeatureTargetListWidget, mLayerTarget, item->text() );
+} // void  QgsSpatialQueryDialog::on_resultFeatureTargetListWidget_currentItemChanged( QListWidgetItem * item )
 
-  bool ok;
-  int Id = currentText.toInt( &ok );
-  mRubberSelectId->addFeature( mLayerTarget, Id );
+void QgsSpatialQueryDialog::on_invalidFeatureTargetListWidget_itemClicked( QListWidgetItem * item )
+{
+  if ( mCurrentFeatureWidget != FW_InvalidTarget )
+  {
+    mCurrentFeatureWidget = FW_InvalidTarget;
+    on_invalidFeatureTargetListWidget_currentItemChanged(item);
+  }
+} // void QgsSpatialQueryDialog::on_invalidFeatureTargetListWidget_itemClicked( QListWidgetItem * item )
 
-  selectedFeatureListWidget->setEnabled( true );
-  setCursor( c );
-  selectedFeatureListWidget->setFocus();
-  mRubberSelectId->show();
+void  QgsSpatialQueryDialog::on_invalidFeatureTargetListWidget_currentItemChanged( QListWidgetItem * item )
+{
+  if ( mCurrentFeatureWidget != FW_InvalidTarget )
+  {
+    mCurrentFeatureWidget = FW_InvalidTarget;
+  }
+  mRubberSelectId->setColor( 255, 0, 0, 0.5, 2 ); // RED
+  changeFeatureListWidget( invalidFeatureTargetListWidget, mLayerTarget, item->text() );
+} // void  QgsSpatialQueryDialog::on_invalidFeatureTargetListWidget_currentItemChanged( QListWidgetItem * item )
 
-} // QgsSpatialQueryDialog::on_selectedFeatureListWidget_currentTextChanged(const QString& currentText)
+void QgsSpatialQueryDialog::on_invalidFeatureReferenceListWidget_itemClicked( QListWidgetItem * item )
+{
+  if ( mCurrentFeatureWidget != FW_InvalidRefence )
+  {
+    mCurrentFeatureWidget = FW_InvalidRefence;
+    on_invalidFeatureReferenceListWidget_currentItemChanged(item);
+  }
+} // void QgsSpatialQueryDialog::on_invalidFeatureReferenceListWidget_itemClicked( QListWidgetItem * item )
 
-void QgsSpatialQueryDialog::on_showLogProcessingCheckBox_clicked( bool checked )
+void  QgsSpatialQueryDialog::on_invalidFeatureReferenceListWidget_currentItemChanged( QListWidgetItem * item )
 {
+  if ( mCurrentFeatureWidget != FW_InvalidRefence )
+  {
+    mCurrentFeatureWidget = FW_InvalidRefence;
+  }
+  mRubberSelectId->setColor( 255, 0, 0, 0.5, 2 ); // RED
+  changeFeatureListWidget( invalidFeatureReferenceListWidget, mLayerReference, item->text() );
+} // void  QgsSpatialQueryDialog::on_invalidFeatureReferenceListWidget_currentItemChanged( QListWidgetItem * item )
+
+void QgsSpatialQueryDialog::on_ckboxLogProcessing_clicked( bool checked )
+{
   showLogProcessing( checked );
+  adjustSize();
 
-} // void QgsSpatialQueryDialog::on_showLogProcessingCheckBox_clicked(bool checked)
+} // void QgsSpatialQueryDialog::on_ckboxLogProcessing_clicked(bool checked)
 
+void QgsSpatialQueryDialog::on_pushButtonSelectResultTarget_clicked()
+{
+  mLayerTarget->setSelectedFeatures( mFeatureResult );
+} // void QgsSpatialQueryDialog::on_pushButtonSelectResultTarget_clicked()
+
+void QgsSpatialQueryDialog::on_pushButtonSelectInvalidTarget_clicked()
+{
+  mLayerTarget->setSelectedFeatures( mFeatureInvalidTarget );
+} // void QgsSpatialQueryDialog::on_pushButtonSelectInvalidTarget_clicked()
+
+void QgsSpatialQueryDialog::on_pushButtonSelectInvalidReference_clicked()
+{
+  mLayerReference->setSelectedFeatures( mFeatureInvalidReference );
+} // void QgsSpatialQueryDialog::on_pushButtonSelectInvalidReference_clicked()
+
+
 //! Slots for signs of QGIS
 void QgsSpatialQueryDialog::signal_qgis_layerWasAdded( QgsMapLayer* mapLayer )
 {
@@ -672,9 +800,9 @@
   mMapIdVectorLayers.insert( vectorLayer->getLayerID(), vectorLayer );
 
   // Verify is can enable buttonBox
-  if ( !buttonBox->button( QDialogButtonBox::Ok )->isEnabled() && targetLayerComboBox->count() > 1 )
+  if ( !buttonBoxMain->button( QDialogButtonBox::Ok )->isEnabled() && targetLayerComboBox->count() > 1 )
   {
-    buttonBox->button( QDialogButtonBox::Ok )->setEnabled( true );
+    buttonBoxMain->button( QDialogButtonBox::Ok )->setEnabled( true );
   }
 
 } // QgsSpatialQueryDialog::signal_qgis_layerWasAdded(QgsMapLayer* mapLayer)
@@ -706,7 +834,7 @@
 
   if ( targetLayerComboBox->count() < 2 )
   {
-    buttonBox->button( QDialogButtonBox::Ok )->setEnabled( false );
+    buttonBoxMain->button( QDialogButtonBox::Ok )->setEnabled( false );
     textEditStatus->append( mMsgLayersLessTwo );
   }
 
@@ -725,7 +853,6 @@
 
 } // void QgsSpatialQueryDialog::signal_layerReference_selectionFeaturesChanged()
 
-
 void QgsSpatialQueryDialog::MsgDEBUG( QString sMSg )
 {
   QMessageBox::warning( 0, tr( "DEBUG" ), sMSg, QMessageBox::Ok );

Modified: trunk/qgis/src/plugins/spatialquery/qgsspatialquerydialog.h
===================================================================
--- trunk/qgis/src/plugins/spatialquery/qgsspatialquerydialog.h	2011-02-08 04:05:06 UTC (rev 15136)
+++ trunk/qgis/src/plugins/spatialquery/qgsspatialquerydialog.h	2011-02-08 07:17:12 UTC (rev 15137)
@@ -15,7 +15,7 @@
  *   (at your option) any later version.                                   *
  *                                                                         *
  ***************************************************************************/
-/*  $Id$ */
+/*  $Id: qgsspatialquerydialog.h 13377 2010-04-25 01:07:36Z jef $ */
 
 #ifndef SPATIALQUERYDIALOG_H
 #define SPATIALQUERYDIALOG_H
@@ -27,6 +27,19 @@
 #include "qgsvectorlayer.h"
 
 /**
+* \brief Enum with feature listwidget
+* \enum Feature_Widget
+*
+*/
+enum Feature_Widget
+{
+  FW_Result,
+  FW_InvalidTarget,
+  FW_InvalidRefence
+};
+
+
+/**
 * \class QgsSpatialQueryDialog
 * \brief Spatial Query dialog
 *
@@ -50,14 +63,25 @@
     //! Unload plugins by QGIS - Disconnect signal from QGIS
     void disconnectQGis();
 
+    //! Override show for ajust size
+    void show();
+
   private slots:
     //! Slots for signs of Dialog
-    void on_buttonBox_accepted();
-    void on_buttonBox_rejected();
+    void on_buttonBoxMain_accepted();
+    void on_buttonBoxMain_rejected();
     void on_targetLayerComboBox_currentIndexChanged( int index );
     void on_referenceLayerComboBox_currentIndexChanged( int index );
-    void on_selectedFeatureListWidget_currentTextChanged( const QString& currentText );
-    void on_showLogProcessingCheckBox_clicked( bool checked );
+    void on_resultFeatureTargetListWidget_itemClicked( QListWidgetItem * item );
+    void on_resultFeatureTargetListWidget_currentItemChanged( QListWidgetItem * item );
+    void on_invalidFeatureTargetListWidget_itemClicked( QListWidgetItem * item );
+    void on_invalidFeatureTargetListWidget_currentItemChanged( QListWidgetItem * item );
+    void on_invalidFeatureReferenceListWidget_itemClicked( QListWidgetItem * item );
+    void on_invalidFeatureReferenceListWidget_currentItemChanged( QListWidgetItem * item );
+    void on_ckboxLogProcessing_clicked( bool checked );
+    void on_pushButtonSelectResultTarget_clicked();
+    void on_pushButtonSelectInvalidTarget_clicked();
+    void on_pushButtonSelectInvalidReference_clicked();
 
     //! Slots for signs of QGIS
     void signal_qgis_layerWasAdded( QgsMapLayer* mapLayer );
@@ -70,8 +94,8 @@
   private:
     //! Initialize the Gui
     void initGui();
-    //! Set Color mRubberSelectId
-    void setColorRubberSelectId();
+    //! Set Color RGB for select - mRGBRubberSelect
+    void setColorRubberSelect();
     //! Set Layer (Target or Reference)
     void setLayer( bool isTarget, int index );
     //! Evaluate status of selected features from layer (Target or Reference)
@@ -106,8 +130,14 @@
     void populateReferenceLayerComboBox();
     //! Populates operationComboBox with the topological operations
     void populateOperationComboBox();
-    //! Populates the result of Spatial Query (selectedFeatureListWidget and labels)
-    void populateQueryResult();
+    //! Populates the features in QListWidget (use by result, invalid target and reference)
+    void populateFeatureListWidget( QListWidget *listWidget, QSet<int> & setFeatures, bool hasSetRow = true );
+    //! Clear the features of QListWidget (use by result, invalid target and reference)
+    void clearFeatureListWidget( QListWidget *listWidget );
+    //! Make action when change item in ListWidget
+    void changeFeatureListWidget( QListWidget *listWidget, QgsVectorLayer* vectorLayer, const QString& currentText );
+    //! Show rubber from feature
+    void showRubberFeature( QgsVectorLayer* vectorLayer, int id );
 
     //! Pointer to Interface QGIS
     QgisInterface* mIface;
@@ -117,18 +147,28 @@
     QgsVectorLayer* mLayerReference;
     //! Stores ID's from spatial query
     QSet<int> mFeatureResult;
+    //! Stores ID's invalid of target layer
+    QSet<int> mFeatureInvalidTarget;
+    //! Stores ID's invalid of reference layer
+    QSet<int> mFeatureInvalidReference;
     //! Map for Id name of vector layers (use in signal_qgis_layerWillBeRemoved)
     QMap<QString, QgsVectorLayer *> mMapIdVectorLayers;
     //! Rubber band for features result
     QgsRubberSelectId* mRubberSelectId;
+    //! RGB select feature result
+    int mRGBRubberSelect[3];
+    //! Current Feature Widget
+    Feature_Widget mCurrentFeatureWidget;
 
     // Message
     QString mMsgLayersLessTwo;
 
     void MsgDEBUG( QString sMSg );
 
-    //! show/hide target, reference and operation group box
-    void setInputsVisible( bool show );
+    //! show/hide operation inputs: target, reference and operation group box
+    void setLayoutOperationVisible( bool show );
+    //! show/hide result of operation: result and invalid group box
+    void setLayoutResultInvalid( bool show );
 };
 
 #endif // SPATIALQUERYDIALOG_H

Modified: trunk/qgis/src/plugins/spatialquery/qgsspatialquerydialogbase.qrc
===================================================================
--- trunk/qgis/src/plugins/spatialquery/qgsspatialquerydialogbase.qrc	2011-02-08 04:05:06 UTC (rev 15136)
+++ trunk/qgis/src/plugins/spatialquery/qgsspatialquerydialogbase.qrc	2011-02-08 07:17:12 UTC (rev 15137)
@@ -1,5 +1,6 @@
 <RCC>
-    <qresource prefix="/icons" >
+    <qresource prefix="/icons">
         <file>spatialquery.png</file>
+        <file>selectall.png</file>
     </qresource>
 </RCC>

Modified: trunk/qgis/src/plugins/spatialquery/qgsspatialquerydialogbase.ui
===================================================================
--- trunk/qgis/src/plugins/spatialquery/qgsspatialquerydialogbase.ui	2011-02-08 04:05:06 UTC (rev 15136)
+++ trunk/qgis/src/plugins/spatialquery/qgsspatialquerydialogbase.ui	2011-02-08 07:17:12 UTC (rev 15137)
@@ -9,8 +9,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>532</width>
-    <height>680</height>
+    <width>940</width>
+    <height>355</height>
    </rect>
   </property>
   <property name="minimumSize">
@@ -34,285 +34,434 @@
   <property name="locale">
    <locale language="English" country="UnitedKingdom"/>
   </property>
-  <layout class="QGridLayout" name="gridLayout_3">
-   <item row="0" column="0">
-    <widget class="QGroupBox" name="grpTargetGroupBox">
-     <property name="toolTip">
-      <string>Layer on which the topological operation will select geometries</string>
-     </property>
-     <property name="title">
-      <string>Target layer</string>
-     </property>
-     <layout class="QVBoxLayout" name="verticalLayout_3">
-      <item>
-       <widget class="QComboBox" name="targetLayerComboBox">
-        <property name="sizePolicy">
-         <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
-          <horstretch>0</horstretch>
-          <verstretch>0</verstretch>
-         </sizepolicy>
-        </property>
-        <property name="minimumSize">
-         <size>
-          <width>206</width>
-          <height>26</height>
-         </size>
-        </property>
-        <property name="maximumSize">
-         <size>
-          <width>16777215</width>
-          <height>16777215</height>
-         </size>
-        </property>
-        <property name="toolTip">
-         <string>Select the target layer</string>
-        </property>
-       </widget>
-      </item>
-      <item>
-       <widget class="QCheckBox" name="usingSelectedTargetCheckBox">
-        <property name="toolTip">
-         <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
+  <layout class="QVBoxLayout" name="verticalLayout">
+   <item>
+    <layout class="QHBoxLayout" name="lytOperatorResultInvalid">
+     <item>
+      <layout class="QVBoxLayout" name="lytOperator">
+       <item>
+        <widget class="QGroupBox" name="grpTargetGroupBox">
+         <property name="toolTip">
+          <string>Layer on which the topological operation will select geometries</string>
+         </property>
+         <property name="title">
+          <string>Target layer</string>
+         </property>
+         <layout class="QVBoxLayout" name="verticalLayout_3">
+          <property name="sizeConstraint">
+           <enum>QLayout::SetMinimumSize</enum>
+          </property>
+          <item>
+           <widget class="QComboBox" name="targetLayerComboBox">
+            <property name="maximumSize">
+             <size>
+              <width>16777215</width>
+              <height>16777215</height>
+             </size>
+            </property>
+            <property name="toolTip">
+             <string>Select the target layer</string>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QCheckBox" name="usingSelectedTargetCheckBox">
+            <property name="toolTip">
+             <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
 &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
 p, li { white-space: pre-wrap; }
 &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
 &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt;When checked the operation will only consider selected geometries of the target layer&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
-        </property>
-        <property name="text">
-         <string>Selected feature(s) only</string>
-        </property>
-       </widget>
-      </item>
-     </layout>
-     <zorder>usingSelectedTargetCheckBox</zorder>
-     <zorder>targetLayerComboBox</zorder>
-    </widget>
-   </item>
-   <item row="1" column="0">
-    <widget class="QGroupBox" name="grpReferenceGroupBox">
-     <property name="toolTip">
-      <string>Layer whose geometries will be used as reference by the topological operation</string>
-     </property>
-     <property name="title">
-      <string>Reference layer</string>
-     </property>
-     <layout class="QVBoxLayout" name="verticalLayout_4">
-      <item>
-       <widget class="QComboBox" name="referenceLayerComboBox">
-        <property name="sizePolicy">
-         <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
-          <horstretch>0</horstretch>
-          <verstretch>0</verstretch>
-         </sizepolicy>
-        </property>
-        <property name="minimumSize">
-         <size>
-          <width>206</width>
-          <height>26</height>
-         </size>
-        </property>
-        <property name="maximumSize">
-         <size>
-          <width>16777215</width>
-          <height>16777215</height>
-         </size>
-        </property>
-        <property name="toolTip">
-         <string>Select the reference layer</string>
-        </property>
-       </widget>
-      </item>
-      <item>
-       <widget class="QCheckBox" name="usingSelectedReferenceCheckBox">
-        <property name="maximumSize">
-         <size>
-          <width>16777215</width>
-          <height>18</height>
-         </size>
-        </property>
-        <property name="toolTip">
-         <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
+            </property>
+            <property name="text">
+             <string>Selected feature(s) only</string>
+            </property>
+           </widget>
+          </item>
+         </layout>
+         <zorder>usingSelectedTargetCheckBox</zorder>
+         <zorder>targetLayerComboBox</zorder>
+        </widget>
+       </item>
+       <item>
+        <widget class="QGroupBox" name="grpReferenceGroupBox">
+         <property name="toolTip">
+          <string>Layer whose geometries will be used as reference by the topological operation</string>
+         </property>
+         <property name="title">
+          <string>Reference layer</string>
+         </property>
+         <layout class="QVBoxLayout" name="verticalLayout_4">
+          <property name="sizeConstraint">
+           <enum>QLayout::SetMinimumSize</enum>
+          </property>
+          <item>
+           <widget class="QComboBox" name="referenceLayerComboBox">
+            <property name="maximumSize">
+             <size>
+              <width>16777215</width>
+              <height>16777215</height>
+             </size>
+            </property>
+            <property name="toolTip">
+             <string>Select the reference layer</string>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QCheckBox" name="usingSelectedReferenceCheckBox">
+            <property name="maximumSize">
+             <size>
+              <width>16777215</width>
+              <height>18</height>
+             </size>
+            </property>
+            <property name="toolTip">
+             <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
 &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
 p, li { white-space: pre-wrap; }
 &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
 &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt;When checked the operation will be only consider selected geometries of the reference layer&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
-        </property>
-        <property name="text">
-         <string>Selected feature(s) only</string>
-        </property>
-       </widget>
-      </item>
-     </layout>
-    </widget>
+            </property>
+            <property name="text">
+             <string>Selected feature(s) only</string>
+            </property>
+           </widget>
+          </item>
+         </layout>
+        </widget>
+       </item>
+       <item>
+        <widget class="QGroupBox" name="grpOperationGroupBox">
+         <property name="toolTip">
+          <string>Topological operations between layers of target and reference</string>
+         </property>
+         <property name="title">
+          <string>Topological operation</string>
+         </property>
+         <layout class="QVBoxLayout" name="verticalLayout_5">
+          <property name="sizeConstraint">
+           <enum>QLayout::SetMinimumSize</enum>
+          </property>
+          <item>
+           <widget class="QComboBox" name="operantionComboBox">
+            <property name="maximumSize">
+             <size>
+              <width>16777215</width>
+              <height>16777215</height>
+             </size>
+            </property>
+            <property name="toolTip">
+             <string>Select the topological operation</string>
+            </property>
+           </widget>
+          </item>
+         </layout>
+        </widget>
+       </item>
+      </layout>
+     </item>
+     <item>
+      <layout class="QVBoxLayout" name="lytResultInvalidMessage">
+       <item>
+        <layout class="QHBoxLayout" name="lytResultInvalid">
+         <item>
+          <widget class="QGroupBox" name="grpResult">
+           <property name="enabled">
+            <bool>true</bool>
+           </property>
+           <property name="title">
+            <string>Results</string>
+           </property>
+           <layout class="QVBoxLayout" name="verticalLayout_7">
+            <item>
+             <layout class="QHBoxLayout" name="lytTargetResult">
+              <item>
+               <widget class="QPushButton" name="pushButtonSelectResultTarget">
+                <property name="toolTip">
+                 <string>Select all features of result</string>
+                </property>
+                <property name="text">
+                 <string/>
+                </property>
+                <property name="icon">
+                 <iconset resource="qgsspatialquerydialogbase.qrc">
+                  <normaloff>:/icons/selectall.png</normaloff>:/icons/selectall.png</iconset>
+                </property>
+               </widget>
+              </item>
+              <item>
+               <widget class="QLabel" name="resultTargetLabel">
+                <property name="minimumSize">
+                 <size>
+                  <width>18</width>
+                  <height>20</height>
+                 </size>
+                </property>
+                <property name="maximumSize">
+                 <size>
+                  <width>16777215</width>
+                  <height>30</height>
+                 </size>
+                </property>
+                <property name="toolTip">
+                 <string>Total of features from query</string>
+                </property>
+                <property name="text">
+                 <string>Target layer</string>
+                </property>
+               </widget>
+              </item>
+              <item>
+               <spacer name="horizontalSpacer">
+                <property name="orientation">
+                 <enum>Qt::Horizontal</enum>
+                </property>
+                <property name="sizeHint" stdset="0">
+                 <size>
+                  <width>40</width>
+                  <height>20</height>
+                 </size>
+                </property>
+               </spacer>
+              </item>
+             </layout>
+            </item>
+            <item>
+             <widget class="QListWidget" name="resultFeatureTargetListWidget">
+              <property name="maximumSize">
+               <size>
+                <width>16777215</width>
+                <height>16777215</height>
+               </size>
+              </property>
+              <property name="toolTip">
+               <string>Select item to identify geometry of feature</string>
+              </property>
+             </widget>
+            </item>
+           </layout>
+          </widget>
+         </item>
+         <item>
+          <widget class="QGroupBox" name="grpInvalid">
+           <property name="title">
+            <string>Invalid features</string>
+           </property>
+           <layout class="QHBoxLayout" name="horizontalLayout_2">
+            <item>
+             <layout class="QVBoxLayout" name="verticalLayout_2">
+              <item>
+               <layout class="QHBoxLayout" name="lytTargetInvalid">
+                <item>
+                 <widget class="QPushButton" name="pushButtonSelectInvalidTarget">
+                  <property name="toolTip">
+                   <string>select all features invalid target</string>
+                  </property>
+                  <property name="text">
+                   <string/>
+                  </property>
+                  <property name="icon">
+                   <iconset resource="qgsspatialquerydialogbase.qrc">
+                    <normaloff>:/icons/selectall.png</normaloff>:/icons/selectall.png</iconset>
+                  </property>
+                 </widget>
+                </item>
+                <item>
+                 <widget class="QLabel" name="invalidTargetLabel">
+                  <property name="text">
+                   <string>Target layer</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>
+               </layout>
+              </item>
+              <item>
+               <widget class="QListWidget" name="invalidFeatureTargetListWidget">
+                <property name="toolTip">
+                 <string>Select item to identify geometry of feature</string>
+                </property>
+               </widget>
+              </item>
+             </layout>
+            </item>
+            <item>
+             <layout class="QVBoxLayout" name="verticalLayout_6">
+              <item>
+               <layout class="QHBoxLayout" name="lytReferenceInvalid">
+                <item>
+                 <widget class="QPushButton" name="pushButtonSelectInvalidReference">
+                  <property name="toolTip">
+                   <string>select all features invalid reference</string>
+                  </property>
+                  <property name="text">
+                   <string/>
+                  </property>
+                  <property name="icon">
+                   <iconset resource="qgsspatialquerydialogbase.qrc">
+                    <normaloff>:/icons/selectall.png</normaloff>:/icons/selectall.png</iconset>
+                  </property>
+                 </widget>
+                </item>
+                <item>
+                 <widget class="QLabel" name="invalidReferenceLabel">
+                  <property name="text">
+                   <string>Reference layer</string>
+                  </property>
+                 </widget>
+                </item>
+                <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>
+               </layout>
+              </item>
+              <item>
+               <widget class="QListWidget" name="invalidFeatureReferenceListWidget">
+                <property name="toolTip">
+                 <string>Select item to identify geometry of feature</string>
+                </property>
+               </widget>
+              </item>
+             </layout>
+            </item>
+           </layout>
+          </widget>
+         </item>
+        </layout>
+       </item>
+       <item>
+        <layout class="QHBoxLayout" name="lytShowInfo">
+         <item>
+          <widget class="QCheckBox" name="ckboxLogProcessing">
+           <property name="toolTip">
+            <string>Check to show log processing of query</string>
+           </property>
+           <property name="text">
+            <string>Show log messages</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <spacer name="spaceShowInfo">
+           <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="QLabel" name="labelInfo">
+           <property name="text">
+            <string>* Select item to highlight on map</string>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </item>
+       <item>
+        <widget class="QTextEdit" name="textEditStatus">
+         <property name="enabled">
+          <bool>true</bool>
+         </property>
+         <property name="textInteractionFlags">
+          <set>Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
+         </property>
+        </widget>
+       </item>
+      </layout>
+     </item>
+    </layout>
    </item>
-   <item row="10" column="0" colspan="2">
-    <widget class="QDialogButtonBox" name="buttonBox">
-     <property name="maximumSize">
-      <size>
-       <width>16777215</width>
-       <height>16777215</height>
-      </size>
-     </property>
-     <property name="contextMenuPolicy">
-      <enum>Qt::DefaultContextMenu</enum>
-     </property>
-     <property name="toolTip">
-      <string>Run query or close the window</string>
-     </property>
-     <property name="standardButtons">
-      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Close|QDialogButtonBox::Ok</set>
-     </property>
-    </widget>
+   <item>
+    <layout class="QVBoxLayout" name="lytProgressBarButtonsMain">
+     <item>
+      <widget class="QProgressBar" name="progressBarStatus">
+       <property name="value">
+        <number>0</number>
+       </property>
+       <property name="alignment">
+        <set>Qt::AlignCenter</set>
+       </property>
+       <property name="textVisible">
+        <bool>false</bool>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QDialogButtonBox" name="buttonBoxMain">
+       <property name="maximumSize">
+        <size>
+         <width>16777215</width>
+         <height>16777215</height>
+        </size>
+       </property>
+       <property name="contextMenuPolicy">
+        <enum>Qt::DefaultContextMenu</enum>
+       </property>
+       <property name="toolTip">
+        <string>Run query or close the window</string>
+       </property>
+       <property name="standardButtons">
+        <set>QDialogButtonBox::Cancel|QDialogButtonBox::Close|QDialogButtonBox::Ok</set>
+       </property>
+      </widget>
+     </item>
+    </layout>
    </item>
-   <item row="5" column="0">
-    <widget class="QGroupBox" name="grpOperationGroupBox">
-     <property name="toolTip">
-      <string>Topological operations between layers of target and reference</string>
-     </property>
-     <property name="title">
-      <string>Topological operation</string>
-     </property>
-     <layout class="QVBoxLayout" name="verticalLayout_5">
-      <item>
-       <widget class="QComboBox" name="operantionComboBox">
-        <property name="sizePolicy">
-         <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
-          <horstretch>10</horstretch>
-          <verstretch>116</verstretch>
-         </sizepolicy>
-        </property>
-        <property name="minimumSize">
-         <size>
-          <width>206</width>
-          <height>26</height>
-         </size>
-        </property>
-        <property name="maximumSize">
-         <size>
-          <width>16777215</width>
-          <height>16777215</height>
-         </size>
-        </property>
-        <property name="toolTip">
-         <string>Select the topological operation</string>
-        </property>
-       </widget>
-      </item>
-     </layout>
-    </widget>
-   </item>
-   <item row="9" column="0">
-    <widget class="QProgressBar" name="progressBarStatus">
-     <property name="value">
-      <number>0</number>
-     </property>
-     <property name="alignment">
-      <set>Qt::AlignCenter</set>
-     </property>
-     <property name="textVisible">
-      <bool>false</bool>
-     </property>
-    </widget>
-   </item>
-   <item row="6" column="0">
-    <widget class="QGroupBox" name="grpResults">
-     <property name="enabled">
-      <bool>true</bool>
-     </property>
-     <property name="sizePolicy">
-      <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
-       <horstretch>0</horstretch>
-       <verstretch>0</verstretch>
-      </sizepolicy>
-     </property>
-     <property name="title">
-      <string>Results (click to highlight on map)</string>
-     </property>
-     <layout class="QVBoxLayout" name="verticalLayout">
-      <item>
-       <widget class="QListWidget" name="selectedFeatureListWidget">
-        <property name="sizePolicy">
-         <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
-          <horstretch>0</horstretch>
-          <verstretch>0</verstretch>
-         </sizepolicy>
-        </property>
-        <property name="minimumSize">
-         <size>
-          <width>136</width>
-          <height>135</height>
-         </size>
-        </property>
-        <property name="maximumSize">
-         <size>
-          <width>16777215</width>
-          <height>16777215</height>
-         </size>
-        </property>
-        <property name="toolTip">
-         <string>Select item to identify geometry of feature</string>
-        </property>
-       </widget>
-      </item>
-      <item>
-       <widget class="QCheckBox" name="showLogProcessingCheckBox">
-        <property name="toolTip">
-         <string>Check to show log processing of query</string>
-        </property>
-        <property name="text">
-         <string>Show log messages</string>
-        </property>
-       </widget>
-      </item>
-      <item>
-       <widget class="QTextEdit" name="textEditStatus">
-        <property name="enabled">
-         <bool>true</bool>
-        </property>
-        <property name="textInteractionFlags">
-         <set>Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
-        </property>
-       </widget>
-      </item>
-      <item>
-       <widget class="QLabel" name="countSelectedFeats">
-        <property name="minimumSize">
-         <size>
-          <width>18</width>
-          <height>20</height>
-         </size>
-        </property>
-        <property name="maximumSize">
-         <size>
-          <width>16777215</width>
-          <height>30</height>
-         </size>
-        </property>
-        <property name="toolTip">
-         <string>Total of features from query</string>
-        </property>
-        <property name="text">
-         <string> Total</string>
-        </property>
-       </widget>
-      </item>
-     </layout>
-    </widget>
-   </item>
-   <item row="7" column="0">
-    <spacer name="verticalSpacer">
-     <property name="orientation">
-      <enum>Qt::Vertical</enum>
-     </property>
-     <property name="sizeHint" stdset="0">
-      <size>
-       <width>20</width>
-       <height>40</height>
-      </size>
-     </property>
-    </spacer>
-   </item>
   </layout>
+  <zorder>grpTargetGroupBox</zorder>
+  <zorder>grpReferenceGroupBox</zorder>
+  <zorder>grpOperationGroupBox</zorder>
+  <zorder>progressBarStatus</zorder>
+  <zorder>buttonBoxMain</zorder>
+  <zorder>grpResult</zorder>
+  <zorder>grpInvalid</zorder>
+  <zorder>grpInvalid</zorder>
+  <zorder>textEditStatus</zorder>
+  <zorder>ckboxLogProcessing</zorder>
+  <zorder>labelInfo</zorder>
  </widget>
- <resources/>
+ <tabstops>
+  <tabstop>targetLayerComboBox</tabstop>
+  <tabstop>usingSelectedTargetCheckBox</tabstop>
+  <tabstop>referenceLayerComboBox</tabstop>
+  <tabstop>usingSelectedReferenceCheckBox</tabstop>
+  <tabstop>operantionComboBox</tabstop>
+  <tabstop>resultFeatureTargetListWidget</tabstop>
+  <tabstop>invalidFeatureTargetListWidget</tabstop>
+  <tabstop>invalidFeatureReferenceListWidget</tabstop>
+  <tabstop>buttonBoxMain</tabstop>
+ </tabstops>
+ <resources>
+  <include location="qgsspatialquerydialogbase.qrc"/>
+ </resources>
+ <connections/>
 </ui>

Added: trunk/qgis/src/plugins/spatialquery/selectall.png
===================================================================
--- trunk/qgis/src/plugins/spatialquery/selectall.png	                        (rev 0)
+++ trunk/qgis/src/plugins/spatialquery/selectall.png	2011-02-08 07:17:12 UTC (rev 15137)
@@ -0,0 +1,7 @@
+‰PNG
+
+   
+IHDR          Ëžn‡   gAMA  ±üa   tEXtSoftware www.inkscape.org›î<  åIDATHKÅ—±JA†õ„4¢(‚Ö‚Ø(‚Mš4ž…VZkek¥…–"(‚ "¨`ckK{_ÅÛ¹K.ãìq»îÞîíÝi6	,	—ÉþßÌÎLfGÛí6ŽÔ|-¯µJñùñVj“p€ª‹áþe¹ö/(êÍ!t7â-„h¡ÓD–ÌาB(M#Ð Á}Œ¾Ÿh½˜+¼¥ï	n•l'˜<H€FêtWÈÛmŒÂ»°æ:яN… ª÷ÐiaÄNH쮺˜
+ {p„¬7¥EC@¤ šxw½/¢Æñ„W1k@è ɉ?øàÑ/bZB¤-@ Ä»þÄåqkQÈÞ¢ðÞÐÙ À¥ é ¢ƒb –,ù î)ªÎHBž¡Öîæ¨ñzöÏT“ jµõ6´´b,;w÷¯âŒ fÃ-Ÿ:.ÿlé„ýnD¯ZN	 Þq%€úGä;~À«8û˜½Ó<±c怠ò	 pFCÍ¢}ð
+À²„“ïÙ`+’A¨‰§d¶A´_ÇÁ½ÂÖñß>’qUÃrõAÏþ7–Û6%Àcìks&Õ}% a”÷ʶiÑB
+µZ÷µ ò |Ó¼`Õë\™ÝÇeÛ„œû\    IEND®B`‚
\ No newline at end of file



More information about the QGIS-commit mailing list