Skip to content


Browse files Browse the repository at this point in the history
Add tr() to some user visible text
Fix a bug with the angle spinbox not displaying the correct value when
the dialog box was opened

git-svn-id: c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
g_j_m committed Jan 31, 2006
1 parent 772d047 commit d442a45
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
14 changes: 7 additions & 7 deletions src/plugins/north_arrow/plugin.cpp
Expand Up @@ -89,14 +89,14 @@ QgsNorthArrowPlugin::~QgsNorthArrowPlugin()
void QgsNorthArrowPlugin::initGui()
QMenu *pluginMenu = qGisInterface->getPluginMenu("&Decorations");
menuId = pluginMenu->insertItem(QIcon(icon),"&NorthArrow", this, SLOT(run()));
QMenu *pluginMenu = qGisInterface->getPluginMenu(tr("&Decorations"));
menuId = pluginMenu->insertItem(QIcon(icon),tr("&NorthArrow"), this, SLOT(run()));

pluginMenu->setWhatsThis(menuId, "Creates a north arrow that is displayed on the map canvas");
pluginMenu->setWhatsThis(menuId, tr("Creates a north arrow that is displayed on the map canvas"));

// Create the action for tool
myQActionPointer = new QAction(QIcon(icon), "North Arrow", this);
myQActionPointer->setWhatsThis("Creates a north arrow that is displayed on the map canvas");
myQActionPointer = new QAction(QIcon(icon), tr("North Arrow"), this);
myQActionPointer->setWhatsThis(tr("Creates a north arrow that is displayed on the map canvas"));
// Connect the action to the run
connect(myQActionPointer, SIGNAL(activated()), this, SLOT(run()));
//render the arrow each time the map is rendered
Expand Down Expand Up @@ -236,7 +236,7 @@ void QgsNorthArrowPlugin::renderNorthArrow(QPainter * theQPainter)
QFont myQFont("time", 32, QFont::Bold);
theQPainter->drawText(10, 20, QString("Pixmap Not Found"));
theQPainter->drawText(10, 20, QString(tr("Pixmap Not Found")));

Expand All @@ -245,7 +245,7 @@ void QgsNorthArrowPlugin::renderNorthArrow(QPainter * theQPainter)
void QgsNorthArrowPlugin::unload()
// remove the GUI
// remove the northarrow from the canvas
disconnect(qGisInterface->getMapCanvas(), SIGNAL(renderComplete(QPainter *)),
Expand Down
7 changes: 5 additions & 2 deletions src/plugins/north_arrow/plugingui.cpp
Expand Up @@ -58,7 +58,10 @@ void QgsNorthArrowPluginGui::on_pbnCancel_clicked()
void QgsNorthArrowPluginGui::setRotation(int theInt)
// signal/slot connection defined in 'designer' causes the slider to
// be moved to reflect the change in the spinbox.

void QgsNorthArrowPluginGui::setPlacement(QString thePlacementQString)
Expand Down Expand Up @@ -146,7 +149,7 @@ void QgsNorthArrowPluginGui::rotatePixmap(int theRotationInt)
QFont myQFont("time", 18, QFont::Bold);
myQPainter.drawText(10, 20, QString("Pixmap Not Found"));
myQPainter.drawText(10, 20, tr("Pixmap Not Found"));
Expand Down

0 comments on commit d442a45

Please sign in to comment.