[Kst] branches/work/kst/portto4/kst/src
Barth Netterfield
netterfield at astro.utoronto.ca
Tue Nov 18 02:50:34 CET 2008
SVN commit 885882 by netterfield:
More improvements to the data wizard.
Improvements to the vector dialog.
M +0 -3 libkstapp/datawizardpagedatapresentation.ui
M +33 -12 libkstapp/vectordialog.cpp
M +2 -1 libkstapp/vectordialog.h
M +116 -161 libkstapp/vectortab.ui
M +26 -8 widgets/datarange.ui
--- branches/work/kst/portto4/kst/src/libkstapp/datawizardpagedatapresentation.ui #885881:885882
@@ -25,9 +25,6 @@
<bool>true</bool>
</property>
<layout class="QGridLayout" >
- <property name="margin" >
- <number>0</number>
- </property>
<item row="0" column="0" >
<widget class="QRadioButton" name="_xAxisCreateFromField" >
<property name="sizePolicy" >
--- branches/work/kst/portto4/kst/src/libkstapp/vectordialog.cpp #885881:885882
@@ -34,7 +34,8 @@
setupUi(this);
setTabTitle(tr("Vector"));
- connect(_readFromSource, SIGNAL(toggled(bool)), this, SLOT(readFromSourceChanged()));
+ connect(_generatedVectorGroup, SIGNAL(clicked(bool)), this, SLOT(generateClicked()));
+ connect(_dataVectorGroup, SIGNAL(clicked(bool)), this, SLOT(readFromSourceClicked()));
connect(_fileName, SIGNAL(changed(const QString &)), this, SLOT(fileNameChanged(const QString &)));
connect(_configure, SIGNAL(clicked()), this, SLOT(showConfigWidget()));
@@ -44,6 +45,13 @@
connect(_to, SIGNAL(textChanged(const QString&)), this, SIGNAL(modified()));
_fileName->setFile(QDir::currentPath());
+ // embed data range in the data source box
+ _dataRange->groupBox2->setFlat(true);
+ _dataRange->groupBox2->setTitle("");
+ int top_margin;
+ _dataRange->groupBox2->layout()->getContentsMargins(NULL,&top_margin,NULL,NULL);
+ _dataRange->groupBox2->layout()->setContentsMargins(0,top_margin,0,0);
+
_connect->setVisible(false);
}
@@ -64,8 +72,9 @@
void VectorTab::setVectorMode(VectorMode mode) {
_mode = mode;
- _readFromSource->setChecked(mode == DataVector);
- _generateX->setChecked(mode == GeneratedVector);
+ _dataVectorGroup->setChecked(mode == DataVector);
+ _dataRange->setEnabled(mode == DataVector);
+ _generatedVectorGroup->setChecked(mode == GeneratedVector);
}
@@ -145,32 +154,44 @@
_numberOfSamples->setValue(numberOfSamples);
}
+void VectorTab::generateClicked() {
+ if (_generatedVectorGroup->isChecked())
+ setVectorMode(GeneratedVector);
+ else
+ setVectorMode(DataVector);
-void VectorTab::readFromSourceChanged() {
+ emit sourceChanged();
+}
- if (_readFromSource->isChecked())
+void VectorTab::readFromSourceClicked() {
+ if (_dataVectorGroup->isChecked())
setVectorMode(DataVector);
else
setVectorMode(GeneratedVector);
- _dataVectorGroup->setEnabled(_readFromSource->isChecked());
- _dataRange->setEnabled(_readFromSource->isChecked());
- _generatedVectorGroup->setEnabled(!_readFromSource->isChecked());
-
emit sourceChanged();
}
-
void VectorTab::hideGeneratedOptions() {
- _sourceGroup->setVisible(false);
_generatedVectorGroup->setVisible(false);
+ _dataVectorGroup->setCheckable(false);
+ _dataVectorGroup->setTitle("");
+ _dataVectorGroup->setFlat(true);
+ int top_margin;
+ _dataVectorGroup->layout()->getContentsMargins(NULL,&top_margin,NULL,NULL);
+ _dataVectorGroup->layout()->setContentsMargins(0,top_margin,0,0);
}
void VectorTab::hideDataOptions() {
- _sourceGroup->setVisible(false);
_dataVectorGroup->setVisible(false);
_dataRange->setVisible(false);
+ _generatedVectorGroup->setCheckable(false);
+ _generatedVectorGroup->setTitle("");
+ _generatedVectorGroup->setFlat(true);
+ int top_margin;
+ _generatedVectorGroup->layout()->getContentsMargins(NULL,&top_margin,NULL,NULL);
+ _generatedVectorGroup->layout()->setContentsMargins(0,top_margin,0,0);
}
--- branches/work/kst/portto4/kst/src/libkstapp/vectordialog.h #885881:885882
@@ -75,7 +75,8 @@
void sourceChanged();
private Q_SLOTS:
- void readFromSourceChanged();
+ void readFromSourceClicked();
+ void generateClicked();
void fileNameChanged(const QString &file);
void showConfigWidget();
--- branches/work/kst/portto4/kst/src/libkstapp/vectortab.ui #885881:885882
@@ -5,64 +5,13 @@
<rect>
<x>0</x>
<y>0</y>
- <width>599</width>
- <height>441</height>
+ <width>745</width>
+ <height>420</height>
</rect>
</property>
- <layout class="QGridLayout" name="gridLayout_2" >
- <item row="0" column="0" >
- <widget class="QGroupBox" name="_sourceGroup" >
- <property name="title" >
- <string>Source</string>
- </property>
- <layout class="QHBoxLayout" >
- <item>
- <widget class="QRadioButton" name="_readFromSource" >
- <property name="text" >
- <string>Read from data source</string>
- </property>
- <property name="checked" >
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QRadioButton" name="_generateX" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="whatsThis" >
- <string>Generate a new vector with the properties given here as the independent variable.</string>
- </property>
- <property name="text" >
- <string>&Generate</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" stdset="0" >
- <size>
- <width>100</width>
- <height>0</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </widget>
- </item>
- <item row="1" column="0" >
- <widget class="QGroupBox" name="_dataVectorGroup" >
+ <layout class="QVBoxLayout" name="verticalLayout" >
+ <item>
+ <widget class="QGroupBox" name="_generatedVectorGroup" >
<property name="sizePolicy" >
<sizepolicy vsizetype="MinimumExpanding" hsizetype="Preferred" >
<horstretch>0</horstretch>
@@ -70,115 +19,14 @@
</sizepolicy>
</property>
<property name="title" >
- <string>Data Source Parameters</string>
+ <string>Generate</string>
</property>
- <layout class="QGridLayout" name="gridLayout" >
- <item row="0" column="0" >
- <widget class="QLabel" name="label_4" >
- <property name="text" >
- <string>File name:</string>
- </property>
- <property name="alignment" >
- <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
- </property>
- <property name="wordWrap" >
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item row="0" column="1" >
- <widget class="Kst::FileRequester" native="1" name="_fileName" />
- </item>
- <item row="1" column="0" >
- <widget class="QLabel" name="label_5" >
- <property name="text" >
- <string>Field or column:</string>
- </property>
- <property name="alignment" >
- <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
- </property>
- <property name="wordWrap" >
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item row="1" column="1" >
- <widget class="Kst::ComboBox" name="_field" >
- <property name="enabled" >
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item row="2" column="0" colspan="2" >
- <layout class="QHBoxLayout" >
- <property name="margin" >
- <number>0</number>
- </property>
- <item>
- <spacer>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeType" >
- <enum>QSizePolicy::Expanding</enum>
- </property>
- <property name="sizeHint" stdset="0" >
- <size>
- <width>21</width>
- <height>0</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QPushButton" name="_connect" >
- <property name="enabled" >
- <bool>false</bool>
- </property>
- <property name="text" >
- <string>Conn&ect</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="_configure" >
- <property name="enabled" >
- <bool>false</bool>
- </property>
- <property name="text" >
- <string>Con&figure...</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </widget>
- </item>
- <item row="2" column="0" >
- <widget class="Kst::DataRange" native="1" name="_dataRange" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="MinimumExpanding" hsizetype="Preferred" >
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
+ <property name="checkable" >
+ <bool>true</bool>
</property>
- </widget>
- </item>
- <item row="3" column="0" >
- <widget class="QGroupBox" name="_generatedVectorGroup" >
- <property name="enabled" >
+ <property name="checked" >
<bool>false</bool>
</property>
- <property name="sizePolicy" >
- <sizepolicy vsizetype="MinimumExpanding" hsizetype="Preferred" >
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="title" >
- <string>Generate Vector</string>
- </property>
<layout class="QGridLayout" >
<item row="0" column="0" >
<widget class="QLabel" name="label_2" >
@@ -283,6 +131,113 @@
</layout>
</widget>
</item>
+ <item>
+ <widget class="QGroupBox" name="_dataVectorGroup" >
+ <property name="title" >
+ <string>Read From Data Source</string>
+ </property>
+ <property name="checkable" >
+ <bool>true</bool>
+ </property>
+ <layout class="QGridLayout" name="gridLayout" >
+ <item row="0" column="0" >
+ <widget class="QLabel" name="label_4" >
+ <property name="text" >
+ <string>File name:</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ <property name="wordWrap" >
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1" >
+ <widget class="Kst::FileRequester" native="1" name="_fileName" />
+ </item>
+ <item row="1" column="0" >
+ <widget class="QLabel" name="label_5" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Preferred" hsizetype="Fixed" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text" >
+ <string>Field or column:</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ <property name="wordWrap" >
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1" >
+ <widget class="Kst::ComboBox" name="_field" >
+ <property name="enabled" >
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0" colspan="2" >
+ <layout class="QHBoxLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType" >
+ <enum>QSizePolicy::Expanding</enum>
+ </property>
+ <property name="sizeHint" stdset="0" >
+ <size>
+ <width>21</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="_connect" >
+ <property name="enabled" >
+ <bool>false</bool>
+ </property>
+ <property name="text" >
+ <string>Conn&ect</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="_configure" >
+ <property name="enabled" >
+ <bool>false</bool>
+ </property>
+ <property name="text" >
+ <string>Con&figure...</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="3" column="0" colspan="2" >
+ <widget class="Kst::DataRange" native="1" name="_dataRange" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Expanding" hsizetype="Preferred" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
</layout>
</widget>
<layoutdefault spacing="6" margin="11" />
--- branches/work/kst/portto4/kst/src/widgets/datarange.ui #885881:885882
@@ -27,13 +27,7 @@
<property name="title" >
<string>Data Range</string>
</property>
- <layout class="QGridLayout" >
- <property name="topMargin" >
- <number>0</number>
- </property>
- <property name="verticalSpacing" >
- <number>0</number>
- </property>
+ <layout class="QGridLayout" name="_2" >
<item row="2" column="5" >
<widget class="QCheckBox" name="_doFilter" >
<property name="enabled" >
@@ -55,6 +49,12 @@
</item>
<item row="2" column="0" colspan="2" >
<widget class="QCheckBox" name="_doSkip" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Fixed" hsizetype="Minimum" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="toolTip" >
<string>Save memory by sparsely sampling the data</string>
</property>
@@ -87,6 +87,12 @@
</item>
<item row="0" column="4" >
<widget class="QLabel" name="label_3" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Preferred" hsizetype="Fixed" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="text" >
<string>Or</string>
</property>
@@ -97,6 +103,12 @@
</item>
<item row="1" column="4" >
<widget class="QLabel" name="label_2" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Preferred" hsizetype="Fixed" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="text" >
<string>Or</string>
</property>
@@ -136,6 +148,12 @@
</item>
<item row="0" column="0" >
<widget class="QLabel" name="label_4" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Preferred" hsizetype="Minimum" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="text" >
<string>Start:</string>
</property>
@@ -150,7 +168,7 @@
<item row="1" column="0" >
<widget class="QLabel" name="label" >
<property name="sizePolicy" >
- <sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
+ <sizepolicy vsizetype="Preferred" hsizetype="Fixed" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
More information about the Kst
mailing list