diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2019-03-03 18:44:34 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2019-03-03 18:44:34 +0000 |
| commit | e0c3dcb6f20ba542bcae375176ae02205591e692 (patch) | |
| tree | e03022992324878ab2cdd72d9d5f5d89d0277743 /src | |
| parent | 4e8071d478eeb2b0dc4b28616e9ef8419896b846 (diff) | |
| download | qmmp-e0c3dcb6f20ba542bcae375176ae02205591e692.tar.gz qmmp-e0c3dcb6f20ba542bcae375176ae02205591e692.tar.bz2 qmmp-e0c3dcb6f20ba542bcae375176ae02205591e692.zip | |
changed properties api
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@8744 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src')
| -rw-r--r-- | src/qmmp/decoderfactory.h | 23 | ||||
| -rw-r--r-- | src/qmmp/effectfactory.h | 26 | ||||
| -rw-r--r-- | src/qmmp/enginefactory.h | 18 | ||||
| -rw-r--r-- | src/qmmp/inputsourcefactory.h | 24 | ||||
| -rw-r--r-- | src/qmmp/visualfactory.h | 22 | ||||
| -rw-r--r-- | src/qmmp/volume.h | 14 | ||||
| -rw-r--r-- | src/qmmpui/filedialogfactory.h | 17 | ||||
| -rw-r--r-- | src/qmmpui/generalfactory.h | 26 | ||||
| -rw-r--r-- | src/qmmpui/uifactory.h | 18 |
9 files changed, 54 insertions, 134 deletions
diff --git a/src/qmmp/decoderfactory.h b/src/qmmp/decoderfactory.h index 7130fa1a1..61ffa77c5 100644 --- a/src/qmmp/decoderfactory.h +++ b/src/qmmp/decoderfactory.h @@ -30,22 +30,11 @@ #include "metadatamodel.h" #include "trackinfo.h" -/*! @brief Helper class to store input plugin properties. +/*! @brief Structure to store input plugin properties. * @author Ilya Kotov <forkotov02@ya.ru> */ -class DecoderProperties +struct DecoderProperties { -public: - /*! - * Constructor - */ - DecoderProperties() - { - hasAbout = false; - hasSettings = false; - noInput = false; - priority = 0; - } QString name; /*!< Input plugin full name */ QString shortName; /*!< Input plugin short name for internal usage */ QStringList filters; /*!< File filters (example: "*.mp3") */ @@ -53,10 +42,10 @@ public: QStringList contentTypes; /*!< Supported content types */ QStringList protocols; /*!< A list of supported protocols. * Should be empty if plugin uses stream input. */ - bool hasAbout; /*!< Should be \b true if plugin has about dialog, otherwise \b false */ - bool hasSettings; /*!< Should be \b true if plugin has settings dialog, otherwise \b false */ - bool noInput; /*!< Should be \b true if plugin has own input, otherwise \b false */ - int priority; /*!< Decoder priority. Decoders with lowest value will be used first */ + bool hasAbout = false; /*!< Should be \b true if plugin has about dialog, otherwise \b false */ + bool hasSettings = false; /*!< Should be \b true if plugin has settings dialog, otherwise \b false */ + bool noInput = false; /*!< Should be \b true if plugin has own input, otherwise \b false */ + int priority = 0; /*!< Decoder priority. Decoders with lowest value will be used first */ }; /*! @brief Input plugin interface (decoder factory). * @author Ilya Kotov <forkotov02@ya.ru> diff --git a/src/qmmp/effectfactory.h b/src/qmmp/effectfactory.h index d5553d14d..0dace848e 100644 --- a/src/qmmp/effectfactory.h +++ b/src/qmmp/effectfactory.h @@ -27,12 +27,11 @@ class QObject; class QWidget; class Effect; -/*! @brief Helper class to store effect plugin properties. +/*! @brief Structure to store effect plugin properties. * @author Ilya Kotov <forkotov02@ya.ru> */ -class QMMP_EXPORT EffectProperties +struct EffectProperties { -public: /*! * This enum describes effect preferd position. */ @@ -42,21 +41,14 @@ public: EFFECT_PRIORITY_DEFAULT, /*!< Default priority */ EFFECT_PRIORITY_HIGH /*!< High priority */ }; - /*! - * Constructor - */ - EffectProperties() - { - hasAbout = false; - hasSettings = false; - priority = EFFECT_PRIORITY_DEFAULT; - } - QString name; /*!< Effect plugin full name */ - QString shortName; /*!< Effect plugin short name for internal usage */ - bool hasAbout; /*!< Should be \b true if plugin has about dialog, otherwise returns \b false */ - bool hasSettings; /*!< Should be \b true if plugin has settings dialog, otherwise returns \b false */ - int priority; /*!< Effect priority. Effecs with higher priority will be applied first */ + + QString name; /*!< Effect plugin full name */ + QString shortName; /*!< Effect plugin short name for internal usage */ + bool hasAbout = false; /*!< Should be \b true if plugin has about dialog, otherwise returns \b false */ + bool hasSettings = false; /*!< Should be \b true if plugin has settings dialog, otherwise returns \b false */ + int priority = EFFECT_PRIORITY_DEFAULT; /*!< Effect priority. Effecs with higher priority will be applied first */ }; + /*! @brief Effect plugin interface (effect factory). * @author Ilya Kotov <forkotov02@ya.ru> */ diff --git a/src/qmmp/enginefactory.h b/src/qmmp/enginefactory.h index a8807258f..56fa27754 100644 --- a/src/qmmp/enginefactory.h +++ b/src/qmmp/enginefactory.h @@ -33,29 +33,21 @@ class AbstractEngine; -/*! @brief Helper class to store custom audio engine properies. +/*! @brief Structure to store custom audio engine properies. * @author Ilya Kotov <forkotov02@ya.ru> */ -class QMMP_EXPORT EngineProperties +struct EngineProperties { -public: - /*! - * Constructor - */ - EngineProperties() - { - hasAbout = false; - hasSettings = false; - } QString name; /*!< Input plugin full name */ QString shortName; /*!< Input plugin short name for internal usage */ QStringList filters; /*!< File filters (example: "*.mp3,*.ogg") */ QString description; /*!< File filter description */ QStringList contentTypes; /*!< Supported content types */ QStringList protocols; /*!< Supported protocols. Should be empty if plugin uses stream input. */ - bool hasAbout; /*!< Should be \b true if plugin has about dialog, otherwise returns \b false */ - bool hasSettings; /*!< Should be \b true if plugin has settings dialog, otherwise returns \b false */ + bool hasAbout = false; /*!< Should be \b true if plugin has about dialog, otherwise returns \b false */ + bool hasSettings = false; /*!< Should be \b true if plugin has settings dialog, otherwise returns \b false */ }; + /*! @brief Engine plugin interface. * @author Ilya Kotov <forkotov02@ya.ru> */ diff --git a/src/qmmp/inputsourcefactory.h b/src/qmmp/inputsourcefactory.h index 423f2b823..b22734d42 100644 --- a/src/qmmp/inputsourcefactory.h +++ b/src/qmmp/inputsourcefactory.h @@ -27,26 +27,16 @@ class QStringList; class InputSource; -/*! @brief Helper class to store transport plugin properies. +/*! @brief Structure to store transport plugin properies. * @author Ilya Kotov <forkotov02@ya.ru> */ -class QMMP_EXPORT InputSourceProperties +struct QMMP_EXPORT InputSourceProperties { -public: - /*! - * Constructor - */ - InputSourceProperties() - { - hasSettings = false; - hasAbout = false; - } - - QString name; /*!< Transport plugin full name */ - QString shortName; /*!< Transport plugin name for internal usage */ - QStringList protocols; /*!< A list of supported protocols. */ - bool hasAbout; /*!< Should be \b true if plugin has about dialog, otherwise \b false */ - bool hasSettings; /*!< Should be \b true if plugin has settings dialog, otherwise \b false */ + QString name; /*!< Transport plugin full name */ + QString shortName; /*!< Transport plugin name for internal usage */ + QStringList protocols; /*!< A list of supported protocols. */ + bool hasAbout = false; /*!< Should be \b true if plugin has about dialog, otherwise \b false */ + bool hasSettings = false; /*!< Should be \b true if plugin has settings dialog, otherwise \b false */ }; diff --git a/src/qmmp/visualfactory.h b/src/qmmp/visualfactory.h index 4fdb3f54b..fb6af9251 100644 --- a/src/qmmp/visualfactory.h +++ b/src/qmmp/visualfactory.h @@ -21,6 +21,7 @@ #ifndef VISUALFACTORY_H #define VISUALFACTORY_H +#include <QString> #include "qmmp_export.h" class QObject; @@ -28,24 +29,15 @@ class QWidget; class QDialog; class Visual; -/*! @brief Helper class to store visual plugin properies. +/*! @brief Structure to store visual plugin properies. * @author Ilya Kotov <forkotov02@ya.ru> */ -class VisualProperties +struct VisualProperties { -public: - /*! - * Constructor - */ - VisualProperties() - { - hasAbout = false; - hasSettings = false; - } - QString name; /*!< Effect plugin full name */ - QString shortName; /*!< Effect plugin short name for internal usage */ - bool hasAbout; /*!< Should be \b true if plugin has about dialog, otherwise returns \b false */ - bool hasSettings; /*!< Should be \b true if plugin has settings dialog, otherwise returns \b false */ + QString name; /*!< Effect plugin full name */ + QString shortName; /*!< Effect plugin short name for internal usage */ + bool hasAbout = false; /*!< Should be \b true if plugin has about dialog, otherwise returns \b false */ + bool hasSettings = false; /*!< Should be \b true if plugin has settings dialog, otherwise returns \b false */ }; /*! @brief %Visual plugin interface (visual factory). * @author Ilya Kotov <forkotov02@ya.ru> diff --git a/src/qmmp/volume.h b/src/qmmp/volume.h index 5ef80cba3..8259e241d 100644 --- a/src/qmmp/volume.h +++ b/src/qmmp/volume.h @@ -28,17 +28,9 @@ * @author Ilya Kotov <forkotov02@ya.ru> */ struct VolumeSettings -{ - /*! - * Constructor - */ - VolumeSettings() - { - left = 0; - right = 0; - } - int left /*!< Volume of the left channel. It should be \b 0..100. */; - int right /*!< Volume of the left channel It should be \b 0..100. */; +{ + int left = 0; /*!< Volume of the left channel. It should be \b 0..100. */ + int right = 0; /*!< Volume of the left channel It should be \b 0..100. */ }; diff --git a/src/qmmpui/filedialogfactory.h b/src/qmmpui/filedialogfactory.h index baf40451c..1354d68e2 100644 --- a/src/qmmpui/filedialogfactory.h +++ b/src/qmmpui/filedialogfactory.h @@ -27,24 +27,15 @@ class FileDialog; class QWidget; class QString; -/*! @brief Helper class to store file dialog plugin properties. +/*! @brief Structure to store file dialog plugin properties. */ -class FileDialogProperties +struct FileDialogProperties { -public: - /*! - * Constructor - */ - FileDialogProperties() - { - hasAbout = false; - modal = true; - } - bool hasAbout; /*!< Should be \b true if the file dialog plugin has about dialog, + bool hasAbout = false;/*!< Should be \b true if the file dialog plugin has about dialog, * otherwise should be \b false */ QString name; /*!< File dialog plugin full name */ QString shortName; /*!< File dialog short name for internal usage */ - bool modal; /*!< Should be \b true if the file dialog doesn't support nonmodal mode, + bool modal = false; /*!< Should be \b true if the file dialog doesn't support nonmodal mode, * otherwise should be \b false */ }; /*! @brief File dialog plugin interface. diff --git a/src/qmmpui/generalfactory.h b/src/qmmpui/generalfactory.h index 8437a6eb8..a891f854d 100644 --- a/src/qmmpui/generalfactory.h +++ b/src/qmmpui/generalfactory.h @@ -29,26 +29,16 @@ class QWidget; class Control; class General; -/*! @brief Helper class to store general plugin properies. +/*! @brief Structure to store general plugin properies. */ -class QMMPUI_EXPORT GeneralProperties +struct GeneralProperties { -public: - /*! - * Constructor - */ - GeneralProperties() - { - hasAbout = false; - hasSettings = false; - visibilityControl = false; - } - QString name; /*!< File dialog plugin full name */ - QString shortName; /*!< File dialog short name for internal usage */ - bool hasAbout; /*!< Should be \b true if plugin has about dialog, otherwise returns \b false */ - bool hasSettings; /*!< Should be \b true if plugin has settings dialog, otherwise returns \b false */ - bool visibilityControl; /*!< Should be \b true if plugin can show/hide main window of the player, - * otherwise returns \b false */ + QString name; /*!< File dialog plugin full name */ + QString shortName; /*!< File dialog short name for internal usage */ + bool hasAbout = false; /*!< Should be \b true if plugin has about dialog, otherwise returns \b false */ + bool hasSettings = false; /*!< Should be \b true if plugin has settings dialog, otherwise returns \b false */ + bool visibilityControl = false; /*!< Should be \b true if plugin can show/hide main window of the player, + * otherwise returns \b false */ }; /*! @brief %General plugin interface. * @author Ilya Kotov <forkotov02@ya.ru> diff --git a/src/qmmpui/uifactory.h b/src/qmmpui/uifactory.h index aacab168b..ecec99294 100644 --- a/src/qmmpui/uifactory.h +++ b/src/qmmpui/uifactory.h @@ -29,21 +29,13 @@ class QWidget; class Control; class General; -/*! @brief Helper class to store user interface plugin properies. +/*! @brief Structure to store user interface plugin properies. */ -class QMMPUI_EXPORT UiProperties +struct UiProperties { -public: - /*! - * Constructor - */ - UiProperties() - { - hasAbout = false; - } - QString name; /*!< File dialog plugin full name */ - QString shortName; /*!< File dialog short name for internal usage */ - bool hasAbout; /*!< Should be \b true if plugin has about dialog, otherwise returns \b false */ + QString name; /*!< File dialog plugin full name */ + QString shortName; /*!< File dialog short name for internal usage */ + bool hasAbout = false; /*!< Should be \b true if plugin has about dialog, otherwise returns \b false */ }; /*! @brief User interface plugin interface. * @author Ilya Kotov <forkotov02@ya.ru> |
