Skip to content

Commit

Permalink
Get rid of some extraneous debug output / noise
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@8986 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed Aug 3, 2008
1 parent 7a7e65d commit f07b63b
Showing 1 changed file with 23 additions and 22 deletions.
45 changes: 23 additions & 22 deletions src/plugins/north_arrow/plugin.cpp
Expand Up @@ -110,7 +110,6 @@ void QgsNorthArrowPlugin::initGui()

void QgsNorthArrowPlugin::projectRead()
{
QgsDebugMsg("+++++++++ north arrow plugin - project read slot called....");
//default text to start with - try to fetch it from qgsproject

mRotationInt = QgsProject::instance()->readNumEntry("NorthArrow","/Rotation",0);
Expand Down Expand Up @@ -160,19 +159,19 @@ void QgsNorthArrowPlugin::renderNorthArrow(QPainter * theQPainter)
{
if (theQPainter->isActive())
{
QgsDebugMsg("Rendering north arrow on active painter");
//QgsDebugMsg("Rendering north arrow on active painter");
}
else
{
QgsDebugMsg("Rendering north arrow on INactive painter!!!");
//QgsDebugMsg("Rendering north arrow on INactive painter!!!");
}

QPixmap myQPixmap; //to store the north arrow image in

QString myFileNameQString = QDir::cleanPath( QgsApplication::pkgDataPath() +
"/images/north_arrows/default.png" );

QgsDebugMsg("Trying to load " + myFileNameQString);
//QgsDebugMsg("Trying to load " + myFileNameQString);
if (myQPixmap.load(myFileNameQString))
{

Expand Down Expand Up @@ -205,27 +204,29 @@ void QgsNorthArrowPlugin::renderNorthArrow(QPainter * theQPainter)
int myHeight = theQPainter->device()->height();
int myWidth = theQPainter->device()->width();

QgsDebugMsg("Rendering north arrow at " + mPlacementLabels.at(mPlacementIndex));
//QgsDebugMsg("Rendering north arrow at " + mPlacementLabels.at(mPlacementIndex));

//Determine placement of label from form combo box
switch (mPlacementIndex)
{
case 0: // Bottom Left
theQPainter->translate(0,myHeight-myQPixmap.height());
break;
case 1: // Top Left
//no need to translate for TL corner because we're already at the origin
theQPainter->translate(0, 0);
break;
case 2: // Top Right
theQPainter->translate(myWidth-myQPixmap.width(),0);
break;
case 3: // Bottom Right
theQPainter->translate(myWidth-myQPixmap.width(),
myHeight-myQPixmap.height());
break;
default:
QgsDebugMsg("Unable to determine where to put north arrow so defaulting to top left");
case 0: // Bottom Left
theQPainter->translate(0,myHeight-myQPixmap.height());
break;
case 1: // Top Left
//no need to translate for TL corner because we're already at the origin
theQPainter->translate(0, 0);
break;
case 2: // Top Right
theQPainter->translate(myWidth-myQPixmap.width(),0);
break;
case 3: // Bottom Right
theQPainter->translate(myWidth-myQPixmap.width(),
myHeight-myQPixmap.height());
break;
default:
{
//QgsDebugMsg("Unable to determine where to put north arrow so defaulting to top left");
}
}
//rotate the canvas by the north arrow rotation amount
theQPainter->rotate( mRotationInt );
Expand Down Expand Up @@ -324,7 +325,7 @@ bool QgsNorthArrowPlugin::calculateNorthDirection()
{
Q_UNUSED(e);
// just give up
QgsDebugMsg("Transformation error, quitting");
QgsDebugMsg("North Arrow: Transformation error, quitting");
return false;
}

Expand Down

0 comments on commit f07b63b

Please sign in to comment.