[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Q: KActions and their icons
From:       Michael Jarrett <gexcfxyy () umail ! corel ! com>
Date:       2001-03-01 18:49:44
[Download RAW message or body]

You can specify an icon in one of the overloaded constructors, I belive.
I'd tell you which one, but I can't get into developer.kde.org right
now...
Alternatively, if you're willing to use XML GUI, you can use the
<ActionProperties> tag - <Action name="" icon=""> under that will set a
specific icon for an action.

Michael Jarrett
michaelj@corel.com

Adriaan de Groot wrote:
> 
> In an attempt to make KPilot use the more modern UI goodies that KDE2
> provides, I decided to switch to KActions. My code now looks like this:
> 
>         p = new KAction(i18n("Configure Conduits..."),
>                 "configure",
>                 0,
>                 this,
>                 SLOT(slotConfigureConduits()),
>                 this);
>         p->plug(fileMenu);
>         fileMenu->insertSeparator(-1);
>         p = new KAction(i18n("&HotSync"),
>                 "hotsync",
>                 0,
>                 this,
>                 SLOT(slotRequestHotSync()),
>                 this);
>         p->plug(fileMenu);
> 
> You can see I haven't switched to XML GUI yet; I figured (a) KPilot's UI
> is so simple there's not much point in making it configurable (b) take
> small steps.
> 
> I've created files {lo16,hi22,hi32}-action-hotsync.png, since I saw that
> KOrganizer has something similar [on a side note, where the heck can I
> find out what these mean? ie. how can I make these? right now I've just
> copied 5days.png from KOrganizer, as a test]. These icons get installed
> into $KDEDIR/share/apps/kpilot/locolor/16x16/actions/hotsync.png, and
> similarly for the other two.
> 
> The code above makes one "Configure" entry with the standard configure
> icon (the wrench). So that's OK [yes, I know about
> KStdAction::preferences() -- that's for Configure KPilot]. The problem is
> with the second KAction, which doesn't use a standard icon. "hotsync" is
> one of my own. The problem is that instead of the hotsync icon I get the
> "unknown" icon. So where does KAction get its icons from?
> 
> --
> +------------------------------+--------------------------------------------+
> + Adriaan de Groot             + Project: FRESCoS                           +
> + adridg@cs.kun.nl             + Private: adridg@sci.kun.nl                 +
> + Kamer A6020 tel. 024 3652272 + http://www.cs.kun.nl/~adridg/frescos/      +
> 
> 
> >> Visit http://master.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
-- 
The address in the headers is not the poster's real email address.  Do not send
private mail to the poster using your mailer's "reply" feature.  CC's of mail 
to mailing lists are OK.  Problem reports to "postmaster@umail.corel.com".  
The poster's email address is "michaelj@corel.com".
 
>> Visit http://master.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic