Skip to content

Commit fc7c89d

Browse files
author
homann
committed
New georeferencer from GIS-Lab thanks to Maxim Dubinin!
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@10107 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 1664273 commit fc7c89d

16 files changed

+946
-829
lines changed

src/plugins/georeferencer/CMakeLists.txt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
21
########################################################
32
# Files
43

54
SET (GEOREF_SRCS
65
plugin.cpp
76
qgsgeorefdatapoint.cpp
8-
plugingui.cpp
97
qgsimagewarper.cpp
108
qgsleastsquares.cpp
119
qgspointdialog.cpp
@@ -15,7 +13,6 @@ SET (GEOREF_SRCS
1513
)
1614

1715
SET (GEOREF_UIS
18-
pluginguibase.ui
1916
qgspointdialogbase.ui
2017
mapcoordsdialogbase.ui
2118
qgsgeorefdescriptiondialogbase.ui
@@ -24,7 +21,6 @@ SET (GEOREF_UIS
2421

2522
SET (GEOREF_MOC_HDRS
2623
plugin.h
27-
plugingui.h
2824
qgspointdialog.h
2925
mapcoordsdialog.h
3026
qgsgeorefwarpoptionsdialog.h
@@ -51,7 +47,9 @@ INCLUDE_DIRECTORIES(
5147
../../gui
5248
..
5349
${GSL_INCLUDE_DIR}
50+
${QGIS_INCLUDE_DIR}
5451
${GDAL_INCLUDE_DIR}
52+
${QT_QTXML_INCLUDE_DIR}
5553
)
5654

5755
TARGET_LINK_LIBRARIES(georefplugin
@@ -60,7 +58,6 @@ TARGET_LINK_LIBRARIES(georefplugin
6058
${GSL_LIBRARIES}
6159
)
6260

63-
6461
########################################################
6562
# Install
6663

src/plugins/georeferencer/affine.jpg

-66.7 KB
Binary file not shown.

src/plugins/georeferencer/helmert.jpg

-92.2 KB
Binary file not shown.

src/plugins/georeferencer/mapcoordsdialog.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@
2121

2222
MapCoordsDialog::MapCoordsDialog()
2323
{
24-
24+
this->setWindowFlags(!Qt::Dialog);
25+
this->setWindowFlags(Qt::WindowSystemMenuHint);
26+
this->setWindowFlags(Qt::WindowMinimizeButtonHint);
27+
this->setWindowFlags(Qt::WindowMaximizeButtonHint);
2528
}
2629

2730

src/plugins/georeferencer/plugin.cpp

Lines changed: 43 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,13 @@
5050
//
5151
//the gui subclass
5252
//
53-
#include "plugingui.h"
54-
53+
//#include "plugingui.h"
54+
#include "qgspointdialog.h"
55+
#include "qgsgeorefdescriptiondialog.h"
5556

5657
static const char * const sIdent = "$Id$";
57-
static const QString sName = QObject::tr( "Georeferencer" );
58-
static const QString sDescription = QObject::tr( "Adding projection info to rasters" );
58+
static const QString sName = QObject::tr( "Georeferencer GDAL" );
59+
static const QString sDescription = QObject::tr( "Adding projection info to rasters using GDAL" );
5960
static const QString sPluginVersion = QObject::tr( "Version 0.1" );
6061
static const QgisPlugin::PLUGINTYPE sPluginType = QgisPlugin::UI;
6162

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

101+
mQActionPointer = new QAction( QIcon( ":/about.png" ), tr( "&Georeferencer" ), this );
102+
mQActionPointer = new QAction("About", this);
103+
connect(mQActionPointer, SIGNAL(triggered()), SLOT(about()));
104+
mQGisIface->addPluginToMenu(tr ("&Georeferencer"), mQActionPointer);
105+
106+
mQActionPointer = new QAction( QIcon( ":/help.png" ), tr( "&Georeferencer" ), this );
107+
mQActionPointer = new QAction("Help", this);
108+
connect(mQActionPointer, SIGNAL(triggered()), SLOT(help()));
109+
mQGisIface->addPluginToMenu(tr ("&Georeferencer"), mQActionPointer);
100110
}
101111
//method defined in interface
102112
void QgsGeorefPlugin::help()
103113
{
104-
//implement me!
114+
QgsGeorefDescriptionDialog dlg( mQGisIface->mainWindow( ) );
115+
dlg.exec();
116+
}
117+
118+
void QgsGeorefPlugin::about( )
119+
{
120+
QDialog dlg( mQGisIface->mainWindow( ) );
121+
dlg.setWindowFlags( dlg.windowFlags( ) | Qt::MSWindowsFixedSizeDialogHint );
122+
dlg.setWindowFlags( dlg.windowFlags( ) &~ Qt::WindowContextHelpButtonHint );
123+
QVBoxLayout *lines = new QVBoxLayout( &dlg );
124+
lines->addWidget( new QLabel( tr( "<b>Georeferencer GDAL</b>") ) );
125+
lines->addWidget( new QLabel( tr( " Based on original Georeferencer Plugin" ) ) );
126+
lines->addWidget( new QLabel( tr( "<b>Developers:</b>" ) ) );
127+
lines->addWidget( new QLabel( tr( " Lars Luthman (original Georeferencer)" ) ) );
128+
lines->addWidget( new QLabel( " Lynx (lynx21.12.12@gmail.ru)" ));
129+
lines->addWidget( new QLabel( " Maxim Dubinin (sim@gis-lab.info)" ));
130+
lines->addWidget( new QLabel( tr( "<b>Links:</b>" ) ) );
131+
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>");
132+
link->setOpenExternalLinks( true );
133+
lines->addWidget( link );
134+
135+
dlg.exec( );
105136
}
106137

107138
// Slot called when the buffer menu item is triggered
108139
void QgsGeorefPlugin::run()
109140
{
110-
QgsGeorefPluginGui *myPluginGui = new QgsGeorefPluginGui( mQGisIface, QgsGeorefPluginGui::findMainWindow() );
111-
myPluginGui->show();
112-
myPluginGui->setFocus();
141+
// QgsGeorefPluginGui *myPluginGui = new QgsGeorefPluginGui( mQGisIface, QgsGeorefPluginGui::findMainWindow(), Qt::Window | Qt::WindowMinimizeButtonHint);
142+
// myPluginGui->show();
143+
// myPluginGui->setFocus();
144+
QgsPointDialog *myPlugin = new QgsPointDialog(mQGisIface, QgsPointDialog::findMainWindow(), Qt::Window | Qt::WindowMinimizeButtonHint);
145+
myPlugin->move(0, 0);
146+
myPlugin->show();
147+
myPlugin->setFocus();
113148
}
114149

115150
// Unload the plugin by cleaning up the GUI

src/plugins/georeferencer/plugin.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ class QgsGeorefPlugin: public QObject, public QgisPlugin
8787
//! show the help document
8888
void help();
8989

90+
void about( );
9091
//////////////////////////////////////////////////////////////////////
9192
//
9293
// END OF MANDATORY PLUGIN METHODS

src/plugins/georeferencer/plugingui.cpp

Lines changed: 0 additions & 231 deletions
This file was deleted.

0 commit comments

Comments
 (0)