Skip to content

Commit 6129e92

Browse files
committed
more precise layer min/max scale description + icon
1 parent 447ccb4 commit 6129e92

4 files changed

+180
-27
lines changed

src/app/qgsrasterlayerproperties.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ QgsRasterLayerProperties::QgsRasterLayerProperties( QgsMapLayer* lyr, QgsMapCanv
7272
mRGBMinimumMaximumEstimated = true;
7373

7474
setupUi( this );
75+
76+
mMaximumScaleIconLabel->setPixmap( QgsApplication::getThemePixmap( "/mActionZoomIn.png" ) );
77+
mMinimumScaleIconLabel->setPixmap( QgsApplication::getThemePixmap( "/mActionZoomOut.png" ) );
78+
7579
connect( buttonBox, SIGNAL( accepted() ), this, SLOT( accept() ) );
7680
connect( this, SIGNAL( accepted() ), this, SLOT( apply() ) );
7781
connect( buttonBox->button( QDialogButtonBox::Apply ), SIGNAL( clicked() ), this, SLOT( apply() ) );

src/app/qgsvectorlayerproperties.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ QgsVectorLayerProperties::QgsVectorLayerProperties(
8080
{
8181
setupUi( this );
8282

83+
mMaximumScaleIconLabel->setPixmap( QgsApplication::getThemePixmap( "/mActionZoomIn.png" ) );
84+
mMinimumScaleIconLabel->setPixmap( QgsApplication::getThemePixmap( "/mActionZoomOut.png" ) );
85+
8386
connect( buttonBox, SIGNAL( accepted() ), this, SLOT( accept() ) );
8487
connect( buttonBox, SIGNAL( rejected() ), this, SLOT( reject() ) );
8588
connect( buttonBox->button( QDialogButtonBox::Apply ), SIGNAL( clicked() ), this, SLOT( apply() ) );

src/ui/qgsrasterlayerpropertiesbase.ui

+87-14
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
<rect>
77
<x>0</x>
88
<y>0</y>
9-
<width>623</width>
10-
<height>531</height>
9+
<width>678</width>
10+
<height>537</height>
1111
</rect>
1212
</property>
1313
<property name="sizePolicy">
@@ -72,7 +72,7 @@
7272
<item row="0" column="0" colspan="4">
7373
<widget class="QTabWidget" name="tabBar">
7474
<property name="currentIndex">
75-
<number>1</number>
75+
<number>2</number>
7676
</property>
7777
<property name="iconSize">
7878
<size>
@@ -705,17 +705,22 @@
705705
<item row="0" column="0">
706706
<widget class="QLabel" name="textLabel1_3">
707707
<property name="toolTip">
708-
<string>MInimum scale denominator.</string>
708+
<string>Maximum scale, i.e. minimum scale denominator. This limit is inclusive, that means the layer will be displayed on this scale.</string>
709709
</property>
710710
<property name="layoutDirection">
711711
<enum>Qt::LeftToRight</enum>
712712
</property>
713713
<property name="text">
714-
<string>Maximum scale:</string>
714+
<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;
715+
&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;
716+
p, li { white-space: pre-wrap; }
717+
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'DejaVu Sans'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
718+
&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;Maximum scale&lt;/p&gt;
719+
&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;(inclusive)&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
715720
</property>
716721
</widget>
717722
</item>
718-
<item row="0" column="4">
723+
<item row="0" column="6">
719724
<widget class="QgsScaleComboBox" name="cbMaximumScale" native="true">
720725
<property name="sizePolicy">
721726
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
@@ -730,11 +735,11 @@
730735
</size>
731736
</property>
732737
<property name="toolTip">
733-
<string>Minimum scale (maximum scale denominator).</string>
738+
<string>Minimum scale, i.e. maximum scale denominator. This limit is exclusive, that means the layer will not be displayed on this scale.</string>
734739
</property>
735740
</widget>
736741
</item>
737-
<item row="0" column="1">
742+
<item row="0" column="2">
738743
<widget class="QgsScaleComboBox" name="cbMinimumScale" native="true">
739744
<property name="sizePolicy">
740745
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
@@ -749,37 +754,104 @@
749754
</size>
750755
</property>
751756
<property name="toolTip">
752-
<string>Maximum scale (minimum scale denominator).</string>
757+
<string>Maximum scale, i.e. minimum scale denominator. This limit is inclusive, that means the layer will be displayed on this scale.</string>
753758
</property>
754759
</widget>
755760
</item>
756-
<item row="0" column="3">
761+
<item row="0" column="4">
757762
<widget class="QLabel" name="textLabel1_2_2_2">
758763
<property name="toolTip">
759-
<string>Maximum scale denominator</string>
764+
<string>Minimum scale, i.e. maximum scale denominator. This limit is exclusive, that means the layer will not be displayed on this scale.</string>
760765
</property>
761766
<property name="layoutDirection">
762767
<enum>Qt::LeftToRight</enum>
763768
</property>
764769
<property name="text">
765-
<string>Minimum scale</string>
770+
<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;
771+
&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;
772+
p, li { white-space: pre-wrap; }
773+
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'DejaVu Sans'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
774+
&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;Minimum scale&lt;/p&gt;
775+
&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;(exclusive)&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
766776
</property>
767777
</widget>
768778
</item>
769-
<item row="0" column="2">
779+
<item row="0" column="3">
770780
<widget class="QPushButton" name="mMinimumScaleSetCurrentPushButton">
771781
<property name="text">
772782
<string>Current</string>
773783
</property>
774784
</widget>
775785
</item>
776-
<item row="0" column="5">
786+
<item row="0" column="7">
777787
<widget class="QPushButton" name="mMaximumScaleSetCurrentPushButton">
778788
<property name="text">
779789
<string>Current</string>
780790
</property>
781791
</widget>
782792
</item>
793+
<item row="0" column="1">
794+
<widget class="QLabel" name="mMaximumScaleIconLabel">
795+
<property name="sizePolicy">
796+
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
797+
<horstretch>0</horstretch>
798+
<verstretch>0</verstretch>
799+
</sizepolicy>
800+
</property>
801+
<property name="minimumSize">
802+
<size>
803+
<width>0</width>
804+
<height>0</height>
805+
</size>
806+
</property>
807+
<property name="maximumSize">
808+
<size>
809+
<width>22</width>
810+
<height>22</height>
811+
</size>
812+
</property>
813+
<property name="text">
814+
<string/>
815+
</property>
816+
<property name="pixmap">
817+
<pixmap resource="../../images/images.qrc">:/images/themes/default/mActionZoomIn.png</pixmap>
818+
</property>
819+
<property name="scaledContents">
820+
<bool>true</bool>
821+
</property>
822+
</widget>
823+
</item>
824+
<item row="0" column="5">
825+
<widget class="QLabel" name="mMinimumScaleIconLabel">
826+
<property name="sizePolicy">
827+
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
828+
<horstretch>0</horstretch>
829+
<verstretch>0</verstretch>
830+
</sizepolicy>
831+
</property>
832+
<property name="minimumSize">
833+
<size>
834+
<width>0</width>
835+
<height>0</height>
836+
</size>
837+
</property>
838+
<property name="maximumSize">
839+
<size>
840+
<width>22</width>
841+
<height>22</height>
842+
</size>
843+
</property>
844+
<property name="text">
845+
<string/>
846+
</property>
847+
<property name="pixmap">
848+
<pixmap resource="../../images/images.qrc">:/images/themes/default/mActionZoomOut.png</pixmap>
849+
</property>
850+
<property name="scaledContents">
851+
<bool>true</bool>
852+
</property>
853+
</widget>
854+
</item>
783855
</layout>
784856
</widget>
785857
</item>
@@ -1212,6 +1284,7 @@ p, li { white-space: pre-wrap; }
12121284
</tabstops>
12131285
<resources>
12141286
<include location="../../images/images.qrc"/>
1287+
<include location="../images/images.qrc"/>
12151288
</resources>
12161289
<connections>
12171290
<connection>

src/ui/qgsvectorlayerpropertiesbase.ui

+86-13
Original file line numberDiff line numberDiff line change
@@ -377,13 +377,18 @@
377377
<property name="margin">
378378
<number>11</number>
379379
</property>
380-
<item row="0" column="3">
380+
<item row="0" column="4">
381381
<widget class="QLabel" name="textLabel1_2_2">
382382
<property name="toolTip">
383-
<string>Maximum scale (minimum scale denominator).</string>
383+
<string>Minimum scale, i.e. maximum scale denominator. This limit is exclusive, that means the layer will not be displayed on this scale.</string>
384384
</property>
385385
<property name="text">
386-
<string>Minimum scale:</string>
386+
<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;
387+
&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;
388+
p, li { white-space: pre-wrap; }
389+
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'DejaVu Sans'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
390+
&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Minimum scale&lt;/p&gt;
391+
&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;(exclusive)&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
387392
</property>
388393
</widget>
389394
</item>
@@ -396,14 +401,19 @@
396401
</sizepolicy>
397402
</property>
398403
<property name="toolTip">
399-
<string>Minimum scale denominator.</string>
404+
<string>Maximum scale, i.e. minimum scale denominator. This limit is inclusive, that means the layer will be displayed on this scale.</string>
400405
</property>
401406
<property name="text">
402-
<string>Maximum scale:</string>
407+
<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;
408+
&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;
409+
p, li { white-space: pre-wrap; }
410+
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'DejaVu Sans'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
411+
&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Maximum scale&lt;/p&gt;
412+
&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;(inclusive)&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
403413
</property>
404414
</widget>
405415
</item>
406-
<item row="0" column="1">
416+
<item row="0" column="2">
407417
<widget class="QgsScaleComboBox" name="cbMinimumScale" native="true">
408418
<property name="sizePolicy">
409419
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
@@ -418,11 +428,11 @@
418428
</size>
419429
</property>
420430
<property name="toolTip">
421-
<string>Maximum scale (minimum scale denominator).</string>
431+
<string>Maximum scale, i.e. minimum scale denominator. This limit is inclusive, that means the layer will be displayed on this scale.</string>
422432
</property>
423433
</widget>
424434
</item>
425-
<item row="0" column="4">
435+
<item row="0" column="6">
426436
<widget class="QgsScaleComboBox" name="cbMaximumScale" native="true">
427437
<property name="sizePolicy">
428438
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
@@ -437,21 +447,83 @@
437447
</size>
438448
</property>
439449
<property name="toolTip">
440-
<string>Minimum scale (maximum scale denominator).</string>
450+
<string>Minimum scale, i.e. maximum scale denominator. This limit is exclusive, that means the layer will not be displayed on this scale.</string>
441451
</property>
442452
</widget>
443453
</item>
444-
<item row="0" column="2">
454+
<item row="0" column="3">
445455
<widget class="QPushButton" name="mMinimumScaleSetCurrentPushButton">
446456
<property name="text">
447-
<string>Set current</string>
457+
<string>Current</string>
448458
</property>
449459
</widget>
450460
</item>
451-
<item row="0" column="5">
461+
<item row="0" column="7">
452462
<widget class="QPushButton" name="mMaximumScaleSetCurrentPushButton">
453463
<property name="text">
454-
<string>Set current</string>
464+
<string>Current</string>
465+
</property>
466+
</widget>
467+
</item>
468+
<item row="0" column="1">
469+
<widget class="QLabel" name="mMaximumScaleIconLabel">
470+
<property name="sizePolicy">
471+
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
472+
<horstretch>0</horstretch>
473+
<verstretch>0</verstretch>
474+
</sizepolicy>
475+
</property>
476+
<property name="minimumSize">
477+
<size>
478+
<width>0</width>
479+
<height>0</height>
480+
</size>
481+
</property>
482+
<property name="maximumSize">
483+
<size>
484+
<width>22</width>
485+
<height>22</height>
486+
</size>
487+
</property>
488+
<property name="text">
489+
<string/>
490+
</property>
491+
<property name="pixmap">
492+
<pixmap resource="../../images/images.qrc">:/images/themes/default/mActionZoomIn.png</pixmap>
493+
</property>
494+
<property name="scaledContents">
495+
<bool>true</bool>
496+
</property>
497+
</widget>
498+
</item>
499+
<item row="0" column="5">
500+
<widget class="QLabel" name="mMinimumScaleIconLabel">
501+
<property name="sizePolicy">
502+
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
503+
<horstretch>0</horstretch>
504+
<verstretch>0</verstretch>
505+
</sizepolicy>
506+
</property>
507+
<property name="minimumSize">
508+
<size>
509+
<width>0</width>
510+
<height>0</height>
511+
</size>
512+
</property>
513+
<property name="maximumSize">
514+
<size>
515+
<width>22</width>
516+
<height>22</height>
517+
</size>
518+
</property>
519+
<property name="text">
520+
<string/>
521+
</property>
522+
<property name="pixmap">
523+
<pixmap resource="../../images/images.qrc">:/images/themes/default/mActionZoomOut.png</pixmap>
524+
</property>
525+
<property name="scaledContents">
526+
<bool>true</bool>
455527
</property>
456528
</widget>
457529
</item>
@@ -927,6 +999,7 @@
927999
</tabstops>
9281000
<resources>
9291001
<include location="../../images/images.qrc"/>
1002+
<include location="../images/images.qrc"/>
9301003
</resources>
9311004
<connections>
9321005
<connection>

0 commit comments

Comments
 (0)