Skip to content
Permalink
Browse files

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
  • Loading branch information
tudorbarascu authored and NathanW2 committed Feb 15, 2017
1 parent ca33329 commit 13e7cd9d46278949329a50709ad3027c5c0eed33
@@ -6770,6 +6770,7 @@ tabacco:tobacco
tahn:than
taht:that
talekd:talked
tangeant:tangent
targetted:targeted
targetting:targeting
tast:taste
@@ -56,7 +56,7 @@ bool QgsAdvancedDigitizingDockWidget::lineCircleIntersection( const QgsPoint& ce

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

// set tooltips
mConstructionModeButton->setToolTip( "<b>" + tr( "Construction mode" ) + "</b><br>(" + tr( "press c to toggle on/off" ) + ")" );
mPerpendicularButton->setToolTip( "<b>" + tr( "Perpendicular" ) + "</b><br>(" + tr( "press p to switch between perpendicular, parallel and normal mode" ) + ")" );
mParallelButton->setToolTip( "<b>" + tr( "Parallel" ) + "</b><br>(" + tr( "press p to switch between perpendicular, parallel and normal mode" ) + ")" );

mDistanceLineEdit->setToolTip( "<b>" + tr( "Distance" ) + "</b><br>(" + tr( "press d for quick access" ) + ")" );
mLockDistanceButton->setToolTip( "<b>" + tr( "Lock distance" ) + "</b><br>(" + tr( "press Ctrl + d for quick access" ) + ")" );
mRepeatingLockDistanceButton->setToolTip( "<b>" + tr( "Continuously lock distance" ) + "</b>" );

mRelativeAngleButton->setToolTip( "<b>" + tr( "Toggles relative angle to previous segment" ) + "</b><br>(" + tr( "press Shift + a for quick access" ) + ")" );
mAngleLineEdit->setToolTip( "<b>" + tr( "Angle" ) + "</b><br>(" + tr( "press a for quick access" ) + ")" );
mLockAngleButton->setToolTip( "<b>" + tr( "Lock angle" ) + "</b><br>(" + tr( "press Ctrl + a for quick access" ) + ")" );
mRepeatingLockAngleButton->setToolTip( "<b>" + tr( "Continuously lock angle" ) + "</b>" );

mRelativeXButton->setToolTip( "<b>" + tr( "Toggles relative x to previous node" ) + "</b><br>(" + tr( "press Shift + x for quick access" ) + ")" );
mXLineEdit->setToolTip( "<b>" + tr( "X coordinate" ) + "</b><br>(" + tr( "press x for quick access" ) + ")" );
mLockXButton->setToolTip( "<b>" + tr( "Lock x coordinate" ) + "</b><br>(" + tr( "press Ctrl + x for quick access" ) + ")" );
mRepeatingLockXButton->setToolTip( "<b>" + tr( "Continuously lock x coordinate" ) + "</b>" );

mRelativeYButton->setToolTip( "<b>" + tr( "Toggles relative y to previous node" ) + "</b><br>(" + tr( "press Shift + y for quick access" ) + ")" );
mYLineEdit->setToolTip( "<b>" + tr( "Y coordinate" ) + "</b><br>(" + tr( "press y for quick access" ) + ")" );
mLockYButton->setToolTip( "<b>" + tr( "Lock y coordinate" ) + "</b><br>(" + tr( "press Ctrl + y for quick access" ) + ")" );
mRepeatingLockYButton->setToolTip( "<b>" + tr( "Continuously lock y coordinate" ) + "</b>" );


updateCapacity( true );
disable();
}
@@ -567,7 +592,7 @@ bool QgsAdvancedDigitizingDockWidget::applyConstraints( QgsMapMouseEvent* e )
QgsPoint penultimatePt = penultimatePoint( &penulPointExist );

// *****************************
// ---- X Constrain
// ---- X constraint
if ( mXConstraint->isLocked() )
{
if ( !mXConstraint->relative() )
@@ -594,7 +619,7 @@ bool QgsAdvancedDigitizingDockWidget::applyConstraints( QgsMapMouseEvent* e )
}
}
// *****************************
// ---- Y Constrain
// ---- Y constraint
if ( mYConstraint->isLocked() )
{
if ( !mYConstraint->relative() )
@@ -621,7 +646,7 @@ bool QgsAdvancedDigitizingDockWidget::applyConstraints( QgsMapMouseEvent* e )
}
}
// *****************************
// ---- Angle constrain
// ---- Angle constraint
// input angles are in degrees
if ( mAngleConstraint->lockMode() == CadConstraint::SoftLock )
{
@@ -117,7 +117,7 @@
<item row="0" column="2">
<widget class="QToolButton" name="mParallelButton">
<property name="toolTip">
<string>Parallel</string>
<string/>
</property>
<property name="text">
<string>...</string>
@@ -140,7 +140,7 @@
<item row="0" column="1">
<widget class="QToolButton" name="mPerpendicularButton">
<property name="toolTip">
<string>Perpendicular</string>
<string/>
</property>
<property name="text">
<string>...</string>
@@ -163,7 +163,7 @@
<item row="0" column="0">
<widget class="QToolButton" name="mConstructionModeButton">
<property name="toolTip">
<string>Construction mode</string>
<string/>
</property>
<property name="text">
<string>...</string>
@@ -243,14 +243,14 @@
<item row="3" column="2">
<widget class="QLineEdit" name="mYLineEdit">
<property name="toolTip">
<string>Y coordinate</string>
<string/>
</property>
</widget>
</item>
<item row="3" column="3">
<widget class="QToolButton" name="mLockYButton">
<property name="toolTip">
<string>Lock y coordinate</string>
<string/>
</property>
<property name="text">
<string>...</string>
@@ -267,7 +267,7 @@
<item row="2" column="3">
<widget class="QToolButton" name="mLockXButton">
<property name="toolTip">
<string>Lock x coordinate</string>
<string/>
</property>
<property name="text">
<string>...</string>
@@ -284,7 +284,7 @@
<item row="3" column="0">
<widget class="QToolButton" name="mRelativeYButton">
<property name="toolTip">
<string>Toggles relative y to previous node</string>
<string/>
</property>
<property name="text">
<string>...</string>
@@ -301,7 +301,7 @@
<item row="1" column="3">
<widget class="QToolButton" name="mLockAngleButton">
<property name="toolTip">
<string>Lock angle</string>
<string/>
</property>
<property name="text">
<string>...</string>
@@ -318,7 +318,7 @@
<item row="2" column="2">
<widget class="QLineEdit" name="mXLineEdit">
<property name="toolTip">
<string>X coordinate</string>
<string/>
</property>
</widget>
</item>
@@ -332,7 +332,7 @@
<item row="1" column="0">
<widget class="QToolButton" name="mRelativeAngleButton">
<property name="toolTip">
<string>Toggles relative angle to previous segment</string>
<string/>
</property>
<property name="text">
<string>...</string>
@@ -352,7 +352,7 @@
<item row="1" column="2">
<widget class="QLineEdit" name="mAngleLineEdit">
<property name="toolTip">
<string>Angle</string>
<string/>
</property>
</widget>
</item>
@@ -373,7 +373,7 @@
<item row="0" column="3">
<widget class="QToolButton" name="mLockDistanceButton">
<property name="toolTip">
<string>Lock distance</string>
<string/>
</property>
<property name="text">
<string>...</string>
@@ -390,14 +390,14 @@
<item row="0" column="2">
<widget class="QLineEdit" name="mDistanceLineEdit">
<property name="toolTip">
<string>Distance</string>
<string/>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QToolButton" name="mRelativeXButton">
<property name="toolTip">
<string>Toggles relative x to previous node</string>
<string/>
</property>
<property name="text">
<string>...</string>
@@ -414,7 +414,7 @@
<item row="0" column="4">
<widget class="QToolButton" name="mRepeatingLockDistanceButton">
<property name="toolTip">
<string>Continuously lock distance</string>
<string/>
</property>
<property name="text">
<string>...</string>
@@ -431,7 +431,7 @@
<item row="1" column="4">
<widget class="QToolButton" name="mRepeatingLockAngleButton">
<property name="toolTip">
<string>Continuously lock angle</string>
<string/>
</property>
<property name="text">
<string>...</string>
@@ -448,7 +448,7 @@
<item row="2" column="4">
<widget class="QToolButton" name="mRepeatingLockXButton">
<property name="toolTip">
<string>Continuously lock x coordinate</string>
<string/>
</property>
<property name="text">
<string>...</string>
@@ -465,7 +465,7 @@
<item row="3" column="4">
<widget class="QToolButton" name="mRepeatingLockYButton">
<property name="toolTip">
<string>Continuously lock y coordinate</string>
<string/>
</property>
<property name="text">
<string>...</string>

0 comments on commit 13e7cd9

Please sign in to comment.
You can’t perform that action at this time.