Skip to content

Commit e9f8f15

Browse files
author
jef
committed
automatic indentation update (r10980-r11003)
git-svn-id: http://svn.osgeo.org/qgis/trunk@11004 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 9123d60 commit e9f8f15

29 files changed

+933
-933
lines changed

src/app/attributetable/qgsattributetablemodel.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ void QgsAttributeTableModel::layerModified( bool onlyGeometry )
144144

145145
loadLayer();
146146
emit modelChanged();
147-
emit headerDataChanged ( Qt::Horizontal, 0, columnCount());
147+
emit headerDataChanged( Qt::Horizontal, 0, columnCount() );
148148
}
149149

150150
void QgsAttributeTableModel::loadLayer()
@@ -274,12 +274,12 @@ QVariant QgsAttributeTableModel::headerData( int section, Qt::Orientation orient
274274
else
275275
{
276276
QString attributeName = mLayer->attributeAlias( mAttributes[section] );
277-
if(attributeName.isEmpty())
277+
if ( attributeName.isEmpty() )
278278
{
279279
QgsField field = mLayer->pendingFields()[ mAttributes[section] ];
280280
attributeName = field.name();
281281
}
282-
return QVariant(attributeName);
282+
return QVariant( attributeName );
283283
}
284284
}
285285
else return QVariant();

src/app/legend/qgslegendlayer.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -373,10 +373,10 @@ void QgsLegendLayer::vectorLayerSymbology( const QgsVectorLayer* layer, double w
373373
const QgsFieldMap& fields = layer->pendingFields();
374374
for ( QgsAttributeList::iterator it = classfieldlist.begin(); it != classfieldlist.end(); ++it )
375375
{
376-
QString classfieldname = layer->attributeAlias(*it);
377-
if(classfieldname.isEmpty())
376+
QString classfieldname = layer->attributeAlias( *it );
377+
if ( classfieldname.isEmpty() )
378378
{
379-
classfieldname = fields[*it].name();
379+
classfieldname = fields[*it].name();
380380
}
381381
itemList.push_front( std::make_pair( classfieldname, QPixmap() ) );
382382
}

src/app/qgsattributedialog.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ QgsAttributeDialog::QgsAttributeDialog( QgsVectorLayer *vl, QgsFeature *thepFeat
103103
const QgsField &field = theFieldMap[it.key()];
104104

105105
//show attribute alias if available
106-
QString myFieldName = vl->attributeDisplayName(it.key());
106+
QString myFieldName = vl->attributeDisplayName( it.key() );
107107
int myFieldType = field.type();
108108
QLabel * mypLabel = new QLabel();
109109
mypInnerLayout->addWidget( mypLabel, index, 0 );

src/app/qgscontinuouscolordialog.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ QgsContinuousColorDialog::QgsContinuousColorDialog( QgsVectorLayer * layer )
4848
QVariant::Type type = it->type();
4949
if ( type == QVariant::Int || type == QVariant::Double )
5050
{
51-
displayName = mVectorLayer->attributeDisplayName(it.key());
51+
displayName = mVectorLayer->attributeDisplayName( it.key() );
5252
classificationComboBox->addItem( displayName, it.key() );
5353
}
5454
}
@@ -140,7 +140,7 @@ void QgsContinuousColorDialog::apply()
140140

141141
//create the render items for minimum and maximum value
142142
QString minimumString;
143-
if(minimum - floor(minimum) > 0)
143+
if ( minimum - floor( minimum ) > 0 )
144144
{
145145
minimumString = QString::number( minimum, 'f' );
146146
}
@@ -163,7 +163,7 @@ void QgsContinuousColorDialog::apply()
163163
}
164164

165165
QString maximumString;
166-
if(maximum - floor(maximum) > 0)
166+
if ( maximum - floor( maximum ) > 0 )
167167
{
168168
maximumString = QString::number( maximum, 'f' );
169169
}

src/app/qgsgraduatedsymboldialog.cpp

+23-23
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ QgsGraduatedSymbolDialog::QgsGraduatedSymbolDialog( QgsVectorLayer * layer ): QD
4040
QString displayName;
4141

4242
for ( QgsFieldMap::const_iterator it = fields.begin(); it != fields.end(); ++it )
43+
{
44+
QVariant::Type type = ( *it ).type();
45+
if ( type == QVariant::Int || type == QVariant::Double )
4346
{
44-
QVariant::Type type = ( *it ).type();
45-
if ( type == QVariant::Int || type == QVariant::Double )
46-
{
47-
displayName = layer->attributeDisplayName(it.key());
48-
classificationComboBox->addItem( displayName );
49-
mFieldMap.insert( std::make_pair( displayName, it.key() ) );
50-
}
47+
displayName = layer->attributeDisplayName( it.key() );
48+
classificationComboBox->addItem( displayName );
49+
mFieldMap.insert( std::make_pair( displayName, it.key() ) );
5150
}
51+
}
5252

5353
//restore the correct settings
5454
const QgsGraduatedSymbolRenderer* renderer = dynamic_cast < const QgsGraduatedSymbolRenderer * >( layer->renderer() );
@@ -345,25 +345,25 @@ void QgsGraduatedSymbolDialog::adjustClassification()
345345
{
346346
if ( last_it != quantileBorders.end() )
347347
{
348-
if(*last_it - floor(*last_it) > 0)
348+
if ( *last_it - floor( *last_it ) > 0 )
349349
{
350-
lowerString = QString::number(*last_it, 'f');
350+
lowerString = QString::number( *last_it, 'f' );
351351
}
352352
else
353353
{
354-
lowerString = QString::number(*last_it, 'f', 0);
354+
lowerString = QString::number( *last_it, 'f', 0 );
355355
}
356-
( *symbol_it )->setLowerValue(lowerString);
356+
( *symbol_it )->setLowerValue( lowerString );
357357

358-
if(*it - floor(*it) > 0)
358+
if ( *it - floor( *it ) > 0 )
359359
{
360-
upperString = QString::number(*it, 'f');
360+
upperString = QString::number( *it, 'f' );
361361
}
362362
else
363363
{
364-
upperString = QString::number(*it, 'f', 0);
364+
upperString = QString::number( *it, 'f', 0 );
365365
}
366-
( *symbol_it )->setUpperValue(upperString);
366+
( *symbol_it )->setUpperValue( upperString );
367367

368368

369369
listBoxText = lowerString + " - " + upperString;
@@ -386,28 +386,28 @@ void QgsGraduatedSymbolDialog::adjustClassification()
386386
double upper = minimum + ( maximum - minimum ) / numberofclassesspinbox->value() * ( i + 1 );
387387

388388
QString lowerString;
389-
if(lower - floor(lower) > 0)
389+
if ( lower - floor( lower ) > 0 )
390390
{
391-
lowerString = QString::number(lower, 'f');
391+
lowerString = QString::number( lower, 'f' );
392392
}
393393
else
394394
{
395-
lowerString = QString::number(lower, 'f', 0);
395+
lowerString = QString::number( lower, 'f', 0 );
396396
}
397397

398-
( *symbol_it )->setLowerValue(lowerString);
398+
( *symbol_it )->setLowerValue( lowerString );
399399

400400
QString upperString;
401-
if(upper - floor(upper) > 0)
401+
if ( upper - floor( upper ) > 0 )
402402
{
403-
upperString = QString::number(upper, 'f');
403+
upperString = QString::number( upper, 'f' );
404404
}
405405
else
406406
{
407-
upperString = QString::number(upper, 'f', 0);
407+
upperString = QString::number( upper, 'f', 0 );
408408
}
409409

410-
( *symbol_it )->setUpperValue(upperString);
410+
( *symbol_it )->setUpperValue( upperString );
411411
listBoxText = lowerString + " - " + upperString;
412412

413413
QListWidgetItem * mypItem = new QListWidgetItem( listBoxText );

src/app/qgsmaptoolidentify.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ void QgsMapToolIdentify::identifyVectorLayer( const QgsPoint& point )
337337
{
338338
featureNode->setText( 1, it->toString() );
339339
}
340-
QString attributeName = layer->attributeDisplayName(it.key());
340+
QString attributeName = layer->attributeDisplayName( it.key() );
341341
mResults->addAttribute( featureNode, attributeName, it->isNull() ? "NULL" : it->toString() );
342342
}
343343

src/app/qgsuniquevaluedialog.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,19 @@ QgsUniqueValueDialog::QgsUniqueValueDialog( QgsVectorLayer* vl ): QDialog(), mVe
3434
setOrientation( Qt::Vertical );
3535

3636
//find out the fields of mVectorLayer
37-
if(mVectorLayer)
37+
if ( mVectorLayer )
3838
{
3939
//we cannot use unique values for not-commited fields because QgsVectorLayer has no 'unique values' method...
4040
QgsVectorDataProvider* provider = mVectorLayer->dataProvider();
41-
if(provider)
41+
if ( provider )
4242
{
4343
const QgsFieldMap & fields = provider->fields();
4444
QString str;
4545

4646
for ( QgsFieldMap::const_iterator it = fields.begin(); it != fields.end(); ++it )
4747
{
4848
str = ( *it ).name();
49-
str = mVectorLayer->attributeDisplayName(it.key());
49+
str = mVectorLayer->attributeDisplayName( it.key() );
5050
mClassificationComboBox->addItem( str, it.key() );
5151
}
5252
}
@@ -57,14 +57,14 @@ QgsUniqueValueDialog::QgsUniqueValueDialog( QgsVectorLayer* vl ): QDialog(), mVe
5757
mClassListWidget->setEditTriggers( QAbstractItemView::DoubleClicked | QAbstractItemView::EditKeyPressed | QAbstractItemView::AnyKeyPressed );
5858
mClassListWidget->setSortingEnabled( true );
5959

60-
if(mVectorLayer)
60+
if ( mVectorLayer )
6161
{
6262
const QgsUniqueValueRenderer* renderer = dynamic_cast < const QgsUniqueValueRenderer * >( mVectorLayer->renderer() );
6363

6464
if ( renderer )
6565
{
6666
mClassListWidget->clear();
67-
QString field = mVectorLayer->attributeDisplayName(renderer->classificationField());
67+
QString field = mVectorLayer->attributeDisplayName( renderer->classificationField() );
6868
mOldClassificationAttribute = field;
6969
mClassificationComboBox->setCurrentIndex( mClassificationComboBox->findText( field ) );
7070

@@ -291,7 +291,7 @@ void QgsUniqueValueDialog::changeClassificationAttribute()
291291
QgsVectorDataProvider *provider = dynamic_cast<QgsVectorDataProvider *>( mVectorLayer->dataProvider() );
292292
if ( provider )
293293
{
294-
int nr = mClassificationComboBox->itemData(mClassificationComboBox->currentIndex()).toInt();
294+
int nr = mClassificationComboBox->itemData( mClassificationComboBox->currentIndex() ).toInt();
295295
if ( nr == -1 )
296296
{
297297
return;

src/app/qgsvectorlayerproperties.cpp

+10-10
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ void QgsVectorLayerProperties::setRow( int row, int idx, const QgsField &field )
175175
tblAttributes->setItem( row, 2, new QTableWidgetItem( field.typeName() ) );
176176
tblAttributes->setItem( row, 3, new QTableWidgetItem( QString::number( field.length() ) ) );
177177
tblAttributes->setItem( row, 4, new QTableWidgetItem( QString::number( field.precision() ) ) );
178-
tblAttributes->setItem( row, 5, new QTableWidgetItem( field.comment() ) );
178+
tblAttributes->setItem( row, 5, new QTableWidgetItem( field.comment() ) );
179179

180180
for ( int i = 0; i < 6; i++ )
181181
tblAttributes->item( row, i )->setFlags( tblAttributes->item( row, i )->flags() & ~Qt::ItemIsEditable );
@@ -226,7 +226,7 @@ void QgsVectorLayerProperties::setRow( int row, int idx, const QgsField &field )
226226
}
227227

228228
//set the alias for the attribute
229-
tblAttributes->setItem( row, 8, new QTableWidgetItem(layer->attributeAlias(idx)));
229+
tblAttributes->setItem( row, 8, new QTableWidgetItem( layer->attributeAlias( idx ) ) );
230230
}
231231

232232

@@ -385,7 +385,7 @@ void QgsVectorLayerProperties::setDisplayField( QString name )
385385
//! @note in raster props, this method is called sync()
386386
void QgsVectorLayerProperties::reset( void )
387387
{
388-
QObject::disconnect(tblAttributes, SIGNAL(cellChanged(int, int)), this, SLOT(on_tblAttributes_cellChanged(int,int)));
388+
QObject::disconnect( tblAttributes, SIGNAL( cellChanged( int, int ) ), this, SLOT( on_tblAttributes_cellChanged( int, int ) ) );
389389

390390
// populate the general information
391391
txtDisplayName->setText( layer->name() );
@@ -493,7 +493,7 @@ void QgsVectorLayerProperties::reset( void )
493493
sliderTransparency_valueChanged( 255 - layer->getTransparency() );
494494

495495
loadRows();
496-
QObject::connect(tblAttributes, SIGNAL(cellChanged(int, int)), this, SLOT(on_tblAttributes_cellChanged(int,int)));
496+
QObject::connect( tblAttributes, SIGNAL( cellChanged( int, int ) ), this, SLOT( on_tblAttributes_cellChanged( int, int ) ) );
497497
} // reset()
498498

499499

@@ -1073,23 +1073,23 @@ void QgsVectorLayerProperties::on_pbnSaveStyleAs_clicked()
10731073
}
10741074
}
10751075

1076-
void QgsVectorLayerProperties::on_tblAttributes_cellChanged(int row, int column)
1076+
void QgsVectorLayerProperties::on_tblAttributes_cellChanged( int row, int column )
10771077
{
1078-
if(column == 8 && layer) //only consider attribute aliases in this function
1078+
if ( column == 8 && layer ) //only consider attribute aliases in this function
10791079
{
10801080
const QgsFieldMap &fields = layer->pendingFields();
1081-
if(row >= fields.size())
1081+
if ( row >= fields.size() )
10821082
{
10831083
return; //index must be wrong
10841084
}
10851085

10861086
QgsFieldMap::const_iterator f_it = fields.constBegin();
10871087
f_it += row;
10881088
int index = f_it.key();
1089-
QTableWidgetItem* aliasItem = tblAttributes->item(row, column);
1090-
if(aliasItem)
1089+
QTableWidgetItem* aliasItem = tblAttributes->item( row, column );
1090+
if ( aliasItem )
10911091
{
1092-
layer->addAttributeAlias(index, aliasItem->text());
1092+
layer->addAttributeAlias( index, aliasItem->text() );
10931093
}
10941094
}
10951095
}

src/app/qgsvectorlayerproperties.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ class QgsVectorLayerProperties : public QDialog, private Ui::QgsVectorLayerPrope
9696
void on_pbnSaveDefaultStyle_clicked();
9797
void on_pbnLoadStyle_clicked();
9898
void on_pbnSaveStyleAs_clicked();
99-
void on_tblAttributes_cellChanged(int row, int column);
99+
void on_tblAttributes_cellChanged( int row, int column );
100100

101101
void addAttribute();
102102
void deleteAttribute();

src/core/composer/qgslegendmodel.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ int QgsLegendModel::addVectorLayerItems( QStandardItem* layerItem, QgsMapLayer*
110110
QgsFieldMap::const_iterator fieldIt = layerFields.find( *att_it );
111111
if ( fieldIt != layerFields.constEnd() )
112112
{
113-
QString attributeName = vectorLayer->attributeDisplayName(fieldIt.key());
113+
QString attributeName = vectorLayer->attributeDisplayName( fieldIt.key() );
114114
QStandardItem* attributeItem = new QStandardItem( attributeName );
115115
layerItem->setChild( layerItem->rowCount(), 0, attributeItem );
116116
}

src/core/qgsvectorlayer.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -403,15 +403,15 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
403403

404404
/**Sets an alias (a display name) for attributes to display in dialogs
405405
@note added in version 1.2*/
406-
void addAttributeAlias(int attIndex, QString aliasString);
406+
void addAttributeAlias( int attIndex, QString aliasString );
407407

408408
/**Returns the alias of an attribute name or an empty string if there is no alias
409409
@note added in version 1.2*/
410-
QString attributeAlias(int attributeIndex) const;
410+
QString attributeAlias( int attributeIndex ) const;
411411

412412
/**Convenience function that returns the attribute alias if defined or the field name else
413413
@note added in version 1.2*/
414-
QString attributeDisplayName(int attributeIndex) const;
414+
QString attributeDisplayName( int attributeIndex ) const;
415415

416416
/** delete an attribute field (but does not commit it) */
417417
bool deleteAttribute( int attr );

0 commit comments

Comments
 (0)