[QGIS Commit] r15141 - in trunk/qgis/src: app plugins/spatialquery

svn_qgis at osgeo.org svn_qgis at osgeo.org
Tue Feb 8 08:34:43 EST 2011


Author: jef
Date: 2011-02-08 05:34:43 -0800 (Tue, 08 Feb 2011)
New Revision: 15141

Modified:
   trunk/qgis/src/app/qgisapp.cpp
   trunk/qgis/src/app/qgsoptions.cpp
   trunk/qgis/src/app/qgsoptions.h
   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
Log:
also use 24px as default icon size in options

Modified: trunk/qgis/src/app/qgisapp.cpp
===================================================================
--- trunk/qgis/src/app/qgisapp.cpp	2011-02-08 12:00:20 UTC (rev 15140)
+++ trunk/qgis/src/app/qgisapp.cpp	2011-02-08 13:34:43 UTC (rev 15141)
@@ -1662,7 +1662,7 @@
 {
   QSettings settings;
   int size = settings.value( "/IconSize", 24 ).toInt();
-  setIconSize(QSize(size,size));
+  setIconSize( QSize( size, size ) );
   // QSize myIconSize ( 32,32 ); //large icons
   // Note: we need to set each object name to ensure that
   // qmainwindow::saveState and qmainwindow::restoreState
@@ -2010,15 +2010,15 @@
 
 void QgisApp::setIconSizes( int size )
 {
-    //Set the icon size of for all the toolbars created in the future.
-    setIconSize(QSize(size,size));
+  //Set the icon size of for all the toolbars created in the future.
+  setIconSize( QSize( size, size ) );
 
-    //Change all current icon sizes.
-    QList<QToolBar *> toolbars = findChildren<QToolBar *>();
-    foreach(QToolBar * toolbar, toolbars)
-    {
-        toolbar->setIconSize(QSize(size,size));
-    }
+  //Change all current icon sizes.
+  QList<QToolBar *> toolbars = findChildren<QToolBar *>();
+  foreach( QToolBar * toolbar, toolbars )
+  {
+    toolbar->setIconSize( QSize( size, size ) );
+  }
 }
 
 void QgisApp::setTheme( QString theThemeName )

Modified: trunk/qgis/src/app/qgsoptions.cpp
===================================================================
--- trunk/qgis/src/app/qgsoptions.cpp	2011-02-08 12:00:20 UTC (rev 15140)
+++ trunk/qgis/src/app/qgsoptions.cpp	2011-02-08 13:34:43 UTC (rev 15141)
@@ -54,14 +54,14 @@
   connect( cmbTheme, SIGNAL( highlighted( const QString& ) ), this, SLOT( themeChanged( const QString& ) ) );
   connect( cmbTheme, SIGNAL( textChanged( const QString& ) ), this, SLOT( themeChanged( const QString& ) ) );
 
-  connect( cmbSize, SIGNAL( activated(const QString& ) ),this,SLOT(iconSizeChanged( const QString& ) ) );
-  connect( cmbSize, SIGNAL( highlighted(const QString& ) ),this,SLOT(iconSizeChanged( const QString& ) ) );
-  connect( cmbSize, SIGNAL( textChanged(const QString& ) ),this,SLOT(iconSizeChanged( const QString& ) ) );
+  connect( cmbSize, SIGNAL( activated( const QString& ) ), this, SLOT( iconSizeChanged( const QString& ) ) );
+  connect( cmbSize, SIGNAL( highlighted( const QString& ) ), this, SLOT( iconSizeChanged( const QString& ) ) );
+  connect( cmbSize, SIGNAL( textChanged( const QString& ) ), this, SLOT( iconSizeChanged( const QString& ) ) );
   connect( this, SIGNAL( accepted() ), this, SLOT( saveOptions() ) );
 
-  cmbSize->addItem("16");
-  cmbSize->addItem("24");
-  cmbSize->addItem("32");
+  cmbSize->addItem( "16" );
+  cmbSize->addItem( "24" );
+  cmbSize->addItem( "32" );
 
   cmbIdentifyMode->addItem( tr( "Current layer" ), 0 );
   cmbIdentifyMode->addItem( tr( "Top down, stop at first" ), 1 );
@@ -244,7 +244,7 @@
 
   // set the theme combo
   cmbTheme->setCurrentIndex( cmbTheme->findText( settings.value( "/Themes", "default" ).toString() ) );
-  cmbSize->setCurrentIndex( cmbSize->findText(settings.value( "/IconSize").toString() ) );
+  cmbSize->setCurrentIndex( cmbSize->findText( settings.value( "/IconSize", 24 ).toString() ) );
   //set the state of the checkboxes
   chkAntiAliasing->setChecked( settings.value( "/qgis/enable_anti_aliasing", false ).toBool() );
   chkUseRenderCaching->setChecked( settings.value( "/qgis/enable_render_caching", false ).toBool() );
@@ -461,10 +461,10 @@
   QgisApp::instance()->setTheme( newt );
 }
 
-void QgsOptions::iconSizeChanged(const QString &iconSize )
+void QgsOptions::iconSizeChanged( const QString &iconSize )
 {
-    int icon = iconSize.toInt();
-    QgisApp::instance()->setIconSizes(icon);
+  int icon = iconSize.toInt();
+  QgisApp::instance()->setIconSizes( icon );
 
 }
 
@@ -576,7 +576,7 @@
     settings.setValue( "/Themes", cmbTheme->currentText() );
   }
 
-  settings.setValue( "/IconSize",cmbSize->currentText() );
+  settings.setValue( "/IconSize", cmbSize->currentText() );
 
   settings.setValue( "/Map/updateThreshold", spinBoxUpdateThreshold->value() );
   //check behaviour so default projection when new layer is added with no

Modified: trunk/qgis/src/app/qgsoptions.h
===================================================================
--- trunk/qgis/src/app/qgsoptions.h	2011-02-08 12:00:20 UTC (rev 15140)
+++ trunk/qgis/src/app/qgsoptions.h	2011-02-08 13:34:43 UTC (rev 15141)
@@ -57,7 +57,7 @@
     // activates or highlights a theme name in the drop-down list
     void themeChanged( const QString & );
 
-    void iconSizeChanged(const QString &iconSize );
+    void iconSizeChanged( const QString &iconSize );
     /**
      * Return the desired state of newly added layers. If a layer
      * is to be drawn when added to the map, this function returns

Modified: trunk/qgis/src/plugins/spatialquery/qgsspatialquery.cpp
===================================================================
--- trunk/qgis/src/plugins/spatialquery/qgsspatialquery.cpp	2011-02-08 12:00:20 UTC (rev 15140)
+++ trunk/qgis/src/plugins/spatialquery/qgsspatialquery.cpp	2011-02-08 13:34:43 UTC (rev 15141)
@@ -15,7 +15,7 @@
  *   (at your option) any later version.                                   *
  *                                                                         *
  ***************************************************************************/
-/*  $Id: qgsspatialquery.cpp 13447 2010-05-09 00:45:17Z jef $ */
+/*  $Id$ */
 
 #include <QMessageBox>
 

Modified: trunk/qgis/src/plugins/spatialquery/qgsspatialquery.h
===================================================================
--- trunk/qgis/src/plugins/spatialquery/qgsspatialquery.h	2011-02-08 12:00:20 UTC (rev 15140)
+++ trunk/qgis/src/plugins/spatialquery/qgsspatialquery.h	2011-02-08 13:34:43 UTC (rev 15141)
@@ -15,7 +15,7 @@
  *   (at your option) any later version.                                   *
  *                                                                         *
  ***************************************************************************/
-/*  $Id: qgsspatialquery.h 13380 2010-04-25 12:51:49Z jef $ */
+/*  $Id$ */
 #ifndef SPATIALQUERY_H
 #define SPATIALQUERY_H
 

Modified: trunk/qgis/src/plugins/spatialquery/qgsspatialquerydialog.cpp
===================================================================
--- trunk/qgis/src/plugins/spatialquery/qgsspatialquerydialog.cpp	2011-02-08 12:00:20 UTC (rev 15140)
+++ trunk/qgis/src/plugins/spatialquery/qgsspatialquerydialog.cpp	2011-02-08 13:34:43 UTC (rev 15141)
@@ -15,7 +15,7 @@
  *   (at your option) any later version.                                   *
  *                                                                         *
  ***************************************************************************/
-/*  $Id: qgsspatialquerydialog.cpp 13441 2010-05-08 19:07:12Z jef $ */
+/*  $Id$ */
 
 #include <QMessageBox>
 #include <QDateTime>
@@ -253,7 +253,7 @@
 
   mRubberSelectId->reset();
 
-  QString formatLabel("%1(%2)");
+  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() ) );
@@ -261,37 +261,37 @@
   // Result target
   if ( mFeatureResult.size() > 0 )
   {
-    pushButtonSelectResultTarget->setEnabled(true);
+    pushButtonSelectResultTarget->setEnabled( true );
     populateFeatureListWidget( resultFeatureTargetListWidget, mFeatureResult );
     evaluateCheckBox( true );
     on_resultFeatureTargetListWidget_currentItemChanged( resultFeatureTargetListWidget->currentItem() );
   }
   else
   {
-    pushButtonSelectResultTarget->setEnabled(false);
-    clearFeatureListWidget(resultFeatureTargetListWidget);
+    pushButtonSelectResultTarget->setEnabled( false );
+    clearFeatureListWidget( resultFeatureTargetListWidget );
   }
   // Invalid target
   if ( mFeatureInvalidTarget.size() > 0 )
   {
-    pushButtonSelectInvalidTarget->setEnabled(true);
+    pushButtonSelectInvalidTarget->setEnabled( true );
     populateFeatureListWidget( invalidFeatureTargetListWidget, mFeatureInvalidTarget, false );
   }
   else
   {
-    pushButtonSelectInvalidTarget->setEnabled(false);
-    clearFeatureListWidget(invalidFeatureTargetListWidget);
+    pushButtonSelectInvalidTarget->setEnabled( false );
+    clearFeatureListWidget( invalidFeatureTargetListWidget );
   }
   // Invalid reference
   if ( mFeatureInvalidReference.size() > 0 )
   {
-    pushButtonSelectInvalidReference->setEnabled(true);
+    pushButtonSelectInvalidReference->setEnabled( true );
     populateFeatureListWidget( invalidFeatureReferenceListWidget, mFeatureInvalidReference, false );
   }
   else
   {
-    pushButtonSelectInvalidReference->setEnabled(false);
-    clearFeatureListWidget(invalidFeatureReferenceListWidget);
+    pushButtonSelectInvalidReference->setEnabled( false );
+    clearFeatureListWidget( invalidFeatureReferenceListWidget );
   }
   setLayoutResultInvalid( true );
   adjustSize();
@@ -584,7 +584,7 @@
 
 } // QgsSpatialQueryDialog::populateOperantionComboBox()
 
-void QgsSpatialQueryDialog::populateFeatureListWidget( QListWidget *listWidget, QSet<int> & setFeatures, bool hasSetRow)
+void QgsSpatialQueryDialog::populateFeatureListWidget( QListWidget *listWidget, QSet<int> & setFeatures, bool hasSetRow )
 {
   listWidget->blockSignals( true );
   listWidget->clear();
@@ -596,7 +596,7 @@
     listWidget->addItem( QString::number( item.next() ) );
   }
   listWidget->setEnabled( true );
-  if (hasSetRow)
+  if ( hasSetRow )
   {
     listWidget->setCurrentRow( 0 );
   }
@@ -606,19 +606,19 @@
 
 void QgsSpatialQueryDialog::clearFeatureListWidget( QListWidget *listWidget )
 {
-   listWidget->blockSignals( true );
-   listWidget->clear();
-   listWidget->blockSignals( false );
+  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();
+  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 )
@@ -708,7 +708,7 @@
   if ( mCurrentFeatureWidget != FW_Result )
   {
     mCurrentFeatureWidget = FW_Result;
-    on_resultFeatureTargetListWidget_currentItemChanged(item);
+    on_resultFeatureTargetListWidget_currentItemChanged( item );
   }
 } // void QgsSpatialQueryDialog::on_resultFeatureTargetListWidget_itemClicked( QListWidgetItem * item )
 
@@ -727,7 +727,7 @@
   if ( mCurrentFeatureWidget != FW_InvalidTarget )
   {
     mCurrentFeatureWidget = FW_InvalidTarget;
-    on_invalidFeatureTargetListWidget_currentItemChanged(item);
+    on_invalidFeatureTargetListWidget_currentItemChanged( item );
   }
 } // void QgsSpatialQueryDialog::on_invalidFeatureTargetListWidget_itemClicked( QListWidgetItem * item )
 
@@ -746,7 +746,7 @@
   if ( mCurrentFeatureWidget != FW_InvalidRefence )
   {
     mCurrentFeatureWidget = FW_InvalidRefence;
-    on_invalidFeatureReferenceListWidget_currentItemChanged(item);
+    on_invalidFeatureReferenceListWidget_currentItemChanged( item );
   }
 } // void QgsSpatialQueryDialog::on_invalidFeatureReferenceListWidget_itemClicked( QListWidgetItem * item )
 

Modified: trunk/qgis/src/plugins/spatialquery/qgsspatialquerydialog.h
===================================================================
--- trunk/qgis/src/plugins/spatialquery/qgsspatialquerydialog.h	2011-02-08 12:00:20 UTC (rev 15140)
+++ trunk/qgis/src/plugins/spatialquery/qgsspatialquerydialog.h	2011-02-08 13:34:43 UTC (rev 15141)
@@ -15,7 +15,7 @@
  *   (at your option) any later version.                                   *
  *                                                                         *
  ***************************************************************************/
-/*  $Id: qgsspatialquerydialog.h 13377 2010-04-25 01:07:36Z jef $ */
+/*  $Id$ */
 
 #ifndef SPATIALQUERYDIALOG_H
 #define SPATIALQUERYDIALOG_H



More information about the QGIS-commit mailing list