Skip to content

Commit

Permalink
remove About dialog from Georeferencer plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy committed Apr 24, 2012
1 parent 09609d6 commit cd408bc
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 36 deletions.
34 changes: 0 additions & 34 deletions src/plugins/georeferencer/qgsgeorefplugin.cpp
Expand Up @@ -52,7 +52,6 @@
#include "qgsgeorefplugin.h"

#include <QFile>
//#include <QDialog>
#include <QMessageBox>

//
Expand Down Expand Up @@ -101,17 +100,13 @@ void QgsGeorefPlugin::initGui()
// Connect the action to the run
connect( mActionRunGeoref, SIGNAL( triggered() ), this, SLOT( run() ) );

mActionAbout = new QAction( QIcon(), tr( "&About" ), this );
connect( mActionAbout, SIGNAL( triggered() ), this, SLOT( about() ) );

setCurrentTheme( "" );
// this is called when the icon theme is changed
connect( mQGisIface, SIGNAL( currentThemeChanged( QString ) ), this, SLOT( setCurrentTheme( QString ) ) );

// Add to the toolbar & menu
mQGisIface->addRasterToolBarIcon( mActionRunGeoref );
mQGisIface->addPluginToRasterMenu( tr( "&Georeferencer" ), mActionRunGeoref );
mQGisIface->addPluginToRasterMenu( tr( "&Georeferencer" ), mActionAbout );
}

// Slot called when the buffer menu item is triggered
Expand All @@ -127,12 +122,10 @@ void QgsGeorefPlugin::run()
void QgsGeorefPlugin::unload()
{
// remove the GUI
mQGisIface->removePluginRasterMenu( tr( "&Georeferencer" ), mActionAbout );
mQGisIface->removePluginRasterMenu( tr( "&Georeferencer" ), mActionRunGeoref );
mQGisIface->removeRasterToolBarIcon( mActionRunGeoref );

delete mActionRunGeoref;
delete mActionAbout;

delete mPluginGui;
mPluginGui = NULL;
Expand All @@ -142,7 +135,6 @@ void QgsGeorefPlugin::unload()
void QgsGeorefPlugin::setCurrentTheme( QString )
{
mActionRunGeoref->setIcon( getThemeIcon( "/mGeorefRun.png" ) );
mActionAbout->setIcon( getThemeIcon( "/mActionAbout.png" ) );
}

QIcon QgsGeorefPlugin::getThemeIcon( const QString &theName )
Expand All @@ -161,39 +153,13 @@ QIcon QgsGeorefPlugin::getThemeIcon( const QString &theName )
}
}

void QgsGeorefPlugin::about( )
{
QString title = QString( "About Georeferencer" );
// sort by date of contribution
QString text = QString( "<center><b>Georeferencer GDAL</b></center>"
"<center>%1</center>"
"<p>Adding projection info to rasters using GDAL<br>"
"<b>Developers:</b>"
"<ol type=disc>"
"<li>Jack R"
"<li>Maxim Dubinin"
"<li>Manuel Massing"
"<li>Lars Luthman"
"</ol>"
"<p><b>Homepage:</b><br>"
"<a href=\"http://gis-lab.info/qa/qgis-georef-new-eng.html\">http://gis-lab.info/qa/qgis-georef-new-eng.html</a>" ).arg( sPluginVersion );

// this is required for adding georef icon in to left side of dialog
// create dynamicaly because on Mac this dialog is modeless
QWidget *w = new QWidget;
w->setAttribute( Qt::WA_DeleteOnClose );
w->setWindowIcon( getThemeIcon( "/mGeorefRun.png" ) );
QMessageBox::about( w, title, text );
}

//////////////////////////////////////////////////////////////////////
//
// END OF MANDATORY PLUGIN METHODS
//
//////////////////////////////////////////////////////////////////////



//////////////////////////////////////////////////////////////////////////
//
//
Expand Down
2 changes: 0 additions & 2 deletions src/plugins/georeferencer/qgsgeorefplugin.h
Expand Up @@ -88,7 +88,6 @@ class QgsGeorefPlugin: public QObject, public QgisPlugin
//! update the plugins theme when the app tells us its theme is changed
void setCurrentTheme( QString theThemeName );
QIcon getThemeIcon( const QString &theThemeName );
void about();

//////////////////////////////////////////////////////////////////////
//
Expand All @@ -109,7 +108,6 @@ class QgsGeorefPlugin: public QObject, public QgisPlugin
QgisInterface *mQGisIface;
//!pointer to the qaction for this plugin
QAction * mActionRunGeoref;
QAction *mActionAbout;
////////////////////////////////////////////////////////////////////
//
// ADD YOUR OWN MEMBER DECLARATIONS AFTER THIS POINT.....
Expand Down

0 comments on commit cd408bc

Please sign in to comment.