org.kde.koala

Class KSelectAction

public class KSelectAction extends KAction

Action for selecting one of several items. This action shows up a submenu with a list of items. One of them can be checked. If the user clicks on an item this item will automatically be checked, the formerly checked item becomes unchecked. There can be only one item checked at a time. See KSelectActionSignals for signals emitted by KSelectAction

UNKNOWN: Action for selecting one of several items.

Constructor Summary
protected KSelectAction(Class dummy)
KSelectAction(String text, KShortcut cut, QObject parent, String name)
Constructs a select action with text and potential keyboard accelerator but nothing else.
KSelectAction(String text, KShortcut cut, QObject parent)
KSelectAction(String text, KShortcut cut)
KSelectAction(String text)
KSelectAction(String text, KShortcut cut, QObject receiver, String slot, QObject parent, String name)
KSelectAction(String text, KShortcut cut, QObject receiver, String slot, QObject parent)
KSelectAction(String text, QIconSet pix, KShortcut cut, QObject parent, String name)
KSelectAction(String text, QIconSet pix, KShortcut cut, QObject parent)
KSelectAction(String text, QIconSet pix, KShortcut cut)
KSelectAction(String text, QIconSet pix)
KSelectAction(String text, String pix, KShortcut cut, QObject parent, String name)
KSelectAction(String text, String pix, KShortcut cut, QObject parent)
KSelectAction(String text, String pix, KShortcut cut)
KSelectAction(String text, String pix)
KSelectAction(String text, QIconSet pix, KShortcut cut, QObject receiver, String slot, QObject parent, String name)
KSelectAction(String text, QIconSet pix, KShortcut cut, QObject receiver, String slot, QObject parent)
KSelectAction(String text, String pix, KShortcut cut, QObject receiver, String slot, QObject parent, String name)
KSelectAction(String text, String pix, KShortcut cut, QObject receiver, String slot, QObject parent)
KSelectAction(QObject parent, String name)
KSelectAction(QObject parent)
KSelectAction()
Method Summary
voidchangeItem(int index, String text)
Changes the text of item @param index to @param text .
protected voidchangeItem(int id, int index, String text)
StringclassName()
voidclear()
Clears up all the items in this action
protected ArrayListcomboItems()
Depending on the menuAccelsEnabled property this method will return the actions items in a way for inclusion in a combobox with the ampersand character removed from all items or not.
intcomboWidth()
When this action is plugged into a toolbar, it creates a combobox.
intcurrentItem()
Returns the index of the current item.
StringcurrentText()
Returns the text of the currently selected item.
voiddispose()
Delete the wrapped C++ instance ahead of finalize()
protected voidfinalize()
Deletes the wrapped C++ instance
booleanisDisposed()
Has the wrapped C++ instance been deleted?
booleanisEditable()
When this action is plugged into a toolbar, it creates a combobox.
ArrayListitems()
booleanmenuAccelsEnabled()
QMetaObjectmetaObject()
intplug(QWidget widget, int index)
"Plug" or insert this action into a given widget.
intplug(QWidget widget)
QPopupMenupopupMenu()
Returns a pointer to the popup menu used by this action.
booleanremoveAmpersandsInCombo()
voidsetComboWidth(int width)
When this action is plugged into a toolbar, it creates a combobox.
voidsetCurrentItem(int index)
Sets the currently checked item.
voidsetEditable(boolean arg1)
When this action is plugged into a toolbar, it creates a combobox.
voidsetItems(String[] lst)
Sets the items to be displayed in this action You need to call this.
voidsetMaxComboViewCount(int n)
Sets the maximum items that are visible at once if the action is a combobox, that is the number of items in the combobox's viewport Only works before the action is plugged
voidsetMenuAccelsEnabled(boolean b)
Sets whether any occurrence of the ampersand character ( & ) in items should be interpreted as keyboard accelerator for items displayed in a menu or not.
protected voidslotActivated(int id)
protected voidslotActivated(String text)
protected voidslotActivated()
protected voidupdateClear(int id)
protected voidupdateComboWidth(int id)
protected voidupdateCurrentItem(int id)
protected voidupdateItems(int id)

Constructor Detail

KSelectAction

protected KSelectAction(Class dummy)

KSelectAction

public KSelectAction(String text, KShortcut cut, QObject parent, String name)
Constructs a select action with text and potential keyboard accelerator but nothing else. Use this only if you really know what you are doing.

Parameters: text The text that will be displayed. cut The corresponding keyboard accelerator (shortcut). parent This action's parent. name An internal name for this action.

UNKNOWN: Constructs a select action with text and potential keyboard accelerator but nothing else.

KSelectAction

public KSelectAction(String text, KShortcut cut, QObject parent)

KSelectAction

public KSelectAction(String text, KShortcut cut)

KSelectAction

public KSelectAction(String text)

KSelectAction

public KSelectAction(String text, KShortcut cut, QObject receiver, String slot, QObject parent, String name)

Parameters: text The text that will be displayed. cut The corresponding keyboard accelerator (shortcut). receiver The SLOT's parent. slot The SLOT to invoke to execute this action. parent This action's parent. name An internal name for this action.

UNKNOWN:

KSelectAction

public KSelectAction(String text, KShortcut cut, QObject receiver, String slot, QObject parent)

KSelectAction

public KSelectAction(String text, QIconSet pix, KShortcut cut, QObject parent, String name)

Parameters: text The text that will be displayed. pix The icons that go with this action. cut The corresponding keyboard accelerator (shortcut). parent This action's parent. name An internal name for this action.

UNKNOWN:

KSelectAction

public KSelectAction(String text, QIconSet pix, KShortcut cut, QObject parent)

KSelectAction

public KSelectAction(String text, QIconSet pix, KShortcut cut)

KSelectAction

public KSelectAction(String text, QIconSet pix)

KSelectAction

public KSelectAction(String text, String pix, KShortcut cut, QObject parent, String name)

Parameters: text The text that will be displayed. pix The dynamically loaded icon that goes with this action. cut The corresponding keyboard accelerator (shortcut). parent This action's parent. name An internal name for this action.

UNKNOWN:

KSelectAction

public KSelectAction(String text, String pix, KShortcut cut, QObject parent)

KSelectAction

public KSelectAction(String text, String pix, KShortcut cut)

KSelectAction

public KSelectAction(String text, String pix)

KSelectAction

public KSelectAction(String text, QIconSet pix, KShortcut cut, QObject receiver, String slot, QObject parent, String name)

Parameters: text The text that will be displayed. pix The icons that go with this action. cut The corresponding keyboard accelerator (shortcut). receiver The SLOT's parent. slot The SLOT to invoke to execute this action. parent This action's parent. name An internal name for this action.

UNKNOWN:

KSelectAction

public KSelectAction(String text, QIconSet pix, KShortcut cut, QObject receiver, String slot, QObject parent)

KSelectAction

public KSelectAction(String text, String pix, KShortcut cut, QObject receiver, String slot, QObject parent, String name)

Parameters: text The text that will be displayed. pix The dynamically loaded icon that goes with this action. cut The corresponding keyboard accelerator (shortcut). receiver The SLOT's parent. slot The SLOT to invoke to execute this action. parent This action's parent. name An internal name for this action.

UNKNOWN:

KSelectAction

public KSelectAction(String text, String pix, KShortcut cut, QObject receiver, String slot, QObject parent)

KSelectAction

public KSelectAction(QObject parent, String name)

Parameters: parent This action's parent. name An internal name for this action.

UNKNOWN:

KSelectAction

public KSelectAction(QObject parent)

KSelectAction

public KSelectAction()

Method Detail

changeItem

public void changeItem(int index, String text)
Changes the text of item @param index to @param text .

UNKNOWN: Changes the text of item @param index to @param text .

changeItem

protected void changeItem(int id, int index, String text)

className

public String className()

clear

public void clear()
Clears up all the items in this action

UNKNOWN: Clears up all the items in this action

comboItems

protected ArrayList comboItems()
Depending on the menuAccelsEnabled property this method will return the actions items in a way for inclusion in a combobox with the ampersand character removed from all items or not.

UNKNOWN: Depending on the menuAccelsEnabled property this method will return the actions items in a way for inclusion in a combobox with the ampersand character removed from all items or not.

comboWidth

public int comboWidth()
When this action is plugged into a toolbar, it creates a combobox. This returns the maximum width set by setComboWidth

UNKNOWN: When this action is plugged into a toolbar, it creates a combobox.

currentItem

public int currentItem()
Returns the index of the current item.

See Also: KSelectAction

UNKNOWN: Returns the index of the current item.

currentText

public String currentText()
Returns the text of the currently selected item.

UNKNOWN: Returns the text of the currently selected item.

dispose

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

finalize

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

isDisposed

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

isEditable

public boolean isEditable()
When this action is plugged into a toolbar, it creates a combobox.

Returns: true if the combo editable.

UNKNOWN: When this action is plugged into a toolbar, it creates a combobox.

items

public ArrayList items()

Returns: the items that can be selected with this action. Use setItems to set them.

UNKNOWN:

menuAccelsEnabled

public boolean menuAccelsEnabled()

metaObject

public QMetaObject metaObject()

plug

public int plug(QWidget widget, int index)
"Plug" or insert this action into a given widget. This will typically be a menu or a toolbar. From this point on, you will never need to directly manipulate the item in the menu or toolbar. You do all enabling/disabling/manipulation directly with your KSelectAction object.

Parameters: widget The GUI element to display this action. index The index of the item.

UNKNOWN: "Plug" or insert this action into a given widget.

plug

public int plug(QWidget widget)

popupMenu

public QPopupMenu popupMenu()
Returns a pointer to the popup menu used by this action.

UNKNOWN: Returns a pointer to the popup menu used by this action.

removeAmpersandsInCombo

public boolean removeAmpersandsInCombo()

setComboWidth

public void setComboWidth(int width)
When this action is plugged into a toolbar, it creates a combobox. This gives a _maximum_ size to the combobox. The minimum size is automatically given by the contents (the items).

UNKNOWN: When this action is plugged into a toolbar, it creates a combobox.

setCurrentItem

public void setCurrentItem(int index)
Sets the currently checked item.

Parameters: index Index of the item (remember the first item is zero).

UNKNOWN: Sets the currently checked item.

setEditable

public void setEditable(boolean arg1)
When this action is plugged into a toolbar, it creates a combobox. This makes the combo editable or read-only.

UNKNOWN: When this action is plugged into a toolbar, it creates a combobox.

setItems

public void setItems(String[] lst)
Sets the items to be displayed in this action You need to call this.

UNKNOWN: Sets the items to be displayed in this action You need to call this.

setMaxComboViewCount

public void setMaxComboViewCount(int n)
Sets the maximum items that are visible at once if the action is a combobox, that is the number of items in the combobox's viewport Only works before the action is plugged

UNKNOWN: Sets the maximum items that are visible at once if the action is a combobox, that is the number of items in the combobox's viewport Only works before the action is plugged

setMenuAccelsEnabled

public void setMenuAccelsEnabled(boolean b)
Sets whether any occurrence of the ampersand character ( & ) in items should be interpreted as keyboard accelerator for items displayed in a menu or not.

UNKNOWN: Sets whether any occurrence of the ampersand character ( & ) in items should be interpreted as keyboard accelerator for items displayed in a menu or not.

slotActivated

protected void slotActivated(int id)

slotActivated

protected void slotActivated(String text)

slotActivated

protected void slotActivated()

updateClear

protected void updateClear(int id)

updateComboWidth

protected void updateComboWidth(int id)

updateCurrentItem

protected void updateCurrentItem(int id)

updateItems

protected void updateItems(int id)