Mercurial > octave-nkf
comparison 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 |
comparison
equal
deleted
inserted
replaced
19718:2b93834e5ede | 19719:7335cc071ab0 |
---|---|
68 Figure (const graphics_object& go, FigureWindow* win); | 68 Figure (const graphics_object& go, FigureWindow* win); |
69 ~Figure (void); | 69 ~Figure (void); |
70 | 70 |
71 static Figure* create (const graphics_object& go); | 71 static Figure* create (const graphics_object& go); |
72 | 72 |
73 QString fileName (void); | |
74 void setFileName (const QString& name); | |
75 | |
73 MouseMode mouseMode (void); | 76 MouseMode mouseMode (void); |
74 | 77 |
75 Container* innerContainer (void); | 78 Container* innerContainer (void); |
76 QWidget* menu (void); | 79 QWidget* menu (void); |
77 | 80 |
102 | 105 |
103 void updateFigureToolBarAndMenuBar (void); | 106 void updateFigureToolBarAndMenuBar (void); |
104 | 107 |
105 static void updateBoundingBoxHelper (void*); | 108 static void updateBoundingBoxHelper (void*); |
106 | 109 |
110 void save_figure_callback (const std::string& file); | |
111 | |
107 private slots: | 112 private slots: |
108 void setMouseMode (MouseMode mode); | 113 void setMouseMode (MouseMode mode); |
109 void fileNewFigure (void); | 114 void fileNewFigure (void); |
115 void fileSaveFigure (bool prompt = false); | |
116 void fileSaveFigureAs (void); | |
110 void fileCloseFigure (void); | 117 void fileCloseFigure (void); |
111 void editCopy (void); | 118 void editCopy (void); |
112 void editCut (void); | 119 void editCut (void); |
113 void editPaste (void); | 120 void editPaste (void); |
114 void helpAboutQtHandles (void); | 121 void helpAboutQtHandles (void); |