KoSelectAction Class Reference
An action that provides a menu with items that can be selected. More...
#include <koselectaction.h>
Inheritance diagram for KoSelectAction:

Public Slots | |
virtual void | setCurrentSelection (int index) |
Signals | |
void | selectionChanged (int) |
Public Member Functions | |
KoSelectAction (const QString &text, const QString &icon, QObject *parent=0, const char *name=0) | |
KoSelectAction (const QString &text, const QString &icon, const QObject *receiver, const char *slot, QObject *parent, const char *name=0) | |
KPopupMenu * | popupMenu () const |
void | popup (const QPoint &global) |
virtual int | plug (QWidget *widget, int index=-1) |
virtual int | currentSelection () |
Protected Slots | |
virtual void | execute (int index) |
Detailed Description
An action that provides a menu with items that can be selected.The main difference between this action and a KSelectAction is that it is plugged into a toolbar as a dropdown menu and not as a combobox.
Definition at line 31 of file koselectaction.h.
Constructor & Destructor Documentation
|
Constructs a KoSelectAction with a text and an icon.
Definition at line 54 of file koselectaction.cpp. References execute(), and popupMenu(). |
|
Same as above, but it also connects a slot to the selectionChanged(int) signal.
Definition at line 62 of file koselectaction.cpp. References execute(), popupMenu(), and selectionChanged(). |
Member Function Documentation
|
Returns a pointer to the popup menu.
Definition at line 76 of file koselectaction.cpp. Referenced by KoLineWidthAction::createMenu(), KoLineStyleAction::createMenu(), KoSelectAction(), popup(), and setCurrentSelection(). |
|
Shows the popup menu.
Definition at line 81 of file koselectaction.cpp. References popupMenu(). Referenced by KoLineWidthAction::createMenu(), and KoLineStyleAction::createMenu(). |
|
Returns the index of the currently selected item.
Definition at line 172 of file koselectaction.cpp. |
|
Emited when the selection changed.
Referenced by execute(), and KoSelectAction(). |
|
Set which item that should be selected.
Definition at line 177 of file koselectaction.cpp. References popupMenu(). Referenced by execute(), KoLineWidthAction::execute(), and KoLineWidthAction::setCurrentWidth(). |
|
Execute an item. By default it sets the item as selected and emits the selectionChanged signal.
Reimplemented in KoLineWidthAction. Definition at line 166 of file koselectaction.cpp. References selectionChanged(), and setCurrentSelection(). Referenced by KoSelectAction(). |
The documentation for this class was generated from the following files: