Skip to content

Commit

Permalink
More migration from qt3 to qt4
Browse files Browse the repository at this point in the history
Use a real copyright symbol instead of (c)


git-svn-id: http://svn.osgeo.org/qgis/trunk@4715 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
g_j_m committed Jan 22, 2006
1 parent 428aeb4 commit c271af4
Show file tree
Hide file tree
Showing 5 changed files with 128 additions and 194 deletions.
27 changes: 5 additions & 22 deletions src/plugins/copyright_label/plugin.cpp
Expand Up @@ -29,23 +29,10 @@ email : tim@linfiniti.com
#include <qgsproject.h>
#include <qgsmapcanvas.h>

#include <q3toolbar.h>
#include <qmenubar.h>
#include <qmessagebox.h>
#include <q3popupmenu.h>
#include <qlineedit.h>
#include <qaction.h>
#include <qapplication.h>
#include <qcursor.h>
#include <qpixmap.h>
#include <qpainter.h>
#include <qfont.h>
#include <qrect.h>
#include <qbrush.h>
#include <q3button.h>
#include <qcheckbox.h>
#include <q3paintdevicemetrics.h>
#include <qglobal.h>
#include <Q3Button>
#include <Q3PaintDeviceMetrics>
#include <Q3SimpleRichText>
#include <QPainter>

//non qt includes
#include <iostream>
Expand Down Expand Up @@ -97,11 +84,7 @@ void QgsCopyrightLabelPlugin::initGui()
pluginMenu->setWhatsThis(menuId, "Creates a copyright label that is displayed on the map canvas.");

// Create the action for tool
#if QT_VERSION < 0x040000
myQActionPointer = new QAction("Copyright Label", QIcon(icon), "&Wmi",0, this, "run");
#else
myQActionPointer = new QAction(QIcon(icon), "Copyright Label", this);
#endif
myQActionPointer->setWhatsThis("Creates a copyright label that is displayed on the map canvas.");
// Connect the action to the run
connect(myQActionPointer, SIGNAL(activated()), this, SLOT(run()));
Expand All @@ -125,7 +108,7 @@ void QgsCopyrightLabelPlugin::projectRead()

mQFont.setFamily(QgsProject::instance()->readEntry("CopyrightLabel","/FontName","Arial"));
mQFont.setPointSize(QgsProject::instance()->readNumEntry("CopyrightLabel","/FontSize",14));
mLabelQString = QgsProject::instance()->readEntry("CopyrightLabel","/Label","(c) QGIS 2006");
mLabelQString = QgsProject::instance()->readEntry("CopyrightLabel","/Label","&copy; QGIS 2006");
mPlacement = QgsProject::instance()->readEntry("CopyrightLabel","/Placement","Bottom Right");
mEnable = QgsProject::instance()->readBoolEntry("CopyrightLabel","/Enabled",true);
// todo - read & store state of font color
Expand Down
8 changes: 3 additions & 5 deletions src/plugins/copyright_label/plugin.h
Expand Up @@ -21,11 +21,9 @@
#define QGSCOPYRIGHTLABELPLUGIN
#include "../qgisplugin.h"
#include "qgisapp.h"
#include <qwidget.h>
#include <qfont.h>
#include <qcolor.h>
#include <q3simplerichtext.h>
#include <qpainter.h>

class QPainter;

/**
* \class Plugin
* \brief OpenModeller plugin for QGIS
Expand Down
7 changes: 1 addition & 6 deletions src/plugins/copyright_label/plugingui.cpp
Expand Up @@ -11,11 +11,6 @@
***************************************************************************/
#include "plugingui.h"
#include "qgscontexthelp.h"
#include <q3textedit.h>
#include <q3simplerichtext.h>
#include <QComboBox>
#include <qcheckbox.h>
#include <qlabel.h>

//qt includes

Expand Down Expand Up @@ -70,7 +65,7 @@ void QgsCopyrightLabelPluginGui::setEnabled(bool theBool)

void QgsCopyrightLabelPluginGui::setText(QString theTextQString)
{
txtCopyrightText->setText(theTextQString);
txtCopyrightText->setPlainText(theTextQString);
}

void QgsCopyrightLabelPluginGui::setPlacement(QString thePlacementQString)
Expand Down
1 change: 0 additions & 1 deletion src/plugins/copyright_label/plugingui.h
Expand Up @@ -13,7 +13,6 @@
#define QGSCOPYRIGHTLABELPLUGINGUI_H

#include <ui_pluginguibase.h>
#include <QDialog>
#include <qfont.h>
#include <qcolor.h>

Expand Down

0 comments on commit c271af4

Please sign in to comment.