Showing with 23 additions and 23 deletions.
  1. +0 −2 src/libkstapp/datadialog.cpp
  2. +5 −0 src/libkstapp/datamanager.cpp
  3. +2 −5 src/libkstapp/datamanager.ui
  4. +3 −2 src/libkstapp/equationdialog.cpp
  5. +12 −12 src/widgets/scalarselector.cpp
  6. +1 −2 src/widgets/scalarselector.h
2 changes: 0 additions & 2 deletions src/libkstapp/datadialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,8 @@ void DataDialog::addDataTab(DataTab *tab) {

void DataDialog::slotApply() {
Kst::ObjectPtr ptr;
bool do_session_reset = false;
if (!dataObject()) {
ptr = createNewDataObject();
do_session_reset = true;
} else {
ptr = editExistingDataObject();
}
Expand Down
5 changes: 5 additions & 0 deletions src/libkstapp/datamanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ DataManager::DataManager(QWidget *parent, Document *doc)
_proxyModel->setFilterKeyColumn(-1); // Filter on all columns by default
_proxyModel->setFilterCaseSensitivity(Qt::CaseInsensitive);
_session->setModel(_proxyModel);

#if QT_VERSION >= 0x040700
_filterText->setPlaceholderText(i18n("Enter your filter here (wildcards allowed)"));
#endif

connect(_filterText, SIGNAL(textChanged(QString)), _proxyModel, SLOT(setFilterWildcard(QString)));
connect(_caseSensitive, SIGNAL(stateChanged(int)), this, SLOT(setCaseSensitivity(int)));
connect(_filterColumn, SIGNAL(currentIndexChanged(int)), this, SLOT(setFilterColumn(int)));
Expand Down
7 changes: 2 additions & 5 deletions src/libkstapp/datamanager.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>750</width>
<height>235</height>
<width>748</width>
<height>233</height>
</rect>
</property>
<property name="windowTitle">
Expand Down Expand Up @@ -57,9 +57,6 @@
<property name="focusPolicy">
<enum>Qt::ClickFocus</enum>
</property>
<property name="placeholderText">
<string>Enter your filter here (wildcards allowed)</string>
</property>
</widget>
</item>
<item>
Expand Down
5 changes: 3 additions & 2 deletions src/libkstapp/equationdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include "document.h"
#include "objectstore.h"
#include "updatemanager.h"
#include "updateserver.h"

#include <QPushButton>

Expand All @@ -46,13 +47,13 @@ EquationTab::EquationTab(QWidget *parent)
connect(_xVectors, SIGNAL(selectionChanged(QString)), this, SLOT(selectionChanged()));
connect(_equation, SIGNAL(textChanged(const QString &)), this, SLOT(selectionChanged()));

connect(_xVectors, SIGNAL(contentChanged()), this, SLOT(updateVectorCombos()));
//connect(_xVectors, SIGNAL(contentChanged()), this, SLOT(updateVectorCombos()));

connect(_xVectors, SIGNAL(selectionChanged(QString)), this, SIGNAL(modified()));
connect(_equation, SIGNAL(textChanged(const QString &)), this, SIGNAL(modified()));
connect(_doInterpolation, SIGNAL(clicked()), this, SIGNAL(modified()));
connect(_curvePlacement->_noPlot, SIGNAL(toggled(bool)), _curveAppearance, SLOT(setDisabled(bool)));

connect(UpdateServer::self(), SIGNAL(objectListsChanged()), this->_equation, SLOT(fillKstObjects()));

TextLabel1_11->setProperty("si","Eq&uation:");
_xVectorLabel->setProperty("si","&X vector:");
Expand Down
24 changes: 12 additions & 12 deletions src/widgets/scalarselector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "dialoglauncher.h"
#include "datacollection.h"
#include "objectstore.h"
#include "updateserver.h"

#include "enodes.h"

Expand Down Expand Up @@ -42,6 +43,8 @@ ScalarSelector::ScalarSelector(QWidget *parent, ObjectStore *store)
connect(_selectScalar, SIGNAL(pressed()), this, SLOT(selectScalar()));
connect(_scalar, SIGNAL(editTextChanged(QString)), this, SLOT(emitSelectionChanged()));
connect(_scalar, SIGNAL(editTextChanged(QString)), this, SLOT(updateDescriptionTip()));
connect(UpdateServer::self(), SIGNAL(objectListsChanged()), this, SLOT(updateScalarList()));

}


Expand Down Expand Up @@ -200,7 +203,6 @@ void ScalarSelector::editScalar() {
fillScalars();
}


void ScalarSelector::selectScalar() {
if (_scalarListSelector->exec() == QDialog::Accepted) {
_scalar->setCurrentIndex(_scalar->findText(_scalarListSelector->selectedScalar()));
Expand Down Expand Up @@ -257,19 +259,17 @@ void ScalarSelector::fillScalars() {
updateDescriptionTip();
}


bool ScalarSelector::event(QEvent * event) {
if ((event->type() == QEvent::Resize) || (event->type() == QEvent::WindowActivate)) {
if (_defaultsSet) {
QString defaultText = _scalar->currentText();
fillScalars();
setDefaultValue(defaultText.toDouble());
} else {
fillScalars();
}
void ScalarSelector::updateScalarList() {
if (_defaultsSet) {
QString defaultText = _scalar->currentText();
fillScalars();
setDefaultValue(defaultText.toDouble());
} else {
fillScalars();
}
return QWidget::event(event);
}


}

// vim: ts=2 sw=2 et
3 changes: 1 addition & 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 All @@ -54,6 +52,7 @@ class KSTWIDGETS_EXPORT ScalarSelector : public QWidget, public Ui::ScalarSelect
void selectScalar();
void emitSelectionChanged();
void updateDescriptionTip();
void updateScalarList();

private:
ScalarListSelector* _scalarListSelector;
Expand Down