[Marble-commits] KDE/kdeedu/marble/src/plugins/render/graticule
Torsten Rahn
tackat at kde.org
Sat Dec 25 23:14:00 CET 2010
SVN commit 1209217 by rahn:
- About dialog for Graticule plugin by Cezar Mocan.
http://svn.reviewboard.kde.org/r/6161/diff/#index_header
M +30 -2 GraticulePlugin.cpp
M +13 -0 GraticulePlugin.h
--- trunk/KDE/kdeedu/marble/src/plugins/render/graticule/GraticulePlugin.cpp #1209216:1209217
@@ -12,20 +12,27 @@
#include <QtGui/QBrush>
#include "MarbleDebug.h"
+#include "MarbleDirs.h"
#include "GeoPainter.h"
#include "GeoDataLineString.h"
#include "Planet.h"
#include "MarbleDataFacade.h"
+#include "PluginAboutDialog.h"
#include "ViewportParams.h"
-
#include "GeoDataLatLonAltBox.h"
+// Qt
+#include <QtGui/QPushButton>
+#include <QtGui/QLabel>
+
+
namespace Marble
{
GraticulePlugin::GraticulePlugin()
- : m_isInitialized( false )
+ : m_isInitialized( false ),
+ m_aboutDialog( 0 )
{
}
@@ -85,6 +92,27 @@
return m_isInitialized;
}
+QDialog *GraticulePlugin::aboutDialog() const
+{
+ if ( !m_aboutDialog ) {
+ // Initializing about dialog
+ m_aboutDialog = new PluginAboutDialog();
+ m_aboutDialog->setName( "Coordinates Grid Plugin" );
+ m_aboutDialog->setVersion( "0.1" );
+ // FIXME: Can we store this string for all of Marble
+ m_aboutDialog->setAboutText( tr( "<br />(c) 2009 The Marble Project<br /><br /><a href=\"http://edu.kde.org/marble\">http://edu.kde.org/marble</a>" ) );
+ QList<Author> authors;
+ Author tackat;
+ tackat.name = "Torsten Rahn";
+ tackat.task = tr( "Developer" );
+ tackat.email = "tackat at kde.org";
+ authors.append( tackat );
+ m_aboutDialog->setAuthors( authors );
+ m_aboutDialog->setPixmap( m_icon.pixmap( 62, 53 ) );
+ }
+ return m_aboutDialog;
+}
+
bool GraticulePlugin::render( GeoPainter *painter, ViewportParams *viewport,
const QString& renderPos,
GeoSceneLayer * layer )
--- trunk/KDE/kdeedu/marble/src/plugins/render/graticule/GraticulePlugin.h #1209216:1209217
@@ -19,9 +19,15 @@
#include <QtCore/QObject>
#include <QtCore/QVector>
#include <QtGui/QPen>
+#include <QtCore/QHash>
+#include <QtGui/QIcon>
+
+#include "AbstractDataPlugin.h"
#include "RenderPlugin.h"
+#include "RenderPluginInterface.h"
+
#include "GeoDataCoordinates.h"
#include "GeoDataLatLonAltBox.h"
@@ -37,6 +43,8 @@
* on the degree system.
*/
+class PluginAboutDialog;
+
class GraticulePlugin : public RenderPlugin
{
Q_OBJECT
@@ -62,7 +70,9 @@
QIcon icon () const;
+ QDialog *aboutDialog() const;
+
void initialize ();
bool isInitialized () const;
@@ -154,6 +164,9 @@
QPen m_shadowPen;
bool m_isInitialized;
+ mutable QIcon m_icon;
+ mutable PluginAboutDialog *m_aboutDialog;
+
};
}
More information about the Marble-commits
mailing list