Skip to content
Permalink
Browse files
automatic indentation update (r9138-r9226)
git-svn-id: http://svn.osgeo.org/qgis/trunk@9227 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Aug 31, 2008
1 parent 401b8e1 commit edbdba1e5fef65b79a773086e7c23e4f3f63c8d9
Showing with 1,181 additions and 1,181 deletions.
  1. +16 −16 src/app/composer/qgscomposer.cpp
  2. +10 −10 src/app/composer/qgscomposerlegendwidget.cpp
  3. +17 −17 src/app/qgisapp.cpp
  4. +15 −15 src/app/qgsattributetabledisplay.cpp
  5. +23 −23 src/app/qgsrasterlayerproperties.cpp
  6. +2 −2 src/app/qgsrasterlayerproperties.h
  7. +5 −5 src/core/composer/qgscomposerlabel.cpp
  8. +1 −1 src/core/composer/qgscomposerlegend.cpp
  9. +30 −30 src/core/composer/qgslegendmodel.cpp
  10. +1 −1 src/core/composer/qgslegendmodel.h
  11. +3 −3 src/core/qgsgeometry.cpp
  12. +3 −3 src/core/qgsgeometry.h
  13. +2 −2 src/core/qgsvectordataprovider.h
  14. +1 −1 src/core/qgsvectorlayer.cpp
  15. +9 −9 src/core/qgsvectorlayer.h
  16. +2 −2 src/core/raster/qgscliptominmaxenhancement.h
  17. +44 −44 src/core/raster/qgsrasterlayer.cpp
  18. +2 −2 src/core/raster/qgsrasterlayer.h
  19. +1 −1 src/core/raster/qgsrasterpyramid.h
  20. +1 −1 src/gui/qgsdetaileditemdelegate.h
  21. +1 −1 src/gui/qgsfiledropedit.h
  22. +4 −4 src/gui/qgsgenericprojectionselector.h
  23. +1 −1 src/gui/qgsmapcanvas.h
  24. +1 −1 src/gui/qgsmapcanvasitem.h
  25. +7 −7 src/gui/qgsmapoverviewcanvas.cpp
  26. +2 −2 src/gui/qgsmaptool.h
  27. +1 −1 src/gui/qgsmaptoolemitpoint.h
  28. +3 −3 src/plugins/grass/qgsgrassselect.cpp
  29. +1 −1 src/plugins/grid_maker/graticulecreator.cpp
  30. +1 −1 src/plugins/grid_maker/plugingui.cpp
  31. +43 −43 src/plugins/interpolation/MathUtils.cc
  32. +1 −1 src/plugins/interpolation/qgsgridfilewriter.cpp
  33. +1 −1 src/plugins/interpolation/qgsinterpolationplugin.cpp
  34. +402 −402 src/plugins/ogr_converter/dialog.cpp
  35. +12 −12 src/plugins/ogr_converter/dialog.h
  36. +52 −52 src/plugins/ogr_converter/format.cpp
  37. +15 −15 src/plugins/ogr_converter/format.h
  38. +33 −33 src/plugins/ogr_converter/plugin.cpp
  39. +10 −10 src/plugins/ogr_converter/plugin.h
  40. +385 −385 src/plugins/ogr_converter/translator.cpp
  41. +17 −17 src/plugins/ogr_converter/translator.h
@@ -79,30 +79,30 @@ QgsComposer::QgsComposer( QgisApp *qgis ): QMainWindow()
// mActionSelectMoveItem

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

QAction* groupItemsAction = toolBar->addAction( QIcon( QPixmap( myIconPath + "mActionGroupItems.png" ) ),
tr( "&Group" ), this, SLOT( groupItems() ) );
tr( "&Group" ), this, SLOT( groupItems() ) );
groupItemsAction->setToolTip( tr( "Group items" ) );
QAction* ungroupItemsAction = toolBar->addAction( QIcon( QPixmap( myIconPath + "mActionUngroupItems.png" ) ),
tr( "&Ungroup" ), this, SLOT( ungroupItems() ) );
tr( "&Ungroup" ), this, SLOT( ungroupItems() ) );
ungroupItemsAction->setToolTip( tr( "Ungroup items" ) );
QAction* raiseItemsAction = toolBar->addAction( QIcon( QPixmap( myIconPath + "mActionRaiseItems.png" ) ),
tr( "Raise" ), this, SLOT( raiseSelectedItems() ) );
tr( "Raise" ), this, SLOT( raiseSelectedItems() ) );
raiseItemsAction->setToolTip( tr( "Raise selected items" ) );
QAction* lowerItemsAction = toolBar->addAction( QIcon( QPixmap( myIconPath + "mActionLowerItems.png" ) ),
tr( "Lower" ), this, SLOT( lowerSelectedItems() ) );
tr( "Lower" ), this, SLOT( lowerSelectedItems() ) );
lowerItemsAction->setToolTip( tr( "Lower selected items" ) );
QAction* moveItemsToTopAction = toolBar->addAction( QIcon( QPixmap( myIconPath + "mActionMoveItemsToTop.png" ) ),
tr( "Bring to Front" ), this, SLOT( moveSelectedItemsToTop() ) );
tr( "Bring to Front" ), this, SLOT( moveSelectedItemsToTop() ) );
moveItemsToTopAction->setToolTip( tr( "Move selected items to top" ) );
QAction* moveItemsToBottomAction = toolBar->addAction( QIcon( QPixmap( myIconPath + "mActionMoveItemsToBottom.png" ) ),
tr( "Send to Back" ), this, SLOT( moveSelectedItemsToBottom() ) );
tr( "Send to Back" ), this, SLOT( moveSelectedItemsToBottom() ) );
moveItemsToBottomAction->setToolTip( tr( "Move selected items to bottom" ) );

QActionGroup* toggleActionGroup = new QActionGroup( this );
@@ -179,7 +179,7 @@ QgsComposer::QgsComposer( QgisApp *qgis ): QMainWindow()
layoutMenu->addAction( lowerItemsAction );
layoutMenu->addAction( moveItemsToTopAction );
layoutMenu->addAction( moveItemsToBottomAction );

#ifndef Q_WS_MAC64 /* assertion failure in NSMenuItem setSubmenu (Qt 4.5.0-snapshot-20080830) */
menuBar()->addMenu( QgisApp::instance()->windowMenu() );

@@ -311,15 +311,15 @@ void QgsComposer::changeEvent( QEvent* event )
QMainWindow::changeEvent( event );
switch ( event->type() )
{
case QEvent::ActivationChange:
if ( QApplication::activeWindow() == this )
{
mWindowAction->setChecked( true );
}
break;
case QEvent::ActivationChange:
if ( QApplication::activeWindow() == this )
{
mWindowAction->setChecked( true );
}
break;

default:
break;
default:
break;
}
}

@@ -362,20 +362,20 @@ void QgsComposerLegendWidget::on_mUpdatePushButton_clicked()
{
return;
}

QModelIndex parentIndex = currentIndex.parent();
if ( !parentIndex.isValid() ) // a layer item
{
QString mapLayerId = currentItem->data().toString();
mLegend->model()->updateLayer(mapLayerId);
mLegend->update();
}
{
QString mapLayerId = currentItem->data().toString();
mLegend->model()->updateLayer( mapLayerId );
mLegend->update();
}
}

void QgsComposerLegendWidget::on_mUpdateAllPushButton_clicked()
{
if(mLegend)
{
mLegend->updateLegend();
}
if ( mLegend )
{
mLegend->updateLegend();
}
}
@@ -4688,25 +4688,25 @@ void QgisApp::changeEvent( QEvent* event )
#ifdef Q_WS_MAC
switch ( event->type() )
{
case QEvent::ActivationChange:
if ( QApplication::activeWindow() == this )
{
mWindowAction->setChecked( true );
}
// this should not be necessary since the action is part of an action group
// however this check is not cleared if PrintComposer is closed and reopened
else
{
mWindowAction->setChecked( false );
}
break;
case QEvent::ActivationChange:
if ( QApplication::activeWindow() == this )
{
mWindowAction->setChecked( true );
}
// this should not be necessary since the action is part of an action group
// however this check is not cleared if PrintComposer is closed and reopened
else
{
mWindowAction->setChecked( false );
}
break;

case QEvent::WindowTitleChange:
mWindowAction->setText( windowTitle() );
break;
case QEvent::WindowTitleChange:
mWindowAction->setText( windowTitle() );
break;

default:
break;
default:
break;
}
#endif
}
@@ -148,29 +148,29 @@ QgsAttributeTableDisplay::QgsAttributeTableDisplay( QgsVectorLayer* layer )
QAction *cutAction = editMenu->addAction( tr( "Cu&t" ), this, SLOT( cut() ), tr( "Ctrl+X" ) );
cutAction->setEnabled( false );
QAction *copyAction = editMenu->addAction(
mCopySelectedRowsButton->icon(), tr( "&Copy" ), this, SLOT( copySelectedRowsToClipboard() ), tr( "Ctrl+C" ) );
mCopySelectedRowsButton->icon(), tr( "&Copy" ), this, SLOT( copySelectedRowsToClipboard() ), tr( "Ctrl+C" ) );
QAction *pasteAction = editMenu->addAction( tr( "&Paste" ), this, SLOT( paste() ), tr( "Ctrl+V" ) );
pasteAction->setEnabled( false );
QAction *deleteAction = editMenu->addAction(
mRemoveSelectionButton->icon(), tr( "Delete" ), this, SLOT( removeSelection() ) );
mRemoveSelectionButton->icon(), tr( "Delete" ), this, SLOT( removeSelection() ) );

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

QMenu *tableMenu = menuBar->addMenu( tr( "Table" ) );
QAction *moveToTopAction = tableMenu->addAction(
mSelectedToTopButton->icon(), tr( "Move to Top" ), this, SLOT( selectedToTop() ) );
mSelectedToTopButton->icon(), tr( "Move to Top" ), this, SLOT( selectedToTop() ) );
QAction *invertAction = tableMenu->addAction(
mInvertSelectionButton->icon(), tr( "Invert" ), this, SLOT( invertSelection() ) );
mInvertSelectionButton->icon(), tr( "Invert" ), this, SLOT( invertSelection() ) );

#ifndef Q_WS_MAC64 /* assertion failure in NSMenuItem setSubmenu (Qt 4.5.0-snapshot-20080830) */
menuBar->addMenu( QgisApp::instance()->windowMenu() );

@@ -195,15 +195,15 @@ void QgsAttributeTableDisplay::changeEvent( QEvent* event )
QDialog::changeEvent( event );
switch ( event->type() )
{
case QEvent::ActivationChange:
if ( QApplication::activeWindow() == this )
{
mWindowAction->setChecked( true );
}
break;
case QEvent::ActivationChange:
if ( QApplication::activeWindow() == this )
{
mWindowAction->setChecked( true );
}
break;

default:
break;
default:
break;
}
}
#endif
@@ -170,7 +170,7 @@ QgsRasterLayerProperties::QgsRasterLayerProperties( QgsMapLayer *lyr, QWidget *p
{
//find out the name of this band
QString myRasterBandNameQString = mRasterLayer->getRasterBandName( myIteratorInt ) ;

//add the band to the histogram tab
//
QPixmap myPixmap( 10, 10 );
@@ -328,7 +328,7 @@ QgsRasterLayerProperties::~QgsRasterLayerProperties()
* PUBLIC METHODS
*
*/
void QgsRasterLayerProperties::populateColorMapTable(const QList<QgsColorRampShader::ColorRampItem>& theColorRampList)
void QgsRasterLayerProperties::populateColorMapTable( const QList<QgsColorRampShader::ColorRampItem>& theColorRampList )
{
if ( theColorRampList.size() > 0 )
{
@@ -342,7 +342,7 @@ void QgsRasterLayerProperties::populateColorMapTable(const QList<QgsColorRampSha
newItem->setText( 2, it->label );
}
}
}
}
void QgsRasterLayerProperties::populateTransparencyTable()
{
//Clear existsing color transparency list
@@ -867,7 +867,7 @@ void QgsRasterLayerProperties::syncColormapTab()
return;
}
//restore the colormap tab if layer has custom symbology
populateColorMapTable(myRasterShaderFunction->getColorRampItemList());
populateColorMapTable( myRasterShaderFunction->getColorRampItemList() );

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

@@ -979,7 +979,7 @@ void QgsRasterLayerProperties::apply()
QgsDebugMsg( "Setting Raster Drawing Style to :: PALETTED_SINGLE_BAND_GRAY" );
QgsDebugMsg( QString( "Combo value : %1 GrayBand Mapping : %2" ).arg( cboGray->currentText() ).arg( mRasterLayer->
getGrayBandName() ) );

mRasterLayer->setDrawingStyle( QgsRasterLayer::PALETTED_SINGLE_BAND_GRAY );
}
else if ( cboxColorMap->currentText() == tr( "Colormap" ) )
@@ -996,7 +996,7 @@ void QgsRasterLayerProperties::apply()

mRasterLayer->setDrawingStyle( QgsRasterLayer::PALETTED_SINGLE_BAND_PSEUDO_COLOR );
}

}
//
// Mutltiband
@@ -2642,9 +2642,9 @@ void QgsRasterLayerProperties::handleColormapTreeWidgetDoubleClick( QTreeWidgetI
void QgsRasterLayerProperties::on_pbtnAddColorMapEntry_clicked()
{
QTreeWidgetItem* newItem = new QTreeWidgetItem( mColormapTreeWidget );
newItem->setText( 0, "0.0");
newItem->setBackground( 1, QBrush( QColor(Qt::magenta) ) );
newItem->setText( 2, tr("Custom color map entry"));
newItem->setText( 0, "0.0" );
newItem->setBackground( 1, QBrush( QColor( Qt::magenta ) ) );
newItem->setText( 2, tr( "Custom color map entry" ) );
}

void QgsRasterLayerProperties::on_pbtnExportColorMapToFile_clicked()
@@ -2711,16 +2711,16 @@ void QgsRasterLayerProperties::on_pbtnExportColorMapToFile_clicked()
void QgsRasterLayerProperties::on_pbtnLoadColorMapFromBand_clicked()
{
QList<QgsColorRampShader::ColorRampItem> myColorRampList;
if(mRasterLayer->readColorTable(cboxColorMapBand->currentIndex()+1, &myColorRampList))
if ( mRasterLayer->readColorTable( cboxColorMapBand->currentIndex() + 1, &myColorRampList ) )
{
populateColorMapTable(myColorRampList);
populateColorMapTable( myColorRampList );
cboxColorInterpolation->setCurrentIndex( cboxColorInterpolation->findText( tr( "Exact" ) ) );
QgsDebugMsg("Color map loaded");
QgsDebugMsg( "Color map loaded" );
}
else
{
QMessageBox::warning(this, tr("Load Color Map"), tr("The color map for Band %n failed to load", "", cboxColorMapBand->currentIndex()+1));
QgsDebugMsg("Color map failed to load");
QMessageBox::warning( this, tr( "Load Color Map" ), tr( "The color map for Band %n failed to load", "", cboxColorMapBand->currentIndex() + 1 ) );
QgsDebugMsg( "Color map failed to load" );
}
}

@@ -2919,41 +2919,41 @@ void QgsRasterLayerProperties::on_pbtnSortColorMap_clicked()
{
myCurrentItem = mColormapTreeWidget->topLevelItem( i );
//If the item is null or does not have a pixel values set, skip
if(!myCurrentItem || myCurrentItem->text(0) == "")
if ( !myCurrentItem || myCurrentItem->text( 0 ) == "" )
{
continue;
}

//Create a copy of the new Color ramp Item
QgsColorRampShader::ColorRampItem myNewColorRampItem;
myNewColorRampItem.value = myCurrentItem->text( 0 ).toDouble();
myNewColorRampItem.color = myCurrentItem->background( 1 ).color();
myNewColorRampItem.label = myCurrentItem->text( 2 );

//Simple insertion sort - speed is not a huge factor here
inserted = false;
myCurrentIndex = 0;
while(!inserted)
while ( !inserted )
{
if(0 == myColorRampItems.size() || myCurrentIndex == myColorRampItems.size())
if ( 0 == myColorRampItems.size() || myCurrentIndex == myColorRampItems.size() )
{
myColorRampItems.push_back( myNewColorRampItem );
inserted = true;
}
else if(myColorRampItems[myCurrentIndex].value <= myNewColorRampItem.value && myCurrentIndex == myColorRampItems.size() - 1)
else if ( myColorRampItems[myCurrentIndex].value <= myNewColorRampItem.value && myCurrentIndex == myColorRampItems.size() - 1 )
{
myColorRampItems.push_back( myNewColorRampItem );
inserted = true;
}
else if(myColorRampItems[myCurrentIndex].value <= myNewColorRampItem.value && myColorRampItems[myCurrentIndex+1].value > myNewColorRampItem.value)
else if ( myColorRampItems[myCurrentIndex].value <= myNewColorRampItem.value && myColorRampItems[myCurrentIndex+1].value > myNewColorRampItem.value )
{
myColorRampItems.insert(myCurrentIndex+1,myNewColorRampItem );
myColorRampItems.insert( myCurrentIndex + 1, myNewColorRampItem );
inserted = true;
}
myCurrentIndex++;
}
}
populateColorMapTable(myColorRampItems);
populateColorMapTable( myColorRampItems );
}

QLinearGradient QgsRasterLayerProperties::redGradient()
@@ -179,9 +179,9 @@ class QgsRasterLayerProperties : public QDialog, private Ui::QgsRasterLayerPrope
included or not
*/
bool mRasterLayerIsWms;

/** \brief Clear current color map table and population with values from new list */
void populateColorMapTable(const QList<QgsColorRampShader::ColorRampItem>&);
void populateColorMapTable( const QList<QgsColorRampShader::ColorRampItem>& );

/** \brief Clear the current transparency table and populate the table with the correct types for current drawing mode and data type*/
void populateTransparencyTable();
@@ -48,12 +48,12 @@ void QgsComposerLabel::paint( QPainter* painter, const QStyleOptionGraphicsItem*
painter->setFont( mFont );

QFontMetricsF fontSize( mFont );

//support multiline labels
double penWidth = pen().widthF();
QRectF painterRect(penWidth, penWidth, rect().width() - 2 * penWidth,
rect().height() - 2 * penWidth);
painter->drawText(painterRect, Qt::AlignLeft | Qt::AlignTop | Qt::TextWordWrap, mText);
QRectF painterRect( penWidth, penWidth, rect().width() - 2 * penWidth,
rect().height() - 2 * penWidth );
painter->drawText( painterRect, Qt::AlignLeft | Qt::AlignTop | Qt::TextWordWrap, mText );


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

QFont QgsComposerLabel::font() const
@@ -440,7 +440,7 @@ QFont QgsComposerLegend::itemFont() const

void QgsComposerLegend::updateLegend()
{
mLegendModel.setLayerSet(layerIdList());
mLegendModel.setLayerSet( layerIdList() );
adjustBoxSize();
update();
}

0 comments on commit edbdba1

Please sign in to comment.