Commit f01d9a3e authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau
Browse files

Unbitrot TestPlugin

parent 524293b0
......@@ -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")
......
......@@ -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 ();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment