Skip to content

Commit 22c0c79

Browse files
ahuarte47m-kuhn
authored andcommittedJan 15, 2014
#8725-R: minor changes and UI update
+ add comment about 'prepareSimplification' in constructor + fix comment in 'providerCanSimplify' + improve UI messages
1 parent 7cb8ff7 commit 22c0c79

11 files changed

+129
-406
lines changed
 

‎src/app/qgsoptions.cpp

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -563,10 +563,8 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WFlags fl ) :
563563

564564
// Default simplify drawing configuration
565565
mSimplifyDrawingGroupBox->setChecked( settings.value( "/qgis/simplifyDrawingHints", ( int )QgsVectorLayer::GeometrySimplification ).toInt() != QgsVectorLayer::NoSimplification );
566-
mSimplifyDrawingSlider->setValue(( int )( 5.0f * ( settings.value( "/qgis/simplifyDrawingTol", QGis::DEFAULT_MAPTOPIXEL_THRESHOLD ).toFloat() - 1 ) ) );
566+
mSimplifyDrawingSpinBox->setValue( settings.value( "/qgis/simplifyDrawingTol", QGis::DEFAULT_MAPTOPIXEL_THRESHOLD ).toFloat() );
567567
mSimplifyDrawingAtProvider->setChecked( !settings.value( "/qgis/simplifyLocal", true ).toBool() );
568-
mSimplifyDrawingPanel->setVisible( mSimplifyDrawingSlider->value() > 0 );
569-
mSimplifyDrawingPx->setText( QString( "(%1 px)" ).arg( 1.0f + 0.2f * mSimplifyDrawingSlider->value() ) );
570568

571569
// Slightly awkard here at the settings value is true to use QImage,
572570
// but the checkbox is true to use QPixmap
@@ -1104,10 +1102,10 @@ void QgsOptions::saveOptions()
11041102
if ( mSimplifyDrawingGroupBox->isChecked() )
11051103
{
11061104
simplifyHints |= QgsVectorLayer::GeometrySimplification;
1107-
if ( mSimplifyDrawingSlider->value() > 0 ) simplifyHints |= QgsVectorLayer::AntialiasingSimplification;
1105+
if ( mSimplifyDrawingSpinBox->value() > 1 ) simplifyHints |= QgsVectorLayer::AntialiasingSimplification;
11081106
}
11091107
settings.setValue( "/qgis/simplifyDrawingHints", simplifyHints );
1110-
settings.setValue( "/qgis/simplifyDrawingTol", 1.0f + 0.2f*mSimplifyDrawingSlider->value() );
1108+
settings.setValue( "/qgis/simplifyDrawingTol", mSimplifyDrawingSpinBox->value() );
11111109
settings.setValue( "/qgis/simplifyLocal", !mSimplifyDrawingAtProvider->isChecked() );
11121110

11131111
// project
@@ -2087,10 +2085,3 @@ void QgsOptions::saveDefaultDatumTransformations()
20872085

20882086
s.endGroup();
20892087
}
2090-
2091-
void QgsOptions::on_mSimplifyDrawingSlider_valueChanged( int value )
2092-
{
2093-
mSimplifyDrawingPanel->setVisible( value > 0 );
2094-
mSimplifyDrawingPx->setText( QString( "(%1 px)" ).arg( 1.0f + 0.2f * value ) );
2095-
}
2096-

‎src/app/qgsoptions.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,6 @@ class APP_EXPORT QgsOptions : public QgsOptionsDialogBase, private Ui::QgsOption
240240
void on_mRemoveDefaultTransformButton_clicked();
241241
void on_mAddDefaultTransformButton_clicked();
242242

243-
void on_mSimplifyDrawingSlider_valueChanged( int value );
244-
245243
private:
246244
QStringList i18nList();
247245
void initContrastEnhancement( QComboBox *cbox, QString name, QString defaultVal );

‎src/app/qgsvectorlayerproperties.cpp

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -395,9 +395,7 @@ void QgsVectorLayerProperties::syncToLayer( void )
395395
// get simplify drawing configuration
396396
const QgsVectorSimplifyMethod& simplifyMethod = layer->simplifyMethod();
397397
mSimplifyDrawingGroupBox->setChecked( simplifyMethod.simplifyHints() != QgsVectorLayer::NoSimplification );
398-
mSimplifyDrawingSlider->setValue(( int )( 5.0f * ( simplifyMethod.threshold() - 1 ) ) );
399-
mSimplifyDrawingPanel->setVisible( mSimplifyDrawingSlider->value() > 0 );
400-
mSimplifyDrawingPx->setText( QString( "(%1 px)" ).arg( 1.0f + 0.2f * mSimplifyDrawingSlider->value() ) );
398+
mSimplifyDrawingSpinBox->setValue( simplifyMethod.threshold() );
401399

402400
if ( !( layer->dataProvider()->capabilities() & QgsVectorDataProvider::SimplifyGeometries ) )
403401
{
@@ -553,11 +551,11 @@ void QgsVectorLayerProperties::apply()
553551
if ( mSimplifyDrawingGroupBox->isChecked() )
554552
{
555553
simplifyHints |= QgsVectorLayer::GeometrySimplification;
556-
if ( mSimplifyDrawingSlider->value() > 0 ) simplifyHints |= QgsVectorLayer::AntialiasingSimplification;
554+
if ( mSimplifyDrawingSpinBox->value() > 1 ) simplifyHints |= QgsVectorLayer::AntialiasingSimplification;
557555
}
558556
QgsVectorSimplifyMethod simplifyMethod = layer->simplifyMethod();
559557
simplifyMethod.setSimplifyHints( simplifyHints );
560-
simplifyMethod.setThreshold( 1.0f + 0.2f*mSimplifyDrawingSlider->value() );
558+
simplifyMethod.setThreshold( mSimplifyDrawingSpinBox->value() );
561559
simplifyMethod.setForceLocalOptimization( !mSimplifyDrawingAtProvider->isChecked() );
562560
layer->setSimplifyMethod( simplifyMethod );
563561

@@ -1100,12 +1098,6 @@ void QgsVectorLayerProperties::on_mMaximumScaleSetCurrentPushButton_clicked()
11001098
cbMaximumScale->setScale( 1.0 / QgisApp::instance()->mapCanvas()->mapRenderer()->scale() );
11011099
}
11021100

1103-
void QgsVectorLayerProperties::on_mSimplifyDrawingSlider_valueChanged( int value )
1104-
{
1105-
mSimplifyDrawingPanel->setVisible( value > 0 );
1106-
mSimplifyDrawingPx->setText( QString( "(%1 px)" ).arg( 1.0f + 0.2f * value ) );
1107-
}
1108-
11091101
void QgsVectorLayerProperties::on_mSimplifyDrawingGroupBox_toggled( bool checked )
11101102
{
11111103
if ( !( layer->dataProvider()->capabilities() & QgsVectorDataProvider::SimplifyGeometries ) )

‎src/app/qgsvectorlayerproperties.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ class APP_EXPORT QgsVectorLayerProperties : public QgsOptionsDialogBase, private
119119
void on_mMinimumScaleSetCurrentPushButton_clicked();
120120
void on_mMaximumScaleSetCurrentPushButton_clicked();
121121

122-
void on_mSimplifyDrawingSlider_valueChanged( int value );
123122
void on_mSimplifyDrawingGroupBox_toggled( bool checked );
124123

125124
signals:

‎src/core/qgsfeatureiterator.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,11 @@ bool QgsAbstractFeatureIterator::nextFeatureFilterFids( QgsFeature& f )
8383

8484
void QgsAbstractFeatureIterator::ref()
8585
{
86-
// prepare if required the simplification of geometries to fetch
86+
// Prepare if required the simplification of geometries to fetch:
87+
// This code runs here because of 'prepareSimplification()' is virtual and it can be overrided
88+
// in inherited iterators who change the default behavior.
89+
// It would be better to call this method in the constructor enabling virtual-calls as it is described by example at:
90+
// http://www.parashift.com/c%2B%2B-faq-lite/calling-virtuals-from-ctor-idiom.html
8791
if ( refs == 0 )
8892
{
8993
prepareSimplification( mRequest.simplifyMethod() );

‎src/core/qgsfeatureiterator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ class CORE_EXPORT QgsAbstractFeatureIterator
9696
//! this iterator runs local simplification
9797
bool mLocalSimplification;
9898

99-
//! returns whether the iterator can simplify on provider side the geometries to fetch using the specified method type
99+
//! returns whether the iterator supports simplify geometries on provider side
100100
virtual bool providerCanSimplify( QgsSimplifyMethod::MethodType methodType ) const;
101101

102102
//! simplify the specified geometry if it was configured

‎src/core/qgsvectorlayerfeatureiterator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ class CORE_EXPORT QgsVectorLayerFeatureIterator : public QgsAbstractFeatureItera
122122
//! optional object to locally simplify edited (changed or added) geometries fetched by this feature iterator
123123
QgsAbstractGeometrySimplifier* mEditGeometrySimplifier;
124124

125-
//! returns whether the iterator can simplify on provider side the geometries to fetch using the specified method type
125+
//! returns whether the iterator supports simplify geometries on provider side
126126
virtual bool providerCanSimplify( QgsSimplifyMethod::MethodType methodType ) const;
127127
};
128128

‎src/providers/ogr/qgsogrfeatureiterator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class QgsOgrFeatureIterator : public QgsAbstractFeatureIterator
6565
//! optional object to simplify OGR-geometries fecthed by this feature iterator
6666
QgsOgrAbstractGeometrySimplifier* mGeometrySimplifier;
6767

68-
//! returns whether the iterator can simplify on provider side the geometries to fetch using the specified method type
68+
//! returns whether the iterator supports simplify geometries on provider side
6969
virtual bool providerCanSimplify( QgsSimplifyMethod::MethodType methodType ) const;
7070
};
7171

‎src/providers/postgres/qgspostgresfeatureiterator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class QgsPostgresFeatureIterator : public QgsAbstractFeatureIterator
7070
static const int sFeatureQueueSize;
7171

7272
private:
73-
//! returns whether the iterator can simplify on provider side the geometries to fetch using the specified method type
73+
//! returns whether the iterator supports simplify geometries on provider side
7474
virtual bool providerCanSimplify( QgsSimplifyMethod::MethodType methodType ) const;
7575
};
7676

‎src/ui/qgsoptionsbase.ui

Lines changed: 56 additions & 186 deletions
Original file line numberDiff line numberDiff line change
@@ -1684,209 +1684,79 @@
16841684
<item row="5" column="0" colspan="2">
16851685
<widget class="QGroupBox" name="mSimplifyDrawingGroupBox">
16861686
<property name="title">
1687-
<string>Simplify geometries by default</string>
1687+
<string>Enable feature simplication by default for newly added layers</string>
16881688
</property>
16891689
<property name="checkable">
16901690
<bool>true</bool>
16911691
</property>
16921692
<layout class="QGridLayout" name="_14">
1693-
<item row="0" column="2" colspan="3">
1693+
<item row="0" column="1" colspan="4">
16941694
<widget class="QLabel" name="label_59">
1695-
<property name="sizePolicy">
1696-
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
1697-
<horstretch>0</horstretch>
1698-
<verstretch>0</verstretch>
1699-
</sizepolicy>
1695+
<property name="text">
1696+
<string>&lt;b&gt;Note:&lt;/b&gt; Feature simplification may speed up rendering but can result in rendering inconsistencies</string>
17001697
</property>
1698+
</widget>
1699+
</item>
1700+
<item row="1" column="1">
1701+
<widget class="QLabel" name="label_56">
17011702
<property name="text">
1702-
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
1703-
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
1704-
p, li { white-space: pre-wrap; }
1705-
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
1706-
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;If checked, new vector layers added to the map will automatically use geometry simplification to speed up rendering. The simplification applies only during rendering of the layer and does not modify the layer geometry.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
1703+
<string>Simplification threshold (higher values result in more simplification): </string>
17071704
</property>
1708-
<property name="wordWrap">
1709-
<bool>true</bool>
1705+
<property name="margin">
1706+
<number>2</number>
1707+
</property>
1708+
</widget>
1709+
</item>
1710+
<item row="1" column="2">
1711+
<widget class="QDoubleSpinBox" name="mSimplifyDrawingSpinBox">
1712+
<property name="decimals">
1713+
<number>2</number>
1714+
</property>
1715+
<property name="minimum">
1716+
<number>1</number>
1717+
</property>
1718+
<property name="maximum">
1719+
<number>5</number>
1720+
</property>
1721+
<property name="singleStep">
1722+
<double>0.20</double>
1723+
</property>
1724+
<property name="value">
1725+
<double>1.0</double>
1726+
</property>
1727+
<property name="toolTip">
1728+
<string>Higher values result in more simplification</string>
1729+
</property>
1730+
</widget>
1731+
</item>
1732+
<item row="1" column="3">
1733+
<widget class="QLabel" name="mSimplifyDrawingPx">
1734+
<property name="text">
1735+
<string>pixels</string>
17101736
</property>
17111737
<property name="margin">
17121738
<number>2</number>
17131739
</property>
17141740
</widget>
17151741
</item>
1716-
<item row="1" column="2" colspan="3">
1717-
<widget class="QgsCollapsibleGroupBox" name="mSimplifyAdvancedGrpBx">
1718-
<property name="title">
1719-
<string>Advanced settings</string>
1742+
<item row="1" column="4">
1743+
<spacer name="horizontalSpacer_40">
1744+
<property name="orientation">
1745+
<enum>Qt::Horizontal</enum>
17201746
</property>
1721-
<property name="syncGroup" stdset="0">
1722-
<string notr="true">vectormeta</string>
1747+
<property name="sizeHint" stdset="0">
1748+
<size>
1749+
<width>20</width>
1750+
<height>20</height>
1751+
</size>
1752+
</property>
1753+
</spacer>
1754+
</item>
1755+
<item row="2" column="1" colspan="4">
1756+
<widget class="QCheckBox" name="mSimplifyDrawingAtProvider">
1757+
<property name="text">
1758+
<string>Runs on provider side, otherwise it will execute once obtained the geometry from data source</string>
17231759
</property>
1724-
<layout class="QGridLayout" name="gridLayout_17">
1725-
<item row="0" column="1" colspan="4">
1726-
<widget class="QCheckBox" name="mSimplifyDrawingAtProvider">
1727-
<property name="text">
1728-
<string>Simplification runs on provider side, otherwise it will execute once obtained the geometry from data source.</string>
1729-
</property>
1730-
</widget>
1731-
</item>
1732-
<item row="1" column="1">
1733-
<widget class="QLabel" name="label_56">
1734-
<property name="text">
1735-
<string>Simplification threshold (higher values result in more simplification): </string>
1736-
</property>
1737-
<property name="margin">
1738-
<number>2</number>
1739-
</property>
1740-
</widget>
1741-
</item>
1742-
<item row="1" column="2">
1743-
<widget class="QSlider" name="mSimplifyDrawingSlider">
1744-
<property name="minimumSize">
1745-
<size>
1746-
<width>130</width>
1747-
<height>16777215</height>
1748-
</size>
1749-
</property>
1750-
<property name="maximumSize">
1751-
<size>
1752-
<width>130</width>
1753-
<height>16777215</height>
1754-
</size>
1755-
</property>
1756-
<property name="toolTip">
1757-
<string>Higher values result in more simplification</string>
1758-
</property>
1759-
<property name="minimum">
1760-
<number>0</number>
1761-
</property>
1762-
<property name="maximum">
1763-
<number>20</number>
1764-
</property>
1765-
<property name="value">
1766-
<number>0</number>
1767-
</property>
1768-
<property name="tracking">
1769-
<bool>true</bool>
1770-
</property>
1771-
<property name="orientation">
1772-
<enum>Qt::Horizontal</enum>
1773-
</property>
1774-
<property name="invertedAppearance">
1775-
<bool>false</bool>
1776-
</property>
1777-
<property name="invertedControls">
1778-
<bool>false</bool>
1779-
</property>
1780-
</widget>
1781-
</item>
1782-
<item row="1" column="3">
1783-
<widget class="QLabel" name="mSimplifyDrawingPx">
1784-
<property name="text">
1785-
<string>(0 px)</string>
1786-
</property>
1787-
<property name="margin">
1788-
<number>2</number>
1789-
</property>
1790-
</widget>
1791-
</item>
1792-
<item row="1" column="4">
1793-
<spacer name="horizontalSpacer_40">
1794-
<property name="orientation">
1795-
<enum>Qt::Horizontal</enum>
1796-
</property>
1797-
<property name="sizeHint" stdset="0">
1798-
<size>
1799-
<width>20</width>
1800-
<height>20</height>
1801-
</size>
1802-
</property>
1803-
</spacer>
1804-
</item>
1805-
<item row="2" column="1" colspan="4">
1806-
<widget class="QFrame" name="mSimplifyDrawingPanel">
1807-
<property name="minimumSize">
1808-
<size>
1809-
<width>0</width>
1810-
<height>70</height>
1811-
</size>
1812-
</property>
1813-
<property name="maximumSize">
1814-
<size>
1815-
<width>16777215</width>
1816-
<height>16777215</height>
1817-
</size>
1818-
</property>
1819-
<property name="frameShape">
1820-
<enum>QFrame::Box</enum>
1821-
</property>
1822-
<property name="frameShadow">
1823-
<enum>QFrame::Raised</enum>
1824-
</property>
1825-
<widget class="QLabel" name="mSimplifyDrawingIcon">
1826-
<property name="geometry">
1827-
<rect>
1828-
<x>10</x>
1829-
<y>0</y>
1830-
<width>60</width>
1831-
<height>67</height>
1832-
</rect>
1833-
</property>
1834-
<property name="sizePolicy">
1835-
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
1836-
<horstretch>0</horstretch>
1837-
<verstretch>0</verstretch>
1838-
</sizepolicy>
1839-
</property>
1840-
<property name="minimumSize">
1841-
<size>
1842-
<width>60</width>
1843-
<height>67</height>
1844-
</size>
1845-
</property>
1846-
<property name="maximumSize">
1847-
<size>
1848-
<width>40</width>
1849-
<height>40</height>
1850-
</size>
1851-
</property>
1852-
<property name="layoutDirection">
1853-
<enum>Qt::LeftToRight</enum>
1854-
</property>
1855-
<property name="autoFillBackground">
1856-
<bool>false</bool>
1857-
</property>
1858-
<property name="text">
1859-
<string/>
1860-
</property>
1861-
<property name="pixmap">
1862-
<pixmap resource="../../images/images.qrc">:/images/themes/default/mIconWarn.png</pixmap>
1863-
</property>
1864-
<property name="scaledContents">
1865-
<bool>false</bool>
1866-
</property>
1867-
</widget>
1868-
<widget class="QLabel" name="mSimplifyDrawingLabel">
1869-
<property name="geometry">
1870-
<rect>
1871-
<x>45</x>
1872-
<y>8</y>
1873-
<width>411</width>
1874-
<height>51</height>
1875-
</rect>
1876-
</property>
1877-
<property name="text">
1878-
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
1879-
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
1880-
p, li { white-space: pre-wrap; }
1881-
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
1882-
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot; font-size:8pt; font-weight:600;&quot;&gt;Warning:&lt;/span&gt;&lt;/p&gt;
1883-
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt; Increasing this threshold may speed up rendering, but may result in gaps &lt;/span&gt;&lt;/p&gt;
1884-
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt; or topological errors in the layer display.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
1885-
</property>
1886-
</widget>
1887-
</widget>
1888-
</item>
1889-
</layout>
18901760
</widget>
18911761
</item>
18921762
</layout>

‎src/ui/qgsvectorlayerpropertiesbase.ui

Lines changed: 58 additions & 189 deletions
Original file line numberDiff line numberDiff line change
@@ -949,206 +949,75 @@
949949
<bool>true</bool>
950950
</property>
951951
<layout class="QGridLayout" name="_12">
952-
<item row="0" column="2" colspan="3">
953-
<widget class="QLabel" name="label_16">
954-
<property name="sizePolicy">
955-
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
956-
<horstretch>0</horstretch>
957-
<verstretch>0</verstretch>
958-
</sizepolicy>
952+
<item row="0" column="1" colspan="4">
953+
<widget class="QLabel" name="label_59">
954+
<property name="text">
955+
<string>&lt;b&gt;Note:&lt;/b&gt; Feature simplification may speed up rendering but can result in rendering inconsistencies</string>
959956
</property>
957+
</widget>
958+
</item>
959+
<item row="1" column="1">
960+
<widget class="QLabel" name="label_56">
960961
<property name="text">
961-
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
962-
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
963-
p, li { white-space: pre-wrap; }
964-
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
965-
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Note:&lt;/span&gt;&lt;/p&gt;
966-
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Enabling this option simplifies geometries in this layer to improve rendering speed. The simplification applies only during rendering of the layer and does not modify the layer geometry.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
967-
</property>
968-
<property name="wordWrap">
969-
<bool>true</bool>
962+
<string>Simplification threshold (higher values result in more simplification): </string>
970963
</property>
971964
<property name="margin">
972965
<number>2</number>
973966
</property>
974967
</widget>
975968
</item>
976-
<item row="1" column="2" colspan="3">
977-
<widget class="QgsCollapsibleGroupBox" name="mSimplifyAdvancedGrpBx">
978-
<property name="title">
979-
<string>Advanced settings</string>
969+
<item row="1" column="2">
970+
<widget class="QDoubleSpinBox" name="mSimplifyDrawingSpinBox">
971+
<property name="decimals">
972+
<number>2</number>
980973
</property>
981-
<property name="syncGroup" stdset="0">
982-
<string notr="true">vectormeta</string>
974+
<property name="minimum">
975+
<number>1</number>
976+
</property>
977+
<property name="maximum">
978+
<number>5</number>
979+
</property>
980+
<property name="singleStep">
981+
<double>0.20</double>
982+
</property>
983+
<property name="value">
984+
<double>1.0</double>
985+
</property>
986+
<property name="toolTip">
987+
<string>Higher values result in more simplification</string>
983988
</property>
984-
<layout class="QGridLayout" name="gridLayout_6">
985-
<item row="0" column="1" colspan="4">
986-
<widget class="QCheckBox" name="mSimplifyDrawingAtProvider">
987-
<property name="text">
988-
<string>Simplification runs on provider side, otherwise it will execute once obtained the geometry from data source.</string>
989-
</property>
990-
</widget>
991-
</item>
992-
<item row="1" column="1">
993-
<widget class="QLabel" name="label_17">
994-
<property name="text">
995-
<string>Simplification threshold (higher values result in more simplification): </string>
996-
</property>
997-
<property name="margin">
998-
<number>2</number>
999-
</property>
1000-
</widget>
1001-
</item>
1002-
<item row="1" column="2">
1003-
<widget class="QSlider" name="mSimplifyDrawingSlider">
1004-
<property name="minimumSize">
1005-
<size>
1006-
<width>130</width>
1007-
<height>16777215</height>
1008-
</size>
1009-
</property>
1010-
<property name="maximumSize">
1011-
<size>
1012-
<width>130</width>
1013-
<height>16777215</height>
1014-
</size>
1015-
</property>
1016-
<property name="toolTip">
1017-
<string>Higher values result in more simplification</string>
1018-
</property>
1019-
<property name="minimum">
1020-
<number>0</number>
1021-
</property>
1022-
<property name="maximum">
1023-
<number>20</number>
1024-
</property>
1025-
<property name="value">
1026-
<number>0</number>
1027-
</property>
1028-
<property name="tracking">
1029-
<bool>true</bool>
1030-
</property>
1031-
<property name="orientation">
1032-
<enum>Qt::Horizontal</enum>
1033-
</property>
1034-
<property name="invertedAppearance">
1035-
<bool>false</bool>
1036-
</property>
1037-
<property name="invertedControls">
1038-
<bool>false</bool>
1039-
</property>
1040-
</widget>
1041-
</item>
1042-
<item row="1" column="3">
1043-
<widget class="QLabel" name="mSimplifyDrawingPx">
1044-
<property name="text">
1045-
<string>(0 px)</string>
1046-
</property>
1047-
<property name="margin">
1048-
<number>2</number>
1049-
</property>
1050-
</widget>
1051-
</item>
1052-
<item row="1" column="4">
1053-
<spacer name="horizontalSpacer_6">
1054-
<property name="orientation">
1055-
<enum>Qt::Horizontal</enum>
1056-
</property>
1057-
<property name="sizeHint" stdset="0">
1058-
<size>
1059-
<width>20</width>
1060-
<height>20</height>
1061-
</size>
1062-
</property>
1063-
</spacer>
1064-
</item>
1065-
<item row="2" column="1" colspan="4">
1066-
<widget class="QFrame" name="mSimplifyDrawingPanel">
1067-
<property name="minimumSize">
1068-
<size>
1069-
<width>0</width>
1070-
<height>70</height>
1071-
</size>
1072-
</property>
1073-
<property name="maximumSize">
1074-
<size>
1075-
<width>16777215</width>
1076-
<height>16777215</height>
1077-
</size>
1078-
</property>
1079-
<property name="frameShape">
1080-
<enum>QFrame::Box</enum>
1081-
</property>
1082-
<property name="frameShadow">
1083-
<enum>QFrame::Raised</enum>
1084-
</property>
1085-
<widget class="QLabel" name="mSimplifyDrawingIcon">
1086-
<property name="geometry">
1087-
<rect>
1088-
<x>10</x>
1089-
<y>0</y>
1090-
<width>60</width>
1091-
<height>67</height>
1092-
</rect>
1093-
</property>
1094-
<property name="sizePolicy">
1095-
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
1096-
<horstretch>0</horstretch>
1097-
<verstretch>0</verstretch>
1098-
</sizepolicy>
1099-
</property>
1100-
<property name="minimumSize">
1101-
<size>
1102-
<width>60</width>
1103-
<height>67</height>
1104-
</size>
1105-
</property>
1106-
<property name="maximumSize">
1107-
<size>
1108-
<width>40</width>
1109-
<height>40</height>
1110-
</size>
1111-
</property>
1112-
<property name="layoutDirection">
1113-
<enum>Qt::LeftToRight</enum>
1114-
</property>
1115-
<property name="autoFillBackground">
1116-
<bool>false</bool>
1117-
</property>
1118-
<property name="text">
1119-
<string/>
1120-
</property>
1121-
<property name="pixmap">
1122-
<pixmap resource="../../images/images.qrc">:/images/themes/default/mIconWarn.png</pixmap>
1123-
</property>
1124-
<property name="scaledContents">
1125-
<bool>false</bool>
1126-
</property>
1127-
</widget>
1128-
<widget class="QLabel" name="mSimplifyDrawingLabel">
1129-
<property name="geometry">
1130-
<rect>
1131-
<x>45</x>
1132-
<y>8</y>
1133-
<width>411</width>
1134-
<height>51</height>
1135-
</rect>
1136-
</property>
1137-
<property name="text">
1138-
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
1139-
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
1140-
p, li { white-space: pre-wrap; }
1141-
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
1142-
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot; font-size:8pt; font-weight:600;&quot;&gt;Warning:&lt;/span&gt;&lt;/p&gt;
1143-
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt; Increasing this threshold may speed up rendering, but may result in gaps &lt;/span&gt;&lt;/p&gt;
1144-
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt; or topological errors in the layer display.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
1145-
</property>
1146-
</widget>
1147-
</widget>
1148-
</item>
1149-
</layout>
1150989
</widget>
1151-
</item>
990+
</item>
991+
<item row="1" column="3">
992+
<widget class="QLabel" name="mSimplifyDrawingPx">
993+
<property name="text">
994+
<string>pixels</string>
995+
</property>
996+
<property name="margin">
997+
<number>2</number>
998+
</property>
999+
</widget>
1000+
</item>
1001+
<item row="1" column="4">
1002+
<spacer name="horizontalSpacer_40">
1003+
<property name="orientation">
1004+
<enum>Qt::Horizontal</enum>
1005+
</property>
1006+
<property name="sizeHint" stdset="0">
1007+
<size>
1008+
<width>20</width>
1009+
<height>20</height>
1010+
</size>
1011+
</property>
1012+
</spacer>
1013+
</item>
1014+
<item row="2" column="1" colspan="4">
1015+
<widget class="QCheckBox" name="mSimplifyDrawingAtProvider">
1016+
<property name="text">
1017+
<string>Runs on provider side, otherwise it will execute once obtained the geometry from data source</string>
1018+
</property>
1019+
</widget>
1020+
</item>
11521021
</layout>
11531022
</widget>
11541023
</item>

0 commit comments

Comments
 (0)
Please sign in to comment.