Skip to content

Commit c04aef6

Browse files
author
homann
committed
Text string made easier to translate in georeferencer.
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@11181 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent fde0c6f commit c04aef6

6 files changed

+16
-17
lines changed

src/plugins/georeferencer/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Files
33

44
SET (GEOREF_SRCS
5-
plugin.cpp
5+
qgsgeorefplugin.cpp
66
qgsgeorefdatapoint.cpp
77
qgsimagewarper.cpp
88
qgsleastsquares.cpp
@@ -20,7 +20,7 @@ SET (GEOREF_UIS
2020
)
2121

2222
SET (GEOREF_MOC_HDRS
23-
plugin.h
23+
qgsgeorefplugin.h
2424
qgspointdialog.h
2525
mapcoordsdialog.h
2626
qgsgeorefwarpoptionsdialog.h

src/plugins/georeferencer/qgsgeorefdescriptiondialog.cpp

+9
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,13 @@
2020
QgsGeorefDescriptionDialog::QgsGeorefDescriptionDialog( QWidget* parent ): QDialog( parent )
2121
{
2222
setupUi( this );
23+
24+
textEdit->setText("<h2>Description</h2>"
25+
"<p>This plugin can generate world files "
26+
"for rasters. You select points on the "
27+
"raster and give their world "
28+
"coordinates, and the plugin will "
29+
"compute the world file parameters. "
30+
"The more coordinates you can "
31+
"provide the better the result will be.</p>");
2332
}

src/plugins/georeferencer/qgsgeorefdescriptiondialogbase.ui

-8
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
<string>Description georeferencer</string>
1414
</property>
1515
<property name="windowIcon" >
16-
<iconset resource="georeferencer.qrc" >:/georeferencer.png</iconset>
1716
</property>
1817
<property name="modal" >
1918
<bool>true</bool>
@@ -40,13 +39,6 @@
4039
<property name="readOnly" >
4140
<bool>true</bool>
4241
</property>
43-
<property name="html" >
44-
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
45-
p, li { white-space: pre-wrap; }
46-
&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:12pt; font-weight:400; font-style:normal; text-decoration:none;">
47-
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-size:11pt; font-weight:600;">Description&lt;/span>&lt;/p>
48-
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:9pt;">This plugin can generate world files for rasters. You select points on the raster and give their world coordinates, and the plugin will compute the world file parameters. The more coordinates you can provide the better the result will be.&lt;/p>&lt;/body>&lt;/html></string>
49-
</property>
5042
</widget>
5143
</item>
5244
<item row="0" column="0" >

src/plugins/georeferencer/qgsleastsquares.cpp

+3-6
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ void QgsLeastSquares::linear( std::vector<QgsPoint> mapCoords,
3030
int n = mapCoords.size();
3131
if ( n < 2 )
3232
{
33-
throw std::domain_error( QObject::tr( "Fit to a linear transform requires at "
34-
"least 2 points." ).toLocal8Bit().constData() );
33+
throw std::domain_error( QObject::tr( "Fit to a linear transform requires at least 2 points." ).toLocal8Bit().constData() );
3534
}
3635

3736
double sumPx( 0 ), sumPy( 0 ), sumPx2( 0 ), sumPy2( 0 ), sumPxMx( 0 ), sumPyMy( 0 ),
@@ -72,8 +71,7 @@ void QgsLeastSquares::helmert( std::vector<QgsPoint> mapCoords,
7271
int n = mapCoords.size();
7372
if ( n < 2 )
7473
{
75-
throw std::domain_error( QObject::tr( "Fit to a Helmert transform requires at "
76-
"least 2 points." ).toLocal8Bit().constData() );
74+
throw std::domain_error( QObject::tr( "Fit to a Helmert transform requires at least 2 points." ).toLocal8Bit().constData() );
7775
}
7876

7977
double A = 0, B = 0, C = 0, D = 0, E = 0, F = 0, G = 0, H = 0, I = 0, J = 0;
@@ -128,8 +126,7 @@ void QgsLeastSquares::affine( std::vector<QgsPoint> mapCoords,
128126
int n = mapCoords.size();
129127
if ( n < 4 )
130128
{
131-
throw std::domain_error( QObject::tr( "Fit to an affine transform requires at "
132-
"least 4 points." ).toLocal8Bit().constData() );
129+
throw std::domain_error( QObject::tr( "Fit to an affine transform requires at least 4 points." ).toLocal8Bit().constData() );
133130
}
134131

135132
double A = 0, B = 0, C = 0, D = 0, E = 0, F = 0,

src/plugins/georeferencer/qgspointdialog.h

+1
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ class QgsPointDialog : public QDialog, private Ui::QgsPointDialogBase
7676
QString guessWorldFileName( const QString& raster );
7777

7878
void enableModifiedRasterControls( bool state );
79+
void enableControls(bool state);
7980
QIcon getThemeIcon( const QString theName );
8081

8182
QActionGroup* mMapToolGroup;

src/plugins/georeferencer/qgspointdialogbase.ui

+1-1
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@
312312
</widget>
313313
</item>
314314
<item row="3" column="0" >
315-
<widget class="QLabel" name="textLabel1" >
315+
<widget class="QLabel" name="lblSelectWorldFile" >
316316
<property name="text" >
317317
<string>World file:</string>
318318
</property>

0 commit comments

Comments
 (0)