361 changes: 205 additions & 156 deletions src/widgets/curveplacement.ui
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>420</width>
<height>214</height>
<width>368</width>
<height>177</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_2">
Expand All @@ -22,175 +22,225 @@
<property name="title">
<string>Placement</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<property name="topMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<property name="spacing">
<number>0</number>
</property>
<item row="3" column="0">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>28</width>
<height>20</height>
</size>
</property>
</spacer>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="2" column="2">
<widget class="QCheckBox" name="_scaleFonts">
<property name="text">
<string>Scale fonts</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QRadioButton" name="_newPlot">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Place in &amp;new plot</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="_newTab">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>In ne&amp;w tab</string>
</property>
</widget>
</item>
<item row="1" column="1" colspan="2">
<widget class="QComboBox" name="_plotList">
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="whatsThis">
<string>The name of the data file which will be read for this vector.</string>
</property>
<property name="editable">
<bool>true</bool>
</property>
<property name="insertPolicy">
<enum>QComboBox::InsertAtTop</enum>
</property>
<property name="sizeAdjustPolicy">
<enum>QComboBox::AdjustToMinimumContentsLength</enum>
</property>
<property name="autoCompletion">
<bool>true</bool>
</property>
<property name="duplicatesEnabled">
<bool>false</bool>
</property>
<property name="si" stdset="0">
<string>place In Existing Plot</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QRadioButton" name="_existingPlot">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Place in &amp;existing plot </string>
</property>
</widget>
</item>
<item row="0" column="0" colspan="3">
<widget class="QRadioButton" name="_noPlot">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Do not pl&amp;ace in any plot</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="0" column="0" colspan="4">
<widget class="QRadioButton" name="_noPlot">
<property name="text">
<string>Do not pl&amp;ace in any plot</string>
</property>
</widget>
</item>
<item row="1" column="0" colspan="2">
<widget class="QRadioButton" name="_existingPlot">
<property name="text">
<string>Place in &amp;existing plot:</string>
</property>
</widget>
</item>
<item row="1" column="2" colspan="2">
<widget class="QComboBox" name="_plotList">
<property name="enabled">
<bool>false</bool>
</property>
<property name="whatsThis">
<string>The name of the data file which will be read for this vector.</string>
</property>
<property name="editable">
<bool>true</bool>
</property>
<property name="insertPolicy">
<enum>QComboBox::InsertAtTop</enum>
</property>
<property name="autoCompletion">
<bool>true</bool>
</property>
<property name="duplicatesEnabled">
<bool>false</bool>
</property>
<property name="si" stdset="0">
<string>place In Existing Plot</string>
</property>
</widget>
</item>
<item row="2" column="0" colspan="2">
<widget class="QRadioButton" name="_newPlot">
<property name="text">
<string>Place in &amp;new plot</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="1" colspan="3">
<widget class="QGroupBox" name="_layoutGroup">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string/>
</property>
<property name="flat">
<bool>true</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>0</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QRadioButton" name="_autoLayout">
<property name="text">
<string>Automati&amp;c layout</string>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QGroupBox" name="_layoutGroup">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string/>
</property>
<property name="flat">
<bool>true</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>0</number>
</property>
<property name="checked">
<bool>true</bool>
<property name="margin">
<number>0</number>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout">
<item>
<widget class="QRadioButton" name="_customGrid">
<widget class="QRadioButton" name="_autoLayout">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Custom &amp;grid:</string>
<string>Automati&amp;c layout</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="_gridColumns">
<property name="enabled">
<bool>false</bool>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>10</number>
</property>
</widget>
<layout class="QHBoxLayout">
<item>
<widget class="QRadioButton" name="_customGrid">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Custom &amp;grid</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="_gridColumns">
<property name="enabled">
<bool>false</bool>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>10</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="_gridColumnsLabel">
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Colu&amp;mns</string>
</property>
<property name="buddy">
<cstring>_gridColumns</cstring>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="_gridColumnsLabel">
<property name="enabled">
<bool>false</bool>
</property>
<widget class="QRadioButton" name="_protectLayout">
<property name="text">
<string>Colu&amp;mns</string>
</property>
<property name="buddy">
<cstring>_gridColumns</cstring>
<string>&amp;Protect existing layout</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QRadioButton" name="_protectLayout">
<property name="text">
<string>&amp;Protect existing layout</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="2" column="2">
<widget class="QCheckBox" name="_newTab">
<property name="text">
<string>In ne&amp;w tab</string>
</property>
</widget>
</item>
<item row="2" column="3">
<widget class="QCheckBox" name="_scaleFonts">
<property name="text">
<string>Scale fonts</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
Expand All @@ -201,7 +251,6 @@
<tabstops>
<tabstop>_noPlot</tabstop>
<tabstop>_existingPlot</tabstop>
<tabstop>_plotList</tabstop>
<tabstop>_newPlot</tabstop>
<tabstop>_newTab</tabstop>
<tabstop>_scaleFonts</tabstop>
Expand Down
10 changes: 1 addition & 9 deletions src/widgets/matrixselector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ void MatrixSelector::fillMatrices() {
MatrixPtr matrix = (*it);

matrix->readLock();
matrices.insert(matrix->sizeLimitedName(_matrix), matrix);
matrices.insert(matrix->CleanedName(), matrix);
matrix->unlock();
}

Expand All @@ -152,14 +152,6 @@ void MatrixSelector::fillMatrices() {
_editMatrix->setEnabled(_matrix->count() > 0);
}


bool MatrixSelector::event(QEvent * event) {
if ((event->type() == QEvent::Resize) || (event->type() == QEvent::WindowActivate)) {
fillMatrices();
}
return QWidget::event(event);
}

}

// vim: ts=2 sw=2 et
1 change: 0 additions & 1 deletion src/widgets/matrixselector.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ class KSTWIDGETS_EXPORT MatrixSelector : public QWidget, public Ui::MatrixSelect

void clearSelection();

virtual bool event(QEvent * event);

Q_SIGNALS:
void selectionChanged();
Expand Down
7 changes: 5 additions & 2 deletions src/widgets/matrixselector.ui
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>277</width>
<height>32</height>
<width>273</width>
<height>28</height>
</rect>
</property>
<property name="whatsThis">
Expand All @@ -22,6 +22,9 @@
</property>
<item>
<widget class="Kst::ComboBox" name="_matrix">
<property name="sizeAdjustPolicy">
<enum>QComboBox::AdjustToMinimumContentsLength</enum>
</property>
<item>
<property name="text">
<string>M</string>
Expand Down
15 changes: 1 addition & 14 deletions src/widgets/scalarselector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,6 @@ void ScalarSelector::fillScalars() {
return;
}

if (_scalar->width()<=_scalar->minimumSizeHint().width()) { // not set up yet...
return;
}

QHash<QString, ScalarPtr> scalars;

ScalarList scalarList = _store->getObjects<Scalar>();
Expand All @@ -230,7 +226,7 @@ void ScalarSelector::fillScalars() {

scalar->readLock();
if (!scalar->hidden()) {
scalars.insert(scalar->sizeLimitedName(_scalar), scalar);
scalars.insert(scalar->CleanedName(), scalar);
}
scalar->unlock();
}
Expand Down Expand Up @@ -274,15 +270,6 @@ void ScalarSelector::updateScalarList() {
}
}

bool ScalarSelector::event(QEvent * event) {
if ((event->type() == QEvent::Resize)) {
fillScalars();
}
return QWidget::event(event);
}



}

// vim: ts=2 sw=2 et
2 changes: 0 additions & 2 deletions src/widgets/scalarselector.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ class KSTWIDGETS_EXPORT ScalarSelector : public QWidget, public Ui::ScalarSelect

void setDefaultValue(double value);

virtual bool event(QEvent * event);

Q_SIGNALS:
void selectionChanged(const QString&);

Expand Down
7 changes: 5 additions & 2 deletions src/widgets/scalarselector.ui
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>234</width>
<height>31</height>
<width>230</width>
<height>27</height>
</rect>
</property>
<property name="whatsThis">
Expand All @@ -22,6 +22,9 @@
<property name="editable">
<bool>true</bool>
</property>
<property name="sizeAdjustPolicy">
<enum>QComboBox::AdjustToMinimumContentsLength</enum>
</property>
</widget>
</item>
<item row="0" column="1">
Expand Down
10 changes: 1 addition & 9 deletions src/widgets/stringselector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ void StringSelector::fillStrings() {
StringPtr string = (*it);

string->readLock();
strings.insert(string->sizeLimitedName(_string), string);
strings.insert(string->CleanedName(), string);
string->unlock();
}

Expand Down Expand Up @@ -161,14 +161,6 @@ void StringSelector::setAllowEmptySelection(bool allowEmptySelection) {
}
}


bool StringSelector::event(QEvent * event) {
if ((event->type() == QEvent::WindowActivate) || (event->type() == QEvent::Resize)) {
fillStrings();
}
return QWidget::event(event);
}

}

// vim: ts=2 sw=2 et
2 changes: 0 additions & 2 deletions src/widgets/stringselector.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ class KSTWIDGETS_EXPORT StringSelector : public QWidget, public Ui::StringSelect

void fillStrings();

virtual bool event(QEvent * event);

Q_SIGNALS:
void selectionChanged(const QString&);

Expand Down
7 changes: 5 additions & 2 deletions src/widgets/stringselector.ui
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>300</width>
<height>39</height>
<width>296</width>
<height>35</height>
</rect>
</property>
<property name="sizePolicy">
Expand All @@ -31,6 +31,9 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="sizeAdjustPolicy">
<enum>QComboBox::AdjustToMinimumContentsLength</enum>
</property>
</widget>
</item>
<item>
Expand Down
11 changes: 2 additions & 9 deletions src/widgets/vectorselector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ VectorSelector::VectorSelector(QWidget *parent, ObjectStore *store)
_newVector->setFixedSize(size + 8, size + 8);
_editVector->setFixedSize(size + 8, size + 8);

_vector->resize(10,5);
fillVectors();
connect(_newVector, SIGNAL(pressed()), this, SLOT(newVector()));
connect(_editVector, SIGNAL(pressed()), this, SLOT(editVector()));
Expand Down Expand Up @@ -213,7 +214,7 @@ void VectorSelector::fillVectors() {
continue;

vector->readLock();
vectors.insert(vector->sizeLimitedName(_vector), vector);
vectors.insert(vector->CleanedName(), vector);
vector->unlock();
}

Expand All @@ -238,14 +239,6 @@ void VectorSelector::fillVectors() {
}
}


bool VectorSelector::event(QEvent * event) {
if ((event->type() == QEvent::Resize)) {
fillVectors();
}
return QWidget::event(event);
}

}

// vim: ts=2 sw=2 et
2 changes: 0 additions & 2 deletions src/widgets/vectorselector.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ class KSTWIDGETS_EXPORT VectorSelector : public QWidget, public Ui::VectorSelect
void setIsX(bool is_x) {_isX = is_x;}
int count() {return _vector->count();}

virtual bool event(QEvent * event);

public Q_SLOTS:
void fillVectors();

Expand Down
7 changes: 5 additions & 2 deletions src/widgets/vectorselector.ui
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>277</width>
<height>32</height>
<width>275</width>
<height>30</height>
</rect>
</property>
<property name="whatsThis">
Expand All @@ -28,6 +28,9 @@
<height>16777215</height>
</size>
</property>
<property name="sizeAdjustPolicy">
<enum>QComboBox::AdjustToMinimumContentsLength</enum>
</property>
<item>
<property name="text">
<string>M</string>
Expand Down