Skip to content

Commit bbd1208

Browse files
author
jef
committed
automatic indentation update (r9138-r9226)
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@9227 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 3a7bcd4 commit bbd1208

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1181
-1181
lines changed

src/app/composer/qgscomposer.cpp

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -79,30 +79,30 @@ QgsComposer::QgsComposer( QgisApp *qgis ): QMainWindow()
7979
// mActionSelectMoveItem
8080

8181
QAction* moveItemContentAction = new QAction( QIcon( QPixmap( myIconPath + "mActionMoveItemContent.png" ) ),
82-
tr( "Move Content" ), 0 );
82+
tr( "Move Content" ), 0 );
8383
moveItemContentAction->setToolTip( tr( "Move item content" ) );
8484
moveItemContentAction->setCheckable( true );
8585
connect( moveItemContentAction, SIGNAL( triggered() ), this, SLOT( moveItemContent() ) );
8686
toolBar->addAction( moveItemContentAction );
8787
//toolBar->addAction(QIcon(QPixmap(myIconPath+"mActionMoveItemContent.png")), tr("Move Item content"), this, SLOT(moveItemContent()));
8888

8989
QAction* groupItemsAction = toolBar->addAction( QIcon( QPixmap( myIconPath + "mActionGroupItems.png" ) ),
90-
tr( "&Group" ), this, SLOT( groupItems() ) );
90+
tr( "&Group" ), this, SLOT( groupItems() ) );
9191
groupItemsAction->setToolTip( tr( "Group items" ) );
9292
QAction* ungroupItemsAction = toolBar->addAction( QIcon( QPixmap( myIconPath + "mActionUngroupItems.png" ) ),
93-
tr( "&Ungroup" ), this, SLOT( ungroupItems() ) );
93+
tr( "&Ungroup" ), this, SLOT( ungroupItems() ) );
9494
ungroupItemsAction->setToolTip( tr( "Ungroup items" ) );
9595
QAction* raiseItemsAction = toolBar->addAction( QIcon( QPixmap( myIconPath + "mActionRaiseItems.png" ) ),
96-
tr( "Raise" ), this, SLOT( raiseSelectedItems() ) );
96+
tr( "Raise" ), this, SLOT( raiseSelectedItems() ) );
9797
raiseItemsAction->setToolTip( tr( "Raise selected items" ) );
9898
QAction* lowerItemsAction = toolBar->addAction( QIcon( QPixmap( myIconPath + "mActionLowerItems.png" ) ),
99-
tr( "Lower" ), this, SLOT( lowerSelectedItems() ) );
99+
tr( "Lower" ), this, SLOT( lowerSelectedItems() ) );
100100
lowerItemsAction->setToolTip( tr( "Lower selected items" ) );
101101
QAction* moveItemsToTopAction = toolBar->addAction( QIcon( QPixmap( myIconPath + "mActionMoveItemsToTop.png" ) ),
102-
tr( "Bring to Front" ), this, SLOT( moveSelectedItemsToTop() ) );
102+
tr( "Bring to Front" ), this, SLOT( moveSelectedItemsToTop() ) );
103103
moveItemsToTopAction->setToolTip( tr( "Move selected items to top" ) );
104104
QAction* moveItemsToBottomAction = toolBar->addAction( QIcon( QPixmap( myIconPath + "mActionMoveItemsToBottom.png" ) ),
105-
tr( "Send to Back" ), this, SLOT( moveSelectedItemsToBottom() ) );
105+
tr( "Send to Back" ), this, SLOT( moveSelectedItemsToBottom() ) );
106106
moveItemsToBottomAction->setToolTip( tr( "Move selected items to bottom" ) );
107107

108108
QActionGroup* toggleActionGroup = new QActionGroup( this );
@@ -179,7 +179,7 @@ QgsComposer::QgsComposer( QgisApp *qgis ): QMainWindow()
179179
layoutMenu->addAction( lowerItemsAction );
180180
layoutMenu->addAction( moveItemsToTopAction );
181181
layoutMenu->addAction( moveItemsToBottomAction );
182-
182+
183183
#ifndef Q_WS_MAC64 /* assertion failure in NSMenuItem setSubmenu (Qt 4.5.0-snapshot-20080830) */
184184
menuBar()->addMenu( QgisApp::instance()->windowMenu() );
185185

@@ -311,15 +311,15 @@ void QgsComposer::changeEvent( QEvent* event )
311311
QMainWindow::changeEvent( event );
312312
switch ( event->type() )
313313
{
314-
case QEvent::ActivationChange:
315-
if ( QApplication::activeWindow() == this )
316-
{
317-
mWindowAction->setChecked( true );
318-
}
319-
break;
314+
case QEvent::ActivationChange:
315+
if ( QApplication::activeWindow() == this )
316+
{
317+
mWindowAction->setChecked( true );
318+
}
319+
break;
320320

321-
default:
322-
break;
321+
default:
322+
break;
323323
}
324324
}
325325

src/app/composer/qgscomposerlegendwidget.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -362,20 +362,20 @@ void QgsComposerLegendWidget::on_mUpdatePushButton_clicked()
362362
{
363363
return;
364364
}
365-
365+
366366
QModelIndex parentIndex = currentIndex.parent();
367367
if ( !parentIndex.isValid() ) // a layer item
368-
{
369-
QString mapLayerId = currentItem->data().toString();
370-
mLegend->model()->updateLayer(mapLayerId);
371-
mLegend->update();
372-
}
368+
{
369+
QString mapLayerId = currentItem->data().toString();
370+
mLegend->model()->updateLayer( mapLayerId );
371+
mLegend->update();
372+
}
373373
}
374374

375375
void QgsComposerLegendWidget::on_mUpdateAllPushButton_clicked()
376376
{
377-
if(mLegend)
378-
{
379-
mLegend->updateLegend();
380-
}
377+
if ( mLegend )
378+
{
379+
mLegend->updateLegend();
380+
}
381381
}

src/app/qgisapp.cpp

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4688,25 +4688,25 @@ void QgisApp::changeEvent( QEvent* event )
46884688
#ifdef Q_WS_MAC
46894689
switch ( event->type() )
46904690
{
4691-
case QEvent::ActivationChange:
4692-
if ( QApplication::activeWindow() == this )
4693-
{
4694-
mWindowAction->setChecked( true );
4695-
}
4696-
// this should not be necessary since the action is part of an action group
4697-
// however this check is not cleared if PrintComposer is closed and reopened
4698-
else
4699-
{
4700-
mWindowAction->setChecked( false );
4701-
}
4702-
break;
4691+
case QEvent::ActivationChange:
4692+
if ( QApplication::activeWindow() == this )
4693+
{
4694+
mWindowAction->setChecked( true );
4695+
}
4696+
// this should not be necessary since the action is part of an action group
4697+
// however this check is not cleared if PrintComposer is closed and reopened
4698+
else
4699+
{
4700+
mWindowAction->setChecked( false );
4701+
}
4702+
break;
47034703

4704-
case QEvent::WindowTitleChange:
4705-
mWindowAction->setText( windowTitle() );
4706-
break;
4704+
case QEvent::WindowTitleChange:
4705+
mWindowAction->setText( windowTitle() );
4706+
break;
47074707

4708-
default:
4709-
break;
4708+
default:
4709+
break;
47104710
}
47114711
#endif
47124712
}

src/app/qgsattributetabledisplay.cpp

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -148,29 +148,29 @@ QgsAttributeTableDisplay::QgsAttributeTableDisplay( QgsVectorLayer* layer )
148148
QAction *cutAction = editMenu->addAction( tr( "Cu&t" ), this, SLOT( cut() ), tr( "Ctrl+X" ) );
149149
cutAction->setEnabled( false );
150150
QAction *copyAction = editMenu->addAction(
151-
mCopySelectedRowsButton->icon(), tr( "&Copy" ), this, SLOT( copySelectedRowsToClipboard() ), tr( "Ctrl+C" ) );
151+
mCopySelectedRowsButton->icon(), tr( "&Copy" ), this, SLOT( copySelectedRowsToClipboard() ), tr( "Ctrl+C" ) );
152152
QAction *pasteAction = editMenu->addAction( tr( "&Paste" ), this, SLOT( paste() ), tr( "Ctrl+V" ) );
153153
pasteAction->setEnabled( false );
154154
QAction *deleteAction = editMenu->addAction(
155-
mRemoveSelectionButton->icon(), tr( "Delete" ), this, SLOT( removeSelection() ) );
155+
mRemoveSelectionButton->icon(), tr( "Delete" ), this, SLOT( removeSelection() ) );
156156

157157
QMenu *layerMenu = menuBar->addMenu( tr( "Layer" ) );
158158
QAction *zoomToSelectedAction = layerMenu->addAction(
159-
mZoomMapToSelectedRowsButton->icon(), tr( "Zoom to Selection" ), this, SLOT( zoomMapToSelectedRows() ), tr( "Ctrl+J" ) );
159+
mZoomMapToSelectedRowsButton->icon(), tr( "Zoom to Selection" ), this, SLOT( zoomMapToSelectedRows() ), tr( "Ctrl+J" ) );
160160
layerMenu->addSeparator();
161161
QAction *toggleEditingAction = layerMenu->addAction(
162-
mToggleEditingButton->icon(), tr( "Toggle Editing" ), this, SLOT( toggleEditing() ) );
162+
mToggleEditingButton->icon(), tr( "Toggle Editing" ), this, SLOT( toggleEditing() ) );
163163
toggleEditingAction->setEnabled( mToggleEditingButton->isEnabled() );
164164
toggleEditingAction->setCheckable( true );
165165
toggleEditingAction->setChecked( mToggleEditingButton->isChecked() );
166166
connect( mToggleEditingButton, SIGNAL( toggled( bool ) ), toggleEditingAction, SLOT( setChecked( bool ) ) );
167167

168168
QMenu *tableMenu = menuBar->addMenu( tr( "Table" ) );
169169
QAction *moveToTopAction = tableMenu->addAction(
170-
mSelectedToTopButton->icon(), tr( "Move to Top" ), this, SLOT( selectedToTop() ) );
170+
mSelectedToTopButton->icon(), tr( "Move to Top" ), this, SLOT( selectedToTop() ) );
171171
QAction *invertAction = tableMenu->addAction(
172-
mInvertSelectionButton->icon(), tr( "Invert" ), this, SLOT( invertSelection() ) );
173-
172+
mInvertSelectionButton->icon(), tr( "Invert" ), this, SLOT( invertSelection() ) );
173+
174174
#ifndef Q_WS_MAC64 /* assertion failure in NSMenuItem setSubmenu (Qt 4.5.0-snapshot-20080830) */
175175
menuBar->addMenu( QgisApp::instance()->windowMenu() );
176176

@@ -195,15 +195,15 @@ void QgsAttributeTableDisplay::changeEvent( QEvent* event )
195195
QDialog::changeEvent( event );
196196
switch ( event->type() )
197197
{
198-
case QEvent::ActivationChange:
199-
if ( QApplication::activeWindow() == this )
200-
{
201-
mWindowAction->setChecked( true );
202-
}
203-
break;
198+
case QEvent::ActivationChange:
199+
if ( QApplication::activeWindow() == this )
200+
{
201+
mWindowAction->setChecked( true );
202+
}
203+
break;
204204

205-
default:
206-
break;
205+
default:
206+
break;
207207
}
208208
}
209209
#endif

src/app/qgsrasterlayerproperties.cpp

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ QgsRasterLayerProperties::QgsRasterLayerProperties( QgsMapLayer *lyr, QWidget *p
170170
{
171171
//find out the name of this band
172172
QString myRasterBandNameQString = mRasterLayer->getRasterBandName( myIteratorInt ) ;
173-
173+
174174
//add the band to the histogram tab
175175
//
176176
QPixmap myPixmap( 10, 10 );
@@ -328,7 +328,7 @@ QgsRasterLayerProperties::~QgsRasterLayerProperties()
328328
* PUBLIC METHODS
329329
*
330330
*/
331-
void QgsRasterLayerProperties::populateColorMapTable(const QList<QgsColorRampShader::ColorRampItem>& theColorRampList)
331+
void QgsRasterLayerProperties::populateColorMapTable( const QList<QgsColorRampShader::ColorRampItem>& theColorRampList )
332332
{
333333
if ( theColorRampList.size() > 0 )
334334
{
@@ -342,7 +342,7 @@ void QgsRasterLayerProperties::populateColorMapTable(const QList<QgsColorRampSha
342342
newItem->setText( 2, it->label );
343343
}
344344
}
345-
}
345+
}
346346
void QgsRasterLayerProperties::populateTransparencyTable()
347347
{
348348
//Clear existsing color transparency list
@@ -867,7 +867,7 @@ void QgsRasterLayerProperties::syncColormapTab()
867867
return;
868868
}
869869
//restore the colormap tab if layer has custom symbology
870-
populateColorMapTable(myRasterShaderFunction->getColorRampItemList());
870+
populateColorMapTable( myRasterShaderFunction->getColorRampItemList() );
871871

872872
sboxNumberOfEntries->setValue( mColormapTreeWidget->topLevelItemCount() );
873873

@@ -979,7 +979,7 @@ void QgsRasterLayerProperties::apply()
979979
QgsDebugMsg( "Setting Raster Drawing Style to :: PALETTED_SINGLE_BAND_GRAY" );
980980
QgsDebugMsg( QString( "Combo value : %1 GrayBand Mapping : %2" ).arg( cboGray->currentText() ).arg( mRasterLayer->
981981
getGrayBandName() ) );
982-
982+
983983
mRasterLayer->setDrawingStyle( QgsRasterLayer::PALETTED_SINGLE_BAND_GRAY );
984984
}
985985
else if ( cboxColorMap->currentText() == tr( "Colormap" ) )
@@ -996,7 +996,7 @@ void QgsRasterLayerProperties::apply()
996996

997997
mRasterLayer->setDrawingStyle( QgsRasterLayer::PALETTED_SINGLE_BAND_PSEUDO_COLOR );
998998
}
999-
999+
10001000
}
10011001
//
10021002
// Mutltiband
@@ -2642,9 +2642,9 @@ void QgsRasterLayerProperties::handleColormapTreeWidgetDoubleClick( QTreeWidgetI
26422642
void QgsRasterLayerProperties::on_pbtnAddColorMapEntry_clicked()
26432643
{
26442644
QTreeWidgetItem* newItem = new QTreeWidgetItem( mColormapTreeWidget );
2645-
newItem->setText( 0, "0.0");
2646-
newItem->setBackground( 1, QBrush( QColor(Qt::magenta) ) );
2647-
newItem->setText( 2, tr("Custom color map entry"));
2645+
newItem->setText( 0, "0.0" );
2646+
newItem->setBackground( 1, QBrush( QColor( Qt::magenta ) ) );
2647+
newItem->setText( 2, tr( "Custom color map entry" ) );
26482648
}
26492649

26502650
void QgsRasterLayerProperties::on_pbtnExportColorMapToFile_clicked()
@@ -2711,16 +2711,16 @@ void QgsRasterLayerProperties::on_pbtnExportColorMapToFile_clicked()
27112711
void QgsRasterLayerProperties::on_pbtnLoadColorMapFromBand_clicked()
27122712
{
27132713
QList<QgsColorRampShader::ColorRampItem> myColorRampList;
2714-
if(mRasterLayer->readColorTable(cboxColorMapBand->currentIndex()+1, &myColorRampList))
2714+
if ( mRasterLayer->readColorTable( cboxColorMapBand->currentIndex() + 1, &myColorRampList ) )
27152715
{
2716-
populateColorMapTable(myColorRampList);
2716+
populateColorMapTable( myColorRampList );
27172717
cboxColorInterpolation->setCurrentIndex( cboxColorInterpolation->findText( tr( "Exact" ) ) );
2718-
QgsDebugMsg("Color map loaded");
2718+
QgsDebugMsg( "Color map loaded" );
27192719
}
27202720
else
27212721
{
2722-
QMessageBox::warning(this, tr("Load Color Map"), tr("The color map for Band %n failed to load", "", cboxColorMapBand->currentIndex()+1));
2723-
QgsDebugMsg("Color map failed to load");
2722+
QMessageBox::warning( this, tr( "Load Color Map" ), tr( "The color map for Band %n failed to load", "", cboxColorMapBand->currentIndex() + 1 ) );
2723+
QgsDebugMsg( "Color map failed to load" );
27242724
}
27252725
}
27262726

@@ -2919,41 +2919,41 @@ void QgsRasterLayerProperties::on_pbtnSortColorMap_clicked()
29192919
{
29202920
myCurrentItem = mColormapTreeWidget->topLevelItem( i );
29212921
//If the item is null or does not have a pixel values set, skip
2922-
if(!myCurrentItem || myCurrentItem->text(0) == "")
2922+
if ( !myCurrentItem || myCurrentItem->text( 0 ) == "" )
29232923
{
29242924
continue;
29252925
}
2926-
2926+
29272927
//Create a copy of the new Color ramp Item
29282928
QgsColorRampShader::ColorRampItem myNewColorRampItem;
29292929
myNewColorRampItem.value = myCurrentItem->text( 0 ).toDouble();
29302930
myNewColorRampItem.color = myCurrentItem->background( 1 ).color();
29312931
myNewColorRampItem.label = myCurrentItem->text( 2 );
2932-
2932+
29332933
//Simple insertion sort - speed is not a huge factor here
29342934
inserted = false;
29352935
myCurrentIndex = 0;
2936-
while(!inserted)
2936+
while ( !inserted )
29372937
{
2938-
if(0 == myColorRampItems.size() || myCurrentIndex == myColorRampItems.size())
2938+
if ( 0 == myColorRampItems.size() || myCurrentIndex == myColorRampItems.size() )
29392939
{
29402940
myColorRampItems.push_back( myNewColorRampItem );
29412941
inserted = true;
29422942
}
2943-
else if(myColorRampItems[myCurrentIndex].value <= myNewColorRampItem.value && myCurrentIndex == myColorRampItems.size() - 1)
2943+
else if ( myColorRampItems[myCurrentIndex].value <= myNewColorRampItem.value && myCurrentIndex == myColorRampItems.size() - 1 )
29442944
{
29452945
myColorRampItems.push_back( myNewColorRampItem );
29462946
inserted = true;
29472947
}
2948-
else if(myColorRampItems[myCurrentIndex].value <= myNewColorRampItem.value && myColorRampItems[myCurrentIndex+1].value > myNewColorRampItem.value)
2948+
else if ( myColorRampItems[myCurrentIndex].value <= myNewColorRampItem.value && myColorRampItems[myCurrentIndex+1].value > myNewColorRampItem.value )
29492949
{
2950-
myColorRampItems.insert(myCurrentIndex+1,myNewColorRampItem );
2950+
myColorRampItems.insert( myCurrentIndex + 1, myNewColorRampItem );
29512951
inserted = true;
29522952
}
29532953
myCurrentIndex++;
29542954
}
29552955
}
2956-
populateColorMapTable(myColorRampItems);
2956+
populateColorMapTable( myColorRampItems );
29572957
}
29582958

29592959
QLinearGradient QgsRasterLayerProperties::redGradient()

src/app/qgsrasterlayerproperties.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,9 @@ class QgsRasterLayerProperties : public QDialog, private Ui::QgsRasterLayerPrope
179179
included or not
180180
*/
181181
bool mRasterLayerIsWms;
182-
182+
183183
/** \brief Clear current color map table and population with values from new list */
184-
void populateColorMapTable(const QList<QgsColorRampShader::ColorRampItem>&);
184+
void populateColorMapTable( const QList<QgsColorRampShader::ColorRampItem>& );
185185

186186
/** \brief Clear the current transparency table and populate the table with the correct types for current drawing mode and data type*/
187187
void populateTransparencyTable();

src/core/composer/qgscomposerlabel.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@ void QgsComposerLabel::paint( QPainter* painter, const QStyleOptionGraphicsItem*
4848
painter->setFont( mFont );
4949

5050
QFontMetricsF fontSize( mFont );
51-
51+
5252
//support multiline labels
5353
double penWidth = pen().widthF();
54-
QRectF painterRect(penWidth, penWidth, rect().width() - 2 * penWidth,
55-
rect().height() - 2 * penWidth);
56-
painter->drawText(painterRect, Qt::AlignLeft | Qt::AlignTop | Qt::TextWordWrap, mText);
54+
QRectF painterRect( penWidth, penWidth, rect().width() - 2 * penWidth,
55+
rect().height() - 2 * penWidth );
56+
painter->drawText( painterRect, Qt::AlignLeft | Qt::AlignTop | Qt::TextWordWrap, mText );
5757

5858

5959
drawFrame( painter );
@@ -86,7 +86,7 @@ void QgsComposerLabel::setFont( const QFont& f )
8686
void QgsComposerLabel::adjustSizeToText()
8787
{
8888
QFontMetricsF fontInfo( mFont );
89-
setSceneRect( QRectF( transform().dx(), transform().dy(), fontInfo.width( mText ) + 2 * mMargin + 2 * pen().widthF(), fontInfo.ascent() + 2 * mMargin + 2 * pen().widthF()) );
89+
setSceneRect( QRectF( transform().dx(), transform().dy(), fontInfo.width( mText ) + 2 * mMargin + 2 * pen().widthF(), fontInfo.ascent() + 2 * mMargin + 2 * pen().widthF() ) );
9090
}
9191

9292
QFont QgsComposerLabel::font() const

src/core/composer/qgscomposerlegend.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ QFont QgsComposerLegend::itemFont() const
440440

441441
void QgsComposerLegend::updateLegend()
442442
{
443-
mLegendModel.setLayerSet(layerIdList());
443+
mLegendModel.setLayerSet( layerIdList() );
444444
adjustBoxSize();
445445
update();
446446
}

0 commit comments

Comments
 (0)