Command for editors, e.g. to be added to a QMenu.
More...
#include <editorcommand.h>
Inherits QObject.
|
| EditorCommand ()=delete |
|
| EditorCommand (const EditorCommand &other)=delete |
|
| EditorCommand (const QString &identifier, const char *text, const char *description, const QString &iconFp, Flags flags, const QList< QKeySequence > &defaultKeySequences, QObject *parent=nullptr) noexcept |
|
| ~EditorCommand () noexcept |
|
const QString & | getIdentifier () const noexcept |
|
const QString & | getText () const noexcept |
|
QString | getDisplayText () const noexcept |
|
QString | getDisplayTextNoTr () const noexcept |
|
const QString & | getDescription () const noexcept |
|
const QIcon & | getIcon () const noexcept |
|
const Flags & | getFlags () const noexcept |
|
const QList< QKeySequence > | getDefaultKeySequences () const noexcept |
|
const QList< QKeySequence > & | getKeySequences () const noexcept |
|
void | setKeySequences (const QList< QKeySequence > &sequences) noexcept |
|
void | updateTranslations () noexcept |
|
QAction * | createAction (QObject *parent, ActionFlags flags=ActionFlags()) const noexcept |
|
template<typename TContext , typename TSlot > |
QAction * | createAction (QObject *parent, const TContext *context, TSlot slot, ActionFlags flags=ActionFlags()) const noexcept |
|
EditorCommand & | operator= (const EditorCommand &rhs)=delete |
|
|
QAction * | setupAction (QAction *action, ActionFlags flags) const noexcept |
|
bool | eventFilter (QObject *obj, QEvent *event) noexcept override |
|
Command for editors, e.g. to be added to a QMenu.
◆ Flag
Enumerator |
---|
OpensPopup | |
AboutRole | |
AboutQtRole | |
PreferencesRole | |
QuitRole | |
◆ ActionFlag
Enumerator |
---|
NoShortcuts | Create an action without shortcuts.
|
WidgetShortcut | Restrict the shortcut to its widget.
|
ApplicationShortcut | Make the shortcut application global.
|
QueuedConnection | Create a queued signal/slot connection.
|
ReactOnToggle | React on toggled() instead of triggered().
|
◆ EditorCommand() [1/3]
◆ EditorCommand() [2/3]
◆ EditorCommand() [3/3]
EditorCommand |
( |
const QString & |
identifier, |
|
|
const char * |
text, |
|
|
const char * |
description, |
|
|
const QString & |
iconFp, |
|
|
Flags |
flags, |
|
|
const QList< QKeySequence > & |
defaultKeySequences, |
|
|
QObject * |
parent = nullptr |
|
) |
| |
|
noexcept |
◆ ~EditorCommand()
◆ getIdentifier()
const QString & getIdentifier |
( |
| ) |
const |
|
inlinenoexcept |
◆ getText()
const QString & getText |
( |
| ) |
const |
|
inlinenoexcept |
◆ getDisplayText()
QString getDisplayText |
( |
| ) |
const |
|
inlinenoexcept |
◆ getDisplayTextNoTr()
QString getDisplayTextNoTr |
( |
| ) |
const |
|
inlinenoexcept |
◆ getDescription()
const QString & getDescription |
( |
| ) |
const |
|
inlinenoexcept |
◆ getIcon()
const QIcon & getIcon |
( |
| ) |
const |
|
inlinenoexcept |
◆ getFlags()
const Flags & getFlags |
( |
| ) |
const |
|
inlinenoexcept |
◆ getDefaultKeySequences()
const QList< QKeySequence > getDefaultKeySequences |
( |
| ) |
const |
|
inlinenoexcept |
◆ getKeySequences()
const QList< QKeySequence > & getKeySequences |
( |
| ) |
const |
|
inlinenoexcept |
◆ setKeySequences()
void setKeySequences |
( |
const QList< QKeySequence > & |
sequences | ) |
|
|
noexcept |
◆ updateTranslations()
void updateTranslations |
( |
| ) |
|
|
noexcept |
◆ createAction() [1/2]
QAction * createAction |
( |
QObject * |
parent, |
|
|
ActionFlags |
flags = ActionFlags() |
|
) |
| const |
|
noexcept |
◆ createAction() [2/2]
QAction * createAction |
( |
QObject * |
parent, |
|
|
const TContext * |
context, |
|
|
TSlot |
slot, |
|
|
ActionFlags |
flags = ActionFlags() |
|
) |
| const |
|
inlinenoexcept |
◆ operator=()
◆ shortcutsChanged
void shortcutsChanged |
( |
const QList< QKeySequence > & |
sequences | ) |
|
|
signal |
◆ setupAction()
QAction * setupAction |
( |
QAction * |
action, |
|
|
ActionFlags |
flags |
|
) |
| const |
|
privatenoexcept |
◆ eventFilter()
bool eventFilter |
( |
QObject * |
obj, |
|
|
QEvent * |
event |
|
) |
| |
|
overrideprivatenoexcept |
◆ unescapeAmpersand()
QString unescapeAmpersand |
( |
QString |
text | ) |
|
|
staticprivatenoexcept |
◆ mIdentifier
◆ mTextNoTr
◆ mText
◆ mDescriptionNoTr
const char* mDescriptionNoTr |
|
private |
◆ mDescription
◆ mIcon
◆ mFlags
◆ mDefaultKeySequences
QList<QKeySequence> mDefaultKeySequences |
|
private |
◆ mKeySequences
QList<QKeySequence> mKeySequences |
|
private |
The documentation for this class was generated from the following files: