summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFriedrich W. H. Kossebau <kossebau@kde.org>2016-07-24 21:38:19 (GMT)
committerFriedrich W. H. Kossebau <kossebau@kde.org>2016-07-24 21:38:19 (GMT)
commitf01d9a3e887c1d86bbaf9b0d87471f770537f9b7 (patch)
treeb701a631dc8e9f8a50a3edeb1c88a5f9a48d259e
parent524293b025dc1339ed58d4115d428fbd07cbe1e2 (diff)
Unbitrot TestPlugin
-rw-r--r--src/plugins/render/test/TestPlugin.cpp40
-rw-r--r--src/plugins/render/test/TestPlugin.h8
2 files changed, 46 insertions, 2 deletions
diff --git a/src/plugins/render/test/TestPlugin.cpp b/src/plugins/render/test/TestPlugin.cpp
index 9927a9e..7af3825 100644
--- a/src/plugins/render/test/TestPlugin.cpp
+++ b/src/plugins/render/test/TestPlugin.cpp
@@ -12,6 +12,7 @@
#include <QColor>
#include <QPixmap>
+#include <QIcon>
#include <QRadialGradient>
#include "MarbleDirs.h"
#include "GeoPainter.h"
@@ -22,6 +23,21 @@
namespace Marble
{
+TestPlugin::TestPlugin()
+ : RenderPlugin(nullptr)
+{
+ setEnabled(true);
+ setVisible(true);
+}
+
+TestPlugin::TestPlugin(const MarbleModel *marbleModel)
+ : RenderPlugin(marbleModel)
+{
+ setEnabled(true);
+ setVisible(true);
+}
+
+
QStringList TestPlugin::backendTypes() const
{
return QStringList( "test" );
@@ -52,11 +68,27 @@ QString TestPlugin::nameId() const
return QString( "test-plugin" );
}
+QString TestPlugin::version() const
+{
+ return "1.0";
+}
+
QString TestPlugin::description() const
{
return tr( "This is a simple test plugin." );
}
+QString TestPlugin::copyrightYears() const
+{
+ return "2008";
+}
+
+QVector<PluginAuthor> TestPlugin::pluginAuthors() const
+{
+ return QVector<PluginAuthor>()
+ << PluginAuthor("Torsten Rahn", "tackat@kde.org");
+}
+
QIcon TestPlugin::icon () const
{
return QIcon();
@@ -74,7 +106,9 @@ bool TestPlugin::isInitialized () const
bool TestPlugin::render( GeoPainter *painter, ViewportParams *viewport, const QString& renderPos, GeoSceneLayer * layer )
{
- painter->autoMapQuality();
+ Q_UNUSED(viewport);
+ Q_UNUSED(renderPos);
+ Q_UNUSED(layer);
// Example: draw a straight line
@@ -83,7 +117,9 @@ bool TestPlugin::render( GeoPainter *painter, ViewportParams *viewport, const QS
painter->setPen( QColor( 255, 255, 255, 255 ) );
- painter->drawLine( northpole1, northpole2 );
+ GeoDataLineString poleLineString;
+ poleLineString << northpole1 << northpole2;
+ painter->drawPolyline(poleLineString);
// Example: draw a straight line string ("polyline")
diff --git a/src/plugins/render/test/TestPlugin.h b/src/plugins/render/test/TestPlugin.h
index c2d6e3f..86c70cd 100644
--- a/src/plugins/render/test/TestPlugin.h
+++ b/src/plugins/render/test/TestPlugin.h
@@ -33,6 +33,9 @@ class TestPlugin : public RenderPlugin
MARBLE_PLUGIN( TestPlugin )
public:
+ TestPlugin();
+ explicit TestPlugin(const MarbleModel *marbleModel);
+
QStringList backendTypes() const;
QString renderPolicy() const;
@@ -45,10 +48,15 @@ class TestPlugin : public RenderPlugin
QString nameId() const;
+ QString version() const override;
+
QString description() const;
QIcon icon () const;
+ QString copyrightYears() const override;
+
+ QVector<PluginAuthor> pluginAuthors() const override;
void initialize ();