##// END OF EJS Templates
Add printing support....
Mark Voorhies -
Show More
@@ -498,9 +498,13 b' class ConsoleWidget(Configurable, QtGui.QWidget):'
498 498 text = unicode(QtGui.QApplication.clipboard().text(mode)).rstrip()
499 499 self._insert_plain_text_into_buffer(cursor, dedent(text))
500 500
501 def print_(self, printer):
501 def print_(self, printer = None):
502 502 """ Print the contents of the ConsoleWidget to the specified QPrinter.
503 503 """
504 if(printer is None):
505 printer = QtGui.QPrinter()
506 if(QtGui.QPrintDialog(printer).exec_() != QtGui.QDialog.Accepted):
507 return
504 508 self._control.print_(printer)
505 509
506 510 def prompt_to_top(self):
@@ -737,6 +741,10 b' class ConsoleWidget(Configurable, QtGui.QWidget):'
737 741 menu.addSeparator()
738 742 menu.addAction('Select All', self.select_all)
739 743
744 menu.addSeparator()
745 print_action = menu.addAction('Print', self.print_)
746 print_action.setEnabled(True)
747
740 748 return menu
741 749
742 750 def _control_key_down(self, modifiers, include_command=True):
General Comments 0
You need to be logged in to leave comments. Login now