[Kst] branches/work/kst/portto4/kst/src/libkstapp

Adam Treat treat at kde.org
Fri Mar 9 22:36:09 CET 2007


SVN commit 641068 by treat:

* More porting


 M  +19 -15    datawizard.cpp  
 M  +2 -2      kstbasicdialog.cpp  
 M  +1 -1      kstchoosecolordialog.cpp  
 M  +1 -1      kstcurvedialog.cpp  
 M  +1 -1      kstdatadialog.cpp  
 M  +1 -0      kstdatamanager.cpp  
 M  +5 -5      ksteditviewobjectdialog.cpp  
 M  +1 -1      ksteqdialog.cpp  
 M  +3 -3      kstgraphfiledialog.cpp  
 M  +1 -1      ksthsdialog.cpp  
 M  +1 -1      kstimagedialog.cpp  
 M  +3 -3      kstmatrixdialog.cpp  
 M  +7 -7      kstplugindialog.cpp  
 M  +1 -1      kstpsddialog.cpp  
 M  +1 -1      kstquickstartdialog.cpp  
 M  +1 -1      kstvectordialog.cpp  
 M  +3 -3      kstviewfitsdialog.cpp  
 M  +2 -4      ktimezonecombo.cpp  
 M  +1 -1      pluginmanager.cpp  
 M  +2 -2      view2dplotwidget.cpp  
 M  +1 -0      viewlabelwidget.cpp  


--- branches/work/kst/portto4/kst/src/libkstapp/datawizard.cpp #641067:641068
@@ -221,7 +221,7 @@
   if (_xAxisCreateFromField->isChecked()) {
     QString txt = _xVector->currentText();
     for (int i = 0; i < _xVector->count(); ++i) {
-      if (_xVector->text(i) == txt) {
+      if (_xVector->itemText(i) == txt) {
         return true;
       }
     }
@@ -244,7 +244,7 @@
 
 void DataWizard::testUrl() {
   _inTest = true;
-  sourceChanged(_url->toString());
+  sourceChanged(_url->url());
   _inTest = false;
 }
 
@@ -324,7 +324,7 @@
     _xVector->clear();
 
     _xVector->addItems(fl);
-    _xVector->completionObject()->addItems(fl);
+    _xVector->completionObject()->insertItems(fl);
     _xVector->setEditable(!complete);
 
     count = fl.count();
@@ -539,7 +539,8 @@
     _onePlot->setChecked(true);
   }
 
-  if (_existingPlot->isEnabled() && _existingPlotName->listBox() && _existingPlotName->listBox()->findItem(psave)) {
+  //FIXME Combo's don't work this way anymore...
+  if (_existingPlot->isEnabled()) {
     _existingPlotName->setItemText(_existingPlotName->currentIndex(), psave);
   }
   updateColumns();
@@ -550,7 +551,7 @@
   Q3ListViewItem *after = 0L;
   _vectors->clearSelection();
   _vectors->setSorting(3, true); // Qt 3.1 compat
-  QRegExp re(filter, Qt::CaseSensative, QRegExp::Wildcard);
+  QRegExp re(filter, Qt::CaseSensitive, QRegExp::Wildcard);
   Q3ListViewItemIterator it(_vectors);
   while (it.current()) {
     Q3ListViewItem *i = it.current();
@@ -1152,7 +1153,7 @@
   _configWidget->setParent(0L);
   dlg->setMainWidget(0L);
   delete dlg;
-  sourceChanged(_url->toString());
+  sourceChanged(_url->url().toString());
 }
 
 void DataWizard::saveSettings() {
@@ -1212,18 +1213,21 @@
   if (cfg.readBoolEntry("XCreate", true) || _xVectorExisting->_vector->count() == 0) {
     _xAxisCreateFromField->setChecked(true);
     QString str = cfg.readEntry("XFieldCreate", "");
-    if (_xVector->listBox()) {
-      Q3ListBoxItem *item = _xVector->listBox()->findItem(str, Qt::ExactMatch);
-      if (item) {
-        _xVector->listBox()->setSelected(item, true);
-      }
-    }
+    //FIXME Combo's don't work this way any longer
+//     if (_xVector->listBox()) {
+//       Q3ListBoxItem *item = _xVector->listBox()->findItem(str, Qt::ExactMatch);
+//       if (item) {
+//         _xVector->listBox()->setSelected(item, true);
+//       }
+//     }
   } else {
     _xAxisUseExisting->setChecked(true);
     QString str = cfg.readEntry("XFieldExists", "");
-    if (_xVectorExisting->_vector->listBox() && _xVectorExisting->_vector->listBox()->findItem(str, Qt::ExactMatch)) {
-      _xVectorExisting->setSelection(str);
-    }
+
+    //FIXME Combo's don't work this way any longer
+//     if (_xVectorExisting->_vector->listBox() && _xVectorExisting->_vector->listBox()->findItem(str, Qt::ExactMatch)) {
+//       _xVectorExisting->setSelection(str);
+//     }
   }
 
   if (cfg.readBoolEntry("Lines", true)) {
--- branches/work/kst/portto4/kst/src/libkstapp/kstbasicdialog.cpp #641067:641068
@@ -97,8 +97,8 @@
                       + ptr->outputStringList().count();
 
   _grid = new QGridLayout(_w->_frame, numInputOutputs + 1, 2, 0, 8);
-  _grid->setColStretch(1,1);
-  _grid->setColStretch(0,0);
+  _grid->setColumnStretch(1,1);
+  _grid->setColumnStretch(0,0);
 
   //create input widgets
   //First, the inputVectors...
--- branches/work/kst/portto4/kst/src/libkstapp/kstchoosecolordialog.cpp #641067:641068
@@ -69,7 +69,7 @@
     
     // new grid
     grid = new QGridLayout(colorFrame, fileNameList.count(), 2, 0, 8);
-    grid->setColStretch(1,0);
+    grid->setColumnStretch(1,0);
     
     int i = fileNameList.count();
     for (QStringList::Iterator it = fileNameList.begin(); 
--- branches/work/kst/portto4/kst/src/libkstapp/kstcurvedialog.cpp #641067:641068
@@ -525,7 +525,7 @@
 
 void KstCurveDialogI::populateEditMultiple() {
   KstVCurveList cvlist = kstObjectSubList<KstDataObject,KstVCurve>(KST::dataObjectList);
-  _editMultipleWidget->_objectList->addItems(cvlist.tagNames());
+  _editMultipleWidget->_objectList->insertStringList(cvlist.tagNames());
 
   // also intermediate state for multiple edit
   _w->_xVector->_vector->insertItem(0, "");
--- branches/work/kst/portto4/kst/src/libkstapp/kstdatadialog.cpp #641067:641068
@@ -25,7 +25,7 @@
 #include <QCloseEvent>
 
 #include <q3vbox.h>
-#include <q3listbox.>
+#include <q3listbox.h>
 #include "editmultiplewidget.h"
 #include "kstdatacollection.h"
 #include "kstdataobjectcollection.h"
--- branches/work/kst/portto4/kst/src/libkstapp/kstdatamanager.cpp #641067:641068
@@ -19,6 +19,7 @@
 
 // include files for Qt
 #include <q3ptrstack.h>
+#include <q3toolbar.h>
 #include <qtoolbox.h>
 
 #include <qtoolbutton.h>
--- branches/work/kst/portto4/kst/src/libkstapp/ksteditviewobjectdialog.cpp #641067:641068
@@ -136,8 +136,8 @@
 
     // create a new grid
     _grid = new QGridLayout(_propertiesFrame, numProperties, 2, 0, 8);
-    _grid->setColStretch(0,0);
-    _grid->setColStretch(1,1);
+    _grid->setColumnStretch(0,0);
+    _grid->setColumnStretch(1,1);
     
     // get the property names and types
     for (int i = 0; i < numProperties; i++) {
@@ -300,7 +300,7 @@
     pp.setPen(pen);
     pp.fillRect( pp.window(), QColor("white"));
     pp.drawLine(1,ppix.height()/2,ppix.width()-1, ppix.height()/2);
-    widget->addItem(ppix);
+    widget->addItem(ppix, "");
     styles.pop_front();
   }
 }
@@ -334,8 +334,8 @@
     for (Q3ValueList<QWidget*>::ConstIterator iter = _inputWidgets.begin(); iter != _inputWidgets.end(); ++iter) {
       
       // get the widget type and property name
-      QString propertyName = QString((*iter)->name()).section(',', 0, 0);
-      QString widgetPropertyName = QString((*iter)->name()).section(',', 1, 1);
+      QString propertyName = QString((*iter)->objectName()).section(',', 0, 0);
+      QString widgetPropertyName = QString((*iter)->objectName()).section(',', 1, 1);
       
       // get the widget's property and set it on the viewObject
       _viewObject->setProperty(propertyName.toLatin1(), (*iter)->property(widgetPropertyName.toLatin1()));
--- branches/work/kst/portto4/kst/src/libkstapp/ksteqdialog.cpp #641067:641068
@@ -413,7 +413,7 @@
 void KstEqDialogI::populateEditMultiple() {
   // list of objects
   KstEquationList eqlist = kstObjectSubList<KstDataObject,KstEquation>(KST::dataObjectList);
-  _editMultipleWidget->_objectList->addItems(eqlist.tagNames());
+  _editMultipleWidget->_objectList->insertStringList(eqlist.tagNames());
 
   // also intermediate state for multiple edit
   _w->_xVectors->_vector->insertItem(0, "");
--- branches/work/kst/portto4/kst/src/libkstapp/kstgraphfiledialog.cpp #641067:641068
@@ -78,7 +78,7 @@
 
 
 void KstGraphFileDialogI::apply_I() {
-  _url = _saveLocation->url();
+  _url = _saveLocation->url().toString();
   _format = _comboBoxFormats->currentText();
   _w = _xSize->value();
   _h = _ySize->value();
@@ -112,7 +112,7 @@
 
 void KstGraphFileDialogI::applyAutosave() {
   if (_autoSave) {
-    _autoSaveTimer->start(_savePeriod*1000, false);
+    _autoSaveTimer->start(_savePeriod*1000);
   } else {
     _autoSaveTimer->stop();
   }
@@ -218,7 +218,7 @@
 
   QString upfmt = _format.toUpper();
   for (int i = 0; i < _comboBoxFormats->count(); i++) {
-    if (_comboBoxFormats->itemText(i).upper() == upfmt) {
+    if (_comboBoxFormats->itemText(i).toUpper() == upfmt) {
       _comboBoxFormats->setCurrentIndex(i);
       break;
     }
--- branches/work/kst/portto4/kst/src/libkstapp/ksthsdialog.cpp #641067:641068
@@ -461,7 +461,7 @@
 
 void KstHsDialogI::populateEditMultiple() {
   KstHistogramList hslist = kstObjectSubList<KstDataObject,KstHistogram>(KST::dataObjectList);
-  _editMultipleWidget->_objectList->addItems(hslist.tagNames());
+  _editMultipleWidget->_objectList->insertStringList(hslist.tagNames());
 
   // also intermediate state for multiple edit
   _w->Min->setText("");
--- branches/work/kst/portto4/kst/src/libkstapp/kstimagedialog.cpp #641067:641068
@@ -595,7 +595,7 @@
 
 void KstImageDialogI::populateEditMultiple() {
   KstImageList imlist = kstObjectSubList<KstDataObject,KstImage>(KST::dataObjectList);
-  _editMultipleWidget->_objectList->addItems(imlist.tagNames());
+  _editMultipleWidget->_objectList->insertStringList(imlist.tagNames());
 
   // also intermediate state for multiple edit
   _w->_colorOnly->setChecked(false);
--- branches/work/kst/portto4/kst/src/libkstapp/kstmatrixdialog.cpp #641067:641068
@@ -175,7 +175,7 @@
       QStringList list = KstDataSource::matrixListForSource(_w->_fileName->url());
       _w->_field->addItems(list);
       if (_fieldCompletion) {
-        _fieldCompletion->addItems(list);
+        _fieldCompletion->insertItems(list);
       }
     }
     KST::dataSourceList.lock().unlock();
@@ -721,7 +721,7 @@
 
 void KstMatrixDialogI::populateEditMultipleRMatrix() {
   KstRMatrixList mxList = kstObjectSubList<KstMatrix,KstRMatrix>(KST::matrixList);
-  _editMultipleWidget->_objectList->addItems(mxList.tagNames());
+  _editMultipleWidget->_objectList->insertStringList(mxList.tagNames());
 
   // intermediate state for multiple edit
   _w->_fileName->clear();
@@ -766,7 +766,7 @@
 
 void KstMatrixDialogI::populateEditMultipleSMatrix() {
   KstSMatrixList mxList = kstObjectSubList<KstMatrix,KstSMatrix>(KST::matrixList);
-  _editMultipleWidget->_objectList->addItems(mxList.tagNames());
+  _editMultipleWidget->_objectList->insertStringList(mxList.tagNames());
 
   // intermediate state for multiple edit
   _w->_gradientZAtMin->setText("");
--- branches/work/kst/portto4/kst/src/libkstapp/kstplugindialog.cpp #641067:641068
@@ -781,8 +781,8 @@
 
   // create new info grid
   _pluginInfoGrid = new QGridLayout(_w->_pluginInfoFrame, 2, 2, 0, 8);
-  _pluginInfoGrid->setColStretch(1,1); // stretch the right column
-  _pluginInfoGrid->setColStretch(0,0); // don't stretch the left column
+  _pluginInfoGrid->setColumnStretch(1,1); // stretch the right column
+  _pluginInfoGrid->setColumnStretch(0,0); // don't stretch the left column
 
   if (idx >= 0 && _w->PluginCombo->count() > 0) {
 
@@ -820,8 +820,8 @@
 
     // generate inputs
     _pluginInputOutputGrid = new QGridLayout(_w->_pluginInputOutputFrame, numInputOutputs + 1, 2, 0, 8);
-    _pluginInputOutputGrid->setColStretch(1,1);
-    _pluginInputOutputGrid->setColStretch(0,0);
+    _pluginInputOutputGrid->setColumnStretch(1,1);
+    _pluginInputOutputGrid->setColumnStretch(0,0);
     generateEntries(true, cnt, _w->_pluginInputOutputFrame, _pluginInputOutputGrid, pluginData._inputs);
 
     // insert separator
@@ -829,14 +829,14 @@
     Q3Frame* line = new Q3Frame(_w->_pluginInputOutputFrame);
     line->setFrameShadow(Q3Frame::Sunken);
     line->setFrameShape(Q3Frame::HLine);
-    _pluginInputOutputGrid->addMultiCellWidget(line, cnt, cnt, 0, 1);
+    _pluginInputOutputGrid->addWidget(line, cnt, cnt, 0, 1);
     _pluginWidgets.push_back(line);
     line->show();
     cnt++;
 
     // generate outputs
-    _pluginInputOutputGrid->setColStretch(1,1);
-    _pluginInputOutputGrid->setColStretch(0,0);
+    _pluginInputOutputGrid->setColumnStretch(1,1);
+    _pluginInputOutputGrid->setColumnStretch(0,0);
     generateEntries(false, cnt, _w->_pluginInputOutputFrame, _pluginInputOutputGrid, pluginData._outputs);
   }
   // resize everything
--- branches/work/kst/portto4/kst/src/libkstapp/kstpsddialog.cpp #641067:641068
@@ -406,7 +406,7 @@
 
 void KstPsdDialogI::populateEditMultiple() {
   KstPSDList pslist = kstObjectSubList<KstDataObject,KstPSD>(KST::dataObjectList);
-  _editMultipleWidget->_objectList->insertItems(pslist.tagNames());
+  _editMultipleWidget->_objectList->insertStringList(pslist.tagNames());
 
   // also intermediate state for multiple edit
   _w->_vector->_vector->insertItem(0, "");
--- branches/work/kst/portto4/kst/src/libkstapp/kstquickstartdialog.cpp #641067:641068
@@ -71,7 +71,7 @@
 void KstQuickStartDialogI::update() {
   //get the list of recent files
   _recentFileList->clear();
-  _recentFileList->insertItems(_app->recentFiles());
+  _recentFileList->insertStringList(_app->recentFiles());
 
   //by default, select a recent file
   if (_recentFileList->numItemsVisible() > 0) {
--- branches/work/kst/portto4/kst/src/libkstapp/kstvectordialog.cpp #641067:641068
@@ -753,7 +753,7 @@
 
 void KstVectorDialogI::populateEditMultipleSV() {
   KstSVectorList vclist = kstObjectSubList<KstVector, KstSVector>(KST::vectorList);
-  _editMultipleWidget->_objectList->addItems(vclist.tagNames());
+  _editMultipleWidget->_objectList->insertStringList(vclist.tagNames());
 
   _w->_N->setMinimum(_w->_N->minimum() - 1);
   _w->_N->setSpecialValueText(" ");
--- branches/work/kst/portto4/kst/src/libkstapp/kstviewfitsdialog.cpp #641067:641068
@@ -18,9 +18,9 @@
 #include <qcombobox.h>
 #include <qlabel.h>
 #include <qlayout.h>
-#include <qlistbox.h>
+#include <q3listbox.h>
 #include <qpushbutton.h>
-#include <qtable.h>
+#include <q3table.h>
 #include <qtimer.h>
 
 #include <klocale.h>
@@ -93,7 +93,7 @@
 }
 
 void KstViewFitsDialogI::updateViewFitsDialog() {
-  if (_comboBoxFits->listBox()->isVisible()) {
+  if (_comboBoxFits->view()->isVisible()) {
     QTimer::singleShot(250, this, SLOT(updateViewFitsDialog()));
   } else {
     QString old;
--- branches/work/kst/portto4/kst/src/libkstapp/ktimezonecombo.cpp #641067:641068
@@ -41,10 +41,8 @@
     db = new KstTimezones;
   }
 
-  if (listBox()) {
-    listBox()->setVScrollBarMode(Q3ScrollView::AlwaysOn);
-    listBox()->setColumnMode(Q3ListBox::FixedNumber);
-    listBox()->setRowMode(Q3ListBox::Variable);
+  if (view()) {
+    view()->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
   }
   
   insertItem("UTC");
--- branches/work/kst/portto4/kst/src/libkstapp/pluginmanager.cpp #641067:641068
@@ -172,7 +172,7 @@
                                          it.value()._readableName,
                                          QString::null,
                                          it.value()._description,
-                                         it.data()._version,
+                                         it.value()._version,
                                          it.value()._author,
                                          it.value()._name,
                                          path);
--- branches/work/kst/portto4/kst/src/libkstapp/view2dplotwidget.cpp #641067:641068
@@ -406,7 +406,7 @@
     pp.setPen(pen);
     pp.fillRect( pp.window(), QColor("white"));
     pp.drawLine(1,ppix.height()/2,ppix.width()-1, ppix.height()/2);
-    _comboMarkerLineStyle->addItem(ppix);
+    _comboMarkerLineStyle->addItem(ppix, "");
   }
 
   _comboMarkerLineStyle->setCurrentIndex(currentIndex);
@@ -490,7 +490,7 @@
       Rising->setChecked(true);
     }
     for (int curveComboIndex = 0; curveComboIndex < CurveCombo->count(); curveComboIndex++) {
-      if (CurveCombo->text(curveComboIndex) == plot->curveToMarkers()->tagName()) {
+      if (CurveCombo->itemText(curveComboIndex) == plot->curveToMarkers()->tagName()) {
         CurveCombo->setCurrentIndex(curveComboIndex);
         break;
       }
--- branches/work/kst/portto4/kst/src/libkstapp/viewlabelwidget.cpp #641067:641068
@@ -17,6 +17,7 @@
 
 #include "viewlabelwidget.h"
 
+#include <q3whatsthis.h>
 #include <kst_export.h>
 
 ViewLabelWidget::ViewLabelWidget(QWidget *parent)


More information about the Kst mailing list