Mercurial > octave-nkf
comparison libgui/graphics/Object.cc @ 19715: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 | 5fec783ffc6d |
comparison
equal
deleted
inserted
replaced
19714:890ff06d84ce | 19715:35bca657d74d |
---|---|
22 | 22 |
23 #ifdef HAVE_CONFIG_H | 23 #ifdef HAVE_CONFIG_H |
24 #include <config.h> | 24 #include <config.h> |
25 #endif | 25 #endif |
26 | 26 |
27 #include <QString> | |
27 #include <QVariant> | 28 #include <QVariant> |
28 | 29 |
29 #include "Backend.h" | 30 #include "Backend.h" |
30 #include "Object.h" | 31 #include "Object.h" |
31 #include "QtHandlesUtils.h" | 32 #include "QtHandlesUtils.h" |
111 | 112 |
112 if (object ().valid_object ()) | 113 if (object ().valid_object ()) |
113 redraw (); | 114 redraw (); |
114 } | 115 } |
115 | 116 |
117 void Object::slotPrint (const QString& file_cmd, const QString& term) | |
118 { | |
119 gh_manager::auto_lock lock; | |
120 | |
121 if (object ().valid_object ()) | |
122 print (file_cmd, term); | |
123 } | |
124 | |
116 void Object::update (int /* pId */) | 125 void Object::update (int /* pId */) |
117 { | 126 { |
118 } | 127 } |
119 | 128 |
120 void Object::finalize (void) | 129 void Object::finalize (void) |
126 } | 135 } |
127 deleteLater (); | 136 deleteLater (); |
128 } | 137 } |
129 | 138 |
130 void Object::redraw (void) | 139 void Object::redraw (void) |
140 { | |
141 } | |
142 | |
143 void Object::print (const QString& file_cmd, const QString& term) | |
131 { | 144 { |
132 } | 145 } |
133 | 146 |
134 void Object::beingDeleted (void) | 147 void Object::beingDeleted (void) |
135 { | 148 { |