[Kst] branches/work/kst/kst1kde4/kst/src/libkstapp
Andrew Walker
arwalker at sumusltd.com
Thu Mar 25 00:49:48 CET 2010
SVN commit 1107164 by arwalker:
continue kst1kde4
M +4 -4 CMakeLists.txt
M +0 -9 datamanager.ui
M +0 -19 fieldselect.ui
M +3 -1 kstdatadialog.h
M +14 -8 kstdatamanager.cpp
A kstfieldselect.cpp [License: GPL (v2+)]
A kstfieldselect.h [License: GPL (v2+)]
D kstfieldselect_i.cpp
D kstfieldselect_i.h
M +26 -23 kstvectordialog.cpp
--- branches/work/kst/kst1kde4/kst/src/libkstapp/CMakeLists.txt #1107163:1107164
@@ -51,10 +51,7 @@
kstgfxtlvmousehandler.cpp
kstmetaplot.cpp
kstdrag.cpp
- kstdatamanager.cpp
- kstpluginmanager.cpp
- kstviewmanager.cpp
- kstfieldselect_i.cpp
+ kstfieldselect.cpp
kstvectordialog.cpp
kstcsddialog.cpp
ksteqdialog.cpp
@@ -100,6 +97,9 @@
kstfilterdialog.cpp
extensionmgr.cpp
ksteditviewobjectdialog.cpp
+ kstdatamanager.cpp
+ kstpluginmanager.cpp
+ kstviewmanager.cpp
kst.cpp)
#KDE3_ADD_DCOP_SKELS(kstapp_LIB_SRCS
--- branches/work/kst/kst1kde4/kst/src/libkstapp/datamanager.ui #1107163:1107164
@@ -61,15 +61,6 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="allColumnsShowFocus">
- <bool>true</bool>
- </property>
- <property name="showSortIndicator">
- <bool>true</bool>
- </property>
- <property name="rootIsDecorated">
- <bool>true</bool>
- </property>
<column>
<property name="text">
<string>Name</string>
--- branches/work/kst/kst1kde4/kst/src/libkstapp/fieldselect.ui #1107163:1107164
@@ -93,15 +93,6 @@
<property name="whatsThis">
<string>Available data: This box lists all fields which have not been selected for plotting. To select a field for plotting, move it to the Selected data list, by dragging it with the mouse, by double clicking, or by highlighting it, and clicking on the select button (Right Arrow - accelerator is Alt-s).</string>
</property>
- <property name="resizePolicy">
- <enum>Q3ScrollView::AutoOneFit</enum>
- </property>
- <property name="selectionMode">
- <enum>Q3ListView::Extended</enum>
- </property>
- <property name="showSortIndicator">
- <bool>true</bool>
- </property>
<column>
<property name="text">
<string>Field/Column</string>
@@ -127,21 +118,11 @@
<container>1</container>
</customwidget>
<customwidget>
- <class>Q3ListView</class>
- <extends>Q3Frame</extends>
- <header>q3listview.h</header>
- </customwidget>
- <customwidget>
<class>VectorListView</class>
</customwidget>
</customwidgets>
<includes>
- <include location="local">q3header.h</include>
- <include location="local">q3listview.h</include>
<include location="local">vectorlistview.h</include>
- <include location="global">q3header.h</include>
- <include location="global">q3listview.h</include>
- <include location="global">vectorlistview.h</include>
</includes>
<resources/>
<connections/>
--- branches/work/kst/kst1kde4/kst/src/libkstapp/kstdatadialog.h #1107163:1107164
@@ -48,8 +48,10 @@
void close();
void reject();
+protected:
+ KstObjectPtr _dp;
+
private:
- KstObjectPtr _dp;
bool _multiple;
bool _editMultipleMode;
bool _newDialog;
--- branches/work/kst/kst1kde4/kst/src/libkstapp/kstdatamanager.cpp #1107163:1107164
@@ -20,7 +20,7 @@
#include <QComboBox>
#include <QListWidget>
#include <QMessageBox>
-#include <qptrstack.h>
+#include <QStack>
#include <qstylefactory.h>
#include <qstyle.h>
#include <qtoolbox.h>
@@ -529,7 +529,9 @@
KstReadLocker ml(&KST::vectorList.lock());
KstVectorList::Iterator v = KST::vectorList.findTag(_tag);
if (v != KST::vectorList.end()) {
- KstRVectorPtr r = kst_cast<KstRVector>(*v);
+ KstRVectorPtr r;
+
+ r = kst_cast<KstRVector>(*v);
if (r) {
r->writeLock();
r->reload();
@@ -540,7 +542,9 @@
KstReadLocker ml(&KST::matrixList.lock());
KstMatrixList::Iterator m = KST::matrixList.findTag(_tag);
if (m != KST::matrixList.end()) {
- KstRMatrixPtr r = kst_cast<KstRMatrix>(*m);
+ KstRMatrixPtr r;
+
+ r = kst_cast<KstRMatrix>(*m);
if (r) {
r->writeLock();
r->reload();
@@ -652,9 +656,11 @@
void KstObjectItem::addToPlot(int id) {
- Kst2DPlotPtr p = PlotMap[id];
- KstBaseCurvePtr c = kst_cast<KstBaseCurve>(dataObject());
+ Kst2DPlotPtr p;
+ KstBaseCurvePtr c;
+ p = PlotMap[id];
+ c = kst_cast<KstBaseCurve>(dataObject());
if (p && c) {
p->addCurve(c);
p->setDirty();
@@ -685,7 +691,7 @@
windows = app->subWindowList(QMdiArea::CreationOrder);
- for (i = windows.constBegin(); i != windows.constEnd(); ++i)
+ for (i = windows.constBegin(); i != windows.constEnd(); ++i) {
KstViewWindow *viewWindow = dynamic_cast<KstViewWindow*>(*i);
if (viewWindow) {
@@ -931,12 +937,12 @@
if (QAction *a = ::qt_cast<QAction*>(sender())) {
const QMap<QString,QString> readable =
PluginCollection::self()->readableNameList();
- KstPluginDialogI::globalInstance()->showNew(readable[a->text()]);
+ KstPluginDialog::globalInstance()->showNew(readable[a->text()]);
}
}
-void KstDataManager::doubleClicked(QListViewItem *i) {
+void KstDataManager::doubleClicked(QListWidgetItem *i) {
if (i && DataView->selectedItems().contains(i)) {
edit_I();
}
--- branches/work/kst/kst1kde4/kst/src/libkstapp/kstvectordialog.cpp #1107163:1107164
@@ -20,13 +20,10 @@
#include <qbuttongroup.h>
#include <qcheckbox.h>
-#include <qlistbox.h>
#include <qradiobutton.h>
#include <qspinbox.h>
-#include <qvbox.h>
#include <qmessagebox.h>
-#include <kdialogbase.h>
#include <kfiledialog.h>
#include <klineedit.h>
#include <klocale.h>
@@ -39,21 +36,20 @@
#include "editmultiplewidget.h"
#include "kst.h"
#include "kstdatacollection.h"
-#include "kstfieldselect_i.h"
+#include "kstfieldselect.h"
#include "kstrvector.h"
#include "kstsvector.h"
#include "kstvectordefaults.h"
-#include "kstvectordialog_i.h"
+#include "kstvectordialog.h"
#include "kstdefaultnames.h"
#include "kstcombobox.h"
-#include "vectordialogwidget.h"
QPointer<KstVectorDialog> KstVectorDialog::_inst = 0L;
const QString& KstVectorDialog::defaultTag = KGlobal::staticQString("<Auto Name>");
-KstVectorDialogI *KstVectorDialog::globalInstance() {
+KstVectorDialog *KstVectorDialog::globalInstance() {
if (!_inst) {
_inst = new KstVectorDialog(KstApp::inst());
}
@@ -64,7 +60,7 @@
KstVectorDialog::KstVectorDialog(QWidget* parent, const char* name,
bool modal, Qt::WindowFlags fl)
: KstDataDialog(parent, name, modal, fl) {
- _w = new VectorDialogWidget(_contents);
+ _w = new Ui::VectorDialogWidget(_contents);
_w->setupUi(this);
setMultiple(true);
@@ -159,7 +155,8 @@
void KstVectorDialog::showFields() {
- KstFieldSelectI *dlg = new KstFieldSelectI(this, "Field Select", true);
+ KstFieldSelect *dlg = new KstFieldSelect(this, "Field Select", true);
+
if (dlg) {
dlg->setURL(_w->FileName->url());
dlg->exec();
@@ -260,7 +257,9 @@
void KstVectorDialog::fillFieldsForRVEdit() {
- KstRVectorPtr rvp = kst_cast<KstRVector>(_dp);
+ KstRVectorPtr rvp;
+
+ rvp = kst_cast<KstRVector>(_dp);
rvp->readLock();
_w->_readFromSource->setChecked(true);
@@ -792,7 +791,7 @@
return;
}
}
-
+/* xxx
assert(_configWidget);
KDialogBase *dlg = new KDialogBase(this, "Data Config Dialog", true, i18n("Configure Data Source"));
if (isNew) {
@@ -811,6 +810,7 @@
dlg->setMainWidget(0L);
delete dlg;
updateCompletion(); // could be smarter by only running if Ok/Apply clicked
+*/
}
@@ -822,17 +822,17 @@
_w->FileName->clear();
_w->_kstDataRange->F0->setText("");
_w->_kstDataRange->N->setText("");
- _w->_kstDataRange->Skip->setMinValue(_w->_kstDataRange->Skip->minValue() - 1);
+ _w->_kstDataRange->Skip->setMinimum(_w->_kstDataRange->Skip->minimum() - 1);
_w->_kstDataRange->Skip->setSpecialValueText(" ");
- _w->_kstDataRange->Skip->setValue(_w->_kstDataRange->Skip->minValue());
+ _w->_kstDataRange->Skip->setValue(_w->_kstDataRange->Skip->minimum());
_w->_kstDataRange->CountFromEnd->setTristate(true);
- _w->_kstDataRange->CountFromEnd->setNoChange();
+ _w->_kstDataRange->CountFromEnd->setChecked(Qt::PartiallyChecked);
_w->_kstDataRange->ReadToEnd->setTristate(true);
- _w->_kstDataRange->ReadToEnd->setNoChange();
+ _w->_kstDataRange->ReadToEnd->setChecked(Qt::PartiallyChecked);
_w->_kstDataRange->DoFilter->setTristate(true);
- _w->_kstDataRange->DoFilter->setNoChange();
+ _w->_kstDataRange->DoFilter->setChecked(Qt::PartiallyChecked);
_w->_kstDataRange->DoSkip->setTristate(true);
- _w->_kstDataRange->DoSkip->setNoChange();
+ _w->_kstDataRange->DoSkip->setChecked(Qt::PartiallyChecked);
_w->_kstDataRange->Skip->setEnabled(true);
_w->_kstDataRange->N->setEnabled(true);
@@ -854,9 +854,9 @@
KstSVectorList vclist = kstObjectSubList<KstVector, KstSVector>(KST::vectorList);
_editMultipleWidget->_objectList->insertStringList(vclist.tagNames());
- _w->_N->setMinValue(_w->_N->minValue() - 1);
+ _w->_N->setMinimum(_w->_N->minimum() - 1);
_w->_N->setSpecialValueText(" ");
- _w->_N->setValue(_w->_N->minValue());
+ _w->_N->setValue(_w->_N->minimum());
_w->_xMin->setText("");
_w->_xMax->setText("");
@@ -909,21 +909,24 @@
if (_editMultipleMode) {
if (_w->_kstDataRange->Skip->specialValueText() == " ") {
_w->_kstDataRange->Skip->setSpecialValueText(QString::null);
- _w->_kstDataRange->Skip->setMinValue(_w->_kstDataRange->Skip->minValue() + 1);
+ _w->_kstDataRange->Skip->setMinimum(_w->_kstDataRange->Skip->minimum() + 1);
}
if (_w->_N->specialValueText() == " ") {
_w->_N->setSpecialValueText(QString::null);
- _w->_N->setMinValue(_w->_N->minValue() + 1);
+ _w->_N->setMinimum(_w->_N->minimum() + 1);
}
}
}
KstObjectPtr KstVectorDialog::findObject(const QString& name) {
+ KstObjectPtr vec;
+
KST::vectorList.lock().readLock();
- KstObjectPtr o = (*KST::vectorList.findTag(name)).data();
+ vec = (*KST::vectorList.findTag(name)).data();
KST::vectorList.lock().unlock();
- return o;
+
+ return vec;
}
#include "kstvectordialog.moc"
More information about the Kst
mailing list