KWidgetsAddons
kselectaction.cpp
85 QObject::connect(q_ptr->selectableActionGroup(), &QActionGroup::triggered, q_ptr, &KSelectAction::slotActionTriggered);
316 // qCDebug(KWidgetsAddonsLog) << "KSelectAction::slotActionTriggered(" << action << ") text=" << text
320 trigger(); // then imitate usual QAction behaviour so that other submenus (and their items) become unchecked
466 // qCDebug(KWidgetsAddonsLog) << "KSelectActionPrivate::comboBoxCurrentIndexChanged(" << index << ")";
476 } else if (q->isEditable() && triggeringCombo && triggeringCombo->count() > 0 && index == triggeringCombo->count() - 1) {
533 QObject::connect(toolBar, &QToolBar::toolButtonStyleChanged, button, &QToolButton::setToolButtonStyle);
638 // qCDebug(KWidgetsAddonsLog) << "\t\taction " << action << " (text=" << action->text () << ") isChecked";
649 // qCDebug(KWidgetsAddonsLog) << "\t\tcurrent action still selected? " << (curAction && curAction->isChecked ());
686 const int index = e->before() ? comboBox->findData(QVariant::fromValue(e->before())) : comboBox->count();
698 comboBox->insertItem(index, e->action()->icon(), ::DropAmpersands(e->action()->text()), QVariant::fromValue(e->action()));
bool isEditable() const
When this action is plugged into a toolbar, it creates a combobox.
Definition kselectaction.cpp:420
bool setCurrentAction(QAction *action)
Sets the currently checked item.
Definition kselectaction.cpp:121
KSelectAction(QObject *parent)
Constructs a selection action with the specified parent.
Definition kselectaction.cpp:52
void setItems(const QStringList &lst)
Convenience function to create the list of selectable items.
Definition kselectaction.cpp:353
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:452
void deleteWidget(QWidget *widget) override
Reimplemented from QWidgetAction.
Definition kselectaction.cpp:588
bool menuAccelsEnabled() const
Returns whether ampersands passed to methods using QStrings are interpreted as keyboard accelerator i...
Definition kselectaction.cpp:504
virtual QAction * removeAction(QAction *action)
Remove the specified action from this action selector.
Definition kselectaction.cpp:259
void setComboWidth(int width)
When this action is plugged into a toolbar, it creates a combobox.
Definition kselectaction.cpp:196
void changeItem(int index, const QString &text)
Changes the text of item.
Definition kselectaction.cpp:342
virtual void slotActionTriggered(QAction *action)
This function is called whenever an action from the selections is triggered.
Definition kselectaction.cpp:310
@ MenuMode
Creates a button which pops up a menu when interacted with, as defined by toolButtonPopupMode().
Definition kselectaction.h:107
QList< QAction * > actions() const
Returns the list of selectable actions.
Definition kselectaction.cpp:97
void setToolBarMode(ToolBarMode mode)
Set the type of widget to be inserted in a toolbar to mode.
Definition kselectaction.cpp:440
QActionGroup * selectableActionGroup() const
The action group used to create exclusivity between the actions associated with this action.
Definition kselectaction.cpp:91
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:212
virtual void insertAction(QAction *before, QAction *action)
Inserts the action action to this widget's list of actions, before the action before.
Definition kselectaction.cpp:288
void indexTriggered(int index)
This signal is emitted when an item is selected.
void textTriggered(const QString &text)
This signal is emitted when an item is selected.
QAction * action(const QString &text, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Searches for an action with the specified text, using a search whose case sensitivity is defined by c...
Definition kselectaction.cpp:163
void actionTriggered(QAction *action)
This signal is emitted when an item is selected.
void addAction(QAction *action)
Add action to the list of selectable actions.
Definition kselectaction.cpp:230
void setMenuAccelsEnabled(bool b)
Sets whether any occurrence of the ampersand character ( & ) in items should be interpreted as keyboa...
Definition kselectaction.cpp:498
QAction * action(int index) const
Returns the action at index, if one exists.
Definition kselectaction.cpp:154
QWidget * createWidget(QWidget *parent) override
Reimplemented from QWidgetAction.
Definition kselectaction.cpp:510
void setEditable(bool)
When this action is plugged into a toolbar, it creates a combobox.
Definition kselectaction.cpp:408
bool setCurrentItem(int index)
Convenience function to set the currently checked action to be the action at index index.
Definition kselectaction.cpp:148
AKONADI_CALENDAR_EXPORT KCalendarCore::Event::Ptr event(const Akonadi::Item &item)
QString label(StandardShortcut id)
void setIconSize(const QSize &size)
QAction(QObject *parent)
void changed()
bool isCheckable() const const
void setChecked(bool)
bool isEnabled() const const
void setIcon(const QIcon &icon)
void setActionGroup(QActionGroup *group)
void setSeparator(bool b)
void setShortcut(const QKeySequence &shortcut)
statusTip
void setText(const QString &text)
void toggled(bool checked)
toolTip
void trigger()
bool isVisible() const const
whatsThis
QAction * action() const const
QAction * before() const const
QList< QAction * > actions() const const
QAction * checkedAction() const const
count
currentIndex
void currentIndexChanged(int index)
currentText
void setEditable(bool editable)
int findData(const QVariant &data, int role, Qt::MatchFlags flags) const const
void insertItem(int index, const QIcon &icon, const QString &text, const QVariant &userData)
QString itemText(int index) const const
void setMaxVisibleItems(int maxItems)
QAbstractItemModel * model() const const
void removeItem(int index)
void setEditText(const QString &text)
void setItemIcon(int index, const QIcon &icon)
void setItemText(int index, const QString &text)
ActionChanged
Qt::FocusReason reason() const const
const_reference at(qsizetype i) const const
qsizetype count() const const
qsizetype indexOf(const AT &value, qsizetype from) const const
bool isEmpty() const const
void reserve(qsizetype size)
qsizetype size() const const
Q_EMITQ_EMIT
bool blockSignals(bool block)
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
void deleteLater()
void destroyed(QObject *obj)
void installEventFilter(QObject *filterObj)
QObject * parent() const const
T qobject_cast(QObject *object)
bool setProperty(const char *name, QVariant &&value)
void setEnabled(bool enabled)
qsizetype indexOf(QChar ch, qsizetype from, Qt::CaseSensitivity cs) const const
qsizetype length() const const
QString & remove(QChar ch, Qt::CaseSensitivity cs)
QString toLower() const const
CaseSensitivity
NoFocus
ActiveWindowFocusReason
void actionTriggered(QAction *action)
iconSize
void iconSizeChanged(const QSize &iconSize)
toolButtonStyle
void toolButtonStyleChanged(Qt::ToolButtonStyle toolButtonStyle)
ToolButtonPopupMode
void setAutoRaise(bool enable)
void setPopupMode(ToolButtonPopupMode mode)
void setDefaultAction(QAction *action)
void setToolButtonStyle(Qt::ToolButtonStyle style)
void triggered(QAction *action)
QVariant fromValue(T &&value)
QAction * addAction(const QIcon &icon, const QString &text)
void addActions(const QList< QAction * > &actions)
void setEnabled(bool)
void setFocusPolicy(Qt::FocusPolicy policy)
void insertAction(QAction *before, QAction *action)
void setMaximumWidth(int maxw)
void removeAction(QAction *action)
void setStatusTip(const QString &)
void setToolTip(const QString &)
void setWhatsThis(const QString &)
virtual void deleteWidget(QWidget *widget)
virtual bool event(QEvent *event) override
Q_D(Todo)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:09:52 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:09:52 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.