[Kst] kdeextragear-2/kst/kst

George Staikos staikos at kde.org
Sat Jul 19 00:32:07 CEST 2003


CVS commit by staikos: 

Allow vectors to be saved to disk.  UI doesn't keep sync with the vector list
at all times yet (needs at least one fix still), and there is no error reporting
in the saving code yet.  Also might switch the vector saving code to use
QTextStream instead of snprintf+write.


  A            vectorsavedialog.ui   1.1
  A            vectorsavedialog.ui.h   1.1 [no copyright]
  M +2 -0      Makefile.am   1.40
  M +12 -0     kst.cpp   1.46
  M +6 -0      kst.h   1.17
  M +2 -1      kstui.rc   1.7


--- kdeextragear-2/kst/kst/Makefile.am  #1.39:1.40
@@ -86,4 +86,5 @@
         plugindialog.ui \
         pluginmanager.ui \
+        vectorsavedialog.ui \
         kstlabeldialog.ui \
         kstplotlist.cpp \
@@ -125,3 +126,4 @@
 vectorselector.o: vectorselector.ui.h vectorselector.ui
 scalarselector.o: scalarselector.ui.h scalarselector.ui
+vectorsavedialog.o: vectorsavedialog.ui.h vectorsavedialog.ui
 

--- kdeextragear-2/kst/kst/kst.cpp  #1.45:1.46
@@ -59,4 +59,5 @@
 #include "kstlabeldialog_i.h"
 #include "kstiface_impl.h"
+#include "vectorsavedialog.h"
 //#include "resource.h"
 
@@ -83,4 +84,5 @@ KstApp::KstApp(QWidget *parent, const ch
   quickPSDDialog = new KstQuickPSDDialogI(this);
   graphFileDialog = new KstGraphFileDialogI(this);
+  vectorSaveDialog = new VectorSaveDialog(this);
   connect(KstVectorDialogI::globalInstance(), SIGNAL(modified()), doc, SLOT(wasModified()));
   connect(KstCurveDialogI::globalInstance(), SIGNAL(modified()), doc, SLOT(wasModified()));
@@ -340,4 +342,13 @@ void KstApp::initActions() {
 
   /************/
+  _vectorSaveAction = new KAction(i18n("Save Vectors to Disk..."),
+                                  0, 0,
+                                  vectorSaveDialog, SLOT(show()),
+                                  actionCollection(),
+                                  "vectorsavedialog_action");
+  _vectorSaveAction->setWhatsThis(i18n("Bring up a dialog box\n"
+                                       "to save vectors to text files.\n"));
+
+  /************/
   SamplesDownAction = new KAction(i18n("&Back 1 Screen"),
                                   "kst_back",
@@ -775,4 +786,5 @@ void KstApp::updateDialogs() {
   quickPSDDialog->update();
   dataManager->update();
+  vectorSaveDialog->init();
   view->update();
 }

--- kdeextragear-2/kst/kst/kst.h  #1.16:1.17
@@ -47,4 +47,5 @@ class KstQuickPSDDialogI;
 class KstGraphFileDialogI;
 class KstDataManagerI;
+class VectorSaveDialog;
 
 /** The base class for Kst application windows. It sets up the main
@@ -271,4 +272,7 @@ private:
   KstGraphFileDialogI *graphFileDialog;
 
+  /* Dialog for exporting to a text file */
+  VectorSaveDialog *vectorSaveDialog;
+
   /* Dialog for looking at data */
   KstDataManagerI *dataManager;
@@ -315,4 +319,6 @@ private:
   /* Plugin Plot Edit Action */
   KAction *PluginDialogAction;
+  /* Vector Save Action */
+  KAction *_vectorSaveAction;
 
   /** Change File Action: brings up the change file dialog box */

--- kdeextragear-2/kst/kst/kstui.rc  #1.6:1.7
@@ -5,5 +5,6 @@
     <Action name="tmp_file_new"/>
     <Action name="graphfiledialog_action"/>
-    //<Action name="file_new_window"/>
+    <Action name="vectorsavedialog_action"/>
+    <!-- Action name="file_new_window"/ -->
   </Menu>
   <Menu name="data"><text>&amp;Data</text>




More information about the Kst mailing list