Changeset View
Changeset View
Standalone View
Standalone View
src/kshortcuteditwidget.cpp
Show First 20 Lines • Show All 58 Lines • ▼ Show 20 Line(s) | 57 | ShortcutEditWidget::ShortcutEditWidget(QWidget *viewport, const QKeySequence &defaultSeq, | |||
---|---|---|---|---|---|
59 | : TabConnectedWidget(viewport), | 59 | : TabConnectedWidget(viewport), | ||
60 | m_defaultKeySequence(defaultSeq), | 60 | m_defaultKeySequence(defaultSeq), | ||
61 | m_isUpdating(false), | 61 | m_isUpdating(false), | ||
62 | m_action(nullptr), | 62 | m_action(nullptr), | ||
63 | m_noneText(i18nc("No shortcut defined", "None")) | 63 | m_noneText(i18nc("No shortcut defined", "None")) | ||
64 | { | 64 | { | ||
65 | QGridLayout *layout = new QGridLayout(this); | 65 | QGridLayout *layout = new QGridLayout(this); | ||
66 | 66 | | |||
67 | m_defaultRadio = new QRadioButton(i18n("Default:"), this); | 67 | m_defaultRadio = new QRadioButton(i18nc("@option:radio", "Default:"), this); | ||
68 | m_defaultLabel = new QLabel(m_noneText, this); | 68 | m_defaultLabel = new QLabel(m_noneText, this); | ||
69 | const QString defaultText = defaultSeq.toString(QKeySequence::NativeText); | 69 | const QString defaultText = defaultSeq.toString(QKeySequence::NativeText); | ||
70 | if (!defaultText.isEmpty()) { | 70 | if (!defaultText.isEmpty()) { | ||
71 | m_defaultLabel->setText(defaultText); | 71 | m_defaultLabel->setText(defaultText); | ||
72 | } | 72 | } | ||
73 | 73 | | |||
74 | m_customRadio = new QRadioButton(i18n("Custom:"), this); | 74 | m_customRadio = new QRadioButton(i18nc("@option:radio", "Custom:"), this); | ||
75 | m_customEditor = new KKeySequenceWidget(this); | 75 | m_customEditor = new KKeySequenceWidget(this); | ||
76 | m_customEditor->setModifierlessAllowed(allowLetterShortcuts); | 76 | m_customEditor->setModifierlessAllowed(allowLetterShortcuts); | ||
77 | 77 | | |||
78 | layout->addWidget(m_defaultRadio, 0, 0); | 78 | layout->addWidget(m_defaultRadio, 0, 0); | ||
79 | layout->addWidget(m_defaultLabel, 0, 1); | 79 | layout->addWidget(m_defaultLabel, 0, 1); | ||
80 | layout->addWidget(m_customRadio, 1, 0); | 80 | layout->addWidget(m_customRadio, 1, 0); | ||
81 | layout->addWidget(m_customEditor, 1, 1); | 81 | layout->addWidget(m_customEditor, 1, 1); | ||
82 | layout->setColumnStretch(2, 1); | 82 | layout->setColumnStretch(2, 1); | ||
▲ Show 20 Lines • Show All 125 Lines • Show Last 20 Lines |