[Kst] branches/work/kst/portto4/kst/src
Adam Treat
treat at kde.org
Thu Sep 27 18:16:00 CEST 2007
SVN commit 717802 by treat:
* Make ascii config look better and give a good name to the
dialog.
M +140 -248 datasources/ascii/asciiconfig.ui
M +2 -0 libkstapp/datasourcedialog.cpp
--- branches/work/kst/portto4/kst/src/datasources/ascii/asciiconfig.ui #717801:717802
@@ -6,25 +6,25 @@
<x>0</x>
<y>0</y>
<width>338</width>
- <height>282</height>
+ <height>317</height>
</rect>
</property>
<layout class="QVBoxLayout" >
- <property name="margin" >
- <number>9</number>
+ <property name="leftMargin" >
+ <number>0</number>
</property>
- <property name="spacing" >
- <number>6</number>
+ <property name="topMargin" >
+ <number>0</number>
</property>
+ <property name="rightMargin" >
+ <number>0</number>
+ </property>
+ <property name="bottomMargin" >
+ <number>0</number>
+ </property>
<item>
- <layout class="QHBoxLayout" >
- <property name="margin" >
- <number>0</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
+ <layout class="QGridLayout" >
+ <item row="0" column="0" >
<widget class="QLabel" name="textLabel1" >
<property name="text" >
<string>Comment indicators:</string>
@@ -37,135 +37,117 @@
</property>
</widget>
</item>
- <item>
+ <item row="0" column="1" >
<widget class="QLineEdit" name="_delimiters" />
</item>
- </layout>
- </item>
- <item>
- <layout class="QHBoxLayout" >
- <property name="margin" >
- <number>0</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
- <widget class="QLabel" name="_indexVectorLabel" >
+ <item row="1" column="0" >
+ <widget class="QLabel" name="textLabel1_2" >
<property name="text" >
- <string>Interpret:</string>
+ <string>Always accept files matching:</string>
</property>
<property name="wordWrap" >
<bool>false</bool>
</property>
- <property name="buddy" >
- <cstring>_indexVector</cstring>
- </property>
</widget>
</item>
- <item>
- <widget class="QComboBox" name="_indexVector" >
- <property name="sizePolicy" >
- <sizepolicy>
- <hsizetype>1</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>1</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- </widget>
+ <item row="1" column="1" >
+ <widget class="QLineEdit" name="_fileNamePattern" />
</item>
- <item>
- <widget class="QLabel" name="_indexTypeLabel" >
- <property name="text" >
- <string>As:</string>
- </property>
- <property name="wordWrap" >
- <bool>false</bool>
- </property>
- <property name="buddy" >
- <cstring>_indexType</cstring>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QComboBox" name="_indexType" >
- <property name="sizePolicy" >
- <sizepolicy>
- <hsizetype>1</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>1</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
+ <item row="2" column="0" >
+ <layout class="QHBoxLayout" >
<item>
- <property name="text" >
- <string>INDEX</string>
- </property>
+ <widget class="QLabel" name="_indexVectorLabel" >
+ <property name="text" >
+ <string>Interpret:</string>
+ </property>
+ <property name="wordWrap" >
+ <bool>false</bool>
+ </property>
+ <property name="buddy" >
+ <cstring>_indexVector</cstring>
+ </property>
+ </widget>
</item>
<item>
- <property name="text" >
- <string>C Time</string>
- </property>
+ <widget class="QComboBox" name="_indexVector" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Fixed" hsizetype="Minimum" >
+ <horstretch>1</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
</item>
+ </layout>
+ </item>
+ <item row="2" column="1" >
+ <layout class="QHBoxLayout" >
<item>
- <property name="text" >
- <string>Seconds</string>
- </property>
+ <widget class="QLabel" name="_indexTypeLabel" >
+ <property name="text" >
+ <string>As:</string>
+ </property>
+ <property name="wordWrap" >
+ <bool>false</bool>
+ </property>
+ <property name="buddy" >
+ <cstring>_indexType</cstring>
+ </property>
+ </widget>
</item>
- </widget>
+ <item>
+ <widget class="QComboBox" name="_indexType" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Fixed" hsizetype="Minimum" >
+ <horstretch>1</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <item>
+ <property name="text" >
+ <string>INDEX</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>C Time</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>Seconds</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ </layout>
</item>
</layout>
</item>
<item>
- <layout class="QHBoxLayout" >
- <property name="margin" >
- <number>0</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
- <widget class="QLabel" name="textLabel1_2" >
- <property name="text" >
- <string>Always accept files matching:</string>
- </property>
- <property name="wordWrap" >
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLineEdit" name="_fileNamePattern" />
- </item>
- </layout>
- </item>
- <item>
<widget class="QGroupBox" name="buttonGroup2" >
<property name="title" >
<string>Header</string>
</property>
- <layout class="QVBoxLayout" >
- <property name="margin" >
+ <layout class="QHBoxLayout" >
+ <property name="leftMargin" >
<number>0</number>
</property>
- <property name="spacing" >
+ <property name="topMargin" >
<number>0</number>
</property>
+ <property name="rightMargin" >
+ <number>0</number>
+ </property>
+ <property name="bottomMargin" >
+ <number>0</number>
+ </property>
<item>
- <layout class="QHBoxLayout" >
- <property name="margin" >
- <number>0</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
+ <layout class="QGridLayout" >
+ <item row="0" column="0" >
<widget class="QLabel" name="textLabel1_3" >
<property name="sizePolicy" >
- <sizepolicy>
- <hsizetype>5</hsizetype>
- <vsizetype>5</vsizetype>
+ <sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
<horstretch>3</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@@ -181,28 +163,10 @@
</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>81</width>
- <height>21</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
+ <item row="0" column="1" >
<widget class="QSpinBox" name="_startLine" >
<property name="sizePolicy" >
- <sizepolicy>
- <hsizetype>1</hsizetype>
- <vsizetype>0</vsizetype>
+ <sizepolicy vsizetype="Fixed" hsizetype="Minimum" >
<horstretch>2</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@@ -212,48 +176,20 @@
</property>
</widget>
</item>
- </layout>
- </item>
- <item>
- <layout class="QHBoxLayout" >
- <property name="margin" >
- <number>0</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
+ <item row="1" column="0" >
<widget class="QCheckBox" name="_readFields" >
<property name="text" >
<string>Read field names from line:</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>81</width>
- <height>21</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
+ <item row="1" column="1" >
<widget class="QSpinBox" name="_fieldsLine" >
<property name="enabled" >
<bool>false</bool>
</property>
<property name="sizePolicy" >
- <sizepolicy>
- <hsizetype>1</hsizetype>
- <vsizetype>0</vsizetype>
+ <sizepolicy vsizetype="Fixed" hsizetype="Minimum" >
<horstretch>2</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@@ -263,26 +199,24 @@
</property>
</widget>
</item>
+ <item row="2" column="0" colspan="2" >
+ <widget class="QLabel" name="textLabel1_9" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
+ <horstretch>3</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text" >
+ <string>Note: Line numbers start at 0.</string>
+ </property>
+ <property name="wordWrap" >
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
</layout>
</item>
- <item>
- <widget class="QLabel" name="textLabel1_9" >
- <property name="sizePolicy" >
- <sizepolicy>
- <hsizetype>5</hsizetype>
- <vsizetype>5</vsizetype>
- <horstretch>3</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text" >
- <string>Note: Line numbers start at 0.</string>
- </property>
- <property name="wordWrap" >
- <bool>false</bool>
- </property>
- </widget>
- </item>
</layout>
</widget>
</item>
@@ -291,55 +225,39 @@
<property name="title" >
<string>Data Format</string>
</property>
- <layout class="QVBoxLayout" >
- <property name="margin" >
+ <layout class="QHBoxLayout" >
+ <property name="leftMargin" >
<number>0</number>
</property>
- <property name="spacing" >
+ <property name="topMargin" >
<number>0</number>
</property>
+ <property name="rightMargin" >
+ <number>0</number>
+ </property>
+ <property name="bottomMargin" >
+ <number>0</number>
+ </property>
<item>
- <widget class="QRadioButton" name="_whitespace" >
- <property name="text" >
- <string>Whitespace delimited</string>
- </property>
- <property name="checked" >
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <layout class="QHBoxLayout" >
- <property name="margin" >
- <number>0</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
+ <layout class="QGridLayout" >
+ <item row="0" column="0" colspan="2" >
+ <widget class="QRadioButton" name="_whitespace" >
+ <property name="text" >
+ <string>Whitespace delimited</string>
+ </property>
+ <property name="checked" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0" >
<widget class="QRadioButton" name="_fixed" >
<property name="text" >
<string>Fixed width columns</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>21</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
+ <item row="1" column="1" >
<widget class="QSpinBox" name="_columnWidth" >
<property name="enabled" >
<bool>false</bool>
@@ -355,40 +273,14 @@
</property>
</widget>
</item>
- </layout>
- </item>
- <item>
- <layout class="QHBoxLayout" >
- <property name="margin" >
- <number>0</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
+ <item row="2" column="0" >
<widget class="QRadioButton" name="_custom" >
<property name="text" >
<string>Custom delimiter</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>21</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
+ <item row="2" column="1" >
<widget class="QLineEdit" name="_columnDelimiter" >
<property name="enabled" >
<bool>false</bool>
@@ -410,8 +302,8 @@
</property>
<property name="sizeHint" >
<size>
- <width>320</width>
- <height>20</height>
+ <width>338</width>
+ <height>16</height>
</size>
</property>
</spacer>
--- branches/work/kst/portto4/kst/src/libkstapp/datasourcedialog.cpp #717801:717802
@@ -20,6 +20,8 @@
DataSourceDialog::DataSourceDialog(DataDialog::EditMode mode, KstDataSourcePtr dataSource, QWidget *parent)
: QDialog(parent), _dataSource(dataSource) {
+ setWindowTitle(QString("Configure %1").arg(_dataSource->fileType()));
+
QVBoxLayout *layout = new QVBoxLayout(this);
_dataSource->readLock();
More information about the Kst
mailing list