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/qgis@10107 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
homann committed Feb 4, 2009
1 parent 1664273 commit fc7c89d
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

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

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

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

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


########################################################
# 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()
{

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
//
#include "plugingui.h"

//#include "plugingui.h"
#include "qgspointdialog.h"
#include "qgsgeorefdescriptiondialog.h"

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

Expand Down Expand Up @@ -97,19 +98,53 @@ void QgsGeorefPlugin::initGui()
mQGisIface->addToolBarIcon( 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
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
void QgsGeorefPlugin::run()
{
QgsGeorefPluginGui *myPluginGui = new QgsGeorefPluginGui( mQGisIface, QgsGeorefPluginGui::findMainWindow() );
myPluginGui->show();
myPluginGui->setFocus();
// QgsGeorefPluginGui *myPluginGui = new QgsGeorefPluginGui( mQGisIface, QgsGeorefPluginGui::findMainWindow(), Qt::Window | Qt::WindowMinimizeButtonHint);
// myPluginGui->show();
// 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
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
void help();

void about( );
//////////////////////////////////////////////////////////////////////
//
// 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 fc7c89d

Please sign in to comment.