Skip to content
Permalink
Browse files

also use 24px as default icon size in options

git-svn-id: http://svn.osgeo.org/qgis/trunk@15141 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Feb 8, 2011
1 parent e97aab1 commit 4a6e6107a5becee2793efa9aec2c8602a45b811e
@@ -1662,7 +1662,7 @@ void QgisApp::createToolBars()
{
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::createStatusBar()

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 )
@@ -54,14 +54,14 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WFlags fl ) :
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 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WFlags fl ) :

// 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 @@ void QgsOptions::themeChanged( const QString &newThemeName )
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 @@ void QgsOptions::saveOptions()
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
@@ -57,7 +57,7 @@ class QgsOptions : public QDialog, private Ui::QgsOptionsBase
// 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
@@ -15,7 +15,7 @@
* (at your option) any later version. *
* *
***************************************************************************/
/* $Id: qgsspatialquery.cpp 13447 2010-05-09 00:45:17Z jef $ */
/* $Id$ */

#include <QMessageBox>

@@ -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

@@ -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,45 +253,45 @@ void QgsSpatialQueryDialog::showResultQuery( QDateTime *datetimeStart, QDateTime

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() ) );

// 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 @@ void QgsSpatialQueryDialog::populateOperationComboBox()

} // 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 @@ void QgsSpatialQueryDialog::populateFeatureListWidget( QListWidget *listWidget,
listWidget->addItem( QString::number( item.next() ) );
}
listWidget->setEnabled( true );
if (hasSetRow)
if ( hasSetRow )
{
listWidget->setCurrentRow( 0 );
}
@@ -606,19 +606,19 @@ void QgsSpatialQueryDialog::populateFeatureListWidget( QListWidget *listWidget,

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 @@ void QgsSpatialQueryDialog::on_resultFeatureTargetListWidget_itemClicked( QListW
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 @@ void QgsSpatialQueryDialog::on_invalidFeatureTargetListWidget_itemClicked( QList
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 @@ void QgsSpatialQueryDialog::on_invalidFeatureReferenceListWidget_itemClicked( QL
if ( mCurrentFeatureWidget != FW_InvalidRefence )
{
mCurrentFeatureWidget = FW_InvalidRefence;
on_invalidFeatureReferenceListWidget_currentItemChanged(item);
on_invalidFeatureReferenceListWidget_currentItemChanged( item );
}
} // void QgsSpatialQueryDialog::on_invalidFeatureReferenceListWidget_itemClicked( QListWidgetItem * item )

@@ -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

0 comments on commit 4a6e610

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