[kde-edu]: Icons for special characters

Anne-Marie Mahfouf annemarie.mahfouf at free.fr
Fri Apr 30 16:42:26 CEST 2004


On April 29, 2004 10:15 pm, Peter Hedlund wrote:
> Hi,
>
> I have written the function below to generate an icon for an arbitrary
> character. It's used in KWordQuiz to provide a toolbar for special
> characters. The code can be used in a KAction constructor or in
> KAction::setIcon(). IMHO the generated icons scale very well from 16 to 48,
> the sizes usually available for KToolbar.
>
> If you like the idea the code could be used in e.g. KHangman and KLettres,
> programs that also provide toolbars for special characters. Then there
> would be no need to distribute the ready-made icons currently included with
> these programs.
yes, it'll be far better than the icons I made which are only one size and 
quite ugly ;)

However, I have some problems to display some Czech characters as c with caron 
and Serbian chars.

I don't save the letters in the config file as you do but I currently use the 
charIcon(const QChar & c) method directly in 
KToolBar::insertButton (charIcon('a'),....);

I guess I'll have maybe to set a data file for each language and get the chars 
from it. 

I'll get around it and I am sure I'll manage to sort it out :)

Thanks for this method which provides a proper set of toolbar icons in all 
sizes and consistent font.

One remark: why the blue color? 

annma


More information about the kde-edu mailing list