Printing of Shortcuts

Andreas Hartmetz ahartmetz at gmail.com
Tue Mar 18 09:04:22 GMT 2008


Am Dienstag, 18. März 2008 00:54:29 schrieb Andreas Pakulat:
> Hi,
>
> 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
> <appname>
>   <list>
> 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.
>
> Andreas

That is a pretty awesome idea and the code is short and sweet. Great!

-- 
Spontaneous combustion! What a stroke of luck!




More information about the kde-core-devel mailing list