org.kde.koala

Class KActionCollection

public class KActionCollection extends QObject

A managed set of KAction objects. If you set the tooltips on KActions and want the tooltip to show in statusbar (recommended) then you will need to connect a couple of the actionclass signals to the toolbar. The easiest way of doing this is in your KMainWindow subclass, where you create a statusbar, do:
 actionCollection().setHighlightingEnabled(true);  
 connect(actionCollection(), SIGNAL("actionStatusText( String )"),
           statusBar(), SLOT("message( String )") );
 connect(actionCollection(), SIGNAL("clearStatusText()"),
           statusBar(), SLOT("clear()") );
 
See KActionCollectionSignals for signals emitted by KActionCollection

UNKNOWN: A managed set of KAction objects.

Constructor Summary
protected KActionCollection(Class dummy)
KActionCollection(QWidget parent, String name, KInstanceInterface instance)
KActionCollection(QWidget parent, String name)
KActionCollection(QWidget parent)
KActionCollection(QWidget watch, QObject parent, String name, KInstanceInterface instance)
Use this constructor if you want the collection's actions to restrict their accelerator keys to watch rather than the parent. If you don't require shortcuts, you can pass a null to the watch parameter.
KActionCollection(QWidget watch, QObject parent, String name)
KActionCollection(QWidget watch, QObject parent)
KActionCollection(KActionCollection copy)
KActionCollection(QObject parent, String name, KInstanceInterface instance)
KActionCollection(QObject parent, String name)
KActionCollection(QObject parent)
Method Summary
KActionaction(int index)
Return the KAction at position "index" in the action collection.
KActionaction(String name, String classname)
Find an action (optionally, of a given subclass of KAction) in the action collection.
KActionaction(String name)
booleanaddDocCollection(KActionCollection pDoc)
Doc/View model.
KAccelbuilderKAccel()
StringclassName()
voidclear()
Clears the entire actionCollection, deleting all actions.
voidconnectHighlight(QWidget container, KAction action)
Call this function if you want to receive a signal whenever a KAction is highlighted in a menu or a toolbar.
intcount()
Returns the number of actions in the collection @short Returns the number of actions in the collection
voiddisconnectHighlight(QWidget container, KAction action)
Disconnect highlight notifications for a particular pair of contianer and action.
voiddispose()
Delete the wrapped C++ instance ahead of finalize()
protected voidfinalize()
Deletes the wrapped C++ instance
ArrayListgroups()
Returns a list of all the groups of all the KActions in this action collection.
booleanhighlightingEnabled()
Return whether highlighting notifications are enabled.
voidinsert(KAction action)
Add an action to the collection.
KInstanceInterfaceinstance()
The instance with which this class is associated.
booleanisAutoConnectShortcuts()
This indicates whether new actions which are created in this collection have their keyboard shortcuts automatically connected on construction.
booleanisDisposed()
Has the wrapped C++ instance been deleted?
booleanisEmpty()
KAccelkaccel()
Returns the KAccel object of the most recently set widget.
QMetaObjectmetaObject()
KActionCollectionop_plus(KActionCollection arg1)
KActionCollectionop_plus_assign(KActionCollection arg1)
KXMLGUIClientInterfaceparentGUIClient()
The parent KXMLGUIClient, return null if not available.
booleanreadShortcutSettings(String sConfigGroup, KConfigBase pConfig)
Used for reading shortcut configuration from a non-XML rc file.
booleanreadShortcutSettings(String sConfigGroup)
booleanreadShortcutSettings()
voidremove(KAction action)
Removes an action from the collection and deletes it.
voidsetAutoConnectShortcuts(boolean arg1)
This indicates whether new actions which are created in this collection should have their keyboard shortcuts automatically connected on construction.
voidsetHighlightingEnabled(boolean enable)
Enable highlighting notification for specific KActions.
voidsetInstance(KInstanceInterface instance)
voidsetWidget(QWidget widget)
This sets the widget to which the keyboard shortcuts should be attached.
KActiontake(KAction action)
Removes an action from the collection.
booleanwriteShortcutSettings(String sConfigGroup, KConfigBase pConfig)
Used for writing shortcut configuration to a non-XML rc file.
booleanwriteShortcutSettings(String sConfigGroup)
booleanwriteShortcutSettings()

Constructor Detail

KActionCollection

protected KActionCollection(Class dummy)

KActionCollection

public KActionCollection(QWidget parent, String name, KInstanceInterface instance)

KActionCollection

public KActionCollection(QWidget parent, String name)

KActionCollection

public KActionCollection(QWidget parent)

KActionCollection

public KActionCollection(QWidget watch, QObject parent, String name, KInstanceInterface instance)
Use this constructor if you want the collection's actions to restrict their accelerator keys to watch rather than the parent. If you don't require shortcuts, you can pass a null to the watch parameter.

UNKNOWN: Use this constructor if you want the collection's actions to restrict their accelerator keys to watch rather than the parent.

KActionCollection

public KActionCollection(QWidget watch, QObject parent, String name)

KActionCollection

public KActionCollection(QWidget watch, QObject parent)

KActionCollection

public KActionCollection(KActionCollection copy)

KActionCollection

public KActionCollection(QObject parent, String name, KInstanceInterface instance)

KActionCollection

public KActionCollection(QObject parent, String name)

KActionCollection

public KActionCollection(QObject parent)

Method Detail

action

public KAction action(int index)
Return the KAction at position "index" in the action collection.

See Also: KActionCollection

UNKNOWN: Return the KAction at position "index" in the action collection.

action

public KAction action(String name, String classname)
Find an action (optionally, of a given subclass of KAction) in the action collection.

Parameters: name Name of the KAction. classname Name of the KAction subclass.

Returns: A pointer to the first KAction in the collection which matches the parameters or null if nothing matches.

UNKNOWN: Find an action (optionally, of a given subclass of KAction) in the action collection.

action

public KAction action(String name)

addDocCollection

public boolean addDocCollection(KActionCollection pDoc)
Doc/View model. This lets you add the action collection of a document to a view's action collection.

UNKNOWN: Doc/View model.

builderKAccel

public KAccel builderKAccel()

UNKNOWN: for KAction.kaccelCurrent() @short @internal, for KAction.kaccelCurrent()

className

public String className()

clear

public void clear()
Clears the entire actionCollection, deleting all actions.

See Also: KActionCollection

UNKNOWN: Clears the entire actionCollection, deleting all actions.

connectHighlight

public void connectHighlight(QWidget container, KAction action)
Call this function if you want to receive a signal whenever a KAction is highlighted in a menu or a toolbar. This is only needed if you do not add this action to this container. You will generally not need to call this function.

Parameters: container A container in which the KAction is plugged (must inherit QPopupMenu or KToolBar) action The action you are interested in

See Also: KActionCollection KActionCollection KActionCollection KActionCollection KActionCollection

UNKNOWN: Call this function if you want to receive a signal whenever a KAction is highlighted in a menu or a toolbar.

count

public int count()
Returns the number of actions in the collection @short Returns the number of actions in the collection

disconnectHighlight

public void disconnectHighlight(QWidget container, KAction action)
Disconnect highlight notifications for a particular pair of contianer and action. This is only needed if you do not add this action to this container. You will generally not need to call this function.

Parameters: container A container in which the KAction is plugged (must inherit QPopupMenu or KToolBar) action The action you are interested in

See Also: KActionCollection KActionCollection KActionCollection KActionCollection KActionCollection

UNKNOWN: Disconnect highlight notifications for a particular pair of contianer and action.

dispose

public void dispose()
Delete the wrapped C++ instance ahead of finalize()

finalize

protected void finalize()
Deletes the wrapped C++ instance

groups

public ArrayList groups()
Returns a list of all the groups of all the KActions in this action collection.

See Also: KAction KAction

UNKNOWN: Returns a list of all the groups of all the KActions in this action collection.

highlightingEnabled

public boolean highlightingEnabled()
Return whether highlighting notifications are enabled.

See Also: KActionCollection KActionCollection KActionCollection KActionCollection KActionCollection

UNKNOWN: Return whether highlighting notifications are enabled.

insert

public void insert(KAction action)
Add an action to the collection. Generally you don't have to call this. The action inserts itself automatically into its parent collection. This can be useful however for a short-lived collection (e.g. for a popupmenu, where the signals from the collection are needed too). (don't forget that in the simple case, a list of actions should be a simple KActionPtrList). If you manually insert actions into a 2nd collection, don't forget to take them out again before destroying the collection.

Parameters: action The KAction to add.

UNKNOWN: Add an action to the collection.

instance

public KInstanceInterface instance()
The instance with which this class is associated. @short The instance with which this class is associated.

isAutoConnectShortcuts

public boolean isAutoConnectShortcuts()
This indicates whether new actions which are created in this collection have their keyboard shortcuts automatically connected on construction.

See Also: KActionCollection

UNKNOWN: This indicates whether new actions which are created in this collection have their keyboard shortcuts automatically connected on construction.

isDisposed

public boolean isDisposed()
Has the wrapped C++ instance been deleted?

isEmpty

public boolean isEmpty()

kaccel

public KAccel kaccel()
Returns the KAccel object of the most recently set widget. @short Returns the KAccel object of the most recently set widget.

metaObject

public QMetaObject metaObject()

op_plus

public KActionCollection op_plus(KActionCollection arg1)

op_plus_assign

public KActionCollection op_plus_assign(KActionCollection arg1)

parentGUIClient

public KXMLGUIClientInterface parentGUIClient()
The parent KXMLGUIClient, return null if not available.

UNKNOWN: The parent KXMLGUIClient, return 0L if not available.

readShortcutSettings

public boolean readShortcutSettings(String sConfigGroup, KConfigBase pConfig)
Used for reading shortcut configuration from a non-XML rc file.

UNKNOWN: Used for reading shortcut configuration from a non-XML rc file.

readShortcutSettings

public boolean readShortcutSettings(String sConfigGroup)

readShortcutSettings

public boolean readShortcutSettings()

remove

public void remove(KAction action)
Removes an action from the collection and deletes it. Since the KAction destructor removes the action from the collection, you generally don't have to call this.

Parameters: action The KAction to remove.

UNKNOWN: Removes an action from the collection and deletes it.

setAutoConnectShortcuts

public void setAutoConnectShortcuts(boolean arg1)
This indicates whether new actions which are created in this collection should have their keyboard shortcuts automatically connected on construction. Set to 'false' if you will be loading XML-based settings. This is automatically done by KParts. The default is 'true'.

See Also: KActionCollection

UNKNOWN: This indicates whether new actions which are created in this collection should have their keyboard shortcuts automatically connected on construction.

setHighlightingEnabled

public void setHighlightingEnabled(boolean enable)
Enable highlighting notification for specific KActions. This is false by default, so, by default, the highlighting signals will not be emitted.

See Also: KActionCollection KActionCollection KActionCollection KActionCollection KActionCollection

UNKNOWN: Enable highlighting notification for specific KActions.

setInstance

public void setInstance(KInstanceInterface instance)

setWidget

public void setWidget(QWidget widget)
This sets the widget to which the keyboard shortcuts should be attached. You only need to call this if a null pointer was passed in the constructor.

UNKNOWN: This sets the widget to which the keyboard shortcuts should be attached.

take

public KAction take(KAction action)
Removes an action from the collection. Since the KAction destructor removes the action from the collection, you generally don't have to call this.

Parameters: action the KAction to remove.

Returns: NULL if not found else returns action.

UNKNOWN: Removes an action from the collection.

writeShortcutSettings

public boolean writeShortcutSettings(String sConfigGroup, KConfigBase pConfig)
Used for writing shortcut configuration to a non-XML rc file.

UNKNOWN: Used for writing shortcut configuration to a non-XML rc file.

writeShortcutSettings

public boolean writeShortcutSettings(String sConfigGroup)

writeShortcutSettings

public boolean writeShortcutSettings()