# kdeui Library API Documentation

Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Namespaces | Source Files

# KListAction Class Reference

`#include <kactionclasses.h>`

Inheritance diagram for KListAction:

[legend]
Collaboration diagram for KListAction:

[legend]
List of all members.

## Public Slots

virtual void | setCurrentItem (int index)

## Public Member Functions

| KListAction (const QString &text, const KShortcut &cut=KShortcut(), QObject *parent=0, const char *name=0)
| KListAction (const QString &text, const KShortcut &cut, const QObject *receiver, const char *slot, QObject *parent, const char *name=0)
| KListAction (const QString &text, const QIconSet &pix, const KShortcut &cut=KShortcut(), QObject *parent=0, const char *name=0)
| KListAction (const QString &text, const QString &pix, const KShortcut &cut=KShortcut(), QObject *parent=0, const char *name=0)
| KListAction (const QString &text, const QIconSet &pix, const KShortcut &cut, const QObject *receiver, const char *slot, QObject *parent, const char *name=0)
| KListAction (const QString &text, const QString &pix, const KShortcut &cut, const QObject *receiver, const char *slot, QObject *parent, const char *name=0)
| KListAction (QObject *parent=0, const char *name=0)
virtual | ~KListAction ()
virtual QString | currentText () const
virtual int | currentItem () const

## Protected Member Functions

virtual void | virtual_hook (int id, void *data)

## Detailed Description

Deprecated:
  Use KSelectAction instead.

Definition at line 571 of file kactionclasses.h.

## Constructor & Destructor Documentation

KListAction::KListAction | ( | const QString & | text,
|  | const KShortcut & | cut = `KShortcut()`,
|  | QObject * | parent = `0`,
|  | const char * | name = `0`
| ) |

Constructs a list 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.

Definition at line 828 of file kactionclasses.cpp.

KListAction::KListAction | ( | const QString & | text,
|  | const KShortcut & | cut,
|  | const QObject * | receiver,
|  | const char * | slot,
|  | QObject * | parent,
|  | const char * | name = `0`
| ) |

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.

Definition at line 835 of file kactionclasses.cpp.

References KAction::activated(), and QObject::connect().

KListAction::KListAction | ( | const QString & | text,
|  | const QIconSet & | pix,
|  | const KShortcut & | cut = `KShortcut()`,
|  | QObject * | parent = `0`,
|  | const char * | name = `0`
| ) |

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.

Definition at line 845 of file kactionclasses.cpp.

KListAction::KListAction | ( | const QString & | text,
|  | const QString & | pix,
|  | const KShortcut & | cut = `KShortcut()`,
|  | QObject * | parent = `0`,
|  | const char * | name = `0`
| ) |

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.

Definition at line 853 of file kactionclasses.cpp.

KListAction::KListAction | ( | const QString & | text,
|  | const QIconSet & | pix,
|  | const KShortcut & | cut,
|  | const QObject * | receiver,
|  | const char * | slot,
|  | QObject * | parent,
|  | const char * | name = `0`
| ) |

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.

Definition at line 861 of file kactionclasses.cpp.

References KAction::activated(), and QObject::connect().

KListAction::KListAction | ( | const QString & | text,
|  | const QString & | pix,
|  | const KShortcut & | cut,
|  | const QObject * | receiver,
|  | const char * | slot,
|  | QObject * | parent,
|  | const char * | name = `0`
| ) |

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.

Definition at line 872 of file kactionclasses.cpp.

References KAction::activated(), and QObject::connect().

KListAction::KListAction | ( | QObject * | parent = `0`,
|  | const char * | name = `0`
| ) |

Parameters:

  | parent | This action's parent.
  | name | An internal name for this action.

Definition at line 883 of file kactionclasses.cpp.

KListAction::~KListAction | ( |  | ) | `[virtual]`

| Destructor. Definition at line 889 of file kactionclasses.cpp.

## Member Function Documentation

QString KListAction::currentText | ( |  | ) | const`[virtual]`

| Returns the text of the currently selected item. Reimplemented from KSelectAction. Definition at line 904 of file kactionclasses.cpp. References currentItem(), and KSelectAction::items().

int KListAction::currentItem | ( |  | ) | const`[virtual]`

Returns the index of the current item.

See also:
  setCurrentItem

Reimplemented from KSelectAction.

Definition at line 912 of file kactionclasses.cpp.

Referenced by currentText().

void KListAction::setCurrentItem | ( | int | index | ) | `[virtual, slot]`

Sets the currently checked item.

Parameters:

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

Reimplemented from KSelectAction.

Definition at line 894 of file kactionclasses.cpp.

References KSelectAction::setCurrentItem().

The documentation for this class was generated from the following files:

- kactionclasses.h
- kactionclasses.cpp

This file is part of the documentation for kdeui Library Version 3.4.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat Jun 11 20:21:34 2005 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003