Skip to content
Permalink
Browse files
[Expressions] Move field values widget
  • Loading branch information
NathanW2 committed Jan 21, 2017
1 parent 374b756 commit 72551fbe8416c7e8acef5cc4db08be9b8bafd448
Showing with 97 additions and 59 deletions.
  1. +1 −1 src/gui/qgsexpressionbuilderwidget.cpp
  2. +96 −58 src/ui/qgsexpressionbuilder.ui
@@ -148,7 +148,7 @@ void QgsExpressionBuilderWidget::currentChanged( const QModelIndex &index, const
}

mLoadGroupBox->setVisible( item->getItemType() == QgsExpressionItem::Field && mLayer );
mValueGroupBox->setVisible(( item->getItemType() == QgsExpressionItem::Field && mLayer ) || mValuesListView->model()->rowCount() > 0 );
mValueGroupBox->setVisible( item->getItemType() == QgsExpressionItem::Field && mLayer );

// Show the help for the current item.
QString help = loadFunctionHelp( item );
@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>996</width>
<height>416</height>
<width>989</width>
<height>520</height>
</rect>
</property>
<property name="sizePolicy">
@@ -20,7 +20,16 @@
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<property name="margin">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item row="0" column="0">
@@ -36,7 +45,16 @@
<string>Expression</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_3">
<property name="margin">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item row="0" column="0">
@@ -82,7 +100,16 @@
</size>
</property>
<layout class="QGridLayout" name="gridLayout">
<property name="margin">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item row="1" column="0" colspan="2">
@@ -363,25 +390,47 @@
</attribute>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="layoutWidget2">
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QTextEdit" name="txtHelpText">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QFrame" name="mValueGroupBox">
<layout class="QGridLayout" name="gridLayout_5">
<property name="margin">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item row="4" column="0">
<widget class="QWidget" name="mLoadGroupBox" native="true">
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
</layout>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_4">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Values</string>
</property>
@@ -394,57 +443,46 @@
</property>
</widget>
</item>
<item row="1" column="0" colspan="2">
<item row="2" column="0" colspan="2">
<widget class="QListView" name="mValuesListView">
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
</property>
</widget>
</item>
<item row="1" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_8">
<property name="topMargin">
<number>0</number>
</property>
<item>
<widget class="QPushButton" name="btnLoadAll">
<property name="text">
<string>all unique</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btnLoadSample">
<property name="text">
<string>10 samples</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="layoutWidget2">
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QWidget" name="mLoadGroupBox" native="true">
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="margin">
<number>0</number>
</property>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>5</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="lblLoad">
<property name="text">
<string>Load values</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btnLoadAll">
<property name="text">
<string>all unique</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btnLoadSample">
<property name="text">
<string>10 samples</string>
</property>
</widget>
</item>
</layout>
<widget class="QTextEdit" name="txtHelpText">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
</layout>

1 comment on commit 72551fb

@nirvn

This comment has been minimized.

Copy link
Contributor

@nirvn nirvn commented on 72551fb Jan 21, 2017

Woupidou!

Please sign in to comment.