Skip to content

Commit 6803162

Browse files
author
gsherman
committedNov 16, 2006
enable context help for gps plugin
git-svn-id: http://svn.osgeo.org/qgis/trunk@6097 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 282287b commit 6803162

File tree

3 files changed

+112
-83
lines changed

3 files changed

+112
-83
lines changed
 

‎src/plugins/gps_importer/qgsgpsplugingui.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include "qgsgpsdevicedialog.h"
1414
#include "qgsmaplayer.h"
1515
#include "qgsdataprovider.h"
16+
#include "qgscontexthelp.h"
1617
#include <qgslogger.h>
1718

1819
//qt includes
@@ -399,3 +400,7 @@ void QgsGPSPluginGui::devicesUpdated() {
399400
}
400401

401402

403+
void QgsGPSPluginGui::on_pbnHelp_clicked()
404+
{
405+
QgsContextHelp::run(context_id);
406+
}

‎src/plugins/gps_importer/qgsgpsplugingui.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ public slots:
5656

5757
void on_pbnCancel_clicked();
5858
void on_pbnOK_clicked();
59+
void on_pbnHelp_clicked();
5960

6061
private:
6162

@@ -85,6 +86,7 @@ public slots:
8586
std::map<QString, QgsGPSDevice*>& mDevices;
8687
QString mBabelFilter;
8788
QString mImpFormat;
89+
static const int context_id = 995980174;
8890
};
8991

9092
#endif

‎src/plugins/gps_importer/qgsgpspluginguibase.ui

Lines changed: 105 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
<ui version="4.0" >
2-
<author></author>
3-
<comment></comment>
4-
<exportmacro></exportmacro>
52
<class>QgsGPSPluginGuiBase</class>
63
<widget class="QDialog" name="QgsGPSPluginGuiBase" >
74
<property name="geometry" >
@@ -25,6 +22,91 @@
2522
<property name="spacing" >
2623
<number>6</number>
2724
</property>
25+
<item row="1" column="0" colspan="3" >
26+
<layout class="QHBoxLayout" >
27+
<property name="margin" >
28+
<number>0</number>
29+
</property>
30+
<property name="spacing" >
31+
<number>6</number>
32+
</property>
33+
<item>
34+
<widget class="QPushButton" name="pbnHelp" >
35+
<property name="text" >
36+
<string>&amp;Help</string>
37+
</property>
38+
<property name="shortcut" >
39+
<string>Alt+C</string>
40+
</property>
41+
</widget>
42+
</item>
43+
<item>
44+
<spacer>
45+
<property name="orientation" >
46+
<enum>Qt::Horizontal</enum>
47+
</property>
48+
<property name="sizeType" >
49+
<enum>QSizePolicy::Expanding</enum>
50+
</property>
51+
<property name="sizeHint" >
52+
<size>
53+
<width>391</width>
54+
<height>26</height>
55+
</size>
56+
</property>
57+
</spacer>
58+
</item>
59+
<item>
60+
<widget class="QPushButton" name="pbnOK" >
61+
<property name="enabled" >
62+
<bool>false</bool>
63+
</property>
64+
<property name="text" >
65+
<string>&amp;OK</string>
66+
</property>
67+
<property name="shortcut" >
68+
<string>Alt+O</string>
69+
</property>
70+
</widget>
71+
</item>
72+
<item>
73+
<widget class="QPushButton" name="pbnCancel" >
74+
<property name="text" >
75+
<string>&amp;Cancel</string>
76+
</property>
77+
<property name="shortcut" >
78+
<string>Alt+C</string>
79+
</property>
80+
</widget>
81+
</item>
82+
</layout>
83+
</item>
84+
<item row="0" column="0" >
85+
<widget class="QLabel" name="label" >
86+
<property name="text" >
87+
<string/>
88+
</property>
89+
<property name="pixmap" >
90+
<pixmap resource="qgsgps_plugin.qrc" >:/gps.xpm</pixmap>
91+
</property>
92+
<property name="scaledContents" >
93+
<bool>true</bool>
94+
</property>
95+
</widget>
96+
</item>
97+
<item row="0" column="1" >
98+
<widget class="Line" name="line1" >
99+
<property name="frameShape" >
100+
<enum>QFrame::VLine</enum>
101+
</property>
102+
<property name="frameShadow" >
103+
<enum>QFrame::Sunken</enum>
104+
</property>
105+
<property name="orientation" >
106+
<enum>Qt::Vertical</enum>
107+
</property>
108+
</widget>
109+
</item>
28110
<item row="0" column="2" >
29111
<widget class="QTabWidget" name="tabWidget" >
30112
<widget class="QWidget" name="tab" >
@@ -55,7 +137,11 @@
55137
<bool>true</bool>
56138
</property>
57139
<property name="html" >
58-
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;/head>&lt;body style=" white-space: pre-wrap; 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>
140+
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
141+
p, li { white-space: pre-wrap; }
142+
&lt;/style>&lt;/head>&lt;body style=" font-family:'Arial'; font-size:12pt; font-weight:400; font-style:normal; text-decoration:none;">
143+
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&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>
144+
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; 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>
59145
</property>
60146
</widget>
61147
</item>
@@ -141,7 +227,11 @@
141227
<bool>true</bool>
142228
</property>
143229
<property name="html" >
144-
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;/head>&lt;body style=" white-space: pre-wrap; 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>
230+
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
231+
p, li { white-space: pre-wrap; }
232+
&lt;/style>&lt;/head>&lt;body style=" font-family:'Arial'; font-size:12pt; font-weight:400; font-style:normal; text-decoration:none;">
233+
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&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>
234+
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; 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>
145235
</property>
146236
</widget>
147237
</item>
@@ -238,7 +328,11 @@
238328
<bool>true</bool>
239329
</property>
240330
<property name="html" >
241-
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;/head>&lt;body style=" white-space: pre-wrap; 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>
331+
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
332+
p, li { white-space: pre-wrap; }
333+
&lt;/style>&lt;/head>&lt;body style=" font-family:'Arial'; font-size:12pt; font-weight:400; font-style:normal; text-decoration:none;">
334+
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&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>
335+
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; 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>
242336
</property>
243337
</widget>
244338
</item>
@@ -389,7 +483,11 @@
389483
<bool>true</bool>
390484
</property>
391485
<property name="html" >
392-
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;/head>&lt;body style=" white-space: pre-wrap; 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>
486+
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
487+
p, li { white-space: pre-wrap; }
488+
&lt;/style>&lt;/head>&lt;body style=" font-family:'Arial'; font-size:12pt; font-weight:400; font-style:normal; text-decoration:none;">
489+
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&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>
490+
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; 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>
393491
</property>
394492
</widget>
395493
</item>
@@ -434,85 +532,9 @@
434532
</widget>
435533
</widget>
436534
</item>
437-
<item row="1" column="0" colspan="3" >
438-
<layout class="QHBoxLayout" >
439-
<property name="margin" >
440-
<number>0</number>
441-
</property>
442-
<property name="spacing" >
443-
<number>6</number>
444-
</property>
445-
<item>
446-
<spacer>
447-
<property name="orientation" >
448-
<enum>Qt::Horizontal</enum>
449-
</property>
450-
<property name="sizeType" >
451-
<enum>QSizePolicy::Expanding</enum>
452-
</property>
453-
<property name="sizeHint" >
454-
<size>
455-
<width>550</width>
456-
<height>20</height>
457-
</size>
458-
</property>
459-
</spacer>
460-
</item>
461-
<item>
462-
<widget class="QPushButton" name="pbnOK" >
463-
<property name="enabled" >
464-
<bool>false</bool>
465-
</property>
466-
<property name="text" >
467-
<string>&amp;OK</string>
468-
</property>
469-
<property name="shortcut" >
470-
<string>Alt+O</string>
471-
</property>
472-
</widget>
473-
</item>
474-
<item>
475-
<widget class="QPushButton" name="pbnCancel" >
476-
<property name="text" >
477-
<string>&amp;Cancel</string>
478-
</property>
479-
<property name="shortcut" >
480-
<string>Alt+C</string>
481-
</property>
482-
</widget>
483-
</item>
484-
</layout>
485-
</item>
486-
<item row="0" column="1" >
487-
<widget class="Line" name="line1" >
488-
<property name="frameShape" >
489-
<enum>QFrame::VLine</enum>
490-
</property>
491-
<property name="frameShadow" >
492-
<enum>QFrame::Sunken</enum>
493-
</property>
494-
<property name="orientation" >
495-
<enum>Qt::Vertical</enum>
496-
</property>
497-
</widget>
498-
</item>
499-
<item row="0" column="0" >
500-
<widget class="QLabel" name="label" >
501-
<property name="text" >
502-
<string/>
503-
</property>
504-
<property name="pixmap" >
505-
<pixmap resource="qgsgps_plugin.qrc" >:/gps.xpm</pixmap>
506-
</property>
507-
<property name="scaledContents" >
508-
<bool>true</bool>
509-
</property>
510-
</widget>
511-
</item>
512535
</layout>
513536
</widget>
514537
<layoutdefault spacing="6" margin="11" />
515-
<pixmapfunction></pixmapfunction>
516538
<resources>
517539
<include location="qgsgps_plugin.qrc" />
518540
</resources>

0 commit comments

Comments
 (0)
Please sign in to comment.