Skip to content
Permalink
Browse files
minor update (indentation, debug output, plenks)
git-svn-id: http://svn.osgeo.org/qgis/trunk@9189 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Aug 27, 2008
1 parent afc5416 commit 874b29b71fce679a66057ed4af2f6ddde9969f9a
Showing with 393 additions and 408 deletions.
  1. +1 −1 python/core/qgsrasterdataprovider.sip
  2. +5 −5 src/app/composer/qgscomposer.cpp
  3. +19 −26 src/app/legend/qgslegend.cpp
  4. +1 −1 src/app/legend/qgslegendgroup.cpp
  5. +1 −1 src/app/legend/qgslegendgroup.h
  6. +1 −1 src/app/legend/qgslegenditem.cpp
  7. +2 −2 src/app/legend/qgslegendlayer.h
  8. +1 −1 src/app/legend/qgslegendpropertygroup.h
  9. +1 −1 src/app/legend/qgslegendpropertyitem.cpp
  10. +1 −1 src/app/qgisapp.cpp
  11. +2 −2 src/app/qgslabeldialog.cpp
  12. +9 −9 src/app/qgsrasterlayerproperties.cpp
  13. +10 −19 src/app/qgssinglesymboldialog.cpp
  14. +1 −1 src/core/composer/qgscomposermap.h
  15. +15 −15 src/core/qgscoordinatetransform.cpp
  16. +21 −21 src/core/qgslabel.cpp
  17. +1 −1 src/core/qgslabel.h
  18. +3 −3 src/core/qgsmaplayer.h
  19. +1 −1 src/core/qgsrasterdataprovider.h
  20. +1 −1 src/core/qgsrect.h
  21. +2 −2 src/core/qgsrunprocess.cpp
  22. +1 −1 src/core/qgsvectorlayer.cpp
  23. +3 −3 src/core/raster/qgsrasterlayer.cpp
  24. +2 −2 src/core/raster/qgsrastertransparency.cpp
  25. +1 −1 src/core/symbology/qgsmarkercatalogue.cpp
  26. +2 −2 src/gui/qgsdetaileditemdelegate.cpp
  27. +8 −9 src/gui/qgsquickprint.cpp
  28. +1 −1 src/plugins/coordinate_capture/coordinatecapture.cpp
  29. +1 −1 src/plugins/dxf2shp_converter/README
  30. +2 −3 src/plugins/dxf2shp_converter/builder.cpp
  31. +3 −1 src/plugins/gps_importer/qgsgpsplugin.cpp
  32. +1 −1 src/plugins/gps_importer/qgsgpsplugingui.cpp
  33. +3 −3 src/plugins/grass/qgsgrassedit.cpp
  34. +2 −2 src/plugins/grass/qgsgrassmapcalc.cpp
  35. +1 −1 src/plugins/grass/qgsgrassmapcalc.h
  36. +1 −1 src/plugins/grass/qgsgrassmodule.cpp
  37. +1 −1 src/plugins/grass/qgsgrassshell.cpp
  38. +1 −1 src/plugins/grass/qgsgrasstools.cpp
  39. +4 −3 src/plugins/maplayer/maplayertest.cpp
  40. +7 −7 src/providers/postgres/qgspostgresprovider.cpp
  41. +6 −6 tests/algorithms/projections/main.cpp
  42. +9 −9 tests/algorithms/qgsproject/main.cpp
  43. +84 −84 tests/src/core/qgsrenderchecker.cpp
  44. +73 −73 tests/src/core/testqgsrasterlayer.cpp
  45. +60 −60 tests/src/core/testqgsrenderers.cpp
  46. +17 −17 tools/mapserver_export/ms_main.cpp
@@ -19,7 +19,7 @@ public:
{
NoCapabilities = 0,
Identify = 1
// Capability2 = 1 << 1, , etc
// Capability2 = 1 << 1, etc
};


@@ -291,10 +291,10 @@ void QgsComposer::on_mActionZoomOut_activated( void )

void QgsComposer::on_mActionRefreshView_activated( void )
{
if(mComposition)
{
mComposition->update();
}
if ( mComposition )
{
mComposition->update();
}
}

void QgsComposer::on_mActionPrint_activated( void )
@@ -821,7 +821,7 @@ void QgsComposer::on_mActionExportAsImage_activated( void )
QgsDebugMsg( QString( "Selected filter: %1" ).arg( myFilterString ) );
QgsDebugMsg( QString( "Image type: %1" ).arg( myFilterMap[myFilterString] ) );

myQSettings.writeEntry( "/UI/lastSaveAsImageFormat" , myFilterMap[myFilterString] );
myQSettings.writeEntry( "/UI/lastSaveAsImageFormat", myFilterMap[myFilterString] );
myQSettings.writeEntry( "/UI/lastSaveAsImageFile", myOutputFileNameQString );

if ( myOutputFileNameQString == "" ) return;
@@ -155,9 +155,8 @@ void QgsLegend::removeLayer( QString layer_key )
}

QTreeWidgetItem* theItem = firstItem();
#ifdef QGISDEBUG
qWarning( "in QgsLegend::removeLayer" );
#endif
QgsDebugMsg( "called." )

while ( theItem )
{
QgsLegendItem *li = dynamic_cast<QgsLegendItem*>( theItem );
@@ -236,9 +235,8 @@ void QgsLegend::mouseMoveEvent( QMouseEvent * e )
QgsLegendItem::DRAG_ACTION action = dest->accept( origin );
if ( action == QgsLegendItem::REORDER )
{
#ifdef QGISDEBUG
qWarning( "mouseMoveEvent::REORDER" );
#endif
QgsDebugMsg( "mouseMoveEvent::REORDER" );

if ( !yCoordAboveCenter( dest, e->y() ) ) //over bottom of item
{
if ( origin->nextSibling() != dest )
@@ -266,9 +264,8 @@ void QgsLegend::mouseMoveEvent( QMouseEvent * e )
}
else if ( action == QgsLegendItem::INSERT )
{
#ifdef QGISDEBUG
qWarning( "mouseMoveEvent::INSERT" );
#endif
QgsDebugMsg( "mouseMoveEvent::INSERT" );

setCursor( QCursor( Qt::PointingHandCursor ) );
if ( origin->parent() != dest )
{
@@ -278,9 +275,8 @@ void QgsLegend::mouseMoveEvent( QMouseEvent * e )
}
else//no action
{
#ifdef QGISDEBUG
qWarning( "mouseMoveEvent::NO_ACTION" );
#endif
QgsDebugMsg( "mouseMoveEvent::NO_ACTION" );

if ( origin->type() == QgsLegendItem::LEGEND_LAYER_FILE && mItemBeingMovedOrigPos != getItemPos( mItemBeingMoved ) )
{
resetToInitialPosition( mItemBeingMoved );
@@ -1121,17 +1117,15 @@ void QgsLegend::resetToInitialPosition( QTreeWidgetItem* li )
QgsLegendItem* formerParent = dynamic_cast<QgsLegendItem*>( li->parent() ); //todo: make sure legend layers are updated
if ( mRestoreInformation == FIRST_ITEM )
{
#ifdef QGISDEBUG
qWarning( "FIRST_ITEM" );
#endif
QgsDebugMsg( "FIRST_ITEM" );

removeItem( li );
insertTopLevelItem( 0, li );
}
else if ( mRestoreInformation == FIRST_CHILD )
{
#ifdef QGISDEBUG
qWarning( "FIRST_CHILD" );
#endif
QgsDebugMsg( "FIRST_CHILD" );

removeItem( li );
if ( formerParent )
{
@@ -1142,9 +1136,8 @@ void QgsLegend::resetToInitialPosition( QTreeWidgetItem* li )
}
else if ( mRestoreInformation == YOUNGER_SIBLING )
{
#ifdef QGISDEBUG
qWarning( "YOUNGER_SIBLING" );
#endif
QgsDebugMsg( "YOUNGER_SIBLING" );

if ( formerParent )
{
formerParent->release(( QgsLegendItem* )li );
@@ -1439,10 +1432,10 @@ std::deque<QString> QgsLegend::layerIDs()
}

#ifdef QGISDEBUG
qWarning( "QgsLegend::layerIDs()" );
QgsDebugMsg( "QgsLegend::layerIDs()" );
for ( std::deque<QString>::iterator it = layers.begin(); it != layers.end(); ++it )
{
qWarning(( *it ).toUtf8() );
QgsDebugMsg( *it );
}
#endif

@@ -1596,15 +1589,15 @@ void QgsLegend::handleItemChange( QTreeWidgetItem* item, int row )
#ifdef QGISDEBUG
if ( item->checkState( 0 ) == Qt::Checked )
{
qWarning( "item checked" );
QgsDebugMsg( "item checked" );
}
else if ( item->checkState( 0 ) == Qt::Unchecked )
{
qWarning( "item unchecked" );
QgsDebugMsg( "item unchecked" );
}
else if ( item->checkState( 0 ) == Qt::PartiallyChecked )
{
qWarning( "item partially checked" );
QgsDebugMsg( "item partially checked" );
}
#endif
blockSignals( true );
@@ -25,7 +25,7 @@
#include <QCoreApplication>
#include <QIcon>

QgsLegendGroup::QgsLegendGroup( QTreeWidgetItem * theItem , QString theName )
QgsLegendGroup::QgsLegendGroup( QTreeWidgetItem * theItem, QString theName )
: QgsLegendItem( theItem, theName )
{
mType = LEGEND_GROUP;
@@ -33,7 +33,7 @@ This is a specialised version of QLegendItem that specifies that the items below
class QgsLegendGroup : public QgsLegendItem
{
public:
QgsLegendGroup( QTreeWidgetItem * , QString );
QgsLegendGroup( QTreeWidgetItem *, QString );
QgsLegendGroup( QTreeWidget*, QString );
QgsLegendGroup( QString name );
~QgsLegendGroup();
@@ -23,7 +23,7 @@
#include "qgslogger.h"


QgsLegendItem::QgsLegendItem( QTreeWidgetItem * theItem , QString theName )
QgsLegendItem::QgsLegendItem( QTreeWidgetItem * theItem, QString theName )
: QTreeWidgetItem( theItem )
{
setText( 0, theName );
@@ -45,8 +45,8 @@ class QgsLegendLayer : public QgsLegendItem
Q_OBJECT

public:
QgsLegendLayer( QTreeWidgetItem * , QString );
QgsLegendLayer( QTreeWidget* , QString );
QgsLegendLayer( QTreeWidgetItem *, QString );
QgsLegendLayer( QTreeWidget*, QString );
QgsLegendLayer( QString name );
~QgsLegendLayer();
/**Sets an icon characterising the type of layer(s) it contains.
@@ -30,7 +30,7 @@ container for layer properties (e.g. projection, scale dependent view)
class QgsLegendPropertyGroup : public QgsLegendItem
{
public:
QgsLegendPropertyGroup( QTreeWidgetItem * , QString );
QgsLegendPropertyGroup( QTreeWidgetItem *, QString );

~QgsLegendPropertyGroup();

@@ -22,7 +22,7 @@
#include <QIcon>

QgsLegendPropertyItem::QgsLegendPropertyItem( QTreeWidgetItem * theItem, QString theString )
: QgsLegendItem( theItem , theString )
: QgsLegendItem( theItem, theString )
{
mType = LEGEND_PROPERTY_ITEM;
QIcon myIcon( QgsApplication::pkgDataPath() + QString( "/images/icons/property_item.png" ) );
@@ -3439,7 +3439,7 @@ void QgisApp::saveMapAsImage()
myOutputFileNameQString += "." + myFilterMap[myFilterString];
}

myQSettings.setValue( "/UI/lastSaveAsImageFilter" , myFilterString );
myQSettings.setValue( "/UI/lastSaveAsImageFilter", myFilterString );
myQSettings.setValue( "/UI/lastSaveAsImageDir", myQFileDialog->directory().absolutePath() );

if ( myOutputFileNameQString != "" )
@@ -320,7 +320,7 @@ void QgsLabelDialog::apply()
{
myTypeInt = QgsLabelAttributes::MapUnits;
}
myLabelAttributes->setSize( mFont.pointSize() , myTypeInt );
myLabelAttributes->setSize( mFont.pointSize(), myTypeInt );
myLabelAttributes->setBold( mFont.bold() );
myLabelAttributes->setItalic( mFont.italic() );
myLabelAttributes->setUnderline( mFont.underline() );
@@ -334,7 +334,7 @@ void QgsLabelDialog::apply()
{
myTypeInt = QgsLabelAttributes::MapUnits;
}
myLabelAttributes->setOffset( spinXOffset->value() , spinYOffset->value(), myTypeInt );
myLabelAttributes->setOffset( spinXOffset->value(), spinYOffset->value(), myTypeInt );
myLabelAttributes->setAngle( spinAngle->value() );

//the values here may seem a bit counterintuitive - basically everything
@@ -2123,9 +2123,9 @@ void QgsRasterLayerProperties::on_pbnHistRefresh_clicked()
{
myPainter.setPen( Qt::gray );
}
#ifdef QGISDEBUG
// QgsDebugMsg(QString("myPainter.fillRect(QRect(%1,%2,%3,%2) , myBrush );").arg(myX).arg(myY).arg(myBarWidth));
#endif

// QgsDebugMsg(QString("myPainter.fillRect(QRect(%1,%2,%3,%2), myBrush );").arg(myX).arg(myY).arg(myBarWidth));

myPainter.drawRect( myX + myYGutterWidth, myImageHeight - ( myY + myXGutterHeight ), myBarWidth, myY );
}
else //line graph
@@ -2209,10 +2209,10 @@ void QgsRasterLayerProperties::on_pbnHistRefresh_clicked()
for ( int i = 0;i < myXDivisions;++i )
{
QPolygon myPolygon;
myPolygon << QPoint(( i*myXDivisions ) + myYGutterWidth , myImageHeight - myXGutterHeight );
myPolygon << QPoint(( i*myXDivisions ) + myYGutterWidth , myImageHeight - ( myXGutterHeight - 5 ) );
myPolygon << QPoint(( i*myXDivisions ) + myYGutterWidth , myImageHeight - myXGutterHeight );
myPolygon << QPoint((( i + 1 )*myXDivisions ) + myYGutterWidth , myImageHeight - myXGutterHeight );
myPolygon << QPoint(( i*myXDivisions ) + myYGutterWidth, myImageHeight - myXGutterHeight );
myPolygon << QPoint(( i*myXDivisions ) + myYGutterWidth, myImageHeight - ( myXGutterHeight - 5 ) );
myPolygon << QPoint(( i*myXDivisions ) + myYGutterWidth, myImageHeight - myXGutterHeight );
myPolygon << QPoint((( i + 1 )*myXDivisions ) + myYGutterWidth, myImageHeight - myXGutterHeight );
myPainter.drawPolyline( myPolygon );
}
//
@@ -2235,7 +2235,7 @@ void QgsRasterLayerProperties::on_pbnHistRefresh_clicked()
//now draw the axis labels onto the graph
myPainter.drawText( 1, 12, myYMaxLabel );
myPainter.drawText( 1, myImageHeight - myXGutterHeight, QString::number( static_cast < unsigned int >( myYAxisMin ) ) );
myPainter.drawText( myYGutterWidth, myImageHeight - 1 , myXMinLabel );
myPainter.drawText( myYGutterWidth, myImageHeight - 1, myXMinLabel );
myPainter.drawText( myImageWidth - myXGutterWidth, myImageHeight - 1, myXMaxLabel );

//
@@ -2604,7 +2604,7 @@ void QgsRasterLayerProperties::on_mClassifyButton_clicked()
for ( int i = 0; i < numberOfEntries; ++i )
{
QColor currentColor;
currentColor.setRgb( colorDiff*i , 0, 255 - colorDiff * i );
currentColor.setRgb( colorDiff*i, 0, 255 - colorDiff * i );
entryColors.push_back( currentColor );
}

@@ -37,18 +37,13 @@
QgsSingleSymbolDialog::QgsSingleSymbolDialog(): QDialog(), mVectorLayer( 0 )
{
setupUi( this );
#ifdef QGISDEBUG
qWarning( "constructor QgsSingleSymbolDialog called WITHOUT a layer" );
#endif
QgsDebugMsg( "entered." );
}

QgsSingleSymbolDialog::QgsSingleSymbolDialog( QgsVectorLayer * layer, bool disabled ): QDialog(), mVectorLayer( layer )
{
setupUi( this );

#ifdef QGISDEBUG
qWarning( "constructor QgsSingleSymbolDialog called WITH a layer" );
#endif
QgsDebugMsg( "entered." );

//
//set point symbol list
@@ -110,7 +105,7 @@ QgsSingleSymbolDialog::QgsSingleSymbolDialog( QgsVectorLayer * layer, bool disab
}
else
{
qWarning( "Warning, data provider is null in QgsSingleSymbolDialog::QgsSingleSymbolDialog(...)" );
QgsDebugMsg( "Warning, data provider is null" );
return;
}
//
@@ -173,8 +168,7 @@ QgsSingleSymbolDialog::QgsSingleSymbolDialog( QgsVectorLayer * layer, bool disab
}
else
{
qWarning( "Warning, layer is a null pointer in "
"QgsSingleSymbolDialog::QgsSingleSymbolDialog(QgsVectorLayer)" );
QgsDebugMsg( "Warning, layer is a null pointer" );
}
}

@@ -183,8 +177,8 @@ QgsSingleSymbolDialog::QgsSingleSymbolDialog( QgsVectorLayer * layer, bool disab
connect( btnFillColor, SIGNAL( clicked() ), this, SLOT( selectFillColor() ) );
connect( outlinewidthspinbox, SIGNAL( valueChanged( double ) ), this, SLOT( resendSettingsChanged() ) );
connect( mLabelEdit, SIGNAL( textChanged( const QString& ) ), this, SLOT( resendSettingsChanged() ) );
connect( lstSymbols, SIGNAL( currentItemChanged( QListWidgetItem * , QListWidgetItem * ) ),
this, SLOT( symbolChanged( QListWidgetItem * , QListWidgetItem * ) ) );
connect( lstSymbols, SIGNAL( currentItemChanged( QListWidgetItem *, QListWidgetItem * ) ),
this, SLOT( symbolChanged( QListWidgetItem *, QListWidgetItem * ) ) );
connect( mPointSizeSpinBox, SIGNAL( valueChanged( double ) ), this, SLOT( resendSettingsChanged() ) );
connect( mRotationClassificationComboBox, SIGNAL( currentIndexChanged( const QString & ) ),
this, SLOT( resendSettingsChanged() ) );
@@ -203,9 +197,7 @@ QgsSingleSymbolDialog::QgsSingleSymbolDialog( QgsVectorLayer * layer, bool disab

QgsSingleSymbolDialog::~QgsSingleSymbolDialog()
{
#ifdef QGISDEBUG
qWarning( "destructor QgsSingleSymbolDialog" );
#endif
QgsDebugMsg( "entered." );
}

void QgsSingleSymbolDialog::selectOutlineColor()
@@ -508,9 +500,8 @@ void QgsSingleSymbolDialog::setFillColor( QColor& c )

void QgsSingleSymbolDialog::setFillStyle( Qt::BrushStyle fstyle )
{
#ifdef QGISDEBUG
qWarning(( "Setting fill style: " + QgsSymbologyUtils::brushStyle2QString( fstyle ) ).toLocal8Bit().data() );
#endif
QgsDebugMsg( QString( "Setting fill style: %1" ).arg( QgsSymbologyUtils::brushStyle2QString( fstyle ) ) );

QString myFillStyle = QgsSymbologyUtils::brushStyle2QString( fstyle );
for ( int i = 0; i < cboFillStyle->count(); ++i )
{
@@ -587,7 +578,7 @@ void QgsSingleSymbolDialog::fillStyleChanged( int theIndex )
//if the new style is texture we need to enable the texture
//selection button, otherwise disable it
QString myFillStyle =
cboFillStyle->itemData( theIndex , Qt::UserRole ).toString();
cboFillStyle->itemData( theIndex, Qt::UserRole ).toString();
if ( "TexturePattern" == myFillStyle )
{
toolSelectTexture->setEnabled( true );
@@ -36,7 +36,7 @@ class QPainter;
* \brief Object representing map window.
*/
// NOTE: QgsComposerMapBase must be first, otherwise does not compile
class CORE_EXPORT QgsComposerMap : /*public QWidget , private Ui::QgsComposerMapBase,*/ public QObject, public QgsComposerItem
class CORE_EXPORT QgsComposerMap : /*public QWidget, private Ui::QgsComposerMapBase,*/ public QObject, public QgsComposerItem
{
Q_OBJECT

0 comments on commit 874b29b

Please sign in to comment.