Printing of Shortcuts

Andreas Pakulat apaku at
Mon Mar 17 23:54:29 GMT 2008


I just noticed the April 7th deadline and decided that this feature is
probably doable until 4.1 (in contrast to the KTE addition I seemingly
need to do): A print button in KShortcutsEditor.

Attached is a first draft for the patch, it adds the button to the right
of the lineedit as that seemed to be a position where it wouldn't take
too much space. I'm fine with any other placement.

The implementation simply iterates over the treewidget and collects the
information. It produces an table using the QText api.

Finally it calls QPrintDialog and prints the whole thing. The attached
pdf file is an example of what I get from kwrite.

Obviously it needs some more formatting (headers, maybe bold on the
primary shortcut) but there are a few questions from me too:

- Am I right that for all apps the editor ideally should have
and not have "Shortcut" as the group? At least thats what I get for
kwrite/kate and kdevelop (i.e. xmlgui apps)

- printing dialog, is the standard Qt dialog enough for this feature?
  I'm not sure for example if it makes sense to provide a preview or
  have extra features like changing the font to be used for printing or
  selection of pages

I think thats all for now, any other comments are welcome as well.


You'll wish that you had done some of the hard things when they were easier
to do.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kdeui_shortcut_print.diff
Type: text/x-diff
Size: 5373 bytes
Desc: not available
URL: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kdeui_shortcuts_print_example.pdf
Type: application/pdf
Size: 20587 bytes
Desc: not available
URL: <>

More information about the kde-core-devel mailing list