@@ -110,7 +110,6 @@ void QgsNorthArrowPlugin::initGui()
110
110
111
111
void QgsNorthArrowPlugin::projectRead ()
112
112
{
113
- QgsDebugMsg (" +++++++++ north arrow plugin - project read slot called...." );
114
113
// default text to start with - try to fetch it from qgsproject
115
114
116
115
mRotationInt = QgsProject::instance ()->readNumEntry (" NorthArrow" ," /Rotation" ,0 );
@@ -160,19 +159,19 @@ void QgsNorthArrowPlugin::renderNorthArrow(QPainter * theQPainter)
160
159
{
161
160
if (theQPainter->isActive ())
162
161
{
163
- QgsDebugMsg (" Rendering north arrow on active painter" );
162
+ // QgsDebugMsg("Rendering north arrow on active painter");
164
163
}
165
164
else
166
165
{
167
- QgsDebugMsg (" Rendering north arrow on INactive painter!!!" );
166
+ // QgsDebugMsg("Rendering north arrow on INactive painter!!!");
168
167
}
169
168
170
169
QPixmap myQPixmap; // to store the north arrow image in
171
170
172
171
QString myFileNameQString = QDir::cleanPath ( QgsApplication::pkgDataPath () +
173
172
" /images/north_arrows/default.png" );
174
173
175
- QgsDebugMsg (" Trying to load " + myFileNameQString);
174
+ // QgsDebugMsg("Trying to load " + myFileNameQString);
176
175
if (myQPixmap.load (myFileNameQString))
177
176
{
178
177
@@ -205,27 +204,29 @@ void QgsNorthArrowPlugin::renderNorthArrow(QPainter * theQPainter)
205
204
int myHeight = theQPainter->device ()->height ();
206
205
int myWidth = theQPainter->device ()->width ();
207
206
208
- QgsDebugMsg (" Rendering north arrow at " + mPlacementLabels .at (mPlacementIndex ));
207
+ // QgsDebugMsg("Rendering north arrow at " + mPlacementLabels.at(mPlacementIndex));
209
208
210
209
// Determine placement of label from form combo box
211
210
switch (mPlacementIndex )
212
211
{
213
- case 0 : // Bottom Left
214
- theQPainter->translate (0 ,myHeight-myQPixmap.height ());
215
- break ;
216
- case 1 : // Top Left
217
- // no need to translate for TL corner because we're already at the origin
218
- theQPainter->translate (0 , 0 );
219
- break ;
220
- case 2 : // Top Right
221
- theQPainter->translate (myWidth-myQPixmap.width (),0 );
222
- break ;
223
- case 3 : // Bottom Right
224
- theQPainter->translate (myWidth-myQPixmap.width (),
225
- myHeight-myQPixmap.height ());
226
- break ;
227
- default :
228
- QgsDebugMsg (" Unable to determine where to put north arrow so defaulting to top left" );
212
+ case 0 : // Bottom Left
213
+ theQPainter->translate (0 ,myHeight-myQPixmap.height ());
214
+ break ;
215
+ case 1 : // Top Left
216
+ // no need to translate for TL corner because we're already at the origin
217
+ theQPainter->translate (0 , 0 );
218
+ break ;
219
+ case 2 : // Top Right
220
+ theQPainter->translate (myWidth-myQPixmap.width (),0 );
221
+ break ;
222
+ case 3 : // Bottom Right
223
+ theQPainter->translate (myWidth-myQPixmap.width (),
224
+ myHeight-myQPixmap.height ());
225
+ break ;
226
+ default :
227
+ {
228
+ // QgsDebugMsg("Unable to determine where to put north arrow so defaulting to top left");
229
+ }
229
230
}
230
231
// rotate the canvas by the north arrow rotation amount
231
232
theQPainter->rotate ( mRotationInt );
@@ -324,7 +325,7 @@ bool QgsNorthArrowPlugin::calculateNorthDirection()
324
325
{
325
326
Q_UNUSED (e);
326
327
// just give up
327
- QgsDebugMsg (" Transformation error, quitting" );
328
+ QgsDebugMsg (" North Arrow: Transformation error, quitting" );
328
329
return false ;
329
330
}
330
331
0 commit comments