Skip to content

Commit

Permalink
New georeferencer from GIS-Lab thanks to Maxim Dubinin!
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@10107 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
homann committed Feb 4, 2009
1 parent 828cf03 commit 105151e
Show file tree
Hide file tree
Showing 16 changed files with 946 additions and 829 deletions.
7 changes: 2 additions & 5 deletions src/plugins/georeferencer/CMakeLists.txt
@@ -1,11 +1,9 @@

######################################################## ########################################################
# Files # Files


SET (GEOREF_SRCS SET (GEOREF_SRCS
plugin.cpp plugin.cpp
qgsgeorefdatapoint.cpp qgsgeorefdatapoint.cpp
plugingui.cpp
qgsimagewarper.cpp qgsimagewarper.cpp
qgsleastsquares.cpp qgsleastsquares.cpp
qgspointdialog.cpp qgspointdialog.cpp
Expand All @@ -15,7 +13,6 @@ SET (GEOREF_SRCS
) )


SET (GEOREF_UIS SET (GEOREF_UIS
pluginguibase.ui
qgspointdialogbase.ui qgspointdialogbase.ui
mapcoordsdialogbase.ui mapcoordsdialogbase.ui
qgsgeorefdescriptiondialogbase.ui qgsgeorefdescriptiondialogbase.ui
Expand All @@ -24,7 +21,6 @@ SET (GEOREF_UIS


SET (GEOREF_MOC_HDRS SET (GEOREF_MOC_HDRS
plugin.h plugin.h
plugingui.h
qgspointdialog.h qgspointdialog.h
mapcoordsdialog.h mapcoordsdialog.h
qgsgeorefwarpoptionsdialog.h qgsgeorefwarpoptionsdialog.h
Expand All @@ -51,7 +47,9 @@ INCLUDE_DIRECTORIES(
../../gui ../../gui
.. ..
${GSL_INCLUDE_DIR} ${GSL_INCLUDE_DIR}
${QGIS_INCLUDE_DIR}
${GDAL_INCLUDE_DIR} ${GDAL_INCLUDE_DIR}
${QT_QTXML_INCLUDE_DIR}
) )


TARGET_LINK_LIBRARIES(georefplugin TARGET_LINK_LIBRARIES(georefplugin
Expand All @@ -60,7 +58,6 @@ TARGET_LINK_LIBRARIES(georefplugin
${GSL_LIBRARIES} ${GSL_LIBRARIES}
) )



######################################################## ########################################################
# Install # Install


Expand Down
Binary file removed src/plugins/georeferencer/affine.jpg
Binary file not shown.
Binary file removed src/plugins/georeferencer/helmert.jpg
Binary file not shown.
5 changes: 4 additions & 1 deletion src/plugins/georeferencer/mapcoordsdialog.cpp
Expand Up @@ -21,7 +21,10 @@


MapCoordsDialog::MapCoordsDialog() MapCoordsDialog::MapCoordsDialog()
{ {

this->setWindowFlags(!Qt::Dialog);
this->setWindowFlags(Qt::WindowSystemMenuHint);
this->setWindowFlags(Qt::WindowMinimizeButtonHint);
this->setWindowFlags(Qt::WindowMaximizeButtonHint);
} }




Expand Down
51 changes: 43 additions & 8 deletions src/plugins/georeferencer/plugin.cpp
Expand Up @@ -50,12 +50,13 @@
// //
//the gui subclass //the gui subclass
// //
#include "plugingui.h" //#include "plugingui.h"

#include "qgspointdialog.h"
#include "qgsgeorefdescriptiondialog.h"


static const char * const sIdent = "$Id$"; static const char * const sIdent = "$Id$";
static const QString sName = QObject::tr( "Georeferencer" ); static const QString sName = QObject::tr( "Georeferencer GDAL" );
static const QString sDescription = QObject::tr( "Adding projection info to rasters" ); static const QString sDescription = QObject::tr( "Adding projection info to rasters using GDAL" );
static const QString sPluginVersion = QObject::tr( "Version 0.1" ); static const QString sPluginVersion = QObject::tr( "Version 0.1" );
static const QgisPlugin::PLUGINTYPE sPluginType = QgisPlugin::UI; static const QgisPlugin::PLUGINTYPE sPluginType = QgisPlugin::UI;


Expand Down Expand Up @@ -97,19 +98,53 @@ void QgsGeorefPlugin::initGui()
mQGisIface->addToolBarIcon( mQActionPointer ); mQGisIface->addToolBarIcon( mQActionPointer );
mQGisIface->addPluginToMenu( tr( "&Georeferencer" ), mQActionPointer ); mQGisIface->addPluginToMenu( tr( "&Georeferencer" ), mQActionPointer );


mQActionPointer = new QAction( QIcon( ":/about.png" ), tr( "&Georeferencer" ), this );
mQActionPointer = new QAction("About", this);
connect(mQActionPointer, SIGNAL(triggered()), SLOT(about()));
mQGisIface->addPluginToMenu(tr ("&Georeferencer"), mQActionPointer);

mQActionPointer = new QAction( QIcon( ":/help.png" ), tr( "&Georeferencer" ), this );
mQActionPointer = new QAction("Help", this);
connect(mQActionPointer, SIGNAL(triggered()), SLOT(help()));
mQGisIface->addPluginToMenu(tr ("&Georeferencer"), mQActionPointer);
} }
//method defined in interface //method defined in interface
void QgsGeorefPlugin::help() void QgsGeorefPlugin::help()
{ {
//implement me! QgsGeorefDescriptionDialog dlg( mQGisIface->mainWindow( ) );
dlg.exec();
}

void QgsGeorefPlugin::about( )
{
QDialog dlg( mQGisIface->mainWindow( ) );
dlg.setWindowFlags( dlg.windowFlags( ) | Qt::MSWindowsFixedSizeDialogHint );
dlg.setWindowFlags( dlg.windowFlags( ) &~ Qt::WindowContextHelpButtonHint );
QVBoxLayout *lines = new QVBoxLayout( &dlg );
lines->addWidget( new QLabel( tr( "<b>Georeferencer GDAL</b>") ) );
lines->addWidget( new QLabel( tr( " Based on original Georeferencer Plugin" ) ) );
lines->addWidget( new QLabel( tr( "<b>Developers:</b>" ) ) );
lines->addWidget( new QLabel( tr( " Lars Luthman (original Georeferencer)" ) ) );
lines->addWidget( new QLabel( " Lynx (lynx21.12.12@gmail.ru)" ));
lines->addWidget( new QLabel( " Maxim Dubinin (sim@gis-lab.info)" ));
lines->addWidget( new QLabel( tr( "<b>Links:</b>" ) ) );
QLabel *link = new QLabel( " <a href=\"http://gis-lab.info/qa/qgis-georef-new-eng.html\">http://gis-lab.info/qa/qgis-georef-new-eng.html</a>");
link->setOpenExternalLinks( true );
lines->addWidget( link );

dlg.exec( );
} }


// Slot called when the buffer menu item is triggered // Slot called when the buffer menu item is triggered
void QgsGeorefPlugin::run() void QgsGeorefPlugin::run()
{ {
QgsGeorefPluginGui *myPluginGui = new QgsGeorefPluginGui( mQGisIface, QgsGeorefPluginGui::findMainWindow() ); // QgsGeorefPluginGui *myPluginGui = new QgsGeorefPluginGui( mQGisIface, QgsGeorefPluginGui::findMainWindow(), Qt::Window | Qt::WindowMinimizeButtonHint);
myPluginGui->show(); // myPluginGui->show();
myPluginGui->setFocus(); // myPluginGui->setFocus();
QgsPointDialog *myPlugin = new QgsPointDialog(mQGisIface, QgsPointDialog::findMainWindow(), Qt::Window | Qt::WindowMinimizeButtonHint);
myPlugin->move(0, 0);
myPlugin->show();
myPlugin->setFocus();
} }


// Unload the plugin by cleaning up the GUI // Unload the plugin by cleaning up the GUI
Expand Down
1 change: 1 addition & 0 deletions src/plugins/georeferencer/plugin.h
Expand Up @@ -87,6 +87,7 @@ class QgsGeorefPlugin: public QObject, public QgisPlugin
//! show the help document //! show the help document
void help(); void help();


void about( );
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
// //
// END OF MANDATORY PLUGIN METHODS // END OF MANDATORY PLUGIN METHODS
Expand Down
231 changes: 0 additions & 231 deletions src/plugins/georeferencer/plugingui.cpp

This file was deleted.

0 comments on commit 105151e

Please sign in to comment.