Mercurial > octave
diff libgui/graphics/Backend.cc @ 19681:35bca657d74d
printing for Qt plot widget (bug #42537)
* Backend.h, Backend.cc (Backend::print_figure): New function.
* Canvas.h, Canvas.cc (Canvas::print): New function.
* Figure.h, Figure.cc (Figure:print): New function.
* Object.h, Object.cc (Object::slotPrint, Object::print):
New functions.
* ObjectProxy.h, ObjectProxy.cc (ObjectProxy::print): New function.
(ObjectProxy::sendPrint): New signal.
(ObjectProxy::init): Connect sendPrint signal to slotPrint slot of
current object.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sun, 08 Feb 2015 16:25:06 -0500 |
parents | 2f4406e9dad6 |
children | 3cc0734283dc |
line wrap: on
line diff
--- a/libgui/graphics/Backend.cc Sun Feb 08 12:10:05 2015 -0800 +++ b/libgui/graphics/Backend.cc Sun Feb 08 16:25:06 2015 -0500 @@ -172,6 +172,21 @@ } } +void Backend::print_figure (const graphics_object& go, + const std::string& term, + const std::string& file_cmd, bool /*mono*/, + const std::string& /*debug_file*/) const +{ + if (go.get_properties ().is_visible ()) + { + ObjectProxy* proxy = toolkitObjectProxy (go); + + if (proxy) + proxy->print (QString::fromStdString (file_cmd), + QString::fromStdString (term)); + } +} + Object* Backend::toolkitObject (const graphics_object& go) { ObjectProxy* proxy = toolkitObjectProxy (go);