Skip to content
Permalink
Browse files

Add scrollbar to only dialog-display mode

and not in widget mode
Sur la branche rulebaseDialog
	modifié :         src/app/nodetool/qgsnodetool.h
aucune modification n'a été ajoutée à la validation (utilisez "git add" ou
  • Loading branch information
DelazJ committed Jan 27, 2018
1 parent 171b9ee commit 1b1be55f7f7810aa80ad3760857a7929a176ed15
Showing with 96 additions and 110 deletions.
  1. +8 −3 src/gui/symbology/qgsrulebasedrendererwidget.cpp
  2. +88 −107 src/ui/qgsrendererrulepropsdialogbase.ui
@@ -679,20 +679,25 @@ QgsRendererRulePropsWidget::QgsRendererRulePropsWidget( QgsRuleBasedRenderer::Ru
connect( mScaleRangeWidget, &QgsScaleRangeWidget::rangeChanged, this, &QgsPanelWidget::widgetChanged );
}

#include "qgsvscrollarea.h"

QgsRendererRulePropsDialog::QgsRendererRulePropsDialog( QgsRuleBasedRenderer::Rule *rule, QgsVectorLayer *layer, QgsStyle *style, QWidget *parent, const QgsSymbolWidgetContext &context )
: QDialog( parent )
{

#ifdef Q_OS_MAC
setWindowModality( Qt::WindowModal );
#endif
this->setLayout( new QVBoxLayout() );

QVBoxLayout *layout = new QVBoxLayout( this );
QgsVScrollArea *scrollArea = new QgsVScrollArea( this );
layout->addWidget( scrollArea );

buttonBox = new QDialogButtonBox( QDialogButtonBox::Ok | QDialogButtonBox::Cancel );
mPropsWidget = new QgsRendererRulePropsWidget( rule, layer, style, this, context );

this->layout()->addWidget( mPropsWidget );
this->layout()->addWidget( buttonBox );
scrollArea->setWidget( mPropsWidget );
layout->addWidget( buttonBox );
this->setWindowTitle( "Edit Rule" );

connect( buttonBox, &QDialogButtonBox::accepted, this, &QgsRendererRulePropsDialog::accept );
@@ -6,133 +6,114 @@
<rect>
<x>0</x>
<y>0</y>
<width>427</width>
<height>274</height>
<width>376</width>
<height>155</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QScrollArea" name="scrollArea">
<property name="widgetResizable">
<bool>true</bool>
<layout class="QFormLayout" name="formLayout">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::ExpandingFieldsGrow</enum>
</property>
<widget class="QWidget" name="scrollAreaWidgetContents">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>407</width>
<height>254</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QFormLayout" name="formLayout">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::ExpandingFieldsGrow</enum>
</property>
<item row="0" column="0">
<widget class="QLabel" name="label_1">
<property name="text">
<string>Label</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="editLabel"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Filter</string>
</property>
</widget>
</item>
<item row="1" column="1">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLineEdit" name="editFilter"/>
</item>
<item>
<widget class="QPushButton" name="btnExpressionBuilder">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>…</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btnTestFilter">
<property name="text">
<string>Test</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Description</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="editDescription"/>
</item>
</layout>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_1">
<property name="text">
<string>Label</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="editLabel"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Filter</string>
</property>
</widget>
</item>
<item row="1" column="1">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QGroupBox" name="groupScale">
<property name="title">
<string>Scale range</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QgsScaleRangeWidget" name="mScaleRangeWidget" native="true">
<property name="toolTip">
<string/>
</property>
<property name="whatsThis">
<string/>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QLineEdit" name="editFilter"/>
</item>
<item>
<widget class="QGroupBox" name="groupSymbol">
<widget class="QPushButton" name="btnExpressionBuilder">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Symbol</string>
<property name="text">
<string></string>
</property>
<property name="checkable">
<bool>true</bool>
</widget>
</item>
<item>
<widget class="QPushButton" name="btnTestFilter">
<property name="text">
<string>Test</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Description</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="editDescription"/>
</item>
</layout>
</item>
<item>
<widget class="QGroupBox" name="groupScale">
<property name="title">
<string>Scale range</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QgsScaleRangeWidget" name="mScaleRangeWidget" native="true">
<property name="toolTip">
<string/>
</property>
<property name="whatsThis">
<string/>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupSymbol">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Symbol</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
</layout>

0 comments on commit 1b1be55

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