KDEUI
kselectaction.cpp
Go to the documentation of this file.
98 QObject::connect(q_ptr->selectableActionGroup(), SIGNAL(triggered(QAction*)), q_ptr, SLOT(actionTriggered(QAction*)));
144 kWarning (129) << "Action does not have the correct properties to be current:" << action->text();
319 trigger(); // then imitate usual QAction behaviour so that other submenus (and their items) become unchecked
536 QObject::connect(button, SIGNAL(triggered(QAction*)), toolBar, SIGNAL(actionTriggered(QAction*)));
638 //kDebug (129) << "\t\tcurrent action still selected? " << (curAction && curAction->isChecked ());
QAction * checkedAction() const
void setText(const QString &text)
void setStatusTip(const QString &)
Type type() const
void setComboWidth(int width)
When this action is plugged into a toolbar, it creates a combobox.
Definition: kselectaction.cpp:201
QAbstractItemModel * model() const
void setEditable(bool editable)
"Re-implemented" so that setEditable(true) creates a KLineEdit instead of QLineEdit.
Definition: kcombobox.cpp:386
ToolBarMode toolBarMode() const
Returns which type of widget (combo box or button with drop-down menu) will be inserted in a toolbar...
void setToolBarMode(ToolBarMode mode)
Set the type of widget to be inserted in a toolbar to mode.
Definition: kselectaction.cpp:434
void setSeparator(bool b)
void addAction(QAction *action)
void addActions(QList< QAction * > actions)
void setDefaultAction(QAction *action)
void setFocusPolicy(Qt::FocusPolicy policy)
Creates a button which pops up a menu when interacted with, as defined by toolButtonPopupMode().
Definition: kselectaction.h:108
QObject * sender() const
void setChecked(bool)
void setIcon(const QIcon &icon)
void setMaxComboViewCount(int n)
Sets the maximum items that are visible at once if the action is a combobox, that is the number of it...
Definition: kselectaction.cpp:215
bool isVisible() const
const T & at(int i) const
void setEditText(const QString &text)
QString itemText(int index) const
virtual void addAction(QAction *action)
Add action to the list of selectable actions.
Definition: kselectaction.cpp:230
void setItemText(int index, const QString &text)
int comboWidth() const
When this action is plugged into a toolbar, it creates a combobox.
void insertItem(int index, const QString &text, const QVariant &userData)
virtual QAction * removeAction(QAction *action)
Remove the specified action from this action selector.
Definition: kselectaction.cpp:278
KSelectAction(QObject *parent)
Constructs a selection action with the specified parent.
Definition: kselectaction.cpp:56
QString toolTip() const
void setToolButtonPopupMode(QToolButton::ToolButtonPopupMode mode)
Set how this list of actions should behave when in popup mode and plugged into a toolbar.
Definition: kselectaction.cpp:446
void changed()
void trigger()
toolButtonStyle
int indexOf(const T &value, int from) const
QAction * action() const
Qt::FocusReason reason() const
void setEditable(bool)
When this action is plugged into a toolbar, it creates a combobox.
Definition: kselectaction.cpp:404
void setEnabled(bool)
int count(const T &value) const
count
void setShortcutConfigurable(bool configurable)
Indicate whether the user may configure the action's shortcut.
Definition: kaction.cpp:178
void installEventFilter(QObject *filterObj)
virtual QWidget * createWidget(QWidget *parent)
Reimplemented from.
Definition: kselectaction.cpp:510
QStringList items() const
Convenience function which returns the items that can be selected with this action.
void setIconSize(const QSize &size)
bool isEmpty() const
void setItems(const QStringList &lst)
Convenience function to create the list of selectable items.
Definition: kselectaction.cpp:349
bool isEditable() const
When this action is plugged into a toolbar, it creates a combobox.
Definition: kselectaction.cpp:415
QString currentText() const
Returns the text of the currently selected item.
void setMenuAccelsEnabled(bool b)
Sets whether any occurrence of the ampersand character ( & ) in items should be interpreted as keyboa...
Definition: kselectaction.cpp:498
void setAutoRaise(bool enable)
QList< QAction * > actions() const
Returns the list of selectable actions.
Definition: kselectaction.cpp:110
QString whatsThis() const
void setEnabled(bool enabled)
void setShortcut(const KShortcut &shortcut, ShortcutTypes type=ShortcutTypes(ActiveShortcut|DefaultShortcut))
Set the shortcut for this action.
Definition: kaction.cpp:198
QString toLower() const
bool blockSignals(bool block)
QVariant fromValue(const T &value)
bool isCheckable() const
KLocale * locale()
QString removeAcceleratorMarker(const QString &label) const
QActionGroup * selectableActionGroup() const
The action group used to create exclusivity between the actions associated with this action...
Definition: kselectaction.cpp:104
QList< QAction * > actions() const
void removeItem(int index)
void setWhatsThis(const QString &)
QString statusTip() const
bool menuAccelsEnabled() const
Returns whether ampersands passed to methods using QStrings are interpreted as keyboard accelerator i...
Definition: kselectaction.cpp:504
void setMaximumWidth(int maxw)
int findData(const QVariant &data, int role, QFlags< Qt::MatchFlag > flags) const
Creates a combo box which contains the actions.
Definition: kselectaction.h:111
QAction * action(int index) const
Returns the action at index, if one exists.
Definition: kselectaction.cpp:162
void changeItem(int index, const QString &text)
Changes the text of item.
Definition: kselectaction.cpp:337
void setActionGroup(QActionGroup *group)
void setPopupMode(ToolButtonPopupMode mode)
void removeAction(QAction *action)
void setItemIcon(int index, const QIcon &icon)
virtual void deleteWidget(QWidget *widget)
QToolButton::ToolButtonPopupMode toolButtonPopupMode() const
Returns the style for the list of actions, when this action is plugged into a KToolBar.
currentIndex
static QDebug kWarning(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
iconSize
virtual void actionTriggered(QAction *action)
This function is called whenever an action from the selections is triggered.
Definition: kselectaction.cpp:309
QAction * before() const
void setToolTip(const QString &)
QAction(QObject *parent)
currentText
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QObject * parent() const
void setToolButtonStyle(Qt::ToolButtonStyle style)
QString newItem(const QString &type, const QString &name, const QString &key, const QString &defaultValue, const CfgConfig &cfg, const QString ¶m=QString())
void setMaxVisibleItems(int maxItems)
void triggered(QAction *action)
This signal is emitted when an item is selected;.
bool setCurrentAction(QAction *action)
Sets the currently checked item.
Definition: kselectaction.cpp:133
void destroyed(QObject *obj)
bool isEnabled() const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:00 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:00 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.