Random cleanup (#861)

Co-authored-by: Seker <murat.seker@barco.com>
This commit is contained in:
Murat Seker
2020-07-12 09:19:59 +02:00
committed by GitHub
parent de9ece5139
commit 138b7d9c94
74 changed files with 115 additions and 234 deletions

View File

@@ -17,7 +17,6 @@ class CaptureCont : public QObject
Q_OBJECT
public:
CaptureCont(Hyperion* hyperion);
~CaptureCont();
void setSystemCaptureEnable(const bool& enable);
void setV4LCaptureEnable(const bool& enable);

View File

@@ -23,7 +23,6 @@ class Grabber : public QObject
public:
Grabber(QString grabberName = "", int width=0, int height=0, int cropLeft=0, int cropRight=0, int cropTop=0, int cropBottom=0);
virtual ~Grabber();
///
/// Set the video mode (2D/3D)

View File

@@ -2,7 +2,6 @@
// stl includes
#include <list>
#include <QMap>
// QT includes
#include <QString>
@@ -11,6 +10,7 @@
#include <QJsonObject>
#include <QJsonValue>
#include <QJsonArray>
#include <QMap>
#include <QMutex>
// hyperion-utils includes
@@ -59,32 +59,25 @@ class Hyperion : public QObject
Q_OBJECT
public:
/// Type definition of the info structure used by the priority muxer
typedef PriorityMuxer::InputInfo InputInfo;
///
/// RGB-Color channel enumeration
///
enum RgbChannel
{
BLACK, WHITE, RED, GREEN, BLUE, CYAN, MAGENTA, YELLOW, INVALID
};
using InputInfo = PriorityMuxer::InputInfo;
///
/// Destructor; cleans up resources
///
virtual ~Hyperion();
~Hyperion() override;
///
/// free all alocated objects, should be called only from constructor or before restarting hyperion
///
void freeObjects(bool emitCloseSignal=false);
ImageProcessor* getImageProcessor() { return _imageProcessor; };
ImageProcessor* getImageProcessor() { return _imageProcessor; }
///
/// @brief Get instance index of this instance
/// @return The index of this instance
///
const quint8 & getInstanceIndex() { return _instIndex; };
const quint8 & getInstanceIndex() { return _instIndex; }
///
/// Returns the number of attached leds
@@ -94,7 +87,7 @@ public:
///
/// @brief Return the size of led grid
///
QSize getLedGridSize() const { return _ledGridSize; };
QSize getLedGridSize() const { return _ledGridSize; }
/// gets the methode how image is maped to leds
const int & getLedMappingType();
@@ -110,8 +103,8 @@ public:
///
/// @brief Get the current active led device
/// @return The device nam
/// e
/// @return The device name
///
const QString & getActiveDeviceType();
///
@@ -206,7 +199,7 @@ public slots:
/// @return EffectEngine instance pointer
///
EffectEngine* getEffectEngineInstance() { return _effectEngine; };
EffectEngine* getEffectEngineInstance() { return _effectEngine; }
///
/// @brief Save an effect
/// @param obj The effect args
@@ -259,7 +252,7 @@ public slots:
/// @brief Get a pointer to the priorityMuxer instance
/// @return PriorityMuxer instance pointer
///
PriorityMuxer* getMuxerInstance() { return &_muxer; };
PriorityMuxer* getMuxerInstance() { return &_muxer; }
///
/// @brief enable/disable automatic/priorized source selection
@@ -335,7 +328,7 @@ public slots:
/// @brief Get the component Register
/// return Component register pointer
///
ComponentRegister& getComponentRegister() { return _componentRegister; };
ComponentRegister& getComponentRegister() { return _componentRegister; }
///
/// @brief Called from components to update their current state. DO NOT CALL FROM USERS
@@ -489,7 +482,7 @@ private slots:
///
/// @brief Apply new videoMode from Daemon to _currVideoMode
///
void handleNewVideoMode(const VideoMode& mode) { _currVideoMode = mode; };
void handleNewVideoMode(const VideoMode& mode) { _currVideoMode = mode; }
private:
friend class HyperionDaemon;

View File

@@ -12,7 +12,7 @@
class Hyperion;
class InstanceTable;
enum instanceState{
enum class InstanceState{
H_STARTED,
H_ON_STOP,
H_STOPPED,
@@ -29,7 +29,7 @@ class HyperionIManager : public QObject
public:
// global instance pointer
static HyperionIManager* getInstance() { return HIMinstance; };
static HyperionIManager* getInstance() { return HIMinstance; }
static HyperionIManager* HIMinstance;
public slots:
@@ -38,7 +38,7 @@ public slots:
/// @param inst The instance to check
/// @return True when running else false
///
bool IsInstanceRunning(const quint8& inst) { return _runningInstances.contains(inst); };
bool IsInstanceRunning(const quint8& inst) { return _runningInstances.contains(inst); }
///
/// @brief Get a Hyperion instance by index
@@ -103,7 +103,7 @@ signals:
/// @param instance The index of instance
/// @param name The name of the instance, just available with H_CREATED
///
void instanceStateChanged(const instanceState& state, const quint8& instance, const QString& name = QString());
void instanceStateChanged(const InstanceState& state, const quint8& instance, const QString& name = QString());
///
/// @brief Emits whenever something changes, the lazy version of instanceStateChanged (- H_ON_STOP) + saveName() emit
@@ -172,7 +172,7 @@ private:
/// @brief check if a instance is allowed for management. Instance 0 represents the root instance
/// @apram inst The instance to check
///
bool isInstAllowed(const quint8& inst) { return (inst > 0); };
bool isInstAllowed(const quint8& inst) { return (inst > 0); }
private:
Logger* _log;

View File

@@ -40,6 +40,7 @@ inline QString colorOrderToString(const ColorOrder colorOrder)
return "not-a-colororder";
}
}
inline ColorOrder stringToColorOrder(const QString & order)
{
if (order == "rgb")