diff libgui/graphics/Figure.h @ 19719:7335cc071ab0

make save and saveas menu items work in Qt figure window See also bug #44177. * Figure.h, Figure.cc (Figure::fileName, Figure::setFileName, Figure::save_figure_callback): New functions. (Figure::createFigureToolBarAndMenuBar): Enable Save and "Save As" items and connect them to new fileSaveFigure and fileSaveFigureAS functions.
author John W. Eaton <jwe@octave.org>
date Mon, 09 Feb 2015 16:06:02 -0500
parents 35bca657d74d
children 31d5d251f010
line wrap: on
line diff
--- a/libgui/graphics/Figure.h	Mon Feb 09 21:36:01 2015 +0100
+++ b/libgui/graphics/Figure.h	Mon Feb 09 16:06:02 2015 -0500
@@ -70,6 +70,9 @@
 
   static Figure* create (const graphics_object& go);
 
+  QString fileName (void);
+  void setFileName (const QString& name);
+
   MouseMode mouseMode (void);
 
   Container* innerContainer (void);
@@ -104,9 +107,13 @@
 
   static void updateBoundingBoxHelper (void*);
 
+  void save_figure_callback (const std::string& file);
+
 private slots:
   void setMouseMode (MouseMode mode);
   void fileNewFigure (void);
+  void fileSaveFigure (bool prompt = false);
+  void fileSaveFigureAs (void);
   void fileCloseFigure (void);
   void editCopy (void);
   void editCut (void);