org.kde.koala

Class KPanelMenu

public class KPanelMenu extends KPopupMenu

This class allows to build menu entries that will be dynamically added either to the K-menu, or to the panel as a normal button. These dynamic menus are located in shared libraries that will be loaded at runtime by Kicker (the %KDE panel). To build such a menu, you have to inherit this class and implement the pure virtual functions #initialize() and slotExec(). You also have to provide a factory object in your library, see KLibFactory. This factory is only used to construct the menu object. Finally, you also have to provide a desktop file describing your dynamic menu. The relevant entries are: Name, Comment, Icon and X-KDE-Library (which contains the library name without any extension). This desktop file has to be installed in $KDEDIR/share/apps/kicker/menuext/.

Author: The kicker maintainers, Michael Goffioul

UNKNOWN: Base class to build dynamically loaded menu entries for the K-menu, or the panel.

Constructor Summary
protected KPanelMenu(Class dummy)
Method Summary
StringclassName()
voiddeinitialize()
Deinitialize the menu: the menu is cleared and the initialized state is set to false.
voiddisableAutoClear()
Disable the automatic clearing of the menu.
booleaninitialized()
Tell if the menu has been initialized, that is it already contains items.
QMetaObjectmetaObject()
Stringpath()
Get the directory path associated with this menu, or null if there's no such associated path.
voidreinitialize()
Reinitialize the menu: the menu is first cleared, the initial state is set to false, and finally #initialize() is called.
voidsetInitialized(boolean on)
Set the initial state.
voidsetPath(String p)
Set a directory path to be associated with this menu.

Constructor Detail

KPanelMenu

protected KPanelMenu(Class dummy)

Method Detail

className

public String className()

deinitialize

public void deinitialize()
Deinitialize the menu: the menu is cleared and the initialized state is set to false. #initialize() is NOT called. It will be called before the menu is next shown, however. Use this slot if you want a delayed reinitialization.

UNKNOWN: Deinitialize the menu: the menu is cleared and the initialized state is set to false.

disableAutoClear

public void disableAutoClear()
Disable the automatic clearing of the menu. Kicker uses a cache system for its menus. After a specific configurable delay, the menu will be cleared. Use this function if you want to disable kicker's cache system, and avoid the clearing of your menu.

UNKNOWN: Disable the automatic clearing of the menu.

initialized

public boolean initialized()
Tell if the menu has been initialized, that is it already contains items. This is useful when you need to know if you have to clear the menu, or to fill it.

Returns: the initial state

See Also: KPanelMenu KPanelMenu

UNKNOWN: Tell if the menu has been initialized, that is it already contains items.

metaObject

public QMetaObject metaObject()

path

public String path()
Get the directory path associated with this menu, or null if there's no such associated path.

Returns: the associated directory path

See Also: KPanelMenu

UNKNOWN: Get the directory path associated with this menu, or String.null if there's no such associated path.

reinitialize

public void reinitialize()
Reinitialize the menu: the menu is first cleared, the initial state is set to false, and finally #initialize() is called. Use this if you want to refill your menu immediately.

UNKNOWN: Reinitialize the menu: the menu is first cleared, the initial state is set to false, and finally #initialize() is called.

setInitialized

public void setInitialized(boolean on)
Set the initial state. Set it to true when you menu is filled with the items you want.

Parameters: on the initial state

See Also: KPanelMenu KPanelMenu

UNKNOWN: Set the initial state.

setPath

public void setPath(String p)
Set a directory path to be associated with this menu.

Parameters: p the directory path

See Also: KPanelMenu

UNKNOWN: Set a directory path to be associated with this menu.