summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRJ Ryan <rryan@mixxx.org>2016-04-27 11:10:30 -0700
committerRJ Ryan <rryan@mixxx.org>2016-04-27 11:10:30 -0700
commit6b1390f83727e968d6837d505f87dda69673a444 (patch)
tree62705f8757e8322fc85185727a2466ae59dccc96
parentd920f19d95ba3ea89083cd65e7bbc0814f82b0c6 (diff)
Move MixxxKeyboard to src/controllers/keyboard/ and rename to KeyboardEventFilter.
-rw-r--r--build/depends.py4
-rw-r--r--src/controllers/keyboard/keyboardeventfilter.cpp (renamed from src/mixxxkeyboard.cpp)34
-rw-r--r--src/controllers/keyboard/keyboardeventfilter.h51
-rw-r--r--src/library/analysisfeature.cpp4
-rw-r--r--src/library/analysisfeature.h2
-rw-r--r--src/library/autodj/autodjfeature.cpp4
-rw-r--r--src/library/autodj/autodjfeature.h2
-rw-r--r--src/library/autodj/dlgautodj.cpp2
-rw-r--r--src/library/autodj/dlgautodj.h4
-rw-r--r--src/library/baseplaylistfeature.cpp24
-rw-r--r--src/library/baseplaylistfeature.h4
-rw-r--r--src/library/browse/browsefeature.cpp4
-rw-r--r--src/library/browse/browsefeature.h2
-rw-r--r--src/library/cratefeature.cpp4
-rw-r--r--src/library/cratefeature.h2
-rw-r--r--src/library/dlghidden.cpp2
-rw-r--r--src/library/dlghidden.h4
-rw-r--r--src/library/dlgmissing.cpp2
-rw-r--r--src/library/dlgmissing.h4
-rw-r--r--src/library/library.cpp4
-rw-r--r--src/library/library.h4
-rw-r--r--src/library/librarycontrol.cpp2
-rw-r--r--src/library/librarycontrol.h4
-rw-r--r--src/library/libraryfeature.h4
-rw-r--r--src/library/mixxxlibraryfeature.cpp2
-rw-r--r--src/library/mixxxlibraryfeature.h2
-rw-r--r--src/library/playlistfeature.cpp2
-rw-r--r--src/library/recording/dlgrecording.cpp2
-rw-r--r--src/library/recording/dlgrecording.h4
-rw-r--r--src/library/recording/recordingfeature.cpp4
-rw-r--r--src/library/recording/recordingfeature.h2
-rw-r--r--src/library/setlogfeature.cpp2
-rw-r--r--src/library/setlogfeature.h2
-rw-r--r--src/mixxx.cpp12
-rw-r--r--src/mixxx.h4
-rw-r--r--src/mixxxkeyboard.h68
-rw-r--r--src/skin/legacyskinparser.cpp4
-rw-r--r--src/skin/legacyskinparser.h6
-rw-r--r--src/skin/skinloader.cpp2
-rw-r--r--src/skin/skinloader.h4
-rw-r--r--src/widget/wlibrary.cpp2
-rw-r--r--src/widget/wlibrary.h2
42 files changed, 134 insertions, 169 deletions
diff --git a/build/depends.py b/build/depends.py
index 3cc066bb1f..24feeed3a8 100644
--- a/build/depends.py
+++ b/build/depends.py
@@ -583,9 +583,8 @@ class MixxxCore(Feature):
return True
def sources(self, build):
- sources = ["mixxxkeyboard.cpp",
+ sources = ["configobject.cpp",
- "configobject.cpp",
"control/control.cpp",
"control/controlaudiotaperpot.cpp",
"control/controlbehavior.cpp",
@@ -742,6 +741,7 @@ class MixxxCore(Feature):
"controllers/midi/midienumerator.cpp",
"controllers/midi/midioutputhandler.cpp",
"controllers/softtakeover.cpp",
+ "controllers/keyboard/keyboardeventfilter.cpp",
"main.cpp",
"mixxx.cpp",
diff --git a/src/mixxxkeyboard.cpp b/src/controllers/keyboard/keyboardeventfilter.cpp
index 12aecfa21b..b62fc2dda6 100644
--- a/src/mixxxkeyboard.cpp
+++ b/src/controllers/keyboard/keyboardeventfilter.cpp
@@ -1,42 +1,24 @@
-/***************************************************************************
- mixxxkeyboard.cpp - description
- -------------------
- begin : Wed Dec 2 2003
- copyright : (C) 2003 by Tue Haste Andersen
- email :
-***************************************************************************/
-
-/***************************************************************************
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- ***************************************************************************/
-
#include <QList>
#include <QtDebug>
#include <QKeyEvent>
#include <QEvent>
-#include "mixxxkeyboard.h"
+#include "controllers/keyboard/keyboardeventfilter.h"
#include "control/controlobject.h"
#include "util/cmdlineargs.h"
-
-MixxxKeyboard::MixxxKeyboard(ConfigObject<ConfigValueKbd>* pKbdConfigObject,
- QObject* parent, const char* name)
+KeyboardEventFilter::KeyboardEventFilter(ConfigObject<ConfigValueKbd>* pKbdConfigObject,
+ QObject* parent, const char* name)
: QObject(parent),
m_pKbdConfigObject(NULL) {
setObjectName(name);
setKeyboardConfig(pKbdConfigObject);
}
-MixxxKeyboard::~MixxxKeyboard() {
+KeyboardEventFilter::~KeyboardEventFilter() {
}
-bool MixxxKeyboard::eventFilter(QObject*, QEvent* e) {
+bool KeyboardEventFilter::eventFilter(QObject*, QEvent* e) {
if (e->type() == QEvent::FocusOut) {
// If we lose focus, we need to clear out the active key list
// because we might not get Key Release events.
@@ -142,7 +124,7 @@ bool MixxxKeyboard::eventFilter(QObject*, QEvent* e) {
return false;
}
-QKeySequence MixxxKeyboard::getKeySeq(QKeyEvent* e) {
+QKeySequence KeyboardEventFilter::getKeySeq(QKeyEvent* e) {
QString modseq;
QKeySequence k;
@@ -175,7 +157,7 @@ QKeySequence MixxxKeyboard::getKeySeq(QKeyEvent* e) {
return k;
}
-void MixxxKeyboard::setKeyboardConfig(ConfigObject<ConfigValueKbd>* pKbdConfigObject) {
+void KeyboardEventFilter::setKeyboardConfig(ConfigObject<ConfigValueKbd>* pKbdConfigObject) {
// Keyboard configs are a surjection from ConfigKey to key sequence. We
// invert the mapping to create an injection from key sequence to
// ConfigKey. This allows a key sequence to trigger multiple controls in
@@ -184,6 +166,6 @@ void MixxxKeyboard::setKeyboardConfig(ConfigObject<ConfigValueKbd>* pKbdConfigOb
m_pKbdConfigObject = pKbdConfigObject;
}
-ConfigObject<ConfigValueKbd>* MixxxKeyboard::getKeyboardConfig() {
+ConfigObject<ConfigValueKbd>* KeyboardEventFilter::getKeyboardConfig() {
return m_pKbdConfigObject;
}
diff --git a/src/controllers/keyboard/keyboardeventfilter.h b/src/controllers/keyboard/keyboardeventfilter.h
new file mode 100644
index 0000000000..1e8810c7cc
--- /dev/null
+++ b/src/controllers/keyboard/keyboardeventfilter.h
@@ -0,0 +1,51 @@
+#ifndef CONTROLLERS_KEYBOARD_KEYBOARDEVENTFILTER_H
+#define CONTROLLERS_KEYBOARD_KEYBOARDEVENTFILTER_H
+
+#include <QObject>
+#include <QEvent>
+#include <QKeyEvent>
+#include <QMultiHash>
+
+#include "configobject.h"
+
+class ControlObject;
+
+// This class provides handling of keyboard events.
+class KeyboardEventFilter : public QObject {
+ Q_OBJECT
+ public:
+ KeyboardEventFilter(ConfigObject<ConfigValueKbd> *pKbdConfigObject,
+ QObject *parent = nullptr, const char* name = nullptr);
+ virtual ~KeyboardEventFilter();
+
+ bool eventFilter(QObject* obj, QEvent* e);
+
+ // Set the keyboard config object. KeyboardEventFilter does NOT take
+ // ownership of pKbdConfigObject.
+ void setKeyboardConfig(ConfigObject<ConfigValueKbd> *pKbdConfigObject);
+ ConfigObject<ConfigValueKbd>* getKeyboardConfig();
+
+ private:
+ struct KeyDownInformation {
+ KeyDownInformation(int keyId, int modifiers, ControlObject* pControl)
+ : keyId(keyId),
+ modifiers(modifiers),
+ pControl(pControl) {
+ }
+
+ int keyId;
+ int modifiers;
+ ControlObject* pControl;
+ };
+
+ // Returns a valid QString with modifier keys from a QKeyEvent
+ QKeySequence getKeySeq(QKeyEvent *e);
+ // List containing keys which is currently pressed
+ QList<KeyDownInformation> m_qActiveKeyList;
+ // Pointer to keyboard config object
+ ConfigObject<ConfigValueKbd> *m_pKbdConfigObject;
+ // Multi-hash of key sequence to
+ QMultiHash<ConfigValueKbd, ConfigKey> m_keySequenceToControlHash;
+};
+
+#endif // CONTROLLERS_KEYBOARD_KEYBOARDEVENTFILTER_H
diff --git a/src/library/analysisfeature.cpp b/src/library/analysisfeature.cpp
index bb1830d897..ab925a9a2b 100644
--- a/src/library/analysisfeature.cpp
+++ b/src/library/analysisfeature.cpp
@@ -9,7 +9,7 @@
#include "library/trackcollection.h"
#include "library/dlganalysis.h"
#include "widget/wlibrary.h"
-#include "mixxxkeyboard.h"
+#include "controllers/keyboard/keyboardeventfilter.h"
#include "analyzer/analyzerqueue.h"
#include "sources/soundsourceproxy.h"
#include "util/dnd.h"
@@ -59,7 +59,7 @@ QIcon AnalysisFeature::getIcon() {
}
void AnalysisFeature::bindWidget(WLibrary* libraryWidget,
- MixxxKeyboard* keyboard) {
+ KeyboardEventFilter* keyboard) {
m_pAnalysisView = new DlgAnalysis(libraryWidget,
m_pConfig,
m_pTrackCollection);
diff --git a/src/library/analysisfeature.h b/src/library/analysisfeature.h
index fa8974bd8f..bbdd853fc4 100644
--- a/src/library/analysisfeature.h
+++ b/src/library/analysisfeature.h
@@ -34,7 +34,7 @@ class AnalysisFeature : public LibraryFeature {
bool dropAccept(QList<QUrl> urls, QObject* pSource);
bool dragMoveAccept(QUrl url);
void bindWidget(WLibrary* libraryWidget,
- MixxxKeyboard* keyboard);
+ KeyboardEventFilter* keyboard);
TreeItemModel* getChildModel();
void refreshLibraryModels();
diff --git a/src/library/autodj/autodjfeature.cpp b/src/library/autodj/autodjfeature.cpp
index eca0c9c703..0969d96030 100644
--- a/src/library/autodj/autodjfeature.cpp
+++ b/src/library/autodj/autodjfeature.cpp
@@ -18,7 +18,7 @@
#include "library/autodj/dlgautodj.h"
#include "library/treeitem.h"
#include "widget/wlibrary.h"
-#include "mixxxkeyboard.h"
+#include "controllers/keyboard/keyboardeventfilter.h"
#include "sources/soundsourceproxy.h"
#include "util/dnd.h"
@@ -106,7 +106,7 @@ QIcon AutoDJFeature::getIcon() {
}
void AutoDJFeature::bindWidget(WLibrary* libraryWidget,
- MixxxKeyboard* keyboard) {
+ KeyboardEventFilter* keyboard) {
m_pAutoDJView = new DlgAutoDJ(libraryWidget,
m_pConfig,
m_pLibrary,
diff --git a/src/library/autodj/autodjfeature.h b/src/library/autodj/autodjfeature.h
index 5b3c137cf8..d930d48fa9 100644
--- a/src/library/autodj/autodjfeature.h
+++ b/src/library/autodj/autodjfeature.h
@@ -46,7 +46,7 @@ class AutoDJFeature : public LibraryFeature {
bool dragMoveAccept(QUrl url);
void bindWidget(WLibrary* libraryWidget,
- MixxxKeyboard* keyboard);
+ KeyboardEventFilter* keyboard);
TreeItemModel* getChildModel();
diff --git a/src/library/autodj/dlgautodj.cpp b/src/library/autodj/dlgautodj.cpp
index 40ea0da6aa..1fa332e58a 100644
--- a/src/library/autodj/dlgautodj.cpp
+++ b/src/library/autodj/dlgautodj.cpp
@@ -12,7 +12,7 @@ DlgAutoDJ::DlgAutoDJ(QWidget* parent,
Library* pLibrary,
AutoDJProcessor* pProcessor,
TrackCollection* pTrackCollection,
- MixxxKeyboard* pKeyboard)
+ KeyboardEventFilter* pKeyboard)
: QWidget(parent),
Ui::DlgAutoDJ(),
m_pAutoDJProcessor(pProcessor),
diff --git a/src/library/autodj/dlgautodj.h b/src/library/autodj/dlgautodj.h
index 0126b26039..fda36bcdcb 100644
--- a/src/library/autodj/dlgautodj.h
+++ b/src/library/autodj/dlgautodj.h
@@ -11,7 +11,7 @@
#include "library/library.h"
#include "library/trackcollection.h"
#include "library/autodj/autodjprocessor.h"
-#include "mixxxkeyboard.h"
+#include "controllers/keyboard/keyboardeventfilter.h"
class PlaylistTableModel;
class WTrackTableView;
@@ -22,7 +22,7 @@ class DlgAutoDJ : public QWidget, public Ui::DlgAutoDJ, public LibraryView {
DlgAutoDJ(QWidget* parent, UserSettingsPointer pConfig,
Library* pLibrary,
AutoDJProcessor* pProcessor, TrackCollection* pTrackCollection,
- MixxxKeyboard* pKeyboard);
+ KeyboardEventFilter* pKeyboard);
virtual ~DlgAutoDJ();
void onShow();
diff --git a/src/library/baseplaylistfeature.cpp b/src/library/baseplaylistfeature.cpp
index 1a2c6d26d0..20f6e98f60 100644
--- a/src/library/baseplaylistfeature.cpp
+++ b/src/library/baseplaylistfeature.cpp
@@ -14,7 +14,7 @@
#include "library/playlisttablemodel.h"
#include "library/trackcollection.h"
#include "library/treeitem.h"
-#include "mixxxkeyboard.h"
+#include "controllers/keyboard/keyboardeventfilter.h"
#include "widget/wlibrary.h"
#include "widget/wlibrarytextbrowser.h"
#include "util/assert.h"
@@ -60,7 +60,7 @@ BasePlaylistFeature::BasePlaylistFeature(QObject* parent,
m_pImportPlaylistAction = new QAction(tr("Import Playlist"),this);
connect(m_pImportPlaylistAction, SIGNAL(triggered()),
this, SLOT(slotImportPlaylist()));
-
+
m_pCreateImportPlaylistAction = new QAction(tr("Import Playlist"), this);
connect(m_pCreateImportPlaylistAction, SIGNAL(triggered()),
this, SLOT(slotCreateImportPlaylist()));
@@ -339,9 +339,9 @@ void BasePlaylistFeature::slotImportPlaylist() {
if (!m_pPlaylistTableModel) {
return;
}
-
+
QString playlist_file = getPlaylistFile();
- if (playlist_file.isEmpty()) return;
+ if (playlist_file.isEmpty()) return;
// Update the import/export playlist directory
QFileInfo fileName(playlist_file);
@@ -384,15 +384,15 @@ void BasePlaylistFeature::slotImportPlaylistFile(QString &playlist_file) {
void BasePlaylistFeature::slotCreateImportPlaylist() {
if (!m_pPlaylistTableModel) return;
-
+
// Get file to read
QString playlist_file = LibraryFeature::getPlaylistFile();
if (playlist_file.isEmpty()) return;
-
+
QFileInfo fileName(playlist_file);
m_pConfig->set(ConfigKey("[Library]","LastImportExportPlaylistDirectory"),
ConfigValue(fileName.dir().absolutePath()));
-
+
// Get a valid name
QString baseName = fileName.baseName();
QString name;
@@ -401,14 +401,14 @@ void BasePlaylistFeature::slotCreateImportPlaylist() {
while (!validNameGiven) {
name = baseName;
if (i != 0) name += QString::number(i);
-
+
// Check name
int existingId = m_playlistDao.getPlaylistIdFromName(name);
-
+
validNameGiven = (existingId == -1);
++i;
}
-
+
int playlistId = m_playlistDao.createPlaylist(name);
if (playlistId != -1) {
activatePlaylist(playlistId);
@@ -420,7 +420,7 @@ void BasePlaylistFeature::slotCreateImportPlaylist() {
+ name);
return;
}
-
+
slotImportPlaylistFile(playlist_file);
}
@@ -579,7 +579,7 @@ TreeItemModel* BasePlaylistFeature::getChildModel() {
}
void BasePlaylistFeature::bindWidget(WLibrary* libraryWidget,
- MixxxKeyboard* keyboard) {
+ KeyboardEventFilter* keyboard) {
Q_UNUSED(keyboard);
WLibraryTextBrowser* edit = new WLibraryTextBrowser(libraryWidget);
edit->setHtml(getRootViewHtml());
diff --git a/src/library/baseplaylistfeature.h b/src/library/baseplaylistfeature.h
index adc8a8d716..3d6a43cbb9 100644
--- a/src/library/baseplaylistfeature.h
+++ b/src/library/baseplaylistfeature.h
@@ -17,7 +17,7 @@
#include "track/track.h"
class WLibrary;
-class MixxxKeyboard;
+class KeyboardEventFilter;
class PlaylistTableModel;
class TrackCollection;
class TreeItem;
@@ -34,7 +34,7 @@ class BasePlaylistFeature : public LibraryFeature {
TreeItemModel* getChildModel();
void bindWidget(WLibrary* libraryWidget,
- MixxxKeyboard* keyboard);
+ KeyboardEventFilter* keyboard);
signals:
void showPage(const QUrl& page);
diff --git a/src/library/browse/browsefeature.cpp b/src/library/browse/browsefeature.cpp
index 5135dc2e4d..9f6231b78c 100644
--- a/src/library/browse/browsefeature.cpp
+++ b/src/library/browse/browsefeature.cpp
@@ -17,7 +17,7 @@
#include "library/trackcollection.h"
#include "widget/wlibrarytextbrowser.h"
#include "widget/wlibrary.h"
-#include "mixxxkeyboard.h"
+#include "controllers/keyboard/keyboardeventfilter.h"
#include "util/sandbox.h"
const QString kQuickLinksSeparator = "-+-";
@@ -208,7 +208,7 @@ TreeItemModel* BrowseFeature::getChildModel() {
}
void BrowseFeature::bindWidget(WLibrary* libraryWidget,
- MixxxKeyboard* keyboard) {
+ KeyboardEventFilter* keyboard) {
Q_UNUSED(keyboard);
WLibraryTextBrowser* edit = new WLibraryTextBrowser(libraryWidget);
edit->setHtml(getRootViewHtml());
diff --git a/src/library/browse/browsefeature.h b/src/library/browse/browsefeature.h
index a38c5b6723..94188ee6b0 100644
--- a/src/library/browse/browsefeature.h
+++ b/src/library/browse/browsefeature.h
@@ -37,7 +37,7 @@ class BrowseFeature : public LibraryFeature {
QIcon getIcon();
void bindWidget(WLibrary* libraryWidget,
- MixxxKeyboard* keyboard);
+ KeyboardEventFilter* keyboard);
TreeItemModel* getChildModel();
diff --git a/src/library/cratefeature.cpp b/src/library/cratefeature.cpp
index 3574dbf2d7..56bd62b1e1 100644
--- a/src/library/cratefeature.cpp
+++ b/src/library/cratefeature.cpp
@@ -19,7 +19,7 @@
#include "library/queryutil.h"
#include "widget/wlibrarytextbrowser.h"
#include "widget/wlibrary.h"
-#include "mixxxkeyboard.h"
+#include "controllers/keyboard/keyboardeventfilter.h"
#include "treeitem.h"
#include "sources/soundsourceproxy.h"
#include "util/dnd.h"
@@ -185,7 +185,7 @@ bool CrateFeature::dragMoveAcceptChild(const QModelIndex& index, QUrl url) {
}
void CrateFeature::bindWidget(WLibrary* libraryWidget,
- MixxxKeyboard* keyboard) {
+ KeyboardEventFilter* keyboard) {
Q_UNUSED(keyboard);
WLibraryTextBrowser* edit = new WLibraryTextBrowser(libraryWidget);
edit->setHtml(getRootViewHtml());
diff --git a/src/library/cratefeature.h b/src/library/cratefeature.h
index 980a8b10cc..821504b6d0 100644
--- a/src/library/cratefeature.h
+++ b/src/library/cratefeature.h
@@ -37,7 +37,7 @@ class CrateFeature : public LibraryFeature {
bool dragMoveAcceptChild(const QModelIndex& index, QUrl url);
void bindWidget(WLibrary* libraryWidget,
- MixxxKeyboard* keyboard);
+ KeyboardEventFilter* keyboard);
TreeItemModel* getChildModel();
diff --git a/src/library/dlghidden.cpp b/src/library/dlghidden.cpp
index 0bbf9f563b..9cddafb991 100644
--- a/src/library/dlghidden.cpp
+++ b/src/library/dlghidden.cpp
@@ -7,7 +7,7 @@
DlgHidden::DlgHidden(QWidget* parent, UserSettingsPointer pConfig,
Library* pLibrary, TrackCollection* pTrackCollection,
- MixxxKeyboard* pKeyboard)
+ KeyboardEventFilter* pKeyboard)
: QWidget(parent),
Ui::DlgHidden(),
m_pTrackTableView(
diff --git a/src/library/dlghidden.h b/src/library/dlghidden.h
index 5c7a9493f6..6b78d85f1f 100644
--- a/src/library/dlghidden.h
+++ b/src/library/dlghidden.h
@@ -6,7 +6,7 @@
#include "library/library.h"
#include "library/libraryview.h"
#include "library/trackcollection.h"
-#include "mixxxkeyboard.h"
+#include "controllers/keyboard/keyboardeventfilter.h"
class WTrackTableView;
class HiddenTableModel;
@@ -17,7 +17,7 @@ class DlgHidden : public QWidget, public Ui::DlgHidden, public LibraryView {
public:
DlgHidden(QWidget* parent, UserSettingsPointer pConfig,
Library* pLibrary, TrackCollection* pTrackCollection,
- MixxxKeyboard* pKeyboard);
+ KeyboardEventFilter* pKeyboard);
virtual ~DlgHidden();
void onShow();
diff --git a/src/library/dlgmissing.cpp b/src/library/dlgmissing.cpp
index d9a1fc0285..3f5918bfb3 100644
--- a/src/library/dlgmissing.cpp
+++ b/src/library/dlgmissing.cpp
@@ -6,7 +6,7 @@
DlgMissing::DlgMissing(QWidget* parent, UserSettingsPointer pConfig,
Library* pLibrary,
- TrackCollection* pTrackCollection, MixxxKeyboard* pKeyboard)
+ TrackCollection* pTrackCollection, KeyboardEventFilter* pKeyboard)
: QWidget(parent),
Ui::DlgMissing(),
m_pTrackTableView(
diff --git a/src/library/dlgmissing.h b/src/library/dlgmissing.h
index 9bcd86026d..fe287e8e8e 100644
--- a/src/library/dlgmissing.h
+++ b/src/library/dlgmissing.h
@@ -6,7 +6,7 @@
#include "library/library.h"
#include "library/libraryview.h"
#include "library/trackcollection.h"
-#include "mixxxkeyboard.h"
+#include "controllers/keyboard/keyboardeventfilter.h"
class WTrackTableView;
class MissingTableModel;
@@ -16,7 +16,7 @@ class DlgMissing : public QWidget, public Ui::DlgMissing, public LibraryView {
public:
DlgMissing(QWidget* parent, UserSettingsPointer pConfig,
Library* pLibrary, TrackCollection* pTrackCollection,
- MixxxKeyboard* pKeyboard);
+ KeyboardEventFilter* pKeyboard);
virtual ~DlgMissing();
void onShow();
diff --git a/src/library/library.cpp b/src/library/library.cpp
index 9d7923f061..99520e58e8 100644
--- a/src/library/library.cpp
+++ b/src/library/library.cpp
@@ -33,7 +33,7 @@
#include "widget/wlibrary.h"
#include "widget/wlibrarysidebar.h"
-#include "mixxxkeyboard.h"
+#include "controllers/keyboard/keyboardeventfilter.h"
// This is is the name which we use to register the WTrackTableView with the
// WLibrary
@@ -176,7 +176,7 @@ void Library::bindSidebarWidget(WLibrarySidebar* pSidebarWidget) {
}
void Library::bindWidget(WLibrary* pLibraryWidget,
- MixxxKeyboard* pKeyboard) {
+ KeyboardEventFilter* pKeyboard) {
WTrackTableView* pTrackTableView =
new WTrackTableView(pLibraryWidget, m_pConfig, m_pTrackCollection);
pTrackTableView->installEventFilter(pKeyboard);
diff --git a/src/library/library.h b/src/library/library.h
index 693968f431..dbc8c8323e 100644
--- a/src/library/library.h
+++ b/src/library/library.h
@@ -32,7 +32,7 @@ class MixxxLibraryFeature;
class PlaylistFeature;
class CrateFeature;
class LibraryControl;
-class MixxxKeyboard;
+class KeyboardEventFilter;
class PlayerManagerInterface;
class Library : public QObject {
@@ -45,7 +45,7 @@ public:
virtual ~Library();
void bindWidget(WLibrary* libraryWidget,
- MixxxKeyboard* pKeyboard);
+ KeyboardEventFilter* pKeyboard);
void bindSidebarWidget(WLibrarySidebar* sidebarWidget);
void addFeature(LibraryFeature* feature);
diff --git a/src/library/librarycontrol.cpp b/src/library/librarycontrol.cpp
index 652112a457..577b9fac17 100644
--- a/src/library/librarycontrol.cpp
+++ b/src/library/librarycontrol.cpp
@@ -194,7 +194,7 @@ void LibraryControl::bindSidebarWidget(WLibrarySidebar* pSidebarWidget) {
this, SLOT(sidebarWidgetDeleted()));
}
-void LibraryControl::bindWidget(WLibrary* pLibraryWidget, MixxxKeyboard* pKeyboard) {
+void LibraryControl::bindWidget(WLibrary* pLibraryWidget, KeyboardEventFilter* pKeyboard) {
Q_UNUSED(pKeyboard);
if (m_pLibraryWidget != NULL) {
disconnect(m_pLibraryWidget, 0, this, 0);
diff --git a/src/library/librarycontrol.h b/src/library/librarycontrol.h
index 291cb9b5d8..fc4a5b7202 100644
--- a/src/library/librarycontrol.h
+++ b/src/library/librarycontrol.h
@@ -10,7 +10,7 @@ class ControlPushButton;
class Library;
class WLibrary;
class WLibrarySidebar;
-class MixxxKeyboard;
+class KeyboardEventFilter;
class LoadToGroupController : public QObject {
Q_OBJECT
@@ -37,7 +37,7 @@ class LibraryControl : public QObject {
LibraryControl(Library* pLibrary);
virtual ~LibraryControl();
- void bindWidget(WLibrary* pLibrary, MixxxKeyboard* pKeyboard);
+ void bindWidget(WLibrary* pLibrary, KeyboardEventFilter* pKeyboard);
void bindSidebarWidget(WLibrarySidebar* pLibrarySidebar);
private slots:
diff --git a/src/library/libraryfeature.h b/src/library/libraryfeature.h
index 0c8eb5ebee..7ecdbdbd6e 100644
--- a/src/library/libraryfeature.h
+++ b/src/library/libraryfeature.h
@@ -23,7 +23,7 @@
class TrackModel;
class WLibrarySidebar;
class WLibrary;
-class MixxxKeyboard;
+class KeyboardEventFilter;
// pure virtual (abstract) class to provide an interface for libraryfeatures
class LibraryFeature : public QObject {
@@ -62,7 +62,7 @@ class LibraryFeature : public QObject {
// Reimplement this to register custom views with the library widget.
virtual void bindWidget(WLibrary* /* libraryWidget */,
- MixxxKeyboard* /* keyboard */) {}