Drop-in replacement for QFontComboBox, better previews

Chusslove Illich caslav.ilic at gmx.net
Fri May 9 23:34:40 BST 2008


> [: Chusslove Illich :]
> A possibility would also be to backtrack one level, inherit from KComboBox
> instead [...]

...which I just did, and now really like it better than inheriting from
QFontComboBox. After implementing the script resolutions as I've outlined
them in the previous message, almost nothing has been left to reuse of what
QFontComboBox did above QComboBox. The text completion is there too, so that
the user can quickly select a font when having a particular one in mind and
not wanting to browse the list.

Also, I was already able to reuse some of the functionality of KFontChooser,
and more is to come when common i18n is factored out. It seems to me natural
that KFontChooser and KFontComboBox behave as a "team", the latter a
lightweigt counterpart to the former.

I only didn't go for all of QFontComboBox functionality, left out filtering
of fonts by writing systems and font properties, which no KDE app uses.
Instead there is only the possibility to limit fonts to fixed-width, in line
with what KFontChooser allows too.

(And no Qt code is left inside, only its spirit, so no licensing issues.)

-- 
Chusslove Illich (Часлав Илић)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kfontcombobox.h
Type: text/x-c++hdr
Size: 3246 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080510/806e3d38/attachment.h>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kfontcombobox.cpp
Type: text/x-c++src
Size: 15044 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080510/806e3d38/attachment.cpp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080510/806e3d38/attachment.sig>


More information about the kde-core-devel mailing list