You are not logged in.

Dear visitor, welcome to KDE-Forum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

brockers

Beginner

  • "brockers" started this thread

Posts: 3

Location: USA

Occupation: Software Engineer

  • Send private message

1

Wednesday, February 23rd 2005, 11:42pm

Help with KDE XML GUI menu setup

I have a toolbar/menu list that needs to be a "radio" style list (select a single option from a given list of options.) I checked out some example code in a couple different KDE projects to see how them implement the same functionality and started using KSelectAction.

It seems to work out ok, but I still have a problem. The actions list changes based on configuration settings (i.e. option 3 may or may not exist for a given configuration.) Now I don't mind "graying out" the option and I don't mind removing the option; but I don't seem to be able to do either without restarting the application. Evidently KSelectAction cannot be grayed out. I have failed to figure out how to remove an item from the KSelectAction after it has been build when the application is first started up.

So my question is. Am I using the correct KAction object from what I need to do? If so, how can I remove a item from the KSelectAction list AFTER I have built it? What is the best way single this change from my configuration dialog to my main application dialog?

If this is a pathetic question, I am sorry. I am still getting used to KDE development and sometimes get easily lost.

brockers

anda_skoa

Professional

Posts: 1,273

Location: Graz, Austria

Occupation: Software Developer

  • Send private message

2

Saturday, March 5th 2005, 4:01pm

You could clear the select action and fill in the currently available items.

Or use different instance of SelectAction and user KXMLClient::unplugActionList to change between them:
http://developer.kde.org/documentation/l…Client.html#a21

Cheers,
_
Qt/KDE Developer
Debian User