Redesign CSV import dialog.

This fixes groupbox alignment and dialog resize issues.

Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Sergey Starosek 2013-11-29 15:40:07 +02:00 committed by Dirk Hohndel
parent 0f7037a92f
commit f24748253c

View file

@ -6,240 +6,250 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>400</width> <width>432</width>
<height>300</height> <height>330</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>Import CSV file</string> <string>Import CSV file</string>
</property> </property>
<widget class="QDialogButtonBox" name="buttonBox"> <layout class="QVBoxLayout" name="verticalLayout">
<property name="geometry"> <item>
<rect> <widget class="QGroupBox" name="groupBox">
<x>200</x> <property name="sizePolicy">
<y>240</y> <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<width>171</width> <horstretch>0</horstretch>
<height>32</height> <verstretch>0</verstretch>
</rect> </sizepolicy>
</property> </property>
<property name="orientation"> <property name="title">
<enum>Qt::Horizontal</enum> <string>Import File (CSV)</string>
</property> </property>
<property name="standardButtons"> <layout class="QHBoxLayout" name="horizontalLayout">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> <item>
</property> <widget class="QLineEdit" name="CSVFile"/>
</widget> </item>
<widget class="QGroupBox" name="groupBox"> <item>
<property name="geometry"> <widget class="QToolButton" name="CSVFileSelector">
<rect> <property name="text">
<x>20</x> <string>...</string>
<y>10</y> </property>
<width>351</width> </widget>
<height>71</height> </item>
</rect> </layout>
</property> </widget>
<property name="title"> </item>
<string>Import File (CSV)</string> <item>
</property> <widget class="QWidget" name="horizontalWidget" native="true">
<widget class="QLineEdit" name="CSVFile"> <layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="geometry"> <property name="spacing">
<rect>
<x>0</x>
<y>30</y>
<width>291</width>
<height>29</height>
</rect>
</property>
</widget>
<widget class="QToolButton" name="CSVFileSelector">
<property name="geometry">
<rect>
<x>300</x>
<y>30</y>
<width>25</width>
<height>27</height>
</rect>
</property>
<property name="text">
<string>...</string>
</property>
</widget>
</widget>
<widget class="QGroupBox" name="groupBox_2">
<property name="geometry">
<rect>
<x>200</x>
<y>80</y>
<width>121</width>
<height>61</height>
</rect>
</property>
<property name="title">
<string>Field Separator</string>
</property>
<widget class="QComboBox" name="CSVSeparator">
<property name="geometry">
<rect>
<x>0</x>
<y>30</y>
<width>111</width>
<height>29</height>
</rect>
</property>
</widget>
</widget>
<widget class="QGroupBox" name="groupBox_3">
<property name="geometry">
<rect>
<x>20</x>
<y>80</y>
<width>171</width>
<height>221</height>
</rect>
</property>
<property name="title">
<string>Field Configuration</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="1">
<widget class="QSpinBox" name="CSVTime">
<property name="minimum">
<number>0</number> <number>0</number>
</property> </property>
<property name="value"> <property name="margin">
<number>0</number> <number>0</number>
</property> </property>
</widget> <item>
</item> <widget class="QGroupBox" name="groupBox_3">
<item row="0" column="0"> <property name="sizePolicy">
<widget class="QLabel" name="label"> <sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<property name="text"> <horstretch>0</horstretch>
<string>Time</string> <verstretch>0</verstretch>
</property> </sizepolicy>
</widget> </property>
</item> <property name="title">
<item row="1" column="1"> <string>Field Configuration</string>
<widget class="QSpinBox" name="CSVDepth"> </property>
<property name="minimum"> <layout class="QGridLayout" name="gridLayout">
<number>0</number> <item row="0" column="1">
</property> <widget class="QSpinBox" name="CSVTime">
<property name="value"> <property name="minimum">
<number>1</number> <number>0</number>
</property> </property>
</widget> <property name="value">
</item> <number>0</number>
<item row="1" column="0"> </property>
<widget class="QLabel" name="label_2"> </widget>
<property name="text"> </item>
<string>Depth</string> <item row="0" column="0">
</property> <widget class="QLabel" name="label">
</widget> <property name="text">
</item> <string>Time</string>
<item row="2" column="1"> </property>
<widget class="QSpinBox" name="CSVTemperature"> </widget>
<property name="enabled"> </item>
<bool>false</bool> <item row="1" column="1">
</property> <widget class="QSpinBox" name="CSVDepth">
</widget> <property name="minimum">
</item> <number>0</number>
<item row="2" column="0"> </property>
<widget class="QCheckBox" name="temperatureCheckBox"> <property name="value">
<property name="text"> <number>1</number>
<string>Temp</string> </property>
</property> </widget>
</widget> </item>
</item> <item row="1" column="0">
<item row="3" column="1"> <widget class="QLabel" name="label_2">
<widget class="QSpinBox" name="CSVpo2"> <property name="text">
<property name="enabled"> <string>Depth</string>
<bool>false</bool> </property>
</property> </widget>
<property name="value"> </item>
<number>0</number> <item row="2" column="1">
</property> <widget class="QSpinBox" name="CSVTemperature">
</widget> <property name="enabled">
</item> <bool>false</bool>
<item row="3" column="0"> </property>
<widget class="QCheckBox" name="po2CheckBox"> </widget>
<property name="text"> </item>
<string>Po2</string> <item row="2" column="0">
</property> <widget class="QCheckBox" name="temperatureCheckBox">
</widget> <property name="text">
</item> <string>Temp</string>
<item row="4" column="1"> </property>
<widget class="QSpinBox" name="CSVcns"> </widget>
<property name="enabled"> </item>
<bool>false</bool> <item row="3" column="1">
</property> <widget class="QSpinBox" name="CSVpo2">
<property name="value"> <property name="enabled">
<number>0</number> <bool>false</bool>
</property> </property>
</widget> <property name="value">
</item> <number>0</number>
<item row="4" column="0"> </property>
<widget class="QCheckBox" name="cnsCheckBox"> </widget>
<property name="text"> </item>
<string>Cns</string> <item row="3" column="0">
</property> <widget class="QCheckBox" name="po2CheckBox">
</widget> <property name="text">
</item> <string>Po2</string>
<item row="5" column="1"> </property>
<widget class="QSpinBox" name="CSVstopdepth"> </widget>
<property name="enabled"> </item>
<bool>false</bool> <item row="4" column="1">
</property> <widget class="QSpinBox" name="CSVcns">
<property name="value"> <property name="enabled">
<number>0</number> <bool>false</bool>
</property> </property>
</widget> <property name="value">
</item> <number>0</number>
<item row="5" column="0"> </property>
<widget class="QCheckBox" name="stopdepthCheckBox"> </widget>
<property name="text"> </item>
<string>Stopdepth</string> <item row="4" column="0">
</property> <widget class="QCheckBox" name="cnsCheckBox">
</widget> <property name="text">
</item> <string>Cns</string>
</layout> </property>
<zorder>label</zorder> </widget>
<zorder>label_2</zorder> </item>
<zorder>CSVTime</zorder> <item row="5" column="1">
<zorder>CSVDepth</zorder> <widget class="QSpinBox" name="CSVstopdepth">
<zorder>temperatureCheckBox</zorder> <property name="enabled">
<zorder>CSVTemperature</zorder> <bool>false</bool>
<zorder>po2CheckBox</zorder> </property>
<zorder>CSVpo2</zorder> <property name="value">
<zorder>cnsCheckBox</zorder> <number>0</number>
<zorder>CSVcns</zorder> </property>
<zorder>stopdepthCheckBox</zorder> </widget>
<zorder>CSVstopdepth</zorder> </item>
</widget> <item row="5" column="0">
<widget class="QGroupBox" name="groupBox_4"> <widget class="QCheckBox" name="stopdepthCheckBox">
<property name="geometry"> <property name="text">
<rect> <string>Stopdepth</string>
<x>200</x> </property>
<y>159</y> </widget>
<width>181</width> </item>
<height>61</height> </layout>
</rect> <zorder>label</zorder>
</property> <zorder>label_2</zorder>
<property name="title"> <zorder>CSVTime</zorder>
<string>Pre-configured imports</string> <zorder>CSVDepth</zorder>
</property> <zorder>temperatureCheckBox</zorder>
<widget class="QComboBox" name="knownImports"> <zorder>CSVTemperature</zorder>
<property name="geometry"> <zorder>po2CheckBox</zorder>
<rect> <zorder>CSVpo2</zorder>
<x>0</x> <zorder>cnsCheckBox</zorder>
<y>30</y> <zorder>CSVcns</zorder>
<width>161</width> <zorder>stopdepthCheckBox</zorder>
<height>29</height> <zorder>CSVstopdepth</zorder>
</rect> </widget>
</property> </item>
<property name="currentIndex"> <item>
<number>-1</number> <widget class="QWidget" name="verticalWidget" native="true">
</property> <layout class="QVBoxLayout" name="verticalLayout_2">
</widget> <property name="topMargin">
</widget> <number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>Field Separator</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QComboBox" name="CSVSeparator"/>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_4">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Pre-configured imports</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QComboBox" name="knownImports">
<property name="currentIndex">
<number>-1</number>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget> </widget>
<resources/> <resources/>
<connections> <connections>
@ -250,12 +260,12 @@
<slot>accept()</slot> <slot>accept()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
<x>248</x> <x>310</x>
<y>254</y> <y>286</y>
</hint> </hint>
<hint type="destinationlabel"> <hint type="destinationlabel">
<x>157</x> <x>215</x>
<y>274</y> <y>164</y>
</hint> </hint>
</hints> </hints>
</connection> </connection>
@ -266,12 +276,12 @@
<slot>reject()</slot> <slot>reject()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
<x>316</x> <x>310</x>
<y>260</y> <y>286</y>
</hint> </hint>
<hint type="destinationlabel"> <hint type="destinationlabel">
<x>286</x> <x>215</x>
<y>274</y> <y>164</y>
</hint> </hint>
</hints> </hints>
</connection> </connection>
@ -280,24 +290,64 @@
<signal>clicked(bool)</signal> <signal>clicked(bool)</signal>
<receiver>CSVTemperature</receiver> <receiver>CSVTemperature</receiver>
<slot>setEnabled(bool)</slot> <slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>77</x>
<y>191</y>
</hint>
<hint type="destinationlabel">
<x>161</x>
<y>191</y>
</hint>
</hints>
</connection> </connection>
<connection> <connection>
<sender>po2CheckBox</sender> <sender>po2CheckBox</sender>
<signal>clicked(bool)</signal> <signal>clicked(bool)</signal>
<receiver>CSVpo2</receiver> <receiver>CSVpo2</receiver>
<slot>setEnabled(bool)</slot> <slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>77</x>
<y>223</y>
</hint>
<hint type="destinationlabel">
<x>161</x>
<y>223</y>
</hint>
</hints>
</connection> </connection>
<connection> <connection>
<sender>cnsCheckBox</sender> <sender>cnsCheckBox</sender>
<signal>clicked(bool)</signal> <signal>clicked(bool)</signal>
<receiver>CSVcns</receiver> <receiver>CSVcns</receiver>
<slot>setEnabled(bool)</slot> <slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>77</x>
<y>255</y>
</hint>
<hint type="destinationlabel">
<x>161</x>
<y>255</y>
</hint>
</hints>
</connection> </connection>
<connection> <connection>
<sender>stopdepthCheckBox</sender> <sender>stopdepthCheckBox</sender>
<signal>clicked(bool)</signal> <signal>clicked(bool)</signal>
<receiver>CSVstopdepth</receiver> <receiver>CSVstopdepth</receiver>
<slot>setEnabled(bool)</slot> <slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>77</x>
<y>287</y>
</hint>
<hint type="destinationlabel">
<x>161</x>
<y>287</y>
</hint>
</hints>
</connection> </connection>
</connections> </connections>
</ui> </ui>