Skip to content
Permalink
Browse files
Cleaned up gps importer translation
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@7993 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
homann committed Jan 17, 2008
1 parent 105b3c2 commit e0483520dd943d1291a7012de3669dc7c08d7bda
Showing with 83 additions and 24 deletions.
  1. +71 −0 src/plugins/gps_importer/qgsgpsplugingui.cpp
  2. +4 −0 src/plugins/gps_importer/qgsgpsplugingui.h
  3. +8 −24 src/plugins/gps_importer/qgsgpspluginguibase.ui
@@ -37,6 +37,10 @@ QgsGPSPluginGui::QgsGPSPluginGui(const BabelMap& importers,
populatePortComboBoxes();
populateULLayerComboBox();
populateIMPBabelFormats();
populateLoadDialog();
populateULDialog();
populateDLDialog();
populateIMPDialog();
populateCONVDialog();

connect(pbULEditDevices, SIGNAL(clicked()), this, SLOT(openDeviceEditor()));
@@ -404,6 +408,73 @@ void QgsGPSPluginGui::populateIMPBabelFormats() {
cmbDLDevice->setCurrentItem(d);
}

void QgsGPSPluginGui::populateLoadDialog() {

QString format = QString("<p>%1</p><p>%2</p>");

QString sentence1 = tr("GPX is the %1, which is used to store information about waypoints, routes, and tracks.").
arg(QString("<a href=http://www.topografix.com/gpx.asp>%1</a>").arg(tr("GPS eXchange file format")));
QString sentence2 = tr("Select a GPX file and then select the feature types that you want to load.");

QString text = format.arg(sentence1).arg(sentence2);

teLoadDescription->setHtml(text);
QgsDebugMsg(text);
}

void QgsGPSPluginGui::populateDLDialog() {

QString format = QString("<p>%1 %2 %3<p>%4 %5</p>");

QString sentence1 = tr("This tool will help you download data from a GPS device.");
QString sentence2 = tr("Choose your GPS device, the port it is connected to, the feature type you want to download, a name for your new layer, and the GPX file where you want to store the data.");
QString sentence3 = tr("If your device isn't listed, or if you want to change some settings, you can also edit the devices.");
QString sentence4 = tr("This tool uses the program GPSBabel (%1) to transfer the data.")
.arg("<a href=\"http://www.gpsbabel.org\">http://www.gpsbabel.org</a>");

QString sentence5 = tr("This requires that you have GPSBabel installed where QGIS can find it.");

QString text = format.arg(sentence1).arg(sentence2).arg(sentence3).arg(sentence4).arg(sentence5);

teDLDescription->setHtml(text);
QgsDebugMsg(text);
}

void QgsGPSPluginGui::populateULDialog() {

QString format = QString("<p>%1 %2 %3<p>%4 %5</p>");

QString sentence1 = tr("This tool will help you upload data from a GPX layer to a GPS device.");
QString sentence2 = tr("Choose the layer you want to upload, the device you want to upload it to, and the port your device is connected to.");
QString sentence3 = tr("If your device isn't listed, or if you want to change some settings, you can also edit the devices.");
QString sentence4 = tr("This tool uses the program GPSBabel (%1) to transfer the data.")
.arg("<a href=\"http://www.gpsbabel.org\">http://www.gpsbabel.org</a>");

QString sentence5 = tr("This requires that you have GPSBabel installed where QGIS can find it.");

QString text = format.arg(sentence1).arg(sentence2).arg(sentence3).arg(sentence4).arg(sentence5);

teULDescription->setHtml(text);
QgsDebugMsg(text);
}

void QgsGPSPluginGui::populateIMPDialog() {

QString format = QString("<p>%1 %2<p><p>%3 %4</p>");

QString sentence1 = tr("QGIS can only load GPX files by itself, but many other formats can be converted to GPX using GPSBabel (%1).")
.arg("<a href=\"http://www.gpsbabel.org\">http://www.gpsbabel.org</a>");
QString sentence2 = tr("This requires that you have GPSBabel installed where QGIS can find it.");
QString sentence3 = tr("Select a GPS file format and the file that you want to import, the feature type that you want to use, a GPX filename that you want to save the converted file as, and a name for the new layer.");
QString sentence4 = tr("All file formats can not store waypoints, routes, and tracks, so some feature types may be disabled for some file formats.");

QString text = format.arg(sentence1).arg(sentence2).arg(sentence3).arg(sentence4);

teIMPDescription->setHtml(text);
QgsDebugMsg(text);
}


void QgsGPSPluginGui::populateCONVDialog() {
cmbCONVType->insertItem(tr("Routes") + " -> " + tr("Waypoints"));
cmbCONVType->insertItem(tr("Waypoints") + " -> " + tr("Routes"));
@@ -63,6 +63,10 @@ public slots:
void populateULLayerComboBox();
void populateIMPBabelFormats();
void populatePortComboBoxes();
void populateLoadDialog();
void populateDLDialog();
void populateULDialog();
void populateIMPDialog();
void populateCONVDialog();

private slots:
@@ -65,7 +65,7 @@
<number>6</number>
</property>
<item row="0" column="0" colspan="2" >
<widget class="QTextEdit" name="textEdit" >
<widget class="QTextEdit" name="teLoadDescription" >
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>7</hsizetype>
@@ -81,11 +81,7 @@
<bool>true</bool>
</property>
<property name="html" >
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;">
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Arial'; font-size:12pt;">&lt;span style=" font-size:10pt;">GPX is the &lt;/span>&lt;a href="http://www.topografix.com/gpx.asp">&lt;span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">GPS eXchange file format&lt;/span>&lt;/a>&lt;span style=" font-size:10pt;">, which is used to store information about waypoints, routes, and tracks.&lt;/span>&lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Arial'; font-size:10pt;">Select a GPX file and then select the feature types that you want to load.&lt;/p>&lt;/body>&lt;/html></string>
<string></string>
</property>
</widget>
</item>
@@ -166,16 +162,12 @@ p, li { white-space: pre-wrap; }
<number>6</number>
</property>
<item row="0" column="0" colspan="4" >
<widget class="QTextEdit" name="textEdit_2" >
<widget class="QTextEdit" name="teIMPDescription" >
<property name="readOnly" >
<bool>true</bool>
</property>
<property name="html" >
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;">
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Arial'; font-size:12pt;">&lt;span style=" font-size:10pt;">QGIS can only load GPX files by itself, but many other formats can be converted to GPX using GPSBabel (&lt;/span>&lt;a href="http://gpsbabel.sf.net">&lt;span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">http://gpsbabel.sf.net&lt;/span>&lt;/a>&lt;span style=" font-size:10pt;">). This requires that you have GPSBabel installed where QGIS can find it.&lt;/span>&lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Arial'; font-size:10pt;">Select a GPS file format and the file that you want to import, the feature type that you want to use, a GPX filename that you want to save the converted file as, and a name for the new layer. All file formats can not store waypoints, routes, and tracks, so some feature types may be disabled for some file formats.&lt;/p>&lt;/body>&lt;/html></string>
<string></string>
</property>
</widget>
</item>
@@ -281,16 +273,12 @@ p, li { white-space: pre-wrap; }
<number>6</number>
</property>
<item row="0" column="0" colspan="5" >
<widget class="QTextEdit" name="textEdit_3" >
<widget class="QTextEdit" name="teDLDescription" >
<property name="readOnly" >
<bool>true</bool>
</property>
<property name="html" >
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;">
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Arial'; font-size:12pt;">&lt;span style=" font-size:10pt;">This tool will help you download data from a GPS device. Choose your GPS device, the port it is connected to, the feature type you want to download, a name for your new layer, and the GPX file where you want to store the data. If your device isn't listed, or if you want to change some settings, you can also edit the devices.&lt;/span>&lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Arial'; font-size:10pt;">This tool uses the program GPSBabel (&lt;a href="http://gpsbabel.sf.net">&lt;span style=" text-decoration: underline; color:#0000ff;">http://gpsbabel.sf.net&lt;/span>&lt;/a>) to transfer the data. If you don't have GPSBabel installed where QGIS can find it, this tool will not work.&lt;/p>&lt;/body>&lt;/html></string>
<string></string>
</property>
</widget>
</item>
@@ -456,16 +444,12 @@ p, li { white-space: pre-wrap; }
</spacer>
</item>
<item row="0" column="0" colspan="5" >
<widget class="QTextEdit" name="textEdit_4" >
<widget class="QTextEdit" name="teULDescription" >
<property name="readOnly" >
<bool>true</bool>
</property>
<property name="html" >
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;">
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Arial'; font-size:12pt;">&lt;span style=" font-size:10pt;">This tool will help you upload data from a GPX layer to a GPS device. Choose the layer you want to upload, the device you want to upload it to, and the port your device is connected to. If your device isn't listed, or if you want to change some settings, you can also edit the devices.&lt;/span>&lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Arial'; font-size:10pt;">This tool uses the program GPSBabel (&lt;a href="http://gpsbabel.sf.net">&lt;span style=" text-decoration: underline; color:#0000ff;">http://gpsbabel.sf.net&lt;/span>&lt;/a>) to transfer the data. If you don't have GPSBabel installed where QGIS can find it, this tool will not work.&lt;/p>&lt;/body>&lt;/html></string>
<string></string>
</property>
</widget>
</item>

0 comments on commit e048352

Please sign in to comment.