[Kst] [Bug 129283] Plot dialog is inconsistent with other dialogs, and is therefore confusing

netterfield at astro.utoronto.ca netterfield at astro.utoronto.ca
Wed Jul 26 18:09:09 CEST 2006


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=129283         




------- Additional Comments From netterfield astro utoronto ca  2006-07-26 18:09 -------
SVN commit 566646 by netterfield:

CCBUG: 129283

Add a plot->new action to the menues to create a new plot in 
the current window.

Addresses item 1 of 129283.



 M  +1 -0      kst/kstui.rc  
 M  +2 -1      kst/pics/Makefile.am  
 M  +13 -0     libkstapp/kst.cpp  
 M  +5 -0      libkstapp/kst.h  


--- trunk/extragear/graphics/kst/src/kst/kstui.rc #566645:566646
 @ -49,6 +49,7  @
   </Menu>
   <Menu name="plots"><text>&amp;Plots</text>
     <Action name="plotdialog_action"/>
+    <Action name="newplot_action"/>
     <Separator/>
     <Action name="zoomtie_action"/>
     <Separator/>
--- trunk/extragear/graphics/kst/src/kst/pics/Makefile.am #566645:566646
 @ -13,7 +13,8  @
 	kst_gfx_rectangle.png kst_gfx_rounded_rectangle.png \
 	kst_gfx_ellipse.png kst_gfx_polyline.png kst_gfx_polygon.png \
 	kst_gfx_arrow.png kst_gfx_picture.png kst_choosecolor.png \
-	kst_csdnew.png kst_differentiatecurves.png kst_viewmanager.png
+	kst_csdnew.png kst_differentiatecurves.png kst_viewmanager.png \
+	kst_newplot.png
 
 
 
--- trunk/extragear/graphics/kst/src/libkstapp/kst.cpp #566645:566646
 @ -494,6 +494,13  @
 
 
   /************/
+  NewPlotAction = new KAction(i18n("New Plot..."), "kst_newplot", 0,
+                                 this, SLOT(newPlot()),
+                                 actionCollection(), "newplot_action");
+  NewPlotAction->setWhatsThis(i18n("Create a new plot in the\n"
+                                      "current window."));
+
+  /************/
   PlotDialogAction = new KAction(i18n("Edit &Plot..."), "kst_editplots", 0,
                                  this, SLOT(showPlotDialog()),
                                  actionCollection(), "plotdialog_action");
 @ -1991,7 +1998,13  @
   }
 }
 
+void KstApp::newPlot() {
+  KstViewWindow *w;
+  w = dynamic_cast<KstViewWindow*>(activeWindow());
+  Kst2DPlotPtr p = kst_cast<Kst2DPlot>(w->view()->findChild(w->createObject<Kst2DPlot>(KST::suggestPlotName(), false)));
 
+}
+
 void KstApp::showPlotDialog(const QString& window, const QString& plot) {
   _plotDialog->show_I(window, plot);
 }
--- trunk/extragear/graphics/kst/src/libkstapp/kst.h #566645:566646
 @ -298,6 +298,9  @
     void slotUpdateMemoryMsg(const QString &msg);
     void slotUpdateProgress(int total, int step, const QString &msg);
 
+    /** creates a new plot in the current window */
+    void newPlot();
+
     /** just calls plotDialog->show_I(0) */
     void showPlotDialog();
     void showPlotDialog(const QString& strWindow, const QString& strPlot);
 @ -485,6 +488,8  @
     KAction *MatrixDialogAction;
     /* Image Edit Action */
     KAction *ImageDialogAction;
+    /* New Plot Action */
+    KAction *NewPlotAction;
     /* Plot Edit Action */
     KAction *PlotDialogAction;
     /* Vector Edit Action */


More information about the Kst mailing list