Skip to content

Commit 13e7cd9

Browse files
tudorbarascuNathanW2
authored andcommitted
show shortcuts in advanced digitizing tools tooltips + fix small typo (#4102)
* show shortcuts in tooltips of advanced digitizing panel + fix small typo * advanced digitizing tooltips styling
1 parent ca33329 commit 13e7cd9

File tree

3 files changed

+48
-22
lines changed

3 files changed

+48
-22
lines changed

scripts/spell_check/spelling.dat

+1
Original file line numberDiff line numberDiff line change
@@ -6770,6 +6770,7 @@ tabacco:tobacco
67706770
tahn:than
67716771
taht:that
67726772
talekd:talked
6773+
tangeant:tangent
67736774
targetted:targeted
67746775
targetting:targeting
67756776
tast:taste

src/gui/qgsadvanceddigitizingdockwidget.cpp

+29-4
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ bool QgsAdvancedDigitizingDockWidget::lineCircleIntersection( const QgsPoint& ce
5656

5757
if ( disc < 0 )
5858
{
59-
//no intersection or tangeant
59+
//no intersection or tangent
6060
return false;
6161
}
6262
else
@@ -197,6 +197,31 @@ QgsAdvancedDigitizingDockWidget::QgsAdvancedDigitizingDockWidget( QgsMapCanvas*
197197
mSettingsButton->setMenu( menu );
198198
connect( mSettingsButton, SIGNAL( triggered( QAction* ) ), this, SLOT( settingsButtonTriggered( QAction* ) ) );
199199

200+
// set tooltips
201+
mConstructionModeButton->setToolTip( "<b>" + tr( "Construction mode" ) + "</b><br>(" + tr( "press c to toggle on/off" ) + ")" );
202+
mPerpendicularButton->setToolTip( "<b>" + tr( "Perpendicular" ) + "</b><br>(" + tr( "press p to switch between perpendicular, parallel and normal mode" ) + ")" );
203+
mParallelButton->setToolTip( "<b>" + tr( "Parallel" ) + "</b><br>(" + tr( "press p to switch between perpendicular, parallel and normal mode" ) + ")" );
204+
205+
mDistanceLineEdit->setToolTip( "<b>" + tr( "Distance" ) + "</b><br>(" + tr( "press d for quick access" ) + ")" );
206+
mLockDistanceButton->setToolTip( "<b>" + tr( "Lock distance" ) + "</b><br>(" + tr( "press Ctrl + d for quick access" ) + ")" );
207+
mRepeatingLockDistanceButton->setToolTip( "<b>" + tr( "Continuously lock distance" ) + "</b>" );
208+
209+
mRelativeAngleButton->setToolTip( "<b>" + tr( "Toggles relative angle to previous segment" ) + "</b><br>(" + tr( "press Shift + a for quick access" ) + ")" );
210+
mAngleLineEdit->setToolTip( "<b>" + tr( "Angle" ) + "</b><br>(" + tr( "press a for quick access" ) + ")" );
211+
mLockAngleButton->setToolTip( "<b>" + tr( "Lock angle" ) + "</b><br>(" + tr( "press Ctrl + a for quick access" ) + ")" );
212+
mRepeatingLockAngleButton->setToolTip( "<b>" + tr( "Continuously lock angle" ) + "</b>" );
213+
214+
mRelativeXButton->setToolTip( "<b>" + tr( "Toggles relative x to previous node" ) + "</b><br>(" + tr( "press Shift + x for quick access" ) + ")" );
215+
mXLineEdit->setToolTip( "<b>" + tr( "X coordinate" ) + "</b><br>(" + tr( "press x for quick access" ) + ")" );
216+
mLockXButton->setToolTip( "<b>" + tr( "Lock x coordinate" ) + "</b><br>(" + tr( "press Ctrl + x for quick access" ) + ")" );
217+
mRepeatingLockXButton->setToolTip( "<b>" + tr( "Continuously lock x coordinate" ) + "</b>" );
218+
219+
mRelativeYButton->setToolTip( "<b>" + tr( "Toggles relative y to previous node" ) + "</b><br>(" + tr( "press Shift + y for quick access" ) + ")" );
220+
mYLineEdit->setToolTip( "<b>" + tr( "Y coordinate" ) + "</b><br>(" + tr( "press y for quick access" ) + ")" );
221+
mLockYButton->setToolTip( "<b>" + tr( "Lock y coordinate" ) + "</b><br>(" + tr( "press Ctrl + y for quick access" ) + ")" );
222+
mRepeatingLockYButton->setToolTip( "<b>" + tr( "Continuously lock y coordinate" ) + "</b>" );
223+
224+
200225
updateCapacity( true );
201226
disable();
202227
}
@@ -567,7 +592,7 @@ bool QgsAdvancedDigitizingDockWidget::applyConstraints( QgsMapMouseEvent* e )
567592
QgsPoint penultimatePt = penultimatePoint( &penulPointExist );
568593

569594
// *****************************
570-
// ---- X Constrain
595+
// ---- X constraint
571596
if ( mXConstraint->isLocked() )
572597
{
573598
if ( !mXConstraint->relative() )
@@ -594,7 +619,7 @@ bool QgsAdvancedDigitizingDockWidget::applyConstraints( QgsMapMouseEvent* e )
594619
}
595620
}
596621
// *****************************
597-
// ---- Y Constrain
622+
// ---- Y constraint
598623
if ( mYConstraint->isLocked() )
599624
{
600625
if ( !mYConstraint->relative() )
@@ -621,7 +646,7 @@ bool QgsAdvancedDigitizingDockWidget::applyConstraints( QgsMapMouseEvent* e )
621646
}
622647
}
623648
// *****************************
624-
// ---- Angle constrain
649+
// ---- Angle constraint
625650
// input angles are in degrees
626651
if ( mAngleConstraint->lockMode() == CadConstraint::SoftLock )
627652
{

src/ui/qgsadvanceddigitizingdockwidgetbase.ui

+18-18
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@
117117
<item row="0" column="2">
118118
<widget class="QToolButton" name="mParallelButton">
119119
<property name="toolTip">
120-
<string>Parallel</string>
120+
<string/>
121121
</property>
122122
<property name="text">
123123
<string>...</string>
@@ -140,7 +140,7 @@
140140
<item row="0" column="1">
141141
<widget class="QToolButton" name="mPerpendicularButton">
142142
<property name="toolTip">
143-
<string>Perpendicular</string>
143+
<string/>
144144
</property>
145145
<property name="text">
146146
<string>...</string>
@@ -163,7 +163,7 @@
163163
<item row="0" column="0">
164164
<widget class="QToolButton" name="mConstructionModeButton">
165165
<property name="toolTip">
166-
<string>Construction mode</string>
166+
<string/>
167167
</property>
168168
<property name="text">
169169
<string>...</string>
@@ -243,14 +243,14 @@
243243
<item row="3" column="2">
244244
<widget class="QLineEdit" name="mYLineEdit">
245245
<property name="toolTip">
246-
<string>Y coordinate</string>
246+
<string/>
247247
</property>
248248
</widget>
249249
</item>
250250
<item row="3" column="3">
251251
<widget class="QToolButton" name="mLockYButton">
252252
<property name="toolTip">
253-
<string>Lock y coordinate</string>
253+
<string/>
254254
</property>
255255
<property name="text">
256256
<string>...</string>
@@ -267,7 +267,7 @@
267267
<item row="2" column="3">
268268
<widget class="QToolButton" name="mLockXButton">
269269
<property name="toolTip">
270-
<string>Lock x coordinate</string>
270+
<string/>
271271
</property>
272272
<property name="text">
273273
<string>...</string>
@@ -284,7 +284,7 @@
284284
<item row="3" column="0">
285285
<widget class="QToolButton" name="mRelativeYButton">
286286
<property name="toolTip">
287-
<string>Toggles relative y to previous node</string>
287+
<string/>
288288
</property>
289289
<property name="text">
290290
<string>...</string>
@@ -301,7 +301,7 @@
301301
<item row="1" column="3">
302302
<widget class="QToolButton" name="mLockAngleButton">
303303
<property name="toolTip">
304-
<string>Lock angle</string>
304+
<string/>
305305
</property>
306306
<property name="text">
307307
<string>...</string>
@@ -318,7 +318,7 @@
318318
<item row="2" column="2">
319319
<widget class="QLineEdit" name="mXLineEdit">
320320
<property name="toolTip">
321-
<string>X coordinate</string>
321+
<string/>
322322
</property>
323323
</widget>
324324
</item>
@@ -332,7 +332,7 @@
332332
<item row="1" column="0">
333333
<widget class="QToolButton" name="mRelativeAngleButton">
334334
<property name="toolTip">
335-
<string>Toggles relative angle to previous segment</string>
335+
<string/>
336336
</property>
337337
<property name="text">
338338
<string>...</string>
@@ -352,7 +352,7 @@
352352
<item row="1" column="2">
353353
<widget class="QLineEdit" name="mAngleLineEdit">
354354
<property name="toolTip">
355-
<string>Angle</string>
355+
<string/>
356356
</property>
357357
</widget>
358358
</item>
@@ -373,7 +373,7 @@
373373
<item row="0" column="3">
374374
<widget class="QToolButton" name="mLockDistanceButton">
375375
<property name="toolTip">
376-
<string>Lock distance</string>
376+
<string/>
377377
</property>
378378
<property name="text">
379379
<string>...</string>
@@ -390,14 +390,14 @@
390390
<item row="0" column="2">
391391
<widget class="QLineEdit" name="mDistanceLineEdit">
392392
<property name="toolTip">
393-
<string>Distance</string>
393+
<string/>
394394
</property>
395395
</widget>
396396
</item>
397397
<item row="2" column="0">
398398
<widget class="QToolButton" name="mRelativeXButton">
399399
<property name="toolTip">
400-
<string>Toggles relative x to previous node</string>
400+
<string/>
401401
</property>
402402
<property name="text">
403403
<string>...</string>
@@ -414,7 +414,7 @@
414414
<item row="0" column="4">
415415
<widget class="QToolButton" name="mRepeatingLockDistanceButton">
416416
<property name="toolTip">
417-
<string>Continuously lock distance</string>
417+
<string/>
418418
</property>
419419
<property name="text">
420420
<string>...</string>
@@ -431,7 +431,7 @@
431431
<item row="1" column="4">
432432
<widget class="QToolButton" name="mRepeatingLockAngleButton">
433433
<property name="toolTip">
434-
<string>Continuously lock angle</string>
434+
<string/>
435435
</property>
436436
<property name="text">
437437
<string>...</string>
@@ -448,7 +448,7 @@
448448
<item row="2" column="4">
449449
<widget class="QToolButton" name="mRepeatingLockXButton">
450450
<property name="toolTip">
451-
<string>Continuously lock x coordinate</string>
451+
<string/>
452452
</property>
453453
<property name="text">
454454
<string>...</string>
@@ -465,7 +465,7 @@
465465
<item row="3" column="4">
466466
<widget class="QToolButton" name="mRepeatingLockYButton">
467467
<property name="toolTip">
468-
<string>Continuously lock y coordinate</string>
468+
<string/>
469469
</property>
470470
<property name="text">
471471
<string>...</string>

0 commit comments

Comments
 (0)