summaryrefslogtreecommitdiffstats
path: root/src/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'src/controllers')
-rw-r--r--src/controllers/bulk/bulkcontroller.cpp7
-rw-r--r--src/controllers/bulk/bulkcontroller.h13
-rw-r--r--src/controllers/bulk/bulkenumerator.cpp7
-rw-r--r--src/controllers/bulk/bulkenumerator.h13
-rw-r--r--src/controllers/bulk/bulksupported.h12
-rw-r--r--src/controllers/controller.cpp7
-rw-r--r--src/controllers/controller.h25
-rw-r--r--src/controllers/controllerdebug.h18
-rw-r--r--src/controllers/controllerenumerator.cpp10
-rw-r--r--src/controllers/controllerenumerator.h19
-rw-r--r--src/controllers/controllerlearningeventfilter.h6
-rw-r--r--src/controllers/controllermanager.cpp7
-rw-r--r--src/controllers/controllermanager.h32
-rw-r--r--src/controllers/controllermappingtablemodel.h5
-rw-r--r--src/controllers/controllerpreset.h4
-rw-r--r--src/controllers/controllerpresetfilehandler.cpp5
-rw-r--r--src/controllers/controllerpresetfilehandler.h4
-rw-r--r--src/controllers/controllerpresetinfo.cpp11
-rw-r--r--src/controllers/controllerpresetinfo.h21
-rw-r--r--src/controllers/controllerpresetinfoenumerator.cpp6
-rw-r--r--src/controllers/controllerpresetinfoenumerator.h12
-rw-r--r--src/controllers/controllerpresetvisitor.h5
-rw-r--r--src/controllers/controllervisitor.h5
-rw-r--r--src/controllers/controlpickermenu.h5
-rw-r--r--src/controllers/defs_controllers.h12
-rw-r--r--src/controllers/delegates/controldelegate.h5
-rw-r--r--src/controllers/delegates/midibytedelegate.h5
-rw-r--r--src/controllers/delegates/midichanneldelegate.h5
-rw-r--r--src/controllers/delegates/midiopcodedelegate.h5
-rw-r--r--src/controllers/delegates/midioptionsdelegate.h5
-rw-r--r--src/controllers/dlgcontrollerlearning.cpp8
-rw-r--r--src/controllers/dlgcontrollerlearning.h13
-rw-r--r--src/controllers/dlgprefcontroller.cpp7
-rw-r--r--src/controllers/dlgprefcontroller.h11
-rw-r--r--src/controllers/hid/hidcontroller.cpp2
-rw-r--r--src/controllers/hid/hidcontroller.h1
-rw-r--r--src/controllers/hid/hidcontrollerpreset.cpp5
-rw-r--r--src/controllers/hid/hidcontrollerpreset.h2
-rw-r--r--src/controllers/hid/hidcontrollerpresetfilehandler.h5
-rw-r--r--src/controllers/hid/hidenumerator.h14
-rw-r--r--src/controllers/keyboard/keyboardeventfilter.h5
-rw-r--r--src/controllers/learningutils.h5
-rw-r--r--src/controllers/midi/hss1394controller.cpp7
-rw-r--r--src/controllers/midi/hss1394controller.h23
-rw-r--r--src/controllers/midi/hss1394enumerator.cpp6
-rw-r--r--src/controllers/midi/hss1394enumerator.h14
-rw-r--r--src/controllers/midi/midicontroller.cpp8
-rw-r--r--src/controllers/midi/midicontroller.h38
-rw-r--r--src/controllers/midi/midicontrollerpreset.cpp8
-rw-r--r--src/controllers/midi/midicontrollerpreset.h8
-rw-r--r--src/controllers/midi/midicontrollerpresetfilehandler.cpp8
-rw-r--r--src/controllers/midi/midicontrollerpresetfilehandler.h13
-rw-r--r--src/controllers/midi/midimessage.h5
-rw-r--r--src/controllers/midi/midioutputhandler.cpp8
-rw-r--r--src/controllers/midi/midioutputhandler.h19
-rw-r--r--src/controllers/midi/midiutils.h6
-rw-r--r--src/controllers/midi/portmidicontroller.cpp9
-rw-r--r--src/controllers/midi/portmidicontroller.h30
-rw-r--r--src/controllers/midi/portmididevice.h5
-rw-r--r--src/controllers/midi/portmidienumerator.cpp7
-rw-r--r--src/controllers/midi/portmidienumerator.h13
-rw-r--r--src/controllers/softtakeover.cpp8
-rw-r--r--src/controllers/softtakeover.h13
63 files changed, 119 insertions, 511 deletions
diff --git a/src/controllers/bulk/bulkcontroller.cpp b/src/controllers/bulk/bulkcontroller.cpp
index 5b8a89bcda..6ac4eaaacd 100644
--- a/src/controllers/bulk/bulkcontroller.cpp
+++ b/src/controllers/bulk/bulkcontroller.cpp
@@ -1,10 +1,3 @@
-/**
- * @file bulkcontroller.cpp
- * @author Neale Pickett neale@woozle.org
- * @date Thu Jun 28 2012
- * @brief USB Bulk controller backend
- *
- */
#include "controllers/bulk/bulkcontroller.h"
#include <libusb.h>
diff --git a/src/controllers/bulk/bulkcontroller.h b/src/controllers/bulk/bulkcontroller.h
index 6430a6f11e..2afb9b3220 100644
--- a/src/controllers/bulk/bulkcontroller.h
+++ b/src/controllers/bulk/bulkcontroller.h
@@ -1,12 +1,4 @@
-/**
- * @file bulkcontroller.h
- * @author Neale Picket neale@woozle.org
- * @date Thu Jun 28 2012
- * @brief USB Bulk controller backend
- */
-
-#ifndef BULKCONTROLLER_H
-#define BULKCONTROLLER_H
+#pragma once
#include <QAtomicInt>
@@ -19,6 +11,7 @@ struct libusb_device_handle;
struct libusb_context;
struct libusb_device_descriptor;
+/// USB Bulk controller backend
class BulkReader : public QThread {
Q_OBJECT
public:
@@ -107,5 +100,3 @@ class BulkController : public Controller {
BulkReader* m_pReader;
HidControllerPreset m_preset;
};
-
-#endif
diff --git a/src/controllers/bulk/bulkenumerator.cpp b/src/controllers/bulk/bulkenumerator.cpp
index ce154e4883..2e6abdde16 100644
--- a/src/controllers/bulk/bulkenumerator.cpp
+++ b/src/controllers/bulk/bulkenumerator.cpp
@@ -1,10 +1,3 @@
-/**
- * @file bulkenumerator.cpp
- * @author Neale Picket neale@woozle.org
- * @date Thu Jun 28 2012
- * @brief USB Bulk controller backend
- */
-
#include <libusb.h>
#include "controllers/bulk/bulkcontroller.h"
diff --git a/src/controllers/bulk/bulkenumerator.h b/src/controllers/bulk/bulkenumerator.h
index b281f49c01..b1c2569f33 100644
--- a/src/controllers/bulk/bulkenumerator.h
+++ b/src/controllers/bulk/bulkenumerator.h
@@ -1,17 +1,10 @@
-/**
-* @file bulkenumerator.h
-* @author Neale Pickett neale@woozle.org
-* @date Thu Jun 28 2012
-* @brief Locate supported USB bulk controllers
-*/
-
-#ifndef BULKENUMERATOR_H
-#define BULKENUMERATOR_H
+#pragma once
#include "controllers/controllerenumerator.h"
struct libusb_context;
+/// Locate supported USB bulk controllers
class BulkEnumerator : public ControllerEnumerator {
public:
explicit BulkEnumerator(UserSettingsPointer pConfig);
@@ -24,5 +17,3 @@ class BulkEnumerator : public ControllerEnumerator {
libusb_context* m_context;
UserSettingsPointer m_pConfig;
};
-
-#endif
diff --git a/src/controllers/bulk/bulksupported.h b/src/controllers/bulk/bulksupported.h
index d79ad88f7b..1ffbc3509a 100644
--- a/src/controllers/bulk/bulksupported.h
+++ b/src/controllers/bulk/bulksupported.h
@@ -1,12 +1,6 @@
-/**
-* @file bulksupported.h
-* @author Neale Picket neale@woozle.org
-* @date Thu Jun 28 2012
-* @brief A list of supported USB bulk devices
-*/
+// A list of supported USB bulk devices
-#ifndef BULKSUPPORTED_H
-#define BULKSUPPORTED_H
+#pragma once
typedef struct bulk_supported {
unsigned short vendor_id;
@@ -22,5 +16,3 @@ static bulk_supported_t bulk_supported[] = {
{0x06f8, 0xb120, 0x82, 0x03}, // Hercules MP3 LE / Glow
{0, 0, 0, 0}
};
-
-#endif
diff --git a/src/controllers/controller.cpp b/src/controllers/controller.cpp
index 1c42a2ee21..23bec15504 100644
--- a/src/controllers/controller.cpp
+++ b/src/controllers/controller.cpp
@@ -1,10 +1,3 @@
-/**
-* @file controller.h
-* @author Sean Pappalardo spappalardo@mixxx.org
-* @date Sat Apr 30 2011
-* @brief Base class representing a physical (or software) controller.
-*/
-
#include "controllers/controller.h"
#include <QApplication>
diff --git a/src/controllers/controller.h b/src/controllers/controller.h
index ca8919812b..825c7ca152 100644
--- a/src/controllers/controller.h
+++ b/src/controllers/controller.h
@@ -1,16 +1,4 @@
-/**
-* @file controller.h
-* @author Sean Pappalardo spappalardo@mixxx.org
-* @date Sat Apr 30 2011
-* @brief Base class representing a physical (or software) controller.
-*
-* This is a base class representing a physical (or software) controller. It
-* must be inherited by a class that implements it on some API. Note that the
-* subclass' destructor should call close() at a minimum.
-*/
-
-#ifndef CONTROLLER_H
-#define CONTROLLER_H
+#pragma once
#include "controllers/controllerpreset.h"
#include "controllers/controllerpresetfilehandler.h"
@@ -22,10 +10,15 @@
class ControllerJSProxy;
+/// Base class representing a physical (or software) controller.
+///
+/// This is a base class representing a physical (or software) controller. It
+/// must be inherited by a class that implements it on some API. Note that the
+/// subclass' destructor should call close() at a minimum.
class Controller : public QObject, ConstControllerPresetVisitor {
Q_OBJECT
public:
- Controller();
+ explicit Controller();
~Controller() override; // Subclass should call close() at minimum.
/// The object that is exposed to the JS scripts as the "controller" object.
@@ -91,7 +84,7 @@ class Controller : public QObject, ConstControllerPresetVisitor {
virtual void receive(const QByteArray& data, mixxx::Duration timestamp);
/// Apply the preset to the controller.
- /// @brief Initializes both controller engine and static output mappings.
+ /// Initializes both controller engine and static output mappings.
///
/// @param initializeScripts Can be set to false to skip script
/// initialization for unit tests.
@@ -203,5 +196,3 @@ class ControllerJSProxy : public QObject {
private:
Controller* const m_pController;
};
-
-#endif
diff --git a/src/controllers/controllerdebug.h b/src/controllers/controllerdebug.h
index dd162d1da8..d99eaf146d 100644
--- a/src/controllers/controllerdebug.h
+++ b/src/controllers/controllerdebug.h
@@ -1,9 +1,7 @@
-#ifndef CONTROLLERDEBUG_H
-#define CONTROLLERDEBUG_H
+#pragma once
#include <QDebug>
-
// Specifies whether or not we should dump incoming data to the console at
// runtime. This is useful for end-user debugging and script-writing.
class ControllerDebug {
@@ -39,11 +37,9 @@ class ControllerDebug {
//
// In order of Bug #1797746, since transition to qt5 it is needed unquote the
// output for mixxx.log with .noquote(), because in qt5 QDebug() is quoted by default.
-#define controllerDebug(stream) \
-{ \
- if (ControllerDebug::enabled()) { \
- QDebug(QtDebugMsg).noquote() << ControllerDebug::kLogMessagePrefix << stream; \
- } \
-} \
-
-#endif // CONTROLLERDEBUG_H
+#define controllerDebug(stream) \
+ { \
+ if (ControllerDebug::enabled()) { \
+ QDebug(QtDebugMsg).noquote() << ControllerDebug::kLogMessagePrefix << stream; \
+ } \
+ }
diff --git a/src/controllers/controllerenumerator.cpp b/src/controllers/controllerenumerator.cpp
index c3ddd88f0f..36bc56f3f6 100644
--- a/src/controllers/controllerenumerator.cpp
+++ b/src/controllers/controllerenumerator.cpp
@@ -1,13 +1,3 @@
-/***************************************************************************
- ControllerEnumerator.cpp
- Controller Enumerator Class
- ----------------------------
- begin : Sat Apr 30 2011
- copyright : (C) 2011 Sean M. Pappalardo
- email : spappalardo@mixxx.org
-
-***************************************************************************/
-
#include "controllers/controllerenumerator.h"
#include "moc_controllerenumerator.cpp"
diff --git a/src/controllers/controllerenumerator.h b/src/controllers/controllerenumerator.h
index b94c538389..dc08154de9 100644
--- a/src/controllers/controllerenumerator.h
+++ b/src/controllers/controllerenumerator.h
@@ -1,18 +1,11 @@
-/**
-* @file controllerenumerator.h
-* @author Sean Pappalardo spappalardo@mixxx.org
-* @date Sat Apr 30 2011
-* @brief Base class handling discovery and enumeration of DJ controllers.
-*
-* This class handles discovery and enumeration of DJ controllers and
-* must be inherited by a class that implements it on some API.
-*/
-
-#ifndef CONTROLLERENUMERATOR_H
-#define CONTROLLERENUMERATOR_H
+#pragma once
#include "controllers/controller.h"
+/// Base class handling discovery and enumeration of DJ controllers.
+///
+/// This class handles discovery and enumeration of DJ controllers and
+/// must be inherited by a class that implements it on some API.
class ControllerEnumerator : public QObject {
Q_OBJECT
public:
@@ -29,5 +22,3 @@ class ControllerEnumerator : public QObject {
return false;
}
};
-
-#endif
diff --git a/src/controllers/controllerlearningeventfilter.h b/src/controllers/controllerlearningeventfilter.h
index 087e37b4bb..dc22e36a53 100644
--- a/src/controllers/controllerlearningeventfilter.h
+++ b/src/controllers/controllerlearningeventfilter.h
@@ -1,5 +1,4 @@
-#ifndef CONTROLLERLEARNINGEVENTFILTER_H
-#define CONTROLLERLEARNINGEVENTFILTER_H
+#pragma once
#include <QObject>
#include <QEvent>
@@ -48,6 +47,3 @@ class ControllerLearningEventFilter : public QObject {
QHash<QWidget*, ControlInfo> m_widgetControlInfo;
bool m_bListening;
};
-
-
-#endif /* CONTROLLERLEARNINGEVENTFILTER_H */
diff --git a/src/controllers/controllermanager.cpp b/src/controllers/controllermanager.cpp
index c89310de1e..04dffa554e 100644
--- a/src/controllers/controllermanager.cpp
+++ b/src/controllers/controllermanager.cpp
@@ -1,10 +1,3 @@
-/**
- * @file controllermanager.cpp
- * @author Sean Pappalardo spappalardo@mixxx.org
- * @date Sat Apr 30 2011
- * @brief Manages creation/enumeration/deletion of hardware controllers.
- */
-
#include "controllers/controllermanager.h"
#include <QSet>
diff --git a/src/controllers/controllermanager.h b/src/controllers/controllermanager.h
index 6a1a4b57d6..1c6c571a2a 100644
--- a/src/controllers/controllermanager.h
+++ b/src/controllers/controllermanager.h
@@ -1,12 +1,4 @@
-/**
- * @file controllermanager.h
- * @author Sean Pappalardo spappalardo@mixxx.org
- * @date Sat Apr 30 2011
- * @brief Manages creation/enumeration/deletion of hardware controllers.
- */
-
-#ifndef CONTROLLERMANAGER_H
-#define CONTROLLERMANAGER_H
+#pragma once
#include <QSharedPointer>
@@ -16,14 +8,14 @@
#include "controllers/controllerpresetinfoenumerator.h"
#include "preferences/usersettings.h"
-//Forward declaration(s)
+// Forward declaration(s)
class Controller;
class ControllerLearningEventFilter;
-// Function to sort controllers by name
+/// Function to sort controllers by name
bool controllerCompare(Controller *a, Controller *b);
-/** Manages enumeration/operation/deletion of hardware controllers. */
+/// Manages enumeration/operation/deletion of hardware controllers.
class ControllerManager : public QObject {
Q_OBJECT
public:
@@ -43,7 +35,7 @@ class ControllerManager : public QObject {
}
QString getConfiguredPresetFileForDevice(const QString& name);
- // Prevent other parts of Mixxx from having to manually connect to our slots
+ /// Prevent other parts of Mixxx from having to manually connect to our slots
void setUpDevices() { emit requestSetUpDevices(); };
static QList<QString> getPresetPaths(UserSettingsPointer pConfig);
@@ -62,15 +54,15 @@ class ControllerManager : public QObject {
void closeController(Controller* pController);
private slots:
- // Perform initialization that should be delayed until the ControllerManager
- // thread is started.
+ /// Perform initialization that should be delayed until the ControllerManager
+ /// thread is started.
void slotInitialize();
- // Open whatever controllers are selected in the preferences. This currently
- // only runs on start-up but maybe should instead be signaled by the
- // preferences dialog on apply, and only open/close changed devices
+ /// Open whatever controllers are selected in the preferences. This currently
+ /// only runs on start-up but maybe should instead be signaled by the
+ /// preferences dialog on apply, and only open/close changed devices
void slotSetUpDevices();
void slotShutdown();
- // Calls poll() on all devices that have isPolling() true.
+ /// Calls poll() on all devices that have isPolling() true.
void pollDevices();
void startPolling();
void stopPolling();
@@ -88,5 +80,3 @@ class ControllerManager : public QObject {
QSharedPointer<PresetInfoEnumerator> m_pMainThreadSystemPresetEnumerator;
bool m_skipPoll;
};
-
-#endif // CONTROLLERMANAGER_H
diff --git a/src/controllers/controllermappingtablemodel.h b/src/controllers/controllermappingtablemodel.h
index 008665f0d4..d6de46532c 100644
--- a/src/controllers/controllermappingtablemodel.h
+++ b/src/controllers/controllermappingtablemodel.h
@@ -1,5 +1,4 @@
-#ifndef CONTROLLERMAPPINGTABLEMODEL_H
-#define CONTROLLERMAPPINGTABLEMODEL_H
+#pragma once
#include <QAbstractTableModel>
#include <QVariant>
@@ -47,5 +46,3 @@ class ControllerMappingTableModel : public QAbstractTableModel,
MidiControllerPreset* m_pMidiPreset;
HidControllerPreset* m_pHidPreset;
};
-
-#endif /* CONTROLLERMAPPINGTABLEMODEL_H */
diff --git a/src/controllers/controllerpreset.h b/src/controllers/controllerpreset.h
index d34fa3ba61..2eaa98b4f9 100644
--- a/src/controllers/controllerpreset.h
+++ b/src/controllers/controllerpreset.h
@@ -1,8 +1,4 @@
#pragma once
-/// @file controllerpreset.h
-/// @author Sean Pappalardo spappalardo@mixxx.org
-/// @date Mon 9 Apr 2012
-/// @brief Controller Preset
#include <QDebug>
#include <QDir>
diff --git a/src/controllers/controllerpresetfilehandler.cpp b/src/controllers/controllerpresetfilehandler.cpp
index 39d429d4eb..a64cb42531 100644
--- a/src/controllers/controllerpresetfilehandler.cpp
+++ b/src/controllers/controllerpresetfilehandler.cpp
@@ -1,8 +1,3 @@
-/// @file controllerpresetfilehandler.cpp
-/// @author Sean Pappalardo spappalardo@mixxx.org
-/// @date Mon 9 Apr 2012
-/// @brief Handles loading and saving of Controller presets.
-
#include "controllers/controllerpresetfilehandler.h"
#include "controllers/controllermanager.h"
#include "controllers/defs_controllers.h"
diff --git a/src/controllers/controllerpresetfilehandler.h b/src/controllers/controllerpresetfilehandler.h
index 5dba31bcc4..7454d171ca 100644
--- a/src/controllers/controllerpresetfilehandler.h
+++ b/src/controllers/controllerpresetfilehandler.h
@@ -1,8 +1,4 @@
#pragma once
-/// @file controllerpresetfilehandler.h
-/// @author Sean Pappalardo spappalardo@mixxx.org
-/// @date Mon 9 Apr 2012
-/// @brief Handles loading and saving of Controller presets.
#include "util/xml.h"
#include "controllers/controllerpreset.h"
diff --git a/src/controllers/controllerpresetinfo.cpp b/src/controllers/controllerpresetinfo.cpp
index bf0051209a..34f075de5b 100644
--- a/src/controllers/controllerpresetinfo.cpp
+++ b/src/controllers/controllerpresetinfo.cpp
@@ -1,14 +1,3 @@
-/**
-* @file controllerpresetinfo.cpp
-* @author Ilkka Tuohela hile@iki.fi
-* @date Wed May 15 2012
-* @brief Implement handling enumeration and parsing of preset info headers
-*
-* This class handles parsing of controller XML description file
-* <info> header tags. It can be used to match controllers automatically or to
-* show details for a mapping.
-*/
-
#include "controllers/controllerpresetinfo.h"
#include "controllers/defs_controllers.h"
diff --git a/src/controllers/controllerpresetinfo.h b/src/controllers/controllerpresetinfo.h
index 3eb5c4ef15..9b38e11900 100644
--- a/src/controllers/controllerpresetinfo.h
+++ b/src/controllers/controllerpresetinfo.h
@@ -1,16 +1,4 @@
-/**
-* @file controllerpresetinfo.h
-* @author Ilkka Tuohela hile@iki.fi
-* @date Wed May 15 2012
-* @brief Base class handling enumeration and parsing of preset info headers
-*
-* This class handles enumeration and parsing of controller XML description file
-* <info> header tags. It can be used to match controllers automatically or to
-* show details for a mapping.
-*/
-
-#ifndef CONTROLLERPRESETINFO_H
-#define CONTROLLERPRESETINFO_H
+#pragma once
#include <QString>
#include <QMap>
@@ -37,6 +25,11 @@ struct ProductInfo {
QString interface_number;
};
+/// Base class handling enumeration and parsing of preset info headers
+///
+/// This class handles enumeration and parsing of controller XML description file
+/// <info> header tags. It can be used to match controllers automatically or to
+/// show details for a mapping.
class PresetInfo {
public:
PresetInfo();
@@ -71,5 +64,3 @@ class PresetInfo {
QString m_wikilink;
QList<ProductInfo> m_products;
};
-
-#endif
diff --git a/src/controllers/controllerpresetinfoenumerator.cpp b/src/controllers/controllerpresetinfoenumerator.cpp
index 517451fd33..10201ac645 100644
--- a/src/controllers/controllerpresetinfoenumerator.cpp
+++ b/src/controllers/controllerpresetinfoenumerator.cpp
@@ -1,9 +1,3 @@
-/**
-* @file controllerpresetinfoenumerator.cpp
-* @author Be be.0@gmx.com
-* @date Sat Jul 18 2015
-* @brief Enumerate list of available controller mapping presets
-*/
#include "controllers/controllerpresetinfoenumerator.h"
#include <QDirIterator>
diff --git a/src/controllers/controllerpresetinfoenumerator.h b/src/controllers/controllerpresetinfoenumerator.h
index 07a71dfd10..03f2fd859f 100644
--- a/