Mercurial > octave-nkf
comparison libgui/graphics/Object.h @ 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 | 2f4406e9dad6 |
children | f0e61a67ad9f |
comparison
equal
deleted
inserted
replaced
19714:890ff06d84ce | 19715:35bca657d74d |
---|---|
26 #include <QObject> | 26 #include <QObject> |
27 | 27 |
28 #include "graphics.h" | 28 #include "graphics.h" |
29 | 29 |
30 class QObject; | 30 class QObject; |
31 class QString; | |
31 class QWidget; | 32 class QWidget; |
32 | 33 |
33 namespace QtHandles | 34 namespace QtHandles |
34 { | 35 { |
35 | 36 |
78 | 79 |
79 public slots: | 80 public slots: |
80 void slotUpdate (int pId); | 81 void slotUpdate (int pId); |
81 void slotFinalize (void); | 82 void slotFinalize (void); |
82 void slotRedraw (void); | 83 void slotRedraw (void); |
84 void slotPrint (const QString& file_cmd, const QString& term); | |
83 | 85 |
84 void objectDestroyed (QObject *obj = 0); | 86 void objectDestroyed (QObject *obj = 0); |
85 | 87 |
86 protected: | 88 protected: |
87 static Object* parentObject (const graphics_object& go); | 89 static Object* parentObject (const graphics_object& go); |
88 void init (QObject* obj, bool callBase = false); | 90 void init (QObject* obj, bool callBase = false); |
89 | 91 |
90 virtual void update (int pId); | 92 virtual void update (int pId); |
91 virtual void finalize (void); | 93 virtual void finalize (void); |
92 virtual void redraw (void); | 94 virtual void redraw (void); |
95 virtual void print (const QString& file_cmd, const QString& term); | |
93 | 96 |
94 virtual void beingDeleted (void); | 97 virtual void beingDeleted (void); |
95 | 98 |
96 protected: | 99 protected: |
97 graphics_handle m_handle; | 100 graphics_handle m_handle; |