Mercurial > octave-antonio
comparison libgui/src/octave-qt-link.cc @ 20113:c36f2b083613
make copying figures to clipboard work (bug #44866)
* Figure.cc (Figure::copy_figure_callback): Just print the figure to a
file here, then call octave_link::copy_image_to_clipboard.
(delete_file): Delete unused static function.
* main-window.h, main-window.cc
(main_window::copy_image_to_clipboard): New function.
(main_window::construct_octave_qt_link): Connect
octave_qt_link::copy_image_to_clipboard_signal signal to
main_window::copy_image_to_clipboard slot.
* octave-qt-link.h, octave-qt-link.cc
(octave_qt_link::do_copy_image_to_clipboard): New function.
(octave_qt_link::copy_image_to_clipboard_signal): New signal.
* octave-link.h (octave_link::do_copy_image_to_clipboard):
New pure virtual function.
(octave_link::copy_image_to_clipboard): New static funtion.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 22 Apr 2015 00:36:24 -0500 |
parents | 89d843d6de14 |
children | d7bea5b11fc3 |
comparison
equal
deleted
inserted
replaced
20112:043dcb4da5fc | 20113:c36f2b083613 |
---|---|
93 { | 93 { |
94 emit exit_app_signal (status); | 94 emit exit_app_signal (status); |
95 | 95 |
96 // Could wait for a while and then timeout, but for now just | 96 // Could wait for a while and then timeout, but for now just |
97 // assume the GUI application exit will be without problems. | 97 // assume the GUI application exit will be without problems. |
98 return true; | |
99 } | |
100 | |
101 bool | |
102 octave_qt_link::do_copy_image_to_clipboard (const std::string& file) | |
103 { | |
104 emit copy_image_to_clipboard_signal (QString::fromStdString (file), true); | |
105 | |
98 return true; | 106 return true; |
99 } | 107 } |
100 | 108 |
101 bool | 109 bool |
102 octave_qt_link::do_edit_file (const std::string& file) | 110 octave_qt_link::do_edit_file (const std::string& file) |