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

List:       kde-devel
Subject:    Q: KActions and their icons
From:       Adriaan de Groot <adridg () sci ! kun ! nl>
Date:       2001-03-01 14:45:46
[Download RAW message or body]

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 <<

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

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