Mercurial > hg > octave-nkf
diff libgui/graphics/ObjectProxy.cc @ 19882: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 | fe0e34be5576 |
children | 3cc0734283dc |
line wrap: on
line diff
--- a/libgui/graphics/ObjectProxy.cc +++ b/libgui/graphics/ObjectProxy.cc @@ -24,6 +24,8 @@ #include <config.h> #endif +#include <QString> + #include "oct-mutex.h" #include "Object.h" @@ -50,6 +52,8 @@ m_object, SLOT (slotFinalize (void))); disconnect (this, SIGNAL (sendRedraw (void)), m_object, SLOT (slotRedraw (void))); + disconnect (this, SIGNAL (sendPrint (const QString&, const QString&)), + m_object, SLOT (slotPrint (const QString&, const QString&))); } m_object = obj; @@ -62,6 +66,8 @@ m_object, SLOT (slotFinalize (void))); connect (this, SIGNAL (sendRedraw (void)), m_object, SLOT (slotRedraw (void))); + connect (this, SIGNAL (sendPrint (const QString&, const QString&)), + m_object, SLOT (slotPrint (const QString&, const QString&))); } } } @@ -91,4 +97,9 @@ emit sendRedraw (); } + void ObjectProxy::print (const QString& file_cmd, const QString& term) +{ + emit sendPrint (file_cmd, term); +} + };