now that I'm a trifle more familiar with the code (sorry for the shifting around of things, I hope it's worth it in the future), I'm trying the printing stuff. Please comment as extensively as you can on this:
- Add a method print_file to server_rep, then implement it in those classes inheriting from it.
- From within those implementations, proceed like in tm_frame_rep::choose_file, and instantiate a new generic printer_widget.
- Implement this printer_widget, at least a Qt version of it. It should print the current document or parts of it, etc.
- #ifdef my way around a bit to leave things as they were before, for other platforms.
If this is the right way to proceed, please confirm. And then comment on this issue, related to the third item:
src/Graphics/Gui/widget.hpp says the following:
widget printer_widget (url ps_pdf_file);
// widget for printing a file, offering a way for selecting a page range,
// changing the paper type and orientation, previewing, etc.
But it would be way more reasonable, from a QT point of view, to have the renderer passed as an argument to the printer. Then I could just patch its output to my QPrinter and have the printing done. Since there's not a single implementation of printer_widget that I can find in the code, may I change the prototype to something along the lines of widget printer_widget (renderer r) ?
Regards,