Skip to content

Commit aeb74f0

Browse files
author
jef
committed
also use 24px as default icon size in options
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@15141 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent fb53e2d commit aeb74f0

File tree

7 files changed

+49
-49
lines changed

7 files changed

+49
-49
lines changed

src/app/qgisapp.cpp

+9-9
Original file line numberDiff line numberDiff line change
@@ -1662,7 +1662,7 @@ void QgisApp::createToolBars()
16621662
{
16631663
QSettings settings;
16641664
int size = settings.value( "/IconSize", 24 ).toInt();
1665-
setIconSize(QSize(size,size));
1665+
setIconSize( QSize( size, size ) );
16661666
// QSize myIconSize ( 32,32 ); //large icons
16671667
// Note: we need to set each object name to ensure that
16681668
// qmainwindow::saveState and qmainwindow::restoreState
@@ -2010,15 +2010,15 @@ void QgisApp::createStatusBar()
20102010

20112011
void QgisApp::setIconSizes( int size )
20122012
{
2013-
//Set the icon size of for all the toolbars created in the future.
2014-
setIconSize(QSize(size,size));
2013+
//Set the icon size of for all the toolbars created in the future.
2014+
setIconSize( QSize( size, size ) );
20152015

2016-
//Change all current icon sizes.
2017-
QList<QToolBar *> toolbars = findChildren<QToolBar *>();
2018-
foreach(QToolBar * toolbar, toolbars)
2019-
{
2020-
toolbar->setIconSize(QSize(size,size));
2021-
}
2016+
//Change all current icon sizes.
2017+
QList<QToolBar *> toolbars = findChildren<QToolBar *>();
2018+
foreach( QToolBar * toolbar, toolbars )
2019+
{
2020+
toolbar->setIconSize( QSize( size, size ) );
2021+
}
20222022
}
20232023

20242024
void QgisApp::setTheme( QString theThemeName )

src/app/qgsoptions.cpp

+11-11
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,14 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WFlags fl ) :
5454
connect( cmbTheme, SIGNAL( highlighted( const QString& ) ), this, SLOT( themeChanged( const QString& ) ) );
5555
connect( cmbTheme, SIGNAL( textChanged( const QString& ) ), this, SLOT( themeChanged( const QString& ) ) );
5656

57-
connect( cmbSize, SIGNAL( activated(const QString& ) ),this,SLOT(iconSizeChanged( const QString& ) ) );
58-
connect( cmbSize, SIGNAL( highlighted(const QString& ) ),this,SLOT(iconSizeChanged( const QString& ) ) );
59-
connect( cmbSize, SIGNAL( textChanged(const QString& ) ),this,SLOT(iconSizeChanged( const QString& ) ) );
57+
connect( cmbSize, SIGNAL( activated( const QString& ) ), this, SLOT( iconSizeChanged( const QString& ) ) );
58+
connect( cmbSize, SIGNAL( highlighted( const QString& ) ), this, SLOT( iconSizeChanged( const QString& ) ) );
59+
connect( cmbSize, SIGNAL( textChanged( const QString& ) ), this, SLOT( iconSizeChanged( const QString& ) ) );
6060
connect( this, SIGNAL( accepted() ), this, SLOT( saveOptions() ) );
6161

62-
cmbSize->addItem("16");
63-
cmbSize->addItem("24");
64-
cmbSize->addItem("32");
62+
cmbSize->addItem( "16" );
63+
cmbSize->addItem( "24" );
64+
cmbSize->addItem( "32" );
6565

6666
cmbIdentifyMode->addItem( tr( "Current layer" ), 0 );
6767
cmbIdentifyMode->addItem( tr( "Top down, stop at first" ), 1 );
@@ -244,7 +244,7 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WFlags fl ) :
244244

245245
// set the theme combo
246246
cmbTheme->setCurrentIndex( cmbTheme->findText( settings.value( "/Themes", "default" ).toString() ) );
247-
cmbSize->setCurrentIndex( cmbSize->findText(settings.value( "/IconSize").toString() ) );
247+
cmbSize->setCurrentIndex( cmbSize->findText( settings.value( "/IconSize", 24 ).toString() ) );
248248
//set the state of the checkboxes
249249
chkAntiAliasing->setChecked( settings.value( "/qgis/enable_anti_aliasing", false ).toBool() );
250250
chkUseRenderCaching->setChecked( settings.value( "/qgis/enable_render_caching", false ).toBool() );
@@ -461,10 +461,10 @@ void QgsOptions::themeChanged( const QString &newThemeName )
461461
QgisApp::instance()->setTheme( newt );
462462
}
463463

464-
void QgsOptions::iconSizeChanged(const QString &iconSize )
464+
void QgsOptions::iconSizeChanged( const QString &iconSize )
465465
{
466-
int icon = iconSize.toInt();
467-
QgisApp::instance()->setIconSizes(icon);
466+
int icon = iconSize.toInt();
467+
QgisApp::instance()->setIconSizes( icon );
468468

469469
}
470470

@@ -576,7 +576,7 @@ void QgsOptions::saveOptions()
576576
settings.setValue( "/Themes", cmbTheme->currentText() );
577577
}
578578

579-
settings.setValue( "/IconSize",cmbSize->currentText() );
579+
settings.setValue( "/IconSize", cmbSize->currentText() );
580580

581581
settings.setValue( "/Map/updateThreshold", spinBoxUpdateThreshold->value() );
582582
//check behaviour so default projection when new layer is added with no

src/app/qgsoptions.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class QgsOptions : public QDialog, private Ui::QgsOptionsBase
5757
// activates or highlights a theme name in the drop-down list
5858
void themeChanged( const QString & );
5959

60-
void iconSizeChanged(const QString &iconSize );
60+
void iconSizeChanged( const QString &iconSize );
6161
/**
6262
* Return the desired state of newly added layers. If a layer
6363
* is to be drawn when added to the map, this function returns

src/plugins/spatialquery/qgsspatialquery.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* (at your option) any later version. *
1616
* *
1717
***************************************************************************/
18-
/* $Id: qgsspatialquery.cpp 13447 2010-05-09 00:45:17Z jef $ */
18+
/* $Id$ */
1919

2020
#include <QMessageBox>
2121

src/plugins/spatialquery/qgsspatialquery.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* (at your option) any later version. *
1616
* *
1717
***************************************************************************/
18-
/* $Id: qgsspatialquery.h 13380 2010-04-25 12:51:49Z jef $ */
18+
/* $Id$ */
1919
#ifndef SPATIALQUERY_H
2020
#define SPATIALQUERY_H
2121

src/plugins/spatialquery/qgsspatialquerydialog.cpp

+25-25
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* (at your option) any later version. *
1616
* *
1717
***************************************************************************/
18-
/* $Id: qgsspatialquerydialog.cpp 13441 2010-05-08 19:07:12Z jef $ */
18+
/* $Id$ */
1919

2020
#include <QMessageBox>
2121
#include <QDateTime>
@@ -253,45 +253,45 @@ void QgsSpatialQueryDialog::showResultQuery( QDateTime *datetimeStart, QDateTime
253253

254254
mRubberSelectId->reset();
255255

256-
QString formatLabel("%1(%2)");
256+
QString formatLabel( "%1(%2)" );
257257
resultTargetLabel->setText( formatLabel.arg( mLayerTarget->name() ).arg( mFeatureResult.size() ) );
258258
invalidTargetLabel->setText( formatLabel.arg( mLayerTarget->name() ).arg( mFeatureInvalidTarget.size() ) );
259259
invalidReferenceLabel->setText( formatLabel.arg( mLayerReference->name() ).arg( mFeatureInvalidReference.size() ) );
260260

261261
// Result target
262262
if ( mFeatureResult.size() > 0 )
263263
{
264-
pushButtonSelectResultTarget->setEnabled(true);
264+
pushButtonSelectResultTarget->setEnabled( true );
265265
populateFeatureListWidget( resultFeatureTargetListWidget, mFeatureResult );
266266
evaluateCheckBox( true );
267267
on_resultFeatureTargetListWidget_currentItemChanged( resultFeatureTargetListWidget->currentItem() );
268268
}
269269
else
270270
{
271-
pushButtonSelectResultTarget->setEnabled(false);
272-
clearFeatureListWidget(resultFeatureTargetListWidget);
271+
pushButtonSelectResultTarget->setEnabled( false );
272+
clearFeatureListWidget( resultFeatureTargetListWidget );
273273
}
274274
// Invalid target
275275
if ( mFeatureInvalidTarget.size() > 0 )
276276
{
277-
pushButtonSelectInvalidTarget->setEnabled(true);
277+
pushButtonSelectInvalidTarget->setEnabled( true );
278278
populateFeatureListWidget( invalidFeatureTargetListWidget, mFeatureInvalidTarget, false );
279279
}
280280
else
281281
{
282-
pushButtonSelectInvalidTarget->setEnabled(false);
283-
clearFeatureListWidget(invalidFeatureTargetListWidget);
282+
pushButtonSelectInvalidTarget->setEnabled( false );
283+
clearFeatureListWidget( invalidFeatureTargetListWidget );
284284
}
285285
// Invalid reference
286286
if ( mFeatureInvalidReference.size() > 0 )
287287
{
288-
pushButtonSelectInvalidReference->setEnabled(true);
288+
pushButtonSelectInvalidReference->setEnabled( true );
289289
populateFeatureListWidget( invalidFeatureReferenceListWidget, mFeatureInvalidReference, false );
290290
}
291291
else
292292
{
293-
pushButtonSelectInvalidReference->setEnabled(false);
294-
clearFeatureListWidget(invalidFeatureReferenceListWidget);
293+
pushButtonSelectInvalidReference->setEnabled( false );
294+
clearFeatureListWidget( invalidFeatureReferenceListWidget );
295295
}
296296
setLayoutResultInvalid( true );
297297
adjustSize();
@@ -584,7 +584,7 @@ void QgsSpatialQueryDialog::populateOperationComboBox()
584584

585585
} // QgsSpatialQueryDialog::populateOperantionComboBox()
586586

587-
void QgsSpatialQueryDialog::populateFeatureListWidget( QListWidget *listWidget, QSet<int> & setFeatures, bool hasSetRow)
587+
void QgsSpatialQueryDialog::populateFeatureListWidget( QListWidget *listWidget, QSet<int> & setFeatures, bool hasSetRow )
588588
{
589589
listWidget->blockSignals( true );
590590
listWidget->clear();
@@ -596,7 +596,7 @@ void QgsSpatialQueryDialog::populateFeatureListWidget( QListWidget *listWidget,
596596
listWidget->addItem( QString::number( item.next() ) );
597597
}
598598
listWidget->setEnabled( true );
599-
if (hasSetRow)
599+
if ( hasSetRow )
600600
{
601601
listWidget->setCurrentRow( 0 );
602602
}
@@ -606,19 +606,19 @@ void QgsSpatialQueryDialog::populateFeatureListWidget( QListWidget *listWidget,
606606

607607
void QgsSpatialQueryDialog::clearFeatureListWidget( QListWidget *listWidget )
608608
{
609-
listWidget->blockSignals( true );
610-
listWidget->clear();
611-
listWidget->blockSignals( false );
609+
listWidget->blockSignals( true );
610+
listWidget->clear();
611+
listWidget->blockSignals( false );
612612
} // void QgsSpatialQueryDialog::clearFeatureListWidget( QListWidget *listWidget )
613613

614614
void QgsSpatialQueryDialog::changeFeatureListWidget( QListWidget *listWidget, QgsVectorLayer* vectorLayer, const QString& currentText )
615615
{
616-
listWidget->setEnabled( false );
617-
bool ok;
618-
int id = currentText.toInt( &ok );
619-
showRubberFeature( vectorLayer, id );
620-
listWidget->setEnabled( true );
621-
listWidget->setFocus();
616+
listWidget->setEnabled( false );
617+
bool ok;
618+
int id = currentText.toInt( &ok );
619+
showRubberFeature( vectorLayer, id );
620+
listWidget->setEnabled( true );
621+
listWidget->setFocus();
622622
} // void QgsSpatialQueryDialog::changeFeatureListWidget( QListWidget *listWidget, QgsVectorLayer* layer, const QString& currentText )
623623

624624
void QgsSpatialQueryDialog::showRubberFeature( QgsVectorLayer* vectorLayer, int id )
@@ -708,7 +708,7 @@ void QgsSpatialQueryDialog::on_resultFeatureTargetListWidget_itemClicked( QListW
708708
if ( mCurrentFeatureWidget != FW_Result )
709709
{
710710
mCurrentFeatureWidget = FW_Result;
711-
on_resultFeatureTargetListWidget_currentItemChanged(item);
711+
on_resultFeatureTargetListWidget_currentItemChanged( item );
712712
}
713713
} // void QgsSpatialQueryDialog::on_resultFeatureTargetListWidget_itemClicked( QListWidgetItem * item )
714714

@@ -727,7 +727,7 @@ void QgsSpatialQueryDialog::on_invalidFeatureTargetListWidget_itemClicked( QList
727727
if ( mCurrentFeatureWidget != FW_InvalidTarget )
728728
{
729729
mCurrentFeatureWidget = FW_InvalidTarget;
730-
on_invalidFeatureTargetListWidget_currentItemChanged(item);
730+
on_invalidFeatureTargetListWidget_currentItemChanged( item );
731731
}
732732
} // void QgsSpatialQueryDialog::on_invalidFeatureTargetListWidget_itemClicked( QListWidgetItem * item )
733733

@@ -746,7 +746,7 @@ void QgsSpatialQueryDialog::on_invalidFeatureReferenceListWidget_itemClicked( QL
746746
if ( mCurrentFeatureWidget != FW_InvalidRefence )
747747
{
748748
mCurrentFeatureWidget = FW_InvalidRefence;
749-
on_invalidFeatureReferenceListWidget_currentItemChanged(item);
749+
on_invalidFeatureReferenceListWidget_currentItemChanged( item );
750750
}
751751
} // void QgsSpatialQueryDialog::on_invalidFeatureReferenceListWidget_itemClicked( QListWidgetItem * item )
752752

src/plugins/spatialquery/qgsspatialquerydialog.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* (at your option) any later version. *
1616
* *
1717
***************************************************************************/
18-
/* $Id: qgsspatialquerydialog.h 13377 2010-04-25 01:07:36Z jef $ */
18+
/* $Id$ */
1919

2020
#ifndef SPATIALQUERYDIALOG_H
2121
#define SPATIALQUERYDIALOG_H

0 commit comments

Comments
 (0)