Merge pull request #5609 from nyalldawson/remove_options

[needs-docs] Remove options for making layer names and groups bold
This commit is contained in:
Nyall Dawson 2017-11-14 11:22:17 +11:00 committed by GitHub
commit 857bae4b2c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 101 additions and 118 deletions

View File

@ -3689,8 +3689,8 @@ void QgisApp::setupLayerTreeViewFromSettings()
model->setFlag( QgsLayerTreeModel::ShowRasterPreviewIcon, s.value( QStringLiteral( "/qgis/createRasterLegendIcons" ), false ).toBool() ); model->setFlag( QgsLayerTreeModel::ShowRasterPreviewIcon, s.value( QStringLiteral( "/qgis/createRasterLegendIcons" ), false ).toBool() );
QFont fontLayer, fontGroup; QFont fontLayer, fontGroup;
fontLayer.setBold( s.value( QStringLiteral( "/qgis/legendLayersBold" ), true ).toBool() ); fontLayer.setBold( true );
fontGroup.setBold( s.value( QStringLiteral( "/qgis/legendGroupsBold" ), false ).toBool() ); fontGroup.setBold( false );
model->setLayerTreeNodeFont( QgsLayerTreeNode::NodeLayer, fontLayer ); model->setLayerTreeNodeFont( QgsLayerTreeNode::NodeLayer, fontLayer );
model->setLayerTreeNodeFont( QgsLayerTreeNode::NodeGroup, fontGroup ); model->setLayerTreeNodeFont( QgsLayerTreeNode::NodeGroup, fontGroup );
} }

View File

@ -666,8 +666,6 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl, const QList<QgsOpti
// but the checkbox is true to use QPixmap // but the checkbox is true to use QPixmap
chkAddedVisibility->setChecked( mSettings->value( QStringLiteral( "/qgis/new_layers_visible" ), true ).toBool() ); chkAddedVisibility->setChecked( mSettings->value( QStringLiteral( "/qgis/new_layers_visible" ), true ).toBool() );
cbxLegendClassifiers->setChecked( mSettings->value( QStringLiteral( "/qgis/showLegendClassifiers" ), false ).toBool() ); cbxLegendClassifiers->setChecked( mSettings->value( QStringLiteral( "/qgis/showLegendClassifiers" ), false ).toBool() );
mLegendLayersBoldChkBx->setChecked( mSettings->value( QStringLiteral( "/qgis/legendLayersBold" ), true ).toBool() );
mLegendGroupsBoldChkBx->setChecked( mSettings->value( QStringLiteral( "/qgis/legendGroupsBold" ), false ).toBool() );
cbxHideSplash->setChecked( mSettings->value( QStringLiteral( "/qgis/hideSplash" ), false ).toBool() ); cbxHideSplash->setChecked( mSettings->value( QStringLiteral( "/qgis/hideSplash" ), false ).toBool() );
mDataSourceManagerNonModal->setChecked( mSettings->value( QStringLiteral( "/qgis/dataSourceManagerNonModal" ), false ).toBool() ); mDataSourceManagerNonModal->setChecked( mSettings->value( QStringLiteral( "/qgis/dataSourceManagerNonModal" ), false ).toBool() );
cbxCheckVersion->setChecked( mSettings->value( QStringLiteral( "/qgis/checkVersion" ), true ).toBool() ); cbxCheckVersion->setChecked( mSettings->value( QStringLiteral( "/qgis/checkVersion" ), true ).toBool() );
@ -1268,10 +1266,6 @@ void QgsOptions::saveOptions()
bool showLegendClassifiers = mSettings->value( QStringLiteral( "/qgis/showLegendClassifiers" ), false ).toBool(); bool showLegendClassifiers = mSettings->value( QStringLiteral( "/qgis/showLegendClassifiers" ), false ).toBool();
mSettings->setValue( QStringLiteral( "/qgis/showLegendClassifiers" ), cbxLegendClassifiers->isChecked() ); mSettings->setValue( QStringLiteral( "/qgis/showLegendClassifiers" ), cbxLegendClassifiers->isChecked() );
bool legendLayersBold = mSettings->value( QStringLiteral( "/qgis/legendLayersBold" ), true ).toBool();
mSettings->setValue( QStringLiteral( "/qgis/legendLayersBold" ), mLegendLayersBoldChkBx->isChecked() );
bool legendGroupsBold = mSettings->value( QStringLiteral( "/qgis/legendGroupsBold" ), false ).toBool();
mSettings->setValue( QStringLiteral( "/qgis/legendGroupsBold" ), mLegendGroupsBoldChkBx->isChecked() );
mSettings->setValue( QStringLiteral( "/qgis/hideSplash" ), cbxHideSplash->isChecked() ); mSettings->setValue( QStringLiteral( "/qgis/hideSplash" ), cbxHideSplash->isChecked() );
mSettings->setValue( QStringLiteral( "/qgis/dataSourceManagerNonModal" ), mDataSourceManagerNonModal->isChecked() ); mSettings->setValue( QStringLiteral( "/qgis/dataSourceManagerNonModal" ), mDataSourceManagerNonModal->isChecked() );
mSettings->setValue( QStringLiteral( "/qgis/checkVersion" ), cbxCheckVersion->isChecked() ); mSettings->setValue( QStringLiteral( "/qgis/checkVersion" ), cbxCheckVersion->isChecked() );
@ -1559,9 +1553,7 @@ void QgsOptions::saveOptions()
saveGdalDriverList(); saveGdalDriverList();
// refresh legend if any legend item's state is to be changed // refresh legend if any legend item's state is to be changed
if ( legendLayersBold != mLegendLayersBoldChkBx->isChecked() if ( legendLayersCapitalize != capitalizeCheckBox->isChecked() )
|| legendGroupsBold != mLegendGroupsBoldChkBx->isChecked()
|| legendLayersCapitalize != capitalizeCheckBox->isChecked() )
{ {
// TODO[MD] QgisApp::instance()->legend()->updateLegendItemStyles(); // TODO[MD] QgisApp::instance()->legend()->updateLegendItemStyles();
} }

View File

@ -308,7 +308,7 @@
<item> <item>
<widget class="QStackedWidget" name="mOptionsStackedWidget"> <widget class="QStackedWidget" name="mOptionsStackedWidget">
<property name="currentIndex"> <property name="currentIndex">
<number>12</number> <number>5</number>
</property> </property>
<widget class="QWidget" name="mOptionsPageGeneral"> <widget class="QWidget" name="mOptionsPageGeneral">
<layout class="QVBoxLayout" name="verticalLayout_3"> <layout class="QVBoxLayout" name="verticalLayout_3">
@ -337,8 +337,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>580</width> <width>1159</width>
<height>804</height> <height>1434</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_28"> <layout class="QVBoxLayout" name="verticalLayout_28">
@ -1032,8 +1032,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>537</width> <width>1092</width>
<height>1128</height> <height>1502</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_22"> <layout class="QVBoxLayout" name="verticalLayout_22">
@ -1562,8 +1562,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>499</width> <width>1010</width>
<height>754</height> <height>1266</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_27"> <layout class="QVBoxLayout" name="verticalLayout_27">
@ -1930,8 +1930,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>672</width> <width>1351</width>
<height>1043</height> <height>1933</height>
</rect> </rect>
</property> </property>
<layout class="QGridLayout" name="gridLayout_22"> <layout class="QGridLayout" name="gridLayout_22">
@ -2681,8 +2681,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>130</width> <width>741</width>
<height>322</height> <height>779</height>
</rect> </rect>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout_46"> <layout class="QHBoxLayout" name="horizontalLayout_46">
@ -2832,8 +2832,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>500</width> <width>813</width>
<height>340</height> <height>751</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_25"> <layout class="QVBoxLayout" name="verticalLayout_25">
@ -2992,16 +2992,43 @@
</item> </item>
<item> <item>
<layout class="QGridLayout" name="gridLayout_3"> <layout class="QGridLayout" name="gridLayout_3">
<item row="1" column="2"> <item row="3" column="1" colspan="2">
<widget class="Line" name="line_4"> <widget class="QCheckBox" name="cbxCreateRasterLegendIcons">
<property name="minimumSize"> <property name="text">
<size> <string>Create raster icons (may be slow)</string>
<width>12</width>
<height>0</height>
</size>
</property> </property>
<property name="orientation"> </widget>
<enum>Qt::Vertical</enum> </item>
<item row="2" column="1" colspan="2">
<widget class="QCheckBox" name="cbxLegendClassifiers">
<property name="text">
<string>Display classification attribute names</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="capitalizeCheckBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Capitalize layer names</string>
</property>
</widget>
</item>
<item row="0" column="0" colspan="3">
<widget class="QLabel" name="label_53">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Legend item styles</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -3021,66 +3048,6 @@
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="1" column="1">
<widget class="QCheckBox" name="capitalizeCheckBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Capitalize layer names</string>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QCheckBox" name="mLegendLayersBoldChkBx">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Bold layer names</string>
</property>
</widget>
</item>
<item row="3" column="1" colspan="3">
<widget class="QCheckBox" name="cbxLegendClassifiers">
<property name="text">
<string>Display classification attribute names</string>
</property>
</widget>
</item>
<item row="2" column="1" colspan="3">
<widget class="QCheckBox" name="mLegendGroupsBoldChkBx">
<property name="text">
<string>Bold group names</string>
</property>
</widget>
</item>
<item row="4" column="1" colspan="3">
<widget class="QCheckBox" name="cbxCreateRasterLegendIcons">
<property name="text">
<string>Create raster icons (may be slow)</string>
</property>
</widget>
</item>
<item row="0" column="0" colspan="4">
<widget class="QLabel" name="label_53">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Legend item styles</string>
</property>
</widget>
</item>
</layout> </layout>
</item> </item>
<item> <item>
@ -3175,8 +3142,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>623</width> <width>1081</width>
<height>734</height> <height>1164</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_30"> <layout class="QVBoxLayout" name="verticalLayout_30">
@ -3619,8 +3586,8 @@ The bigger the number, the faster zooming with the mouse wheel will be.</string>
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>491</width> <width>920</width>
<height>610</height> <height>924</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_39"> <layout class="QVBoxLayout" name="verticalLayout_39">
@ -3888,8 +3855,8 @@ The bigger the number, the faster zooming with the mouse wheel will be.</string>
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>548</width> <width>1072</width>
<height>785</height> <height>1551</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_31"> <layout class="QVBoxLayout" name="verticalLayout_31">
@ -4483,8 +4450,8 @@ The bigger the number, the faster zooming with the mouse wheel will be.</string>
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>431</width> <width>823</width>
<height>376</height> <height>576</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_6"> <layout class="QVBoxLayout" name="verticalLayout_6">
@ -4622,8 +4589,8 @@ The bigger the number, the faster zooming with the mouse wheel will be.</string>
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>418</width> <width>838</width>
<height>544</height> <height>855</height>
</rect> </rect>
</property> </property>
<layout class="QGridLayout" name="gridLayout_15"> <layout class="QGridLayout" name="gridLayout_15">
@ -4845,8 +4812,8 @@ The bigger the number, the faster zooming with the mouse wheel will be.</string>
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>866</width> <width>1258</width>
<height>930</height> <height>1349</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_33"> <layout class="QVBoxLayout" name="verticalLayout_33">
@ -5373,23 +5340,12 @@ The bigger the number, the faster zooming with the mouse wheel will be.</string>
</widget> </widget>
<layoutdefault spacing="6" margin="11"/> <layoutdefault spacing="6" margin="11"/>
<customwidgets> <customwidgets>
<customwidget>
<class>QgsColorButton</class>
<extends>QToolButton</extends>
<header>qgscolorbutton.h</header>
<container>1</container>
</customwidget>
<customwidget> <customwidget>
<class>QgsScrollArea</class> <class>QgsScrollArea</class>
<extends>QScrollArea</extends> <extends>QScrollArea</extends>
<header>qgsscrollarea.h</header> <header>qgsscrollarea.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget>
<class>QgsSpinBox</class>
<extends>QSpinBox</extends>
<header>qgsspinbox.h</header>
</customwidget>
<customwidget> <customwidget>
<class>QgsCollapsibleGroupBox</class> <class>QgsCollapsibleGroupBox</class>
<extends>QGroupBox</extends> <extends>QGroupBox</extends>
@ -5402,6 +5358,17 @@ The bigger the number, the faster zooming with the mouse wheel will be.</string>
<header>qgsprojectionselectionwidget.h</header> <header>qgsprojectionselectionwidget.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget>
<class>QgsColorButton</class>
<extends>QToolButton</extends>
<header>qgscolorbutton.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>QgsSpinBox</class>
<extends>QSpinBox</extends>
<header>qgsspinbox.h</header>
</customwidget>
<customwidget> <customwidget>
<class>QgsVariableEditorWidget</class> <class>QgsVariableEditorWidget</class>
<extends>QWidget</extends> <extends>QWidget</extends>
@ -5572,8 +5539,6 @@ The bigger the number, the faster zooming with the mouse wheel will be.</string>
<tabstop>mLegendGrpBx</tabstop> <tabstop>mLegendGrpBx</tabstop>
<tabstop>cmbLegendDoubleClickAction</tabstop> <tabstop>cmbLegendDoubleClickAction</tabstop>
<tabstop>capitalizeCheckBox</tabstop> <tabstop>capitalizeCheckBox</tabstop>
<tabstop>mLegendLayersBoldChkBx</tabstop>
<tabstop>mLegendGroupsBoldChkBx</tabstop>
<tabstop>cbxLegendClassifiers</tabstop> <tabstop>cbxLegendClassifiers</tabstop>
<tabstop>cbxCreateRasterLegendIcons</tabstop> <tabstop>cbxCreateRasterLegendIcons</tabstop>
<tabstop>mLegendGraphicResolutionSpinBox</tabstop> <tabstop>mLegendGraphicResolutionSpinBox</tabstop>
@ -5679,6 +5644,32 @@ The bigger the number, the faster zooming with the mouse wheel will be.</string>
</tabstops> </tabstops>
<resources> <resources>
<include location="../../images/images.qrc"/> <include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
</resources> </resources>
<connections> <connections>
<connection> <connection>