2 * SPDX-FileCopyrightText: 2017 Marco Martin <[email protected]>
57 * The type of control this mnemonic is attached: different types of controls have different importance and priority for shortcut assignment.
60 Q_PROPERTY(MnemonicAttached::ControlType controlType READ controlType WRITE setControlType NOTIFY controlTypeChanged)
81 SecondaryControl, /**< Other controls that are considered not much important and low priority for shortcuts */
86 ~MnemonicAttached() override;
88 void setLabel(const QString &text);
94 void setEnabled(bool enabled);
95 bool enabled() const;
102 void setActive(bool active);
103 bool active() const;
123 bool installEventFilterForWindow(QQuickWindow *wnd);
124 bool removeEventFilterForWindow(QQuickWindow *wnd);
150 QMap<int, QChar> m_weights;
152 QString m_label;
153 QString m_actualRichTextLabel;
154 QString m_richTextLabel;
155 QString m_mnemonicLabel;
156 QKeySequence m_sequence;
160 QPointer<QQuickWindow> m_window;
164 static QHash<QKeySequence, MnemonicAttached *> s_sequenceToObject;
167 QML_DECLARE_TYPEINFO(MnemonicAttached, QML_HAS_ATTACHED_PROPERTIES)
True when the user is pressing alt and the accelerators should be shown.
Only if true this mnemonic will be considered for the global assignment default: true.
The label of the control we want to compute a mnemonic for, instance "Label:" or "&Ok".
The user-visible final label, which will have the shortcut letter underlined, such as "<u>O</u>k".
The label with an "&" mnemonic in the place which will have the shortcut assigned,...
This Attached property is used to calculate automated keyboard sequences to trigger actions based upo...
The final key sequence assigned, if any: it will be Alt+alphanumeric char.
pushbuttons, checkboxes etc
QObject * parent() const const
Other controls that are considered not much important and low priority for shortcuts.
The type of control this mnemonic is attached: different types of controls have different importance ...