#include <KoSelectAction.h>
Public Slots | |
| virtual void | setCurrentSelection (int index) |
Public Slots inherited from TDEAction | |
| virtual void | setText (const TQString &text) |
| virtual bool | setShortcut (const TDEShortcut &) |
| virtual void | setWhatsThis (const TQString &text) |
| virtual void | setToolTip (const TQString &) |
| virtual void | setIconSet (const TQIconSet &iconSet) |
| virtual void | setEnabled (bool enable) |
| void | setDisabled (bool disable) |
| virtual void | setShortcutConfigurable (bool) |
| virtual void | activate () |
Signals | |
| void | selectionChanged (int) |
Signals inherited from TDEAction | |
| void | activated () |
| void | activated (TDEAction::ActivationReason reason, TQt::ButtonState state) |
Public Member Functions | |
| KoSelectAction (const TQString &text, const TQString &icon, TQObject *parent=0, const char *name=0) | |
| KoSelectAction (const TQString &text, const TQString &icon, const TQObject *receiver, const char *slot, TQObject *parent, const char *name=0) | |
| TDEPopupMenu * | popupMenu () const |
| void | popup (const TQPoint &global) |
| virtual int | plug (TQWidget *widget, int index=-1) |
| virtual int | currentSelection () |
| void | setShowCurrentSelection (bool show) |
Public Member Functions inherited from TDEAction | |
| TDEAction (const TQString &text, const TDEShortcut &cut, const TQObject *receiver, const char *slot, TDEActionCollection *parent, const char *name) | |
| TDEAction (const TQString &text, const TQIconSet &pix, const TDEShortcut &cut, const TQObject *receiver, const char *slot, TDEActionCollection *parent, const char *name) | |
| TDEAction (const TQString &text, const TQString &pix, const TDEShortcut &cut, const TQObject *receiver, const char *slot, TDEActionCollection *parent, const char *name) | |
| TDEAction (const KGuiItem &item, const TDEShortcut &cut, const TQObject *receiver, const char *slot, TDEActionCollection *parent, const char *name) | |
| TDEAction (const TQString &text, const TDEShortcut &cut=TDEShortcut(), TQObject *parent=0, const char *name=0) | |
| TDEAction (const TQString &text, const TDEShortcut &cut, const TQObject *receiver, const char *slot, TQObject *parent, const char *name=0) | |
| TDEAction (const TQString &text, const TQIconSet &pix, const TDEShortcut &cut=TDEShortcut(), TQObject *parent=0, const char *name=0) | |
| TDEAction (const TQString &text, const TQString &pix, const TDEShortcut &cut=TDEShortcut(), TQObject *parent=0, const char *name=0) | |
| TDEAction (const TQString &text, const TQIconSet &pix, const TDEShortcut &cut, const TQObject *receiver, const char *slot, TQObject *parent, const char *name=0) | |
| TDEAction (const TQString &text, const TQString &pix, const TDEShortcut &cut, const TQObject *receiver, const char *slot, TQObject *parent, const char *name=0) | |
| TDEAction (TQObject *parent=0, const char *name=0) | |
| virtual void | plugAccel (TDEAccel *accel, bool configurable=true) TDE_DEPRECATED |
| virtual void | unplug (TQWidget *w) |
| virtual void | unplugAccel () TDE_DEPRECATED |
| virtual bool | isPlugged () const |
| bool | isPlugged (const TQWidget *container) const |
| virtual bool | isPlugged (const TQWidget *container, int id) const |
| virtual bool | isPlugged (const TQWidget *container, const TQWidget *_representative) const |
| uint | tdeaccelCount () const |
| virtual TQString | text () const |
| virtual const TDEShortcut & | shortcut () const |
| virtual const TDEShortcut & | shortcutDefault () const |
| virtual bool | isEnabled () const |
| virtual bool | isShortcutConfigurable () const |
| virtual TQString | whatsThis () const |
| virtual TQString | toolTip () const |
| virtual TQIconSet | iconSet (TDEIcon::Group group, int size=0) const |
| TQIconSet | iconSet () const |
| int | accel () const TDE_DEPRECATED |
| void | setAccel (int key) TDE_DEPRECATED |
| void | setStatusText (const TQString &text) |
| int | menuId (int i) |
Protected Slots | |
| virtual void | execute (int index) |
Protected Slots inherited from TDEAction | |
| void | slotPopupActivated () |
| void | slotButtonClicked (int, TQt::ButtonState state) |
Additional Inherited Members | |
Public Types inherited from TDEAction | |
| enum | ActivationReason |
Static Public Member Functions inherited from TDEAction | |
| static int | getToolButtonID () |
Protected Member Functions inherited from TDEAction | |
| const KGuiItem & | guiItem () const |
Detailed Description
An action that provides a menu with items that can be selected.
The main difference between this action and a TDESelectAction 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
◆ KoSelectAction() [1/2]
| KoSelectAction::KoSelectAction | ( | const TQString & | text, |
| const TQString & | icon, | ||
| TQObject * | parent = 0, |
||
| const char * | name = 0 |
||
| ) |
Constructs a KoSelectAction with a text and an icon.
- Parameters
-
text The text that will be displayed. icon The dynamically loaded icon that goes with this action. parent This action's parent. name An internal name for this action.
Definition at line 54 of file KoSelectAction.cpp.
◆ KoSelectAction() [2/2]
| KoSelectAction::KoSelectAction | ( | const TQString & | text, |
| const TQString & | icon, | ||
| const TQObject * | receiver, | ||
| const char * | slot, | ||
| TQObject * | parent, | ||
| const char * | name = 0 |
||
| ) |
Same as above, but it also connects a slot to the selectionChanged(int) signal.
- Parameters
-
text The text that will be displayed. icon The dynamically loaded icon that goes with this action. receiver The slot's parent. slot The slot to invoke when a selectionChanged(int) signal is emited. parent This action's parent. name An internal name for this action.
Definition at line 63 of file KoSelectAction.cpp.
◆ ~KoSelectAction()
| KoSelectAction::~KoSelectAction | ( | ) |
Definition at line 72 of file KoSelectAction.cpp.
Member Function Documentation
◆ currentSelection()
|
virtual |
Returns the index of the currently selected item.
Definition at line 173 of file KoSelectAction.cpp.
◆ execute
|
protectedvirtualslot |
Execute an item.
By default it sets the item as selected and emits the selectionChanged signal.
- Parameters
-
index Index of the item that should be executed.
Definition at line 167 of file KoSelectAction.cpp.
◆ plug()
|
virtual |
Reimplemented from TDEAction.
Definition at line 87 of file KoSelectAction.cpp.
◆ popup()
| void KoSelectAction::popup | ( | const TQPoint & | global | ) |
Shows the popup menu.
- Parameters
-
global Position at which the popup menu is shown.
Definition at line 82 of file KoSelectAction.cpp.
◆ popupMenu()
| TDEPopupMenu * KoSelectAction::popupMenu | ( | ) | const |
Returns a pointer to the popup menu.
Definition at line 77 of file KoSelectAction.cpp.
◆ selectionChanged
|
signal |
Emited when the selection changed.
◆ setCurrentSelection
|
virtualslot |
Set which item that should be selected.
- Parameters
-
index Index of item that should be selected
Definition at line 178 of file KoSelectAction.cpp.
◆ setShowCurrentSelection()
| void KoSelectAction::setShowCurrentSelection | ( | bool | show | ) |
If the current selection selection should be shown or not in the menu.
Definition at line 188 of file KoSelectAction.cpp.
The documentation for this class was generated from the following files:

Public Slots inherited from