Skip to content

Commit 0a1cef9

Browse files
committedNov 2, 2011
Added icons for save and load buttons; Open and Save buttons hiden for now
1 parent 3ff610a commit 0a1cef9

File tree

2 files changed

+18
-17
lines changed

2 files changed

+18
-17
lines changed
 

‎src/gui/qgsexpressionbuilderwidget.cpp

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@ QgsExpressionBuilderWidget::QgsExpressionBuilderWidget( QWidget *parent )
2525
{
2626
setupUi( this );
2727

28-
mValueListWidget->hide();
29-
mValueListLabel->hide();
28+
mValueGroupBox->hide();
29+
// The open and save button are for future.
30+
btnOpen->hide();
31+
btnSave->hide();
3032

3133
mModel = new QStandardItemModel( );
3234
mProxyModel = new QgsExpressionItemSearchProxy();
@@ -112,8 +114,7 @@ void QgsExpressionBuilderWidget::on_expressionTree_clicked( const QModelIndex &i
112114
else
113115
{
114116
// Show the help for the current item.
115-
mValueListWidget->hide();
116-
mValueListLabel->hide();
117+
mValueGroupBox->hide();
117118
mValueListWidget->clear();
118119
txtHelpText->setText( item->getHelpText() );
119120
txtHelpText->setToolTip( txtHelpText->text() );
@@ -327,8 +328,7 @@ void QgsExpressionBuilderWidget::loadSampleValues()
327328
if ( !mLayer )
328329
return;
329330

330-
mValueListWidget->show();
331-
mValueListLabel->show();
331+
mValueGroupBox->show();
332332
int fieldIndex = mLayer->fieldNameIndex( item->text() );
333333
fillFieldValues( fieldIndex, 10 );
334334
}
@@ -342,8 +342,7 @@ void QgsExpressionBuilderWidget::loadAllValues()
342342
if ( !mLayer )
343343
return;
344344

345-
mValueListWidget->show();
346-
mValueListLabel->show();
345+
mValueGroupBox->show();
347346
int fieldIndex = mLayer->fieldNameIndex( item->text() );
348347
fillFieldValues( fieldIndex, -1 );
349348
}

‎src/ui/qgsexpressionbuilder.ui

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,8 @@
167167
<rect>
168168
<x>0</x>
169169
<y>0</y>
170-
<width>270</width>
171-
<height>137</height>
170+
<width>264</width>
171+
<height>153</height>
172172
</rect>
173173
</property>
174174
<layout class="QGridLayout" name="gridLayout_4">
@@ -214,7 +214,7 @@
214214
</widget>
215215
</item>
216216
<item>
217-
<widget class="QGroupBox" name="groupBox_2">
217+
<widget class="QGroupBox" name="mValueGroupBox">
218218
<property name="title">
219219
<string>Field Values</string>
220220
</property>
@@ -432,7 +432,7 @@
432432
<property name="maximumSize">
433433
<size>
434434
<width>16777215</width>
435-
<height>150</height>
435+
<height>120</height>
436436
</size>
437437
</property>
438438
<property name="baseSize">
@@ -478,8 +478,8 @@
478478
<string/>
479479
</property>
480480
<property name="icon">
481-
<iconset>
482-
<normaloff>../../images/themes/gis/mActionFileOpen.png</normaloff>../../images/themes/gis/mActionFileOpen.png</iconset>
481+
<iconset resource="../../images/images.qrc">
482+
<normaloff>:/images/themes/gis/mActionFileOpen.png</normaloff>:/images/themes/gis/mActionFileOpen.png</iconset>
483483
</property>
484484
</widget>
485485
</item>
@@ -489,8 +489,8 @@
489489
<string/>
490490
</property>
491491
<property name="icon">
492-
<iconset>
493-
<normaloff>../../images/themes/gis/mActionFileSave.png</normaloff>../../images/themes/gis/mActionFileSave.png</iconset>
492+
<iconset resource="../../images/images.qrc">
493+
<normaloff>:/images/themes/default/mActionFileSave.png</normaloff>:/images/themes/default/mActionFileSave.png</iconset>
494494
</property>
495495
</widget>
496496
</item>
@@ -585,6 +585,8 @@
585585
</item>
586586
</layout>
587587
</widget>
588-
<resources/>
588+
<resources>
589+
<include location="../../images/images.qrc"/>
590+
</resources>
589591
<connections/>
590592
</ui>

0 commit comments

Comments
 (0)
Please sign in to comment.