Skip to content
Permalink
Browse files

#5416 Add map tips delay setting to menu

  • Loading branch information
jdugge committed Oct 26, 2017
1 parent 7622ecf commit c30b824ac4e116e0b1c2d0ec760c106a61c5e913
Showing with 62 additions and 2 deletions.
  1. +2 −2 src/app/qgisapp.cpp
  2. +6 −0 src/app/qgsoptions.cpp
  3. +54 −0 src/ui/qgsoptionsbase.ui
@@ -3815,10 +3815,10 @@ void QgisApp::createMapTips()
mpMapTipsTimer = new QTimer( mMapCanvas );
// connect the timer to the maptips slot
connect( mpMapTipsTimer, &QTimer::timeout, this, &QgisApp::showMapTip );
// set the interval to 0.850 seconds or time defined in Advanced Settings
// set the delay to 0.850 seconds or time defined in the Settings
// timer will be started next time the mouse moves
QgsSettings settings;
int timerInterval = settings.value( "qgis/mapTipsTimerInterval", 850 ).toInt();
int timerInterval = settings.value( "qgis/mapTipsDelay", 850 ).toInt();
mpMapTipsTimer->setInterval( timerInterval );
mpMapTipsTimer->setSingleShot( true );

@@ -642,6 +642,9 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl, const QList<QgsOpti
// WMS getLegendGraphic setting
mLegendGraphicResolutionSpinBox->setValue( mSettings->value( QStringLiteral( "/qgis/defaultLegendGraphicResolution" ), 0 ).toInt() );

// Map Tips delay
mMapTipsDelaySpinBox->setValue( mSettings->value( QStringLiteral( "qgis/mapTipsDelay" ), 850 ).toInt() );

//
// Raster properties
//
@@ -1233,6 +1236,9 @@ void QgsOptions::saveOptions()
mSettings->setValue( QStringLiteral( "/qgis/addOracleDC" ), cbxAddOracleDC->isChecked() );
mSettings->setValue( QStringLiteral( "/qgis/compileExpressions" ), cbxCompileExpressions->isChecked() );
mSettings->setValue( QStringLiteral( "/qgis/defaultLegendGraphicResolution" ), mLegendGraphicResolutionSpinBox->value() );
mSettings->setValue( QStringLiteral( "/qgis/mapTipsDelay" ), mMapTipsDelaySpinBox->value() );
bool createRasterLegendIcons = mSettings->value( QStringLiteral( "/qgis/createRasterLegendIcons" ), false ).toBool();
mSettings->setValue( QStringLiteral( "/qgis/createRasterLegendIcons" ), cbxCreateRasterLegendIcons->isChecked() );
mSettings->setValue( QStringLiteral( "/qgis/copyFeatureFormat" ), mComboCopyFeatureFormat->currentData().toInt() );

mSettings->setValue( QStringLiteral( "/qgis/new_layers_visible" ), chkAddedVisibility->isChecked() );
@@ -3073,6 +3073,60 @@
</layout>
</widget>
</item>
<item>
<widget class="QgsCollapsibleGroupBox" name="groupBox_12">
<property name="title">
<string>Map Tips</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_22">
<item>
<widget class="QLabel" name="textLabel1_16">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Delay (ms)</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_39">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Preferred</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>30</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QSpinBox" name="mMapTipsDelaySpinBox">
<property name="toolTip">
<string extracomment="MAP_RESOLUTION or DPI value overloading getMap default value (set 0 to use default)"/>
</property>
<property name="whatsThis">
<string extracomment="MAP_RESOLUTION or DPI value overloading getMap default value (set 0 to use default)"/>
</property>
<property name="minimum">
<number>0</number>
</property>
<property name="maximum">
<number>1000000</number>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer>
<property name="orientation">

0 comments on commit c30b824

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