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

Adam Treat treat at kde.org
Fri Mar 2 20:19:19 CET 2007


SVN commit 638637 by treat:

* Bits


 M  +1 -1      datawizard.cpp  
 M  +8 -8      kst.cpp  
 M  +2 -2      kstdatadialog.cpp  
 M  +1 -1      ksteditviewobjectdialog.cpp  
 M  +1 -1      kstiface_impl.cpp  
 M  +2 -2      kstplugindialog.cpp  
 M  +1 -1      kstviewmatricesdialog.cpp  
 M  +1 -1      kstviewscalarsdialog.cpp  
 M  +1 -1      kstviewstringsdialog.cpp  
 M  +1 -1      kstviewvectorsdialog.cpp  
 M  +5 -5      kstviewwindow.cpp  
 M  +1 -1      ktimezonecombo.cpp  


--- branches/work/kst/portto4/kst/src/libkstapp/datawizard.cpp #638636:638637
@@ -919,7 +919,7 @@
       if (!_onePlot->isChecked()) { // change plots if we are not onePlot
         if (_radioButtonPlotDataPSD->isChecked()) { // if xy and psd
           ++pit;
-          if (plots.findIndex(*pit) >= (int)plots.count()/2) {
+          if (plots.indexOf(*pit) >= (int)plots.count()/2) {
             pit = plots.begin();
           }
         } else if (++pit == plots.end()) {
--- branches/work/kst/portto4/kst/src/libkstapp/kst.cpp #638636:638637
@@ -143,7 +143,7 @@
 
   initDocument();
   KstDebug::self()->setHandler(doc);
-  setCaption(doc->title());
+  setWindowTitle(doc->title());
 
   /* create dialogs */
   debugDialog = new KstDebugDialogI(this);
@@ -1110,7 +1110,7 @@
   slotUpdateStatusMsg(i18n("Opening %1...").arg(url.prettyURL()));
 
   if (doc->openDocument(url, o_file, o_n, o_f, o_s, o_ave)) {
-    setCaption(doc->title());
+    setWindowTitle(doc->title());
     if (url.isLocalFile()) {
       QFileInfo finfo(in_filename);
       addRecentFile(finfo.absFilePath());
@@ -1231,7 +1231,7 @@
 
   if (doc->saveModified()) {
     doc->newDocument();
-    setCaption(doc->title());
+    setWindowTitle(doc->title());
     selectRecentFile(KUrl(""));
   }
 
@@ -1248,7 +1248,7 @@
       doc->deleteContents();
       doc->setModified(false);
       if (doc->openDocument(url)) {
-        setCaption(doc->title());
+        setWindowTitle(doc->title());
         addRecentFile(url);
       }
     }
@@ -1266,7 +1266,7 @@
     if (doc->openDocument(newfile)) {
       returnVal = true;
     }
-    setCaption(kapp->caption() + ": " + doc->title());
+    setWindowTitle(qApp->applicationName() + ": " + doc->title());
   }
 
   slotUpdateStatusMsg(i18n("Ready"));
@@ -1314,7 +1314,7 @@
         doc->setTitle(saveAsInfo.fileName());
         doc->setAbsFilePath(saveAsInfo.absFilePath());
 
-        setCaption(kapp->caption() + ": " + doc->title());
+        setWindowTitle(qApp->applicationName() + ": " + doc->title());
 
         slotUpdateStatusMsg(i18n("Ready"));
         return true;
@@ -2396,7 +2396,7 @@
   QString name = windowName(true, vw->caption(), true);
 
   if (!name.isEmpty() && vw->caption() != name) {
-    vw->setCaption(name);
+    vw->setWindowTitle(name);
     vw->setTabCaption(name);
     updateDialogsForWindow();
     doc->setModified();
@@ -2425,7 +2425,7 @@
   }
   nameToUse = name;
 
-  w->setCaption(nameToUse);
+  w->setWindowTitle(nameToUse);
   w->setTabCaption(nameToUse);
   addWindow(w, KMdi::StandardAdd | KMdi::UseKMdiSizeHint);
   w->activate();
--- branches/work/kst/portto4/kst/src/libkstapp/kstdatadialog.cpp #638636:638637
@@ -110,7 +110,7 @@
   _tagName->setEnabled(true);
   _legendText->setEnabled(true);
 
-  setCaption(i18n("New %1").arg(objectName()));
+  setWindowTitle(i18n("New %1").arg(objectName()));
   QDialog::show();
   raise();
   _ok->setEnabled(true);
@@ -140,7 +140,7 @@
   update();
   fillFieldsForEdit();
 
-  setCaption(i18n("Edit %1").arg(objectName()));
+  setWindowTitle(i18n("Edit %1").arg(objectName()));
   QDialog::show();
   raise();
   _ok->setEnabled(true);
--- branches/work/kst/portto4/kst/src/libkstapp/ksteditviewobjectdialog.cpp #638636:638637
@@ -84,7 +84,7 @@
   _top = top;
   updateWidgets();
   if (_viewObject) {
-    setCaption(i18n("Edit %1").arg(_viewObject->type()));
+    setWindowTitle(i18n("Edit %1").arg(_viewObject->type()));
   }
   _apply->setEnabled(false);
   show();
--- branches/work/kst/portto4/kst/src/libkstapp/kstiface_impl.cpp #638636:638637
@@ -904,7 +904,7 @@
     _doc->setTitle(saveAsInfo.fileName());
     _doc->setAbsFilePath(saveAsInfo.absFilePath());
 
-    _app->setCaption(kapp->caption() + ": " + _doc->title());
+    _app->setWindowTitle(qApp->applicationName() + ": " + _doc->title());
   }
   return rc;
 }
--- branches/work/kst/portto4/kst/src/libkstapp/kstplugindialog.cpp #638636:638637
@@ -172,7 +172,7 @@
   _tagName->setText(pluginName);
   updatePluginList();
 
-  int i = _pluginList.findIndex(pluginObjectName);
+  int i = _pluginList.indexOf(pluginObjectName);
   _w->PluginCombo->setCurrentItem(i);
   pluginChanged(_w->PluginCombo->currentItem());
 
@@ -185,7 +185,7 @@
 
 void KstPluginDialogI::fillFieldsForNew() {
   updatePluginList();
-  int i = _pluginList.findIndex(_pluginName);
+  int i = _pluginList.indexOf(_pluginName);
   _w->PluginCombo->setCurrentItem(i);
   pluginChanged(_w->PluginCombo->currentItem());
   _tagName->setText(plugin_defaultTag);
--- branches/work/kst/portto4/kst/src/libkstapp/kstviewmatricesdialog.cpp #638636:638637
@@ -110,7 +110,7 @@
  *  language.
  */
 void KstViewMatricesDialogI::languageChange() {
-  setCaption(i18n("View Matrix Values"));
+  setWindowTitle(i18n("View Matrix Values"));
   KstViewMatricesDialog::languageChange();
 }
 
--- branches/work/kst/portto4/kst/src/libkstapp/kstviewscalarsdialog.cpp #638636:638637
@@ -81,7 +81,7 @@
  *  language.
  */
 void KstViewScalarsDialogI::languageChange() {
-  setCaption(i18n("View Scalar Values"));
+  setWindowTitle(i18n("View Scalar Values"));
   listViewScalars->header()->setLabel(0, i18n("Scalar"));
   listViewScalars->header()->setLabel(1, i18n("Value"));
   KstViewScalarsDialog::languageChange();      
--- branches/work/kst/portto4/kst/src/libkstapp/kstviewstringsdialog.cpp #638636:638637
@@ -81,7 +81,7 @@
  *  language.
  */
 void KstViewStringsDialogI::languageChange() {
-  setCaption(i18n("View String Values"));
+  setWindowTitle(i18n("View String Values"));
   listViewStrings->header()->setLabel(0, i18n("String"));
   listViewStrings->header()->setLabel(1, i18n("Value"));
   KstViewStringsDialog::languageChange();      
--- branches/work/kst/portto4/kst/src/libkstapp/kstviewvectorsdialog.cpp #638636:638637
@@ -109,7 +109,7 @@
  *  language.
  */
 void KstViewVectorsDialogI::languageChange() {
-  setCaption(i18n("View Vector Values"));
+  setWindowTitle(i18n("View Vector Values"));
   tableVectors->horizontalHeader()->setLabel(0, i18n("Values"));
   KstViewVectorsDialog::languageChange();
 }
--- branches/work/kst/portto4/kst/src/libkstapp/kstviewwindow.cpp #638636:638637
@@ -61,7 +61,7 @@
     if( !e.isNull()) { // the node was really an element.
       if (e.tagName() == "tag") {
         in_tag = e.text();
-        setCaption(in_tag);
+        setWindowTitle(in_tag);
         setTabCaption(in_tag);
       } else if (e.tagName() == "restore") {
         rectRestore.setX( e.attribute( "x", "0" ).toInt() );
@@ -415,10 +415,10 @@
 }
 
 
-void KstViewWindow::setCaption(const QString& caption) {
-  KMdiChildView::setCaption(caption);
-  _view->setTagName(KstObjectTag(caption, KstObjectTag::globalTagContext));  // FIXME: global tag context?
-}
+// void KstViewWindow::setCaption(const QString& caption) {
+//   KMdiChildView::setCaption(caption);
+//   _view->setTagName(KstObjectTag(caption, KstObjectTag::globalTagContext));  // FIXME: global tag context?
+// }
 
 
 void KstViewWindow::closeEvent(QCloseEvent *e) {
--- branches/work/kst/portto4/kst/src/libkstapp/ktimezonecombo.cpp #638636:638637
@@ -109,7 +109,7 @@
 
 
 void KTimezoneCombo::setTimezone(const QString& tz) {
-  int idx = d->_names.findIndex(tz);
+  int idx = d->_names.indexOf(tz);
 
   if (idx != -1) {
     setCurrentItem(idx);


More information about the Kst mailing list