@@ -38,7 +38,9 @@ QgsGpsToolBar::QgsGpsToolBar( QgsAppGpsConnection *connection, QgsMapCanvas *can
38
38
39
39
mWgs84CRS = QgsCoordinateReferenceSystem::fromOgcWmsCrs ( QStringLiteral ( " EPSG:4326" ) );
40
40
41
- mConnectAction = new QAction ( tr ( " Connect" ), this );
41
+ mConnectAction = new QAction ( tr ( " Connect GPS" ), this );
42
+ mConnectAction ->setToolTip ( tr ( " Connect to GPS" ) );
43
+ mConnectAction ->setIcon ( QgsApplication::getThemeIcon ( QStringLiteral ( " /gpsicons/mIconGpsConnect.svg" ) ) );
42
44
mConnectAction ->setCheckable ( true );
43
45
addAction ( mConnectAction );
44
46
@@ -52,6 +54,7 @@ QgsGpsToolBar::QgsGpsToolBar( QgsAppGpsConnection *connection, QgsMapCanvas *can
52
54
53
55
mRecenterAction = new QAction ( tr ( " Recenter" ) );
54
56
mRecenterAction ->setToolTip ( tr ( " Recenter map on GPS location" ) );
57
+ mRecenterAction ->setIcon ( QgsApplication::getThemeIcon ( QStringLiteral ( " /gpsicons/mActionRecenter.svg" ) ) );
55
58
mRecenterAction ->setEnabled ( false );
56
59
57
60
connect ( mRecenterAction , &QAction::triggered, this , [ = ]
@@ -77,20 +80,24 @@ QgsGpsToolBar::QgsGpsToolBar( QgsAppGpsConnection *connection, QgsMapCanvas *can
77
80
78
81
mAddTrackPointAction = new QAction ( tr ( " Add Track Point" ), this );
79
82
mAddTrackPointAction ->setEnabled ( false );
83
+ mAddTrackPointAction ->setIcon ( QgsApplication::getThemeIcon ( QStringLiteral ( " /gpsicons/mActionAddTrackPoint.svg" ) ) );
80
84
connect ( mAddTrackPointAction , &QAction::triggered, this , &QgsGpsToolBar::addVertexClicked );
81
85
addAction ( mAddTrackPointAction );
82
86
83
- mAddFeatureAction = new QAction ( tr ( " Add Feature" ), this );
87
+ mAddFeatureAction = new QAction ( tr ( " Create Feature" ), this );
88
+ mAddFeatureAction ->setIcon ( QgsApplication::getThemeIcon ( QStringLiteral ( " mActionCaptureLine.svg" ) ) );
84
89
connect ( mAddFeatureAction , &QAction::triggered, this , &QgsGpsToolBar::addFeatureClicked );
85
90
addAction ( mAddFeatureAction );
86
91
87
92
mResetFeatureAction = new QAction ( tr ( " Reset Feature" ), this );
93
+ mResetFeatureAction ->setIcon ( QgsApplication::getThemeIcon ( QStringLiteral ( " /gpsicons/mActionReset.svg" ) ) );
88
94
connect ( mResetFeatureAction , &QAction::triggered, this , &QgsGpsToolBar::resetFeatureClicked );
89
95
addAction ( mResetFeatureAction );
90
96
91
97
addSeparator ();
92
98
93
99
mShowInfoAction = new QAction ( tr ( " Information" ) );
100
+ mShowInfoAction ->setIcon ( QgsApplication::getThemeIcon ( QStringLiteral ( " mActionPropertiesWidget.svg" ) ) );
94
101
mShowInfoAction ->setToolTip ( tr ( " Show GPS Information Panel" ) );
95
102
mShowInfoAction ->setCheckable ( true );
96
103
addAction ( mShowInfoAction );
@@ -198,7 +205,8 @@ void QgsGpsToolBar::updateCloseFeatureButton( QgsMapLayer *lyr )
198
205
mLastLayer = vlayer;
199
206
}
200
207
201
- QString buttonLabel = tr ( " &Add Feature" );
208
+ QString buttonLabel = tr ( " Create Feature" );
209
+ QString icon = QStringLiteral ( " mActionCaptureLine.svg" );;
202
210
if ( vlayer )
203
211
{
204
212
QgsVectorDataProvider *provider = vlayer->dataProvider ();
@@ -210,15 +218,18 @@ void QgsGpsToolBar::updateCloseFeatureButton( QgsMapLayer *lyr )
210
218
switch ( layerGeometryType )
211
219
{
212
220
case QgsWkbTypes::PointGeometry:
213
- buttonLabel = tr ( " &Add Point" );
221
+ buttonLabel = tr ( " Create Point Feature" );
222
+ icon = QStringLiteral ( " mActionCapturePoint.svg" );
214
223
break ;
215
224
216
225
case QgsWkbTypes::LineGeometry:
217
- buttonLabel = tr ( " &Add Line" );
226
+ buttonLabel = tr ( " Create Line Feature" );
227
+ icon = QStringLiteral ( " mActionCaptureLine.svg" );
218
228
break ;
219
229
220
230
case QgsWkbTypes::PolygonGeometry:
221
- buttonLabel = tr ( " &Add Polygon" );
231
+ buttonLabel = tr ( " Create Polygon Feature" );
232
+ icon = QStringLiteral ( " mActionCapturePolygon.svg" );
222
233
break ;
223
234
224
235
case QgsWkbTypes::UnknownGeometry:
@@ -234,6 +245,8 @@ void QgsGpsToolBar::updateCloseFeatureButton( QgsMapLayer *lyr )
234
245
mAddFeatureAction ->setEnabled ( false );
235
246
}
236
247
mAddFeatureAction ->setText ( buttonLabel );
248
+ mAddFeatureAction ->setIcon ( QgsApplication::getThemeIcon ( icon ) );
249
+ mAddFeatureAction ->setToolTip ( buttonLabel );
237
250
}
238
251
239
252
void QgsGpsToolBar::layerEditStateChanged ()
0 commit comments