Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Multimedia
KMix
Commits
1e06bd18
Commit
1e06bd18
authored
Jul 26, 2020
by
Jonathan Marten
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Eliminate MixDeviceWidget::createShortcutsAction(), always do it
parent
c4028835
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
17 deletions
+8
-17
gui/mdwenum.cpp
gui/mdwenum.cpp
+1
-2
gui/mdwslider.cpp
gui/mdwslider.cpp
+0
-1
gui/mixdevicewidget.cpp
gui/mixdevicewidget.cpp
+7
-13
gui/mixdevicewidget.h
gui/mixdevicewidget.h
+0
-1
No files found.
gui/mdwenum.cpp
View file @
1e06bd18
...
...
@@ -48,8 +48,7 @@ MDWEnum::MDWEnum(shared_ptr<MixDevice> md, MixDeviceWidget::MDWFlags flags, View
_label
(
nullptr
),
_enumCombo
(
nullptr
)
{
createWidgets
();
createShortcutsAction
();
createWidgets
();
}
...
...
gui/mdwslider.cpp
View file @
1e06bd18
...
...
@@ -76,7 +76,6 @@ MDWSlider::MDWSlider(shared_ptr<MixDevice> md, MixDeviceWidget::MDWFlags flags,
createActions
();
createWidgets
();
createGlobalActions
();
createShortcutsAction
();
// Yes, this looks odd - monitor all events sent to myself by myself?
// But it's so that wheel events over the MDWSlider background can be
...
...
gui/mixdevicewidget.cpp
View file @
1e06bd18
...
...
@@ -62,6 +62,10 @@ MixDeviceWidget::MixDeviceWidget(shared_ptr<MixDevice> md, MDWFlags flags, ViewB
m_globalActions
=
new
KActionCollection
(
this
);
m_shortcutsDialog
=
nullptr
;
QAction
*
act
=
m_channelActions
->
addAction
(
"keys"
);
act
->
setText
(
i18n
(
"Channel Shortcuts..."
));
connect
(
act
,
&
QAction
::
triggered
,
this
,
&
MixDeviceWidget
::
configureShortcuts
);
QString
name
(
md
->
id
());
/* char* whatsThisChar = whatsthis.toUtf8().data();
QString w;
...
...
@@ -75,16 +79,6 @@ MixDeviceWidget::MixDeviceWidget(shared_ptr<MixDevice> md, MDWFlags flags, ViewB
}
void
MixDeviceWidget
::
createShortcutsAction
()
{
if
(
m_globalActions
->
isEmpty
())
return
;
// no shortcuts to define
QAction
*
act
=
m_channelActions
->
addAction
(
"keys"
);
act
->
setText
(
i18n
(
"Channel Shortcuts..."
));
connect
(
act
,
&
QAction
::
triggered
,
this
,
&
MixDeviceWidget
::
configureShortcuts
);
}
void
MixDeviceWidget
::
configureShortcuts
()
{
// Dialog for *global* shortcuts of this MDW
...
...
@@ -106,10 +100,10 @@ void MixDeviceWidget::contextMenuEvent(QContextMenuEvent *ev)
createContextMenu
(
menu
);
//
t
he common "Channel Shortcuts" action
//
T
he common "Channel Shortcuts" action
QAction
*
act
=
m_channelActions
->
action
(
"keys"
);
if
(
act
!=
nullptr
)
{
if
(
act
!=
nullptr
&&
!
m_globalActions
->
isEmpty
())
// action is available, and
{
// there are shortcuts to define
menu
->
addSeparator
();
menu
->
addAction
(
act
);
}
...
...
gui/mixdevicewidget.h
View file @
1e06bd18
...
...
@@ -81,7 +81,6 @@ protected slots:
protected:
virtual
void
createContextMenu
(
QMenu
*
menu
)
=
0
;
void
contextMenuEvent
(
QContextMenuEvent
*
ev
)
override
;
void
createShortcutsAction
();
Qt
::
Orientation
orientation
()
const
{
return
(
m_view
->
orientation
());
}
MixDeviceWidget
::
MDWFlags
flags
()
const
{
return
(
m_flags
);
}
...
...
Write
Preview
Markdown
is supported
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