Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Multimedia
Kwave
Commits
1690a345
Commit
1690a345
authored
Nov 01, 2020
by
Thomas Eschenbacher
Browse files
SignalWidget: use QKeySequence::StandardKey instead of hardcoded keys
parent
73ee6324
Changes
1
Hide whitespace changes
Inline
Side-by-side
libgui/SignalWidget.cpp
View file @
1690a345
...
...
@@ -198,7 +198,7 @@ void Kwave::SignalWidget::contextMenuEvent(QContextMenuEvent *e)
action
=
context_menu
->
addAction
(
QIcon
::
fromTheme
(
_
(
"edit-undo"
)),
i18n
(
"&Undo"
),
this
,
SLOT
(
contextMenuEditUndo
()),
Q
t
::
CTRL
+
Qt
::
Key_Z
);
Q
KeySequence
::
StandardKey
::
Undo
);
Q_ASSERT
(
action
);
if
(
!
action
)
return
;
if
(
!
m_signal_manager
->
canUndo
())
...
...
@@ -208,7 +208,7 @@ void Kwave::SignalWidget::contextMenuEvent(QContextMenuEvent *e)
action
=
context_menu
->
addAction
(
QIcon
::
fromTheme
(
_
(
"edit-redo"
)),
i18n
(
"&Redo"
),
this
,
SLOT
(
contextMenuEditRedo
()),
Q
t
::
CTRL
+
Qt
::
Key_Y
);
Q
KeySequence
::
StandardKey
::
Redo
);
Q_ASSERT
(
action
);
if
(
!
action
)
return
;
if
(
!
m_signal_manager
->
canRedo
())
...
...
@@ -219,15 +219,15 @@ void Kwave::SignalWidget::contextMenuEvent(QContextMenuEvent *e)
QAction
*
action_cut
=
context_menu
->
addAction
(
QIcon
::
fromTheme
(
_
(
"edit-cut"
)),
i18n
(
"Cu&t"
),
this
,
SLOT
(
contextMenuEditCut
()),
Q
t
::
CTRL
+
Qt
::
Key_X
);
Q
KeySequence
::
StandardKey
::
Cut
);
QAction
*
action_copy
=
context_menu
->
addAction
(
QIcon
::
fromTheme
(
_
(
"edit-copy"
)),
i18n
(
"&Copy"
),
this
,
SLOT
(
contextMenuEditCopy
()),
Q
t
::
CTRL
+
Qt
::
Key_C
);
Q
KeySequence
::
StandardKey
::
Copy
);
QAction
*
action_paste
=
context_menu
->
addAction
(
QIcon
::
fromTheme
(
_
(
"edit-paste"
)),
i18n
(
"&Paste"
),
this
,
SLOT
(
contextMenuEditPaste
()),
Q
t
::
CTRL
+
Qt
::
Key_V
);
Q
KeySequence
::
StandardKey
::
Paste
);
context_menu
->
addSeparator
();
if
(
action_cut
)
action_cut
->
setEnabled
(
have_selection
);
if
(
action_copy
)
action_copy
->
setEnabled
(
have_selection
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment