Skip to content

Commit

Permalink
Use button box for cross platform consistency
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@8550 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed May 30, 2008
1 parent c3f44c1 commit 949f516
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 75 deletions.
2 changes: 0 additions & 2 deletions src/app/qgsludialog.cpp
Expand Up @@ -23,8 +23,6 @@ QgsLUDialog::QgsLUDialog(QWidget *parent, Qt::WFlags fl)
: QDialog(parent, fl)
{
setupUi(this);
connect(mOkButton, SIGNAL(clicked()), this, SLOT(accept()));
connect(mCancelButton, SIGNAL(clicked()), this, SLOT(reject()));
}

QgsLUDialog::~QgsLUDialog()
Expand Down
142 changes: 69 additions & 73 deletions src/ui/qgsludialogbase.ui
Expand Up @@ -5,8 +5,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>340</width>
<height>159</height>
<width>324</width>
<height>133</height>
</rect>
</property>
<property name="windowTitle" >
Expand All @@ -16,15 +16,24 @@
<bool>true</bool>
</property>
<layout class="QGridLayout" >
<property name="margin" >
<number>10</number>
<property name="leftMargin" >
<number>4</number>
</property>
<property name="spacing" >
<number>6</number>
<property name="topMargin" >
<number>4</number>
</property>
<property name="rightMargin" >
<number>4</number>
</property>
<property name="bottomMargin" >
<number>4</number>
</property>
<property name="horizontalSpacing" >
<number>-1</number>
</property>
<property name="verticalSpacing" >
<number>-1</number>
</property>
<item row="1" column="0" >
<widget class="QLineEdit" name="mLowerEdit" />
</item>
<item row="0" column="0" >
<widget class="QLabel" name="mLowerLabel" >
<property name="text" >
Expand All @@ -46,11 +55,24 @@
<property name="sizeHint" >
<size>
<width>16</width>
<height>21</height>
<height>49</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="2" >
<widget class="QLabel" name="mUpperLabel" >
<property name="text" >
<string>Upper value</string>
</property>
<property name="buddy" >
<cstring>mUpperEdit</cstring>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QLineEdit" name="mLowerEdit" />
</item>
<item row="1" column="1" >
<widget class="QLabel" name="mBetweenLabel" >
<property name="text" >
Expand All @@ -65,74 +87,48 @@
<widget class="QLineEdit" name="mUpperEdit" />
</item>
<item row="2" column="0" colspan="3" >
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" >
<size>
<width>100</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="mOkButton" >
<property name="text" >
<string>OK</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="mCancelButton" >
<property name="text" >
<string>Cancel</string>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" >
<size>
<width>31</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="0" column="2" >
<widget class="QLabel" name="mUpperLabel" >
<property name="text" >
<string>Upper value</string>
</property>
<property name="buddy" >
<cstring>mUpperEdit</cstring>
<widget class="QDialogButtonBox" name="buttonBox" >
<property name="standardButtons" >
<set>QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
</layout>
</widget>
<layoutdefault spacing="6" margin="11" />
<resources/>
<connections/>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>QgsLUDialogBase</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel" >
<x>285</x>
<y>120</y>
</hint>
<hint type="destinationlabel" >
<x>321</x>
<y>35</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>QgsLUDialogBase</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel" >
<x>209</x>
<y>116</y>
</hint>
<hint type="destinationlabel" >
<x>151</x>
<y>7</y>
</hint>
</hints>
</connection>
</connections>
</ui>

0 comments on commit 949f516

Please sign in to comment.