diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2018-07-21 17:30:35 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2018-07-21 17:30:35 +0000 |
| commit | 2111b82728e37a649539076ee4e9fc83103f196b (patch) | |
| tree | 502932f709108cd76ae393a4904e460c5dd57d0a | |
| parent | 6ca203336305da1b2f8b45e4dca647153da49e3c (diff) | |
| download | qmmp-2111b82728e37a649539076ee4e9fc83103f196b.tar.gz qmmp-2111b82728e37a649539076ee4e9fc83103f196b.tar.bz2 qmmp-2111b82728e37a649539076ee4e9fc83103f196b.zip | |
changed translation api again
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@8200 90c681e8-e032-0410-971d-27865f9a5e38
142 files changed, 549 insertions, 218 deletions
diff --git a/src/plugins/CommandLineOptions/IncDecVolumeOption/incdecvolumeoption.cpp b/src/plugins/CommandLineOptions/IncDecVolumeOption/incdecvolumeoption.cpp index 8f594eddf..d901458ca 100644 --- a/src/plugins/CommandLineOptions/IncDecVolumeOption/incdecvolumeoption.cpp +++ b/src/plugins/CommandLineOptions/IncDecVolumeOption/incdecvolumeoption.cpp @@ -24,11 +24,10 @@ #include <qmmp/soundcore.h> #include "incdecvolumeoption.h" -const CommandLineProperties IncDecVolumeCommandLineOption::properties() const +CommandLineProperties IncDecVolumeCommandLineOption::properties() const { CommandLineProperties properties; properties.shortName = "IncDecVolumeCommandLineOption"; - properties.translation = QLatin1String(":/incdecvolume_plugin_"); properties.helpString << QString("--volume-inc") + "||" + tr("Increase volume by 5 steps") << QString("--volume-dec") + "||" + tr("Decrease volume by 5 steps"); return properties; @@ -53,3 +52,8 @@ QString IncDecVolumeCommandLineOption::executeCommand(const QString& opt_str, co return QString(); } + +QString IncDecVolumeCommandLineOption::translation() const +{ + return QLatin1String(":/incdecvolume_plugin_"); +} diff --git a/src/plugins/CommandLineOptions/IncDecVolumeOption/incdecvolumeoption.h b/src/plugins/CommandLineOptions/IncDecVolumeOption/incdecvolumeoption.h index 98c869fe7..95196944c 100644 --- a/src/plugins/CommandLineOptions/IncDecVolumeOption/incdecvolumeoption.h +++ b/src/plugins/CommandLineOptions/IncDecVolumeOption/incdecvolumeoption.h @@ -34,9 +34,10 @@ Q_OBJECT Q_PLUGIN_METADATA(IID "org.qmmp.qmmpui.CommandLineOptionInterface.1.0") Q_INTERFACES(CommandLineOption) public: - virtual const CommandLineProperties properties() const; + virtual CommandLineProperties properties() const; virtual bool identify(const QString& opt_str) const; virtual QString executeCommand(const QString& opt_str, const QStringList &args); + virtual QString translation() const; }; #endif diff --git a/src/plugins/CommandLineOptions/PlayListOption/playlistoption.cpp b/src/plugins/CommandLineOptions/PlayListOption/playlistoption.cpp index 17156c4c8..cc0ff7cf0 100644 --- a/src/plugins/CommandLineOptions/PlayListOption/playlistoption.cpp +++ b/src/plugins/CommandLineOptions/PlayListOption/playlistoption.cpp @@ -28,11 +28,10 @@ #include <qmmpui/commandlinemanager.h> #include "playlistoption.h" -const CommandLineProperties PlayListOption::properties() const +CommandLineProperties PlayListOption::properties() const { CommandLineProperties properties; properties.shortName = "PlayListOption"; - properties.translation = QLatin1String(":/playlist_plugin_"); properties.helpString << QString("--pl-help") + "||" + tr("Show playlist manipulation commands"); return properties; } @@ -146,6 +145,11 @@ QString PlayListOption::executeCommand(const QString& opt_str, const QStringList return out; } +QString PlayListOption::translation() const +{ + return QLatin1String(":/playlist_plugin_"); +} + QString PlayListOption::boolToText(bool enabled) { return QString(enabled ? "[+]" : "[-]"); diff --git a/src/plugins/CommandLineOptions/PlayListOption/playlistoption.h b/src/plugins/CommandLineOptions/PlayListOption/playlistoption.h index bb0e13570..22d67d048 100644 --- a/src/plugins/CommandLineOptions/PlayListOption/playlistoption.h +++ b/src/plugins/CommandLineOptions/PlayListOption/playlistoption.h @@ -36,9 +36,10 @@ Q_OBJECT Q_PLUGIN_METADATA(IID "org.qmmp.qmmpui.CommandLineOptionInterface.1.0") Q_INTERFACES(CommandLineOption) public: - virtual const CommandLineProperties properties() const; + virtual CommandLineProperties properties() const; virtual bool identify(const QString& opt_str) const; virtual QString executeCommand(const QString& opt_str, const QStringList &args); + virtual QString translation() const; private: QString boolToText(bool enabled); diff --git a/src/plugins/CommandLineOptions/SeekOption/seekoption.cpp b/src/plugins/CommandLineOptions/SeekOption/seekoption.cpp index ed367fd9f..7072e6e60 100644 --- a/src/plugins/CommandLineOptions/SeekOption/seekoption.cpp +++ b/src/plugins/CommandLineOptions/SeekOption/seekoption.cpp @@ -24,11 +24,10 @@ #include <qmmp/soundcore.h> #include "seekoption.h" -const CommandLineProperties SeekOption::properties() const +CommandLineProperties SeekOption::properties() const { CommandLineProperties properties; properties.shortName = "SeekOption"; - properties.translation = QLatin1String(":/seek_plugin_"); properties.helpString << QString("--seek <time>") + "||" + tr("Seek to position in the current track") << QString("--seek-fwd <time>") + "||" + tr("Seek forward") << QString("--seek-bwd <time>") + "||" + tr("Seek backwards"); @@ -76,3 +75,8 @@ QString SeekOption::executeCommand(const QString &opt_str, const QStringList &ar return QString(); return QString(); } + +QString SeekOption::translation() const +{ + return QLatin1String(":/seek_plugin_"); +} diff --git a/src/plugins/CommandLineOptions/SeekOption/seekoption.h b/src/plugins/CommandLineOptions/SeekOption/seekoption.h index 24bc608e3..c4bcafaae 100644 --- a/src/plugins/CommandLineOptions/SeekOption/seekoption.h +++ b/src/plugins/CommandLineOptions/SeekOption/seekoption.h @@ -34,9 +34,10 @@ Q_OBJECT Q_PLUGIN_METADATA(IID "org.qmmp.qmmpui.CommandLineOptionInterface.1.0") Q_INTERFACES(CommandLineOption) public: - virtual const CommandLineProperties properties() const; + virtual CommandLineProperties properties() const; virtual bool identify(const QString &opt_str) const; virtual QString executeCommand(const QString& opt_str, const QStringList &args); + virtual QString translation() const; }; #endif diff --git a/src/plugins/CommandLineOptions/StatusOption/statusoption.cpp b/src/plugins/CommandLineOptions/StatusOption/statusoption.cpp index cb19b4efc..a536daa6b 100644 --- a/src/plugins/CommandLineOptions/StatusOption/statusoption.cpp +++ b/src/plugins/CommandLineOptions/StatusOption/statusoption.cpp @@ -25,11 +25,10 @@ #include <qmmpui/metadataformatter.h> #include "statusoption.h" -const CommandLineProperties StatusOption::properties() const +CommandLineProperties StatusOption::properties() const { CommandLineProperties properties; properties.shortName = "StatusOption"; - properties.translation = QLatin1String(":/status_plugin_"); properties.helpString << QString("--status") + "||" + tr("Print playback status") << QString("--nowplaying <fmt>") + "||" + tr("Print formatted track name (example: qmmp --nowplaying \"%t - %a\")") @@ -107,6 +106,11 @@ QString StatusOption::executeCommand(const QString &opt_str, const QStringList & return out; } +QString StatusOption::translation() const +{ + return QLatin1String(":/status_plugin_"); +} + QString StatusOption::genProgressBar() { SoundCore *core = SoundCore::instance(); diff --git a/src/plugins/CommandLineOptions/StatusOption/statusoption.h b/src/plugins/CommandLineOptions/StatusOption/statusoption.h index d161d29be..0dd83c919 100644 --- a/src/plugins/CommandLineOptions/StatusOption/statusoption.h +++ b/src/plugins/CommandLineOptions/StatusOption/statusoption.h @@ -36,9 +36,10 @@ Q_OBJECT Q_PLUGIN_METADATA(IID "org.qmmp.qmmpui.CommandLineOptionInterface.1.0") Q_INTERFACES(CommandLineOption) public: - virtual const CommandLineProperties properties() const; + virtual CommandLineProperties properties() const; virtual bool identify(const QString& opt_str) const; virtual QString executeCommand(const QString& opt_str, const QStringList &args); + virtual QString translation() const; private: QString genProgressBar(); diff --git a/src/plugins/Effect/bs2b/effectbs2bfactory.cpp b/src/plugins/Effect/bs2b/effectbs2bfactory.cpp index 8f48344bb..ca543bcc5 100644 --- a/src/plugins/Effect/bs2b/effectbs2bfactory.cpp +++ b/src/plugins/Effect/bs2b/effectbs2bfactory.cpp @@ -30,7 +30,6 @@ const EffectProperties EffectBs2bFactory::properties() const EffectProperties properties; properties.name = tr("BS2B Plugin"); properties.shortName = "bs2b"; - properties.translation = QLatin1String(":/bs2b_plugin_"); properties.hasSettings = true; properties.hasAbout = true; return properties; @@ -59,3 +58,8 @@ void EffectBs2bFactory::showAbout(QWidget *parent) tr("Ilya Kotov <forkotov02@ya.ru>")+"<br>"+ tr("Sebastian Pipping <sebastian@pipping.org>")+"</p>"); } + +QString EffectBs2bFactory::translation() const +{ + return QLatin1String(":/bs2b_plugin_"); +} diff --git a/src/plugins/Effect/bs2b/effectbs2bfactory.h b/src/plugins/Effect/bs2b/effectbs2bfactory.h index 29db0d551..49644a68b 100644 --- a/src/plugins/Effect/bs2b/effectbs2bfactory.h +++ b/src/plugins/Effect/bs2b/effectbs2bfactory.h @@ -38,6 +38,7 @@ public: Effect *create(); void showSettings(QWidget *parent); void showAbout(QWidget *parent); + QString translation() const; }; diff --git a/src/plugins/Effect/crossfade/effectcrossfadefactory.cpp b/src/plugins/Effect/crossfade/effectcrossfadefactory.cpp index a5f12e94d..0c940678d 100644 --- a/src/plugins/Effect/crossfade/effectcrossfadefactory.cpp +++ b/src/plugins/Effect/crossfade/effectcrossfadefactory.cpp @@ -29,7 +29,6 @@ const EffectProperties EffectCrossfadeFactory::properties() const EffectProperties properties; properties.name = tr("Crossfade Plugin"); properties.shortName = "crossfade"; - properties.translation = QLatin1String(":/crossfade_plugin_"); properties.hasSettings = true; properties.hasAbout = true; properties.priority = EffectProperties::EFFECT_PRIORITY_LOW; @@ -51,5 +50,10 @@ void EffectCrossfadeFactory::showAbout(QWidget *parent) { QMessageBox::about (parent, tr("About Crossfade Plugin"), tr("Qmmp Crossfade Plugin")+"\n"+ - tr("Written by: Ilya Kotov <forkotov02@ya.ru>")); + tr("Written by: Ilya Kotov <forkotov02@ya.ru>")); +} + +QString EffectCrossfadeFactory::translation() const +{ + return QLatin1String(":/crossfade_plugin_"); } diff --git a/src/plugins/Effect/crossfade/effectcrossfadefactory.h b/src/plugins/Effect/crossfade/effectcrossfadefactory.h index dc52a9138..8fd23e5c0 100644 --- a/src/plugins/Effect/crossfade/effectcrossfadefactory.h +++ b/src/plugins/Effect/crossfade/effectcrossfadefactory.h @@ -38,6 +38,7 @@ public: Effect *create(); void showSettings(QWidget *parent); void showAbout(QWidget *parent); + QString translation() const; }; diff --git a/src/plugins/Effect/filewriter/effectfilewriterfactory.cpp b/src/plugins/Effect/filewriter/effectfilewriterfactory.cpp index 87af164a7..95d75c160 100644 --- a/src/plugins/Effect/filewriter/effectfilewriterfactory.cpp +++ b/src/plugins/Effect/filewriter/effectfilewriterfactory.cpp @@ -29,7 +29,6 @@ const EffectProperties EffectFileWriterFactory::properties() const EffectProperties properties; properties.name = tr("File Writer Plugin"); properties.shortName = "filewriter"; - properties.translation = QLatin1String(":/filewriter_plugin_"); properties.hasSettings = true; properties.hasAbout = true; properties.priority = EffectProperties::EFFECT_PRIORITY_LOW; @@ -51,5 +50,10 @@ void EffectFileWriterFactory::showAbout(QWidget *parent) { QMessageBox::about (parent, tr("About File Writer Plugin"), tr("Qmmp File Writer Plugin")+"\n"+ - tr("Written by: Ilya Kotov <forkotov02@ya.ru>")); + tr("Written by: Ilya Kotov <forkotov02@ya.ru>")); +} + +QString EffectFileWriterFactory::translation() const +{ + return QLatin1String(":/filewriter_plugin_"); } diff --git a/src/plugins/Effect/filewriter/effectfilewriterfactory.h b/src/plugins/Effect/filewriter/effectfilewriterfactory.h index 6f74d20e8..266f72606 100644 --- a/src/plugins/Effect/filewriter/effectfilewriterfactory.h +++ b/src/plugins/Effect/filewriter/effectfilewriterfactory.h @@ -38,6 +38,7 @@ public: Effect *create(); void showSettings(QWidget *parent); void showAbout(QWidget *parent); + QString translation() const; }; diff --git a/src/plugins/Effect/ladspa/effectladspafactory.cpp b/src/plugins/Effect/ladspa/effectladspafactory.cpp index 0ee9a9e42..b0b73fd7d 100644 --- a/src/plugins/Effect/ladspa/effectladspafactory.cpp +++ b/src/plugins/Effect/ladspa/effectladspafactory.cpp @@ -29,7 +29,6 @@ const EffectProperties EffectLADSPAFactory::properties() const EffectProperties properties; properties.name = tr("LADSPA Plugin"); properties.shortName = "ladspa"; - properties.translation = QLatin1String(":/ladspa_plugin_"); properties.hasSettings = true; properties.hasAbout = true; return properties; @@ -56,3 +55,8 @@ void EffectLADSPAFactory::showAbout(QWidget *parent) tr("Nick Lamb <njl195@zepler.org.uk>")+"\n"+ tr("Giacomo Lozito <city_hunter@users.sf.net>")); } + +QString EffectLADSPAFactory::translation() const +{ + return QLatin1String(":/ladspa_plugin_"); +} diff --git a/src/plugins/Effect/ladspa/effectladspafactory.h b/src/plugins/Effect/ladspa/effectladspafactory.h index afa2b5b04..62e8b589c 100644 --- a/src/plugins/Effect/ladspa/effectladspafactory.h +++ b/src/plugins/Effect/ladspa/effectladspafactory.h @@ -38,6 +38,7 @@ public: Effect *create(); void showSettings(QWidget *parent); void showAbout(QWidget *parent); + QString translation() const; }; diff --git a/src/plugins/Effect/soxr/effectsoxrfactory.cpp b/src/plugins/Effect/soxr/effectsoxrfactory.cpp index afdaf044c..832a25adc 100644 --- a/src/plugins/Effect/soxr/effectsoxrfactory.cpp +++ b/src/plugins/Effect/soxr/effectsoxrfactory.cpp @@ -29,7 +29,6 @@ const EffectProperties EffectSoXRFactory::properties() const EffectProperties properties; properties.name = tr("SoX Resampler Plugin"); properties.shortName = "soxr"; - properties.translation = QLatin1String(":/soxr_plugin_"); properties.hasSettings = true; properties.hasAbout = true; properties.priority = EffectProperties::EFFECT_PRIORITY_HIGH; @@ -51,5 +50,10 @@ void EffectSoXRFactory::showAbout(QWidget *parent) { QMessageBox::about (parent, tr("About SoX Resampler Plugin"), tr("Qmmp SoX Resampler Plugin")+"\n"+ - tr("Written by: Ilya Kotov <forkotov02@ya.ru>")); + tr("Written by: Ilya Kotov <forkotov02@ya.ru>")); +} + +QString EffectSoXRFactory::translation() const +{ + return QLatin1String(":/soxr_plugin_"); } diff --git a/src/plugins/Effect/soxr/effectsoxrfactory.h b/src/plugins/Effect/soxr/effectsoxrfactory.h index f4d670d50..5300336d6 100644 --- a/src/plugins/Effect/soxr/effectsoxrfactory.h +++ b/src/plugins/Effect/soxr/effectsoxrfactory.h @@ -38,6 +38,7 @@ public: Effect *create(); void showSettings(QWidget *parent); void showAbout(QWidget *parent); + QString translation() const; }; diff --git a/src/plugins/Effect/stereo/effectstereofactory.cpp b/src/plugins/Effect/stereo/effectstereofactory.cpp index 105f23139..5e75b080e 100644 --- a/src/plugins/Effect/stereo/effectstereofactory.cpp +++ b/src/plugins/Effect/stereo/effectstereofactory.cpp @@ -29,7 +29,6 @@ const EffectProperties EffectStereoFactory::properties() const EffectProperties properties; properties.name = tr("Extra Stereo Plugin"); properties.shortName = "stereo"; - properties.translation = QLatin1String(":/stereo_plugin_"); properties.hasSettings = true; properties.hasAbout = true; return properties; @@ -53,3 +52,8 @@ void EffectStereoFactory::showAbout(QWidget *parent) tr("Written by: Ilya Kotov <forkotov02@ya.ru>")+"\n"+ tr("Based on the Extra Stereo Plugin for Xmms by Johan Levin")); } + +QString EffectStereoFactory::translation() const +{ + return QLatin1String(":/stereo_plugin_"); +} diff --git a/src/plugins/Effect/stereo/effectstereofactory.h b/src/plugins/Effect/stereo/effectstereofactory.h index 09a60b150..abf141597 100644 --- a/src/plugins/Effect/stereo/effectstereofactory.h +++ b/src/plugins/Effect/stereo/effectstereofactory.h @@ -38,6 +38,7 @@ public: Effect *create(); void showSettings(QWidget *parent); void showAbout(QWidget *parent); + QString translation() const; }; diff --git a/src/plugins/Engines/mplayer/mplayerenginefactory.cpp b/src/plugins/Engines/mplayer/mplayerenginefactory.cpp index 68d087269..965d8863f 100644 --- a/src/plugins/Engines/mplayer/mplayerenginefactory.cpp +++ b/src/plugins/Engines/mplayer/mplayerenginefactory.cpp @@ -27,12 +27,11 @@ // MplayerEngineFactory -const EngineProperties MplayerEngineFactory::properties() const +EngineProperties MplayerEngineFactory::properties() const { EngineProperties properties; properties.name = tr("Mplayer Plugin"); properties.shortName = "mplayer"; - properties.translation = QLatin1String(":/mplayer_plugin_"); properties.filters = MplayerInfo::filters(); properties.description = tr("Video Files"); //properties.contentType = "application/ogg;audio/x-vorbis+ogg"; @@ -85,3 +84,8 @@ void MplayerEngineFactory::showAbout(QWidget *parent) tr("This plugin uses MPlayer as backend")+"\n"+ tr("Written by: Ilya Kotov <forkotov02@ya.ru>")); } + +QString MplayerEngineFactory::translation() const +{ + return QLatin1String(":/mplayer_plugin_"); +} diff --git a/src/plugins/Engines/mplayer/mplayerenginefactory.h b/src/plugins/Engines/mplayer/mplayerenginefactory.h index fb89b14c5..8084c712a 100644 --- a/src/plugins/Engines/mplayer/mplayerenginefactory.h +++ b/src/plugins/Engines/mplayer/mplayerenginefactory.h @@ -29,13 +29,14 @@ Q_PLUGIN_METADATA(IID "org.qmmp.qmmp.EngineFactoryInterface.1.0") Q_INTERFACES(EngineFactory) public: - const EngineProperties properties() const; + EngineProperties properties() const; bool supports(const QString &source) const; AbstractEngine *create(QObject *parent = 0); QList<TrackInfo *> createPlayList(const QString &path, TrackInfo::Parts parts, QStringList *); MetaDataModel* createMetaDataModel(const QString &path, QObject *parent = 0); void showSettings(QWidget *parent); void showAbout(QWidget *parent); + QString translation() const; }; #endif diff --git a/src/plugins/FileDialogs/QmmpFileDialog/qmmpfiledialog.cpp b/src/plugins/FileDialogs/QmmpFileDialog/qmmpfiledialog.cpp index f9f696397..d93ae55a9 100644 --- a/src/plugins/FileDialogs/QmmpFileDialog/qmmpfiledialog.cpp +++ b/src/plugins/FileDialogs/QmmpFileDialog/qmmpfiledialog.cpp @@ -63,12 +63,11 @@ FileDialog* QmmpFileDialogFactory::create() return new QmmpFileDialog(); } -const FileDialogProperties QmmpFileDialogFactory::properties() const +FileDialogProperties QmmpFileDialogFactory::properties() const { FileDialogProperties properties; properties.name = tr("Qmmp File Dialog"); properties.shortName = "qmmp_dialog"; - properties.translation = QLatin1String(":/qmmp_file_dialog_plugin_"); properties.hasAbout = true; properties.modal = false; return properties; @@ -84,3 +83,8 @@ void QmmpFileDialogFactory::showAbout(QWidget *parent) tr("Some code is copied from the Qt library")); } + +QString QmmpFileDialogFactory::translation() const +{ + return QLatin1String(":/qmmp_file_dialog_plugin_"); +} diff --git a/src/plugins/FileDialogs/QmmpFileDialog/qmmpfiledialog.h b/src/plugins/FileDialogs/QmmpFileDialog/qmmpfiledialog.h index 3ccce93fa..72b283083 100644 --- a/src/plugins/FileDialogs/QmmpFileDialog/qmmpfiledialog.h +++ b/src/plugins/FileDialogs/QmmpFileDialog/qmmpfiledialog.h @@ -51,8 +51,9 @@ Q_PLUGIN_METADATA(IID "org.qmmp.qmmpui.FileDialogFactoryInterface.1.0") Q_INTERFACES(FileDialogFactory) public: virtual FileDialog* create(); - virtual const FileDialogProperties properties() const; + virtual FileDialogProperties properties() const; virtual void showAbout(QWidget*); + virtual QString translation() const; virtual ~QmmpFileDialogFactory() { ; diff --git a/src/plugins/FileDialogs/TwoPanelFileDialog/twopanelfiledialog.cpp b/src/plugins/FileDialogs/TwoPanelFileDialog/twopanelfiledialog.cpp index b5bd416a0..2adfe1816 100644 --- a/src/plugins/FileDialogs/TwoPanelFileDialog/twopanelfiledialog.cpp +++ b/src/plugins/FileDialogs/TwoPanelFileDialog/twopanelfiledialog.cpp @@ -61,13 +61,12 @@ FileDialog* TwoPanelFileDialogFactory::create() return new TwoPanelFileDialog(); } -const FileDialogProperties TwoPanelFileDialogFactory::properties() const +FileDialogProperties TwoPanelFileDialogFactory::properties() const { FileDialogProperties properties; properties.name = tr("Two-panel File Dialog"); properties.shortName = "twopanel_dialog"; properties.hasAbout = true; - properties.translation = QLatin1String(":/two_panel_file_dialog_plugin_"); properties.modal = false; return properties; } @@ -79,3 +78,8 @@ void TwoPanelFileDialogFactory::showAbout(QWidget *parent) tr("Written by: Ilya Kotov <forkotov02@ya.ru>") + "\n" + tr("Based on code from the Qt library")); } + +QString TwoPanelFileDialogFactory::translation() const +{ + return QLatin1String(":/two_panel_file_dialog_plugin_"); +} diff --git a/src/plugins/FileDialogs/TwoPanelFileDialog/twopanelfiledialog.h b/src/plugins/FileDialogs/TwoPanelFileDialog/twopanelfiledialog.h index 80e40a354..608af1e8b 100644 --- a/src/plugins/FileDialogs/TwoPanelFileDialog/twopanelfiledialog.h +++ b/src/plugins/FileDialogs/TwoPanelFileDialog/twopanelfiledialog.h @@ -58,8 +58,9 @@ class TwoPanelFileDialogFactory : public QObject, public FileDialogFactory Q_INTERFACES(FileDialogFactory) public: FileDialog* create(); - const FileDialogProperties properties() const; + FileDialogProperties properties() const; void showAbout(QWidget*); + QString translation() const; }; diff --git a/src/plugins/General/converter/converterfactory.cpp b/src/plugins/General/converter/converterfactory.cpp index 0254cda82..c48deae30 100644 --- a/src/plugins/General/converter/converterfactory.cpp +++ b/src/plugins/General/converter/converterfactory.cpp @@ -22,12 +22,11 @@ #include "converterhelper.h" #include "converterfactory.h" -const GeneralProperties ConverterFactory::properties() const +GeneralProperties ConverterFactory::properties() const { GeneralProperties properties; properties.name = tr("Converter Plugin"); properties.shortName = "converter"; - properties.translation = QLatin1String(":/converter_plugin_"); properties.hasAbout = true; properties.hasSettings = false; properties.visibilityControl = false; @@ -53,3 +52,8 @@ void ConverterFactory::showAbout(QWidget *parent) "using external command-line encoders") +"\n"+ tr("Written by: Ilya Kotov <forkotov02@ya.ru>")); } + +QString ConverterFactory::translation() const +{ + return QLatin1String(":/converter_plugin_"); +} diff --git a/src/plugins/General/converter/converterfactory.h b/src/plugins/General/converter/converterfactory.h index 83a7f3bf3..280a9825c 100644 --- a/src/plugins/General/converter/converterfactory.h +++ b/src/plugins/General/converter/converterfactory.h @@ -34,10 +34,11 @@ Q_OBJECT Q_PLUGIN_METADATA(IID "org.qmmp.qmmpui.GeneralFactoryInterface.1.0") Q_INTERFACES(GeneralFactory) public: - const GeneralProperties properties() const; + GeneralProperties properties() const; QObject *create(QObject *parent); QDialog *createConfigDialog(QWidget *parent); void showAbout(QWidget *parent); + QString translation() const; }; #endif diff --git a/src/plugins/General/copypaste/copypastefactory.cpp b/src/plugins/General/copypaste/copypastefactory.cpp index 458d6a764..5c15895de 100644 --- a/src/plugins/General/copypaste/copypastefactory.cpp +++ b/src/plugins/General/copypaste/copypastefactory.cpp @@ -23,12 +23,11 @@ #include "copypaste.h" #include "copypastefactory.h" -const GeneralProperties CopyPasteFactory::properties() const +GeneralProperties CopyPasteFactory::properties() const { GeneralProperties properties; properties.name = tr("Copy/Paste Plugin"); properties.shortName = "copypaste"; - properties.translation = QLatin1String(":/copypaste_plugin_"); properties.hasAbout = true; properties.hasSettings = false; properties.visibilityControl = false; @@ -52,3 +51,8 @@ void CopyPasteFactory::showAbout(QWidget *parent) tr("This plugin allows one to copy selected tracks from one playlist to another")+"\n"+ tr("Written by: Ilya Kotov <forkotov02@ya.ru>")); } + +QString CopyPasteFactory::translation() const +{ + return QLatin1String(":/copypaste_plugin_"); +} diff --git a/src/plugins/General/copypaste/copypastefactory.h b/src/plugins/General/copypaste/copypastefactory.h index 1dda634e4..20bb61a6c 100644 --- a/src/plugins/General/copypaste/copypastefactory.h +++ b/src/plugins/General/copypaste/copypastefactory.h @@ -34,10 +34,11 @@ Q_OBJECT Q_PLUGIN_METADATA(IID "org.qmmp.qmmpui.GeneralFactoryInterface.1.0") Q_INTERFACES(GeneralFactory) public: - const GeneralProperties properties() const; + GeneralProperties properties() const; QObject *create(QObject *parent); QDialog *createConfigDialog(QWidget *); void showAbout(QWidget *parent); + QString translation() const; }; #endif // COPYPASTEFACTORY_H diff --git a/src/plugins/General/covermanager/covermanagerfactory.cpp b/src/plugins/General/covermanager/covermanagerfactory.cpp index ef79a0520..caae162f5 100644 --- a/src/plugins/General/covermanager/covermanagerfactory.cpp +++ b/src/plugins/General/covermanager/covermanagerfactory.cpp @@ -24,12 +24,11 @@ #include "covermanager.h" #include "covermanagerfactory.h" -const GeneralProperties CoverManagerFactory::properties() const +GeneralProperties CoverManagerFactory::properties() const { GeneralProperties properties; properties.name = tr("Cover Manager Plugin"); properties.shortName = "cover_manager"; - properties.translation = QLatin1String(":/covermanager_plugin_"); properties.hasAbout = true; properties.hasSettings = false; properties.visibilityControl = false; @@ -52,3 +51,8 @@ void CoverManagerFactory::showAbout(QWidget *parent) tr("Qmmp Cover Manager Plugin")+"\n"+ tr("Written by: Ilya Kotov <forkotov02@ya.ru>")); } + +QString CoverManagerFactory::translation() const +{ + return QLatin1String(":/covermanager_plugin_"); +} diff --git a/src/plugins/General/covermanager/covermanagerfactory.h b/src/plugins/General/covermanager/covermanagerfactory.h index c9c78a277..b4d838cf9 100644 --- a/src/plugins/General/covermanager/covermanagerfactory.h +++ b/src/plugins/General/covermanager/covermanagerfactory.h @@ -34,10 +34,11 @@ Q_OBJECT Q_PLUGIN_METADATA(IID "org.qmmp.qmmpui.GeneralFactoryInterface.1.0") Q_INTERFACES(GeneralFactory) public: - const GeneralProperties properties() const; + GeneralProperties properties() const; QObject *create(QObject *parent); QDialog *createConfigDialog(QWidget *parent); void showAbout(QWidget *parent); + QString translation() const; }; #endif diff --git a/src/plugins/General/fileops/fileopsfactory.cpp b/src/plugins/General/fileops/fileopsfactory.cpp index 12dfd08a0..baed7b309 100644 --- a/src/plugins/General/fileops/fileopsfactory.cpp +++ b/src/plugins/General/fileops/fileopsfactory.cpp @@ -24,12 +24,11 @@ #include "settingsdialog.h" #include "fileopsfactory.h" -const GeneralProperties FileOpsFactory::properties() const +GeneralProperties FileOpsFactory::properties() const { GeneralProperties properties; properties.name = tr("File Operations Plugin"); properties.shortName = "fileops"; - properties.translation = QLatin1String(":/fileops_plugin_"); properties.hasAbout = true; properties.hasSettings = true; properties.visibilityControl = false; @@ -52,3 +51,8 @@ void FileOpsFactory::showAbout(QWidget *parent) tr("Qmmp File Operations Plugin")+"\n"+ tr("Written by: Ilya Kotov <forkotov02@ya.ru>")); } + +QString FileOpsFactory::translation() const +{ + return QLatin1String(":/fileops_plugin_"); +} diff --git a/src/plugins/General/fileops/fileopsfactory.h b/src/plugins/General/fileops/fileopsfactory.h index 1118b67b9..1a6deef94 100644 --- a/src/plugins/General/fileops/fileopsfactory.h +++ b/src/plugins/General/fileops/fileopsfactory.h @@ -35,10 +35,11 @@ Q_OBJECT Q_PLUGIN_METADATA(IID "org.qmmp.qmmpui.GeneralFactoryInterface.1.0") Q_INTERFACES(GeneralFactory) public: - const GeneralProperties properties() const; + GeneralProperties properties() const; QObject *create(QObject *parent); QDialog *createConfigDialog(QWidget *parent); void showAbout(QWidget *parent); + QString translation() const; }; #endif diff --git a/src/plugins/General/gnomehotkey/gnomehotkeyfactory.cpp b/src/plugins/General/gnomehotkey/gnomehotkeyfactory.cpp index 5e9ba1c7b..e22d2d9e9 100644 --- a/src/plugins/General/gnomehotkey/gnomehotkeyfactory.cpp +++ b/src/plugins/General/gnomehotkey/gnomehotkeyfactory.cpp @@ -23,12 +23,11 @@ #include "mediakeys.h" #include "gnomehotkeyfactory.h" -const GeneralProperties GnomeHotkeyFactory::properties() const +GeneralProperties GnomeHotkeyFactory::properties() const { GeneralProperties properties; properties.name = tr("Gnome Hotkey Plugin"); properties.shortName = "gnomehotkey"; - properties.translation = QLatin1String(":/gnomehotkey_plugin_"); properties.hasAbout = true; properties.hasSettings = false; properties.visibilityControl = false; @@ -53,3 +52,8 @@ void GnomeHotkeyFactory::showAbout(QWidget *parent) tr("This plugin adds support of the GNOME/Cinnamon hotkeys") + "\n" + tr("Written by: Ilya Kotov <forkotov02@ya.ru>")); } + +QString GnomeHotkeyFactory::translation() const +{ + return QLatin1String(":/gnomehotkey_plugin_"); +} diff --git a/src/plugins/General/gnomehotkey/gnomehotkeyfactory.h b/src/plugins/General/gnomehotkey/gnomehotkeyfactory.h index ebe082435..d119143b0 100644 --- a/src/plugins/General/gnomehotkey/gnomehotkeyfactory.h +++ b/src/plugins/General/gnomehotkey/gnomehotkeyfactory.h @@ -34,10 +34,11 @@ Q_OBJECT Q_PLUGIN_METADATA(IID "org.qmmp.qmmpui.GeneralFactoryInterface.1.0") Q_INTERFACES(GeneralFactory) public: - const GeneralProperties properties() const; + GeneralProperties properties() const; QObject *create(QObject *parent); QDialog *createConfigDialog(QWidget *parent); void showAbout(QWidget *parent); + QString translation() const; }; #endif diff --git a/src/plugins/General/hal/halfactory.cpp b/src/plugins/General/hal/halfactory.cpp index 6046ba105..400e2caa0 100644 --- a/src/plugins/General/hal/halfactory.cpp +++ b/src/plugins/General/hal/halfactory.cpp @@ -24,12 +24,11 @@ #include "halplugin.h" #include "halfactory.h" -const GeneralProperties HalFactory::properties() const +GeneralProperties HalFactory::properties() const { GeneralProperties properties; properties.name = tr("HAL Plugin"); properties.shortName = "hal"; - properties.translation = QLatin1String(":/hal_plugin_"); properties.hasAbout = true; properties.hasSettings = true; properties.visibilityControl = false; @@ -54,3 +53,8 @@ void HalFactory::showAbout(QWidget *parent) tr("Written by: Ilya Kotov <forkotov02@ya.ru>") + "\n" + tr("Based on Solid (KDE hardware library)")); } + +QString HalFactory::translation() const +{ + return QLatin1String(":/hal_plugin_"); +} diff --git a/src/plugins/General/hal/halfactory.h b/src/plugins/General/hal/halfactory.h index a2b8b5ed9..195b3c42c 100644 --- a/src/plugins/General/hal/halfactory.h +++ b/src/plugins/General/hal/halfactory.h @@ -33,10 +33,11 @@ Q_OBJECT Q_PLUGIN_METADATA(IID "org.qmmp.qmmpui.GeneralFactoryInterface.1.0") Q_INTERFACES(GeneralFactory) public: - const GeneralProperties properties() const; + GeneralProperties properties() const; QObject *create(QObject *parent); QDialog *createConfigDialog(QWidget *parent); void showAbout(QWidget *parent); + QString translation() const; }; #endif diff --git a/src/plugins/General/hotkey/hotkeyfactory.cpp b/src/plugins/General/hotkey/hotkeyfactory.cpp index 7092e1d06..ff74a5cfe 100644 --- a/src/plugins/General/hotkey/hotkeyfactory.cpp +++ b/src/plugins/General/hotkey/hotkeyfactory.cpp @@ -25,12 +25,11 @@ #include "hotkeymanager.h" #include "hotkeyfactory.h" -const GeneralProperties HotkeyFactory::properties() const +GeneralProperties HotkeyFactory::properties() const { GeneralProperties properties; properties.name = tr("Global Hotkey Plugin"); properties.shortName = "hotkey"; - properties.translation = QLatin1String(":/hotkey_plugin_"); properties.hasAbout = true; properties.hasSettings = true; properties.visibilityControl = false; @@ -60,3 +59,8 @@ void HotkeyFactory::showAbout(QWidget *parent) tr("This plugin adds support for multimedia keys or global key combinations")+"\n"+ tr("Written by: Ilya Kotov <forkotov02@ya.ru>")); } + +QString HotkeyFactory::translation() const +{ + return QLatin1String(":/hotkey_plugin_"); +} diff --git a/src/plugins/General/hotkey/hotkeyfactory.h b/src/plugins/General/hotkey/hotkeyfactory.h index 98e8cbcac..2bd998f5f 100644 --- a/src/plugins/General/hotkey/hotkeyfactory.h +++ b/src/plugins/General/hotkey/hotkeyfactory.h @@ -33,10 +33,11 @@ Q_OBJECT Q_PLUGIN_METADATA(IID "org.qmmp.qmmpui.GeneralFactoryInterface.1.0") Q_INTERFACES(GeneralFactory) public: - const GeneralProperties properties() const; + GeneralProperties properties() const; QObject *create(QObject *parent); QDialog *createConfigDialog(QWidget *parent); void showAbout(QWidget *parent); + QString translation() const; }; #endif diff --git a/src/plugins/General/kdenotify/kdenotifyfactory.cpp b/src/plugins/General/kdenotify/kdenotifyfactory.cpp index 1597f3eb6..9d55ec451 100644 --- a/src/plugins/General/kdenotify/kdenotifyfactory.cpp +++ b/src/plugins/General/kdenotify/kdenotifyfactory.cpp @@ -23,12 +23,11 @@ #include "kdenotify.h" #include "settingsdialog.h" -const GeneralProperties KdeNotifyFactory::properties() const +GeneralProperties KdeNotifyFactory::properties() const { GeneralProperties properties; properties.name = tr("KDE notification plugin"); properties.shortName = "kdenotify_icon"; - properties.translation = QLatin1String(":/kdenotify_plugin_"); properties.hasAbout = true; properties.hasSettings = true; properties.visibilityControl = false; @@ -49,5 +48,10 @@ void KdeNotifyFactory::showAbout(QWidget *parent) { QMessageBox::about (parent, tr("About KDE Notification Plugin"), tr("KDE notification plugin for Qmmp") + "<br>" - "Artur Guzik <a.guzik88@gmail.com>"); + "Artur Guzik <a.guzik88@gmail.com>"); +} + +QString KdeNotifyFactory::translation() const +{ + return QLatin1String(":/kdenotify_plugin_"); } diff --git a/src/plugins/General/kdenotify/kdenotifyfactory.h b/src/plugins/General/kdenotify/kdenotifyfactory.h index 083a95e6c..9d4e76c57 100644 --- a/src/plugins/General/kdenotify/kdenotifyfactory.h +++ b/src/plugins/General/kdenotify/kdenotifyfactory.h @@ -33,10 +33,11 @@ Q_OBJECT Q_PLUGIN_METADATA(IID "org.qmmp.qmmpui.GeneralFactoryInterface.1.0") Q_INTERFACES(GeneralFactory) public: - const GeneralProperties properties() const; + GeneralProperties properties() const; QObject *create(QObject *parent); QDialog *createConfigDialog(QWidget *parent); void showAbout(QWidget *parent); + QString translation() const; }; #endif // KDENOTIFYFACTORY_H diff --git a/src/plugins/General/lyrics/lyricsfactory.cpp b/src/plugins/General/lyrics/lyricsfactory.cpp index cf1440469..1b5cac3e2 100644 --- a/src/plugins/General/lyrics/lyricsfactory.cpp +++ b/src/plugins/General/lyrics/lyricsfactory.cpp @@ -23,12 +23,11 @@ #include "lyrics.h" #include "lyricsfactory.h" -const GeneralProperties LyricsFactory::properties() const +GeneralProperties LyricsFactory::properties() const { GeneralProperties properties; properties.name = tr("Lyrics Plugin"); properties.shortName = "lyrics"; - properties.translation = QLatin1String(":/lyrics_plugin_"); properties.hasAbout = true; properties.hasSettings = false; properties.visibilityControl = false; @@ -53,3 +52,8 @@ void LyricsFactory::showAbout(QWidget *parent) tr("This plugin retrieves lyrics from LyricWiki")+"\n"+ tr("Written by: Ilya Kotov <forkotov02@ya.ru>")); } + +QString LyricsFactory::translation() const +{ + return QLatin1String(":/lyrics_plugin_"); +} diff --git a/src/plugins/General/lyrics/lyricsfactory.h b/src/plugins/General/lyrics/lyricsfactory.h index fdcddb897..c968329bd 100644 --- a/src/plugins/General/lyrics/lyricsfactory.h +++ b/src/plugins/General/lyrics/lyricsfactory.h @@ -35,10 +35,11 @@ Q_OBJECT Q_PLUGIN_METADATA(IID "org.qmmp.qmmpui.GeneralFactoryInterface.1.0") Q_INTERFACES(GeneralFactory) public: - const GeneralProperties properties() const; + GeneralProperties properties() const; QObject *create(QObject *parent); QDialog *createConfigDialog(QWidget *parent); void showAbout(QWidget *parent); + QString translation() const; }; #endif diff --git a/src/plugins/General/mpris/mprisfactory.cpp b/src/plugins/General/mpris/mprisfactory.cpp index 645d42480..a43139505 100644 --- a/src/plugins/General/mpris/mprisfactory.cpp +++ b/src/plugins/General/mpris/mprisfactory.cpp @@ -24,12 +24,11 @@ #include "mpris.h" #include "mprisfactory.h" -const GeneralProperties MPRISFactory::properties() const +GeneralProperties MPRISFactory::properties() const { GeneralProperties properties; properties.name = tr("MPRIS Plugin"); properties.shortName = "mpris"; - properties.translation = QLatin1String(":/mpris_plugin_"); properties.hasAbout = true; properties.hasSettings = false; properties.visibilityControl = false; @@ -52,3 +51,8 @@ void MPRISFactory::showAbout(QWidget *parent) tr("Qmmp MPRIS Plugin")+"\n"+ tr("Written by: Ilya Kotov <forkotov02@ya.ru>")); } + +QString MPRISFactory::translation() const +{ + return QLatin1String(":/mpris_plugin_"); +} diff --git a/src/plugins/General/mpris/mprisfactory.h b/src/plugins/General/mpris/mprisfactory.h index 28abf020e..95b64c603 100644 --- a/src/plugins/General/mpris/mprisfactory.h +++ b/src/plugins/General/mpris/mprisfactory.h @@ -34,10 +34,11 @@ Q_OBJECT Q_PLUGIN_METADATA(IID "org.qmmp.qmmpui.GeneralFactoryInterface.1.0") Q_INTERFACES(GeneralFactory) public: - const GeneralProperties properties() const; + GeneralProperties properties() const; QObject *create(QObject *parent); QDialog *createConfigDialog(QWidget *parent); void showAbout(QWidget *parent); + QString translation() const; }; #endif diff --git a/src/plugins/General/notifier/notifierfactory.cpp b/src/plugins/General/notifier/notifierfactory.cpp index e69aa2b20..6627ff430 100644 --- a/src/plugins/General/notifier/notifierfactory.cpp +++ b/src/plugins/General/notifier/notifierfactory.cpp @@ -23,12 +23,11 @@ #include "settingsdialog.h" #include "notifierfactory.h" -const GeneralProperties NotifierFactory::properties() const +GeneralProperties NotifierFactory::properties() const { GeneralProperties properties; properties.name = tr("Notifier Plugin"); properties.shortName = "notifier"; - properties.translation = QLatin1String(":/notifier_plugin_"); properties.hasAbout = true; properties.hasSettings = true; properties.visibilityControl = false; @@ -51,3 +50,8 @@ void NotifierFactory::showAbout(QWidget *parent) tr("Qmmp Notifier Plugin")+"\n"+ tr("Written by: Ilya Kotov <forkotov02@ya.ru>")); } + +QString NotifierFactory::translation() const +{ + return QLatin1String(":/notifier_plugin_"); +} diff --git a/src/plugins/General/notifier/notifierfactory.h b/src/plugins/General/notifier/notifierfactory.h index 764ed45f5..d93852958 100644 --- a/src/plugins/General/notifier/notifierfactory.h +++ b/src/plugins/General/notifier/notifierfactory.h @@ -35,10 +35,11 @@ Q_OBJECT Q_PLUGIN_METADATA(IID "org.qmmp.qmmpui.GeneralFactoryInterface.1.0") Q_INTERFACES(GeneralFactory) public: - const GeneralProperties properties() const; + GeneralProperties properties() const; QObject *create(QObject *parent); QDialog *createConfigDialog(QWidget *parent); void showAbout(QWidget *parent); + QString translation() const; }; #endif diff --git a/src/plugins/General/rgscan/rgscanfactory.cpp b/src/plugins/General/rgscan/rgscanfactory.cpp index fe89a62c1..9e68e89a9 100644 --- a/src/plugins/General/rgscan/rgscanfactory.cpp +++ b/src/plugins/General/rgscan/rgscanfactory.cpp @@ -22,12 +22,11 @@ #include "rgscanhelper.h" #include "rgscanfactory.h" -const GeneralProperties RGScanFactory::properties() const +GeneralProperties RGScanFactory::properties() const { GeneralProperties properties; properties.name = tr("ReplayGain Scanner Plugin"); properties.shortName = "rgscan"; - properties.translation = QLatin1String(":/rgscan_plugin_"); properties.hasAbout = true; properties.hasSettings = false; properties.visibilityControl = false; @@ -57,3 +56,8 @@ void RGScanFactory::showAbout(QWidget *parent) tr("Frank Klemm")); } + +QString RGScanFactory::translation() const +{ + return QLatin1String(":/rgscan_plugin_"); +} diff --git a/src/plugins/General/rgscan/rgscanfactory.h b/src/plugins/General/rgscan/rgscanfactory.h index 63c900b7d..e6f3aa7ed 100644 --- a/src/plugins/General/rgscan/rgscanfactory.h +++ b/src/plugins/General/rgscan/rgscanfactory.h @@ -34,10 +34,11 @@ Q_OBJECT Q_PLUGIN_METADATA(IID "org.qmmp.qmmpui.GeneralFactoryInterface.1.0") Q_INTERFACES(GeneralFactory) public: - const GeneralProperties properties() const; + GeneralProperties properties() const; QObject *create(QObject *parent); QDialog *createConfigDialog(QWidget *parent); void showAbout(QWidget *parent); + QString translation() const; }; #endif diff --git a/src/plugins/General/scrobbler/scrobblerfactory.cpp b/src/plugins/General/scrobbler/scrobblerfactory.cpp index d79b26e50..5d8ebe3d7 100644 --- a/src/plugins/General/scrobbler/scrobblerfactory.cpp +++ b/src/plugins/General/scrobbler/scrobblerfactory.cpp @@ -25,12 +25,11 @@ #include "settingsdialog.h" #include "scrobblerfactory.h" -const GeneralProperties ScrobblerFactory::properties() const +GeneralProperties ScrobblerFactory::properties() const { GeneralProperties properties; properties.name = tr("Scrobbler Plugin"); properties.shortName = "scrobbler"; - properties.translation = QLatin1String(":/scrobbler_plugin_"); properties.hasAbout = true; properties.hasSettings = true; properties.visibilityControl = false; @@ -53,3 +52,8 @@ void ScrobblerFactory::showAbout(QWidget *parent) tr("Qmmp AudioScrobbler Plugin")+"\n"+ tr("Written by: Ilya Kotov <forkotov02@ya.ru>")); } + +QString ScrobblerFactory::translation() const +{ + return QLatin1String(":/scrobbler_plugin_"); +} diff --git a/src/plugins/General/scrobbler/scrobblerfactory.h b/src/plugins/General/scrobbler/scrobblerfactory.h index 9b07a927e..5a3c5e673 100644 --- a/src/plugins/General/scrobbler/scrobblerfactory.h +++ b/src/plugins/General/scrobbler/scrobblerfactory.h @@ -34,10 +34,11 @@ Q_OBJECT Q_PLUGIN_METADATA(IID "org.qmmp.qmmpui.GeneralFactoryInterface.1.0") Q_INTERFACES(GeneralFactory) public: - const GeneralProperties properties() const; + GeneralProperties properties() const; QObject *create(QObject *parent); QDialog *createConfigDialog(QWidget *parent); void showAbout(QWidget *parent); + QString translation() const; }; #endif diff --git a/src/plugins/General/statusicon/statusiconfactory.cpp b/src/plugins/General/statusicon/statusiconfactory.cpp index 26b0f4641..0ac66b39d 100644 --- a/src/plugins/General/statusicon/statusiconfactory.cpp +++ b/src/plugins/General/statusicon/statusiconfactory.cpp @@ -23,7 +23,7 @@ #include "settingsdialog.h" #include "statusiconfactory.h" -const GeneralProperties StatusIconFactory::properties() const +GeneralProperties StatusIconFactory::properties() const { GeneralProperties properties; properties.name = tr("Status Icon Plugin"); @@ -31,7 +31,6 @@ const GeneralProperties StatusIconFactory::properties() const properties.hasAbout = true; properties.hasSettings = true; properties.visibilityControl = true; - properties.translation = QLatin1String(":/statusicon_plugin_"); return properties; } @@ -53,3 +52,8 @@ void StatusIconFactory::showAbout(QWidget *parent) tr("Ilya Kotov <forkotov02@ya.ru>")+"\n"+ tr("Artur Guzik <a.guzik88@gmail.com>")); } + +QString StatusIconFactory::translation() const +{ + return QLatin1String(":/statusicon_plugin_"); +} diff --git a/src/plugins/General/statusicon/statusiconfactory.h b/src/plugins/General/statusicon/statusiconfactory.h index 434929d73..d33b9d6ec 100644 --- a/src/plugins/General/statusicon/statusiconfactory.h +++ b/src/plugins/General/statusicon/statusiconfactory.h @@ -35,10 +35,11 @@ Q_OBJECT Q_PLUGIN_METADATA(IID "org.qmmp.qmmpui.GeneralFactoryInterface.1.0") Q_INTERFACES(GeneralFactory) public: - const GeneralProperties properties() const; + GeneralProperties properties() const; QObject *create(QObject *parent); QDialog *createConfigDialog(QWidget *parent); void showAbout(QWidget *parent); + QString translation() const; }; #endif diff --git a/src/plugins/General/streambrowser/streambrowserfactory.cpp b/src/plugins/General/streambrowser/streambrowserfactory.cpp index 4cdbd12cc..655a7adfb 100644 --- a/src/plugins/General/streambrowser/streambrowserfactory.cpp +++ b/src/plugins/General/streambrowser/streambrowserfactory.cpp @@ -23,12 +23,11 @@ #include "streambrowser.h" #include "streambrowserfactory.h" -const GeneralProperties StreamBrowserFactory::properties() const +GeneralProperties StreamBrowserFactory::properties() const { GeneralProperties properties; properties.name = tr("Stream Browser Plugin"); properties.shortName = "streambrowser"; - properties.translation = QLatin1String(":/streambrowser_plugin_"); properties.hasAbout = true; properties.hasSettings = false; properties.visibilityControl = false; @@ -53,3 +52,8 @@ void StreamBrowserFactory::showAbout(QWidget *parent) tr("This plugin allows one to add stream from IceCast stream directory")+"\n"+ tr("Written by: Ilya Kotov <forkotov02@ya.ru>")); } + +QString StreamBrowserFactory::translation() const +{ + return QLatin1String(":/streambrowser_plugin_"); +} diff --git a/src/plugins/General/streambrowser/streambrowserfactory.h b/src/plugins/General/streambrowser/streambrowserfactory.h index 320bb77ba..c4436ff81 100644 --- a/src/plugins/General/streambrowser/streambrowserfactory.h +++ b/src/plugins/General/streambrowser/streambrowserfactory.h @@ -35,10 +35,11 @@ Q_OBJECT Q_PLUGIN_METADATA(IID "org.qmmp.qmmpui.GeneralFactoryInterface.1.0") Q_INTERFACES(GeneralFactory) public: - const GeneralProperties properties() const; + GeneralProperties properties() const; QObject *create(QObject *parent); QDialog *createConfigDialog(QWidget *parent); void showAbout(QWidget *parent); + QString translation() const; }; #endif diff --git a/src/plugins/General/trackchange/trackchangefactory.cpp b/src/plugins/General/trackchange/trackchangefactory.cpp index 806f3f073..3933983bb 100644 --- a/src/plugins/General/trackchange/trackchangefactory.cpp +++ b/src/plugins/General/trackchange/trackchangefactory.cpp @@ -24,12 +24,11 @@ #include "settingsdialog.h" #include "trackchangefactory.h" -const GeneralProperties TrackChangeFactory::properties() const +GeneralProperties TrackChangeFactory::properties() const { GeneralProperties properties; properties.name = tr("Track Change Plugin"); properties.shortName = "trackchange"; - properties.translation = QLatin1String(":/trackchange_plugin_"); properties.hasAbout = true; properties.hasSettings = true; properties.visibilityControl = false; @@ -53,3 +52,8 @@ void TrackChangeFactory::showAbout(QWidget *parent) tr("This plugin executes external command when current track is changed") + "\n" + tr("Written by: Ilya Kotov <forkotov02@ya.ru>")); } + +QString TrackChangeFactory::translation() const +{ + return QLatin1String(":/trackchange_plugin_"); +} diff --git a/src/plugins/General/trackchange/trackchangefactory.h b/src/plugins/General/trackchange/trackchangefactory.h index 955053a72..f8470b1b6 100644 --- a/src/plugins/General/trackchange/trackchangefactory.h +++ b/src/plugins/General/trackchange/trackchangefactory.h @@ -34,10 +34,11 @@ Q_OBJECT Q_PLUGIN_METADATA(IID "org.qmmp.qmmpui.GeneralFactoryInterface.1.0") Q_INTERFACES(GeneralFactory) public: - const GeneralProperties properties() const; + GeneralProperties properties() const; QObject *create(QObject *parent); QDialog *createConfigDialog(QWidget *parent); void showAbout(QWidget *parent); + QString translation() const; }; #endif diff --git a/src/plugins/General/udisks2/udisks2factory.cpp b/src/plugins/General/udisks2/udisks2factory.cpp index 4be6d28f2..721ff275f 100644 --- a/src/plugins/General/udisks2/udisks2factory.cpp +++ b/src/plugins/General/udisks2/udisks2factory.cpp @@ -24,12 +24,11 @@ #include "udisks2plugin.h" #include "udisks2factory.h" -const GeneralProperties UDisks2Factory::properties() const +GeneralProperties UDisks2Factory::properties() const { GeneralProperties properties; properties.name = tr("UDisks2 Plugin"); properties.shortName = "udisks2"; - properties.translation = QLatin1String(":/udisks2_plugin_"); properties.hasAbout = true; properties.hasSettings = true; properties.visibilityControl = false; @@ -53,3 +52,8 @@ void UDisks2Factory::showAbout(QWidget *parent) tr("This plugin provides removable devices detection using UDisks2") + "\n" + tr("Written by: Ilya Kotov <forkotov02@ya.ru>")); } + +QString UDisks2Factory::translation() const +{ + return QLatin1String(":/udisks2_plugin_"); +} diff --git a/src/plugins/General/udisks2/udisks2factory.h b/src/plugins/General/udisks2/udisks2factory.h index cdf1081fb..e760bf43c 100644 --- a/src/plugins/General/udisks2/udisks2factory.h +++ b/src/plugins/General/udisks2/udisks2factory.h @@ -34,10 +34,11 @@ Q_OBJECT Q_PLUGIN_METADATA(IID "org.qmmp.qmmpui.GeneralFactoryInterface.1.0") Q_INTERFACES(GeneralFactory) public: - const GeneralProperties properties() const; + GeneralProperties properties() const; QObject *create(QObject *parent); QDialog *createConfigDialog(QWidget *parent); void showAbout(QWidget *parent); + QString translation() const; }; #endif diff --git a/src/plugins/Input/aac/decoderaacfactory.cpp b/src/plugins/Input/aac/decoderaacfactory.cpp index 77a9fdfcb..ef185f012 100644 --- a/src/plugins/Input/aac/decoderaacfactory.cpp +++ b/src/plugins/Input/aac/decoderaacfactory.cpp @@ -34,7 +34,7 @@ bool DecoderAACFactory::canDecode(QIODevice *input) const return aac_file.isValid(); } -const DecoderProperties DecoderAACFactory::properties() const +DecoderProperties DecoderAACFactory::properties() const { DecoderProperties properties; properties.name = tr("AAC Plugin"); @@ -42,7 +42,6 @@ const DecoderProperties DecoderAACFactory::properties() const properties.description = tr("AAC Files"); properties.contentTypes << "audio/aacp" << "audio/aac"; properties.shortName = "aac"; - properties.translation = QLatin1String(":/aac_plugin_"); properties.hasAbout = true; properties.hasSettings = false; return properties; @@ -104,3 +103,8 @@ void DecoderAACFactory::showAbout(QWidget *parent) tr("Qmmp AAC Audio Plugin")+"\n"+ tr("Written by: Ilya Kotov <forkotov02@ya.ru>")); } + +QString DecoderAACFactory::translation() const +{ + return QLatin1String(":/aac_plugin_"); +} diff --git a/src/plugins/Input/aac/decoderaacfactory.h b/src/plugins/Input/aac/decoderaacfactory.h index 789b558b9..1ddb25e68 100644 --- a/src/plugins/Input/aac/decoderaacfactory.h +++ b/src/plugins/Input/aac/decoderaacfactory.h @@ -30,12 +30,13 @@ Q_INTERFACES(DecoderFactory) public: bool canDecode(QIODevice *input) const; - const DecoderProperties properties() const; + DecoderProperties properties() const; Decoder *create(const QString&, QIODevice *); QList<TrackInfo *> createPlayList(const QString &path, TrackInfo::Parts parts, QStringList *); MetaDataModel* createMetaDataModel(const QString &path, QObject *parent = 0); void showSettings(QWidget *parent); void showAbout(QWidget *parent); + QString translation() const; }; #endif diff --git a/src/plugins/Input/archive/decoderarchivefactory.cpp b/src/plugins/Input/archive/decoderarchivefactory.cpp index 774294397..8ebaefc00 100644 --- a/src/plugins/Input/archive/decoderarchivefactory.cpp +++ b/src/plugins/Input/archive/decoderarchivefactory.cpp @@ -34,7 +34,7 @@ bool DecoderArchiveFactory::canDecode(QIODevice *) const return false; } -const DecoderProperties DecoderArchiveFactory::properties() const +DecoderProperties DecoderArchiveFactory::properties() const { DecoderProperties properties; properties.name = tr("Archive Plugin"); @@ -42,7 +42,6 @@ const DecoderProperties DecoderArchiveFactory::properties() const properties.description = tr("Archives"); properties.contentTypes << "application/zip" << "application/x-rar-compressed"; properties.shortName = "archive"; - properties.translation = QLatin1String(":/archive_plugin_"); properties.hasAbout = true; properties.hasSettings = false; properties.noInput = true; @@ -152,3 +151,8 @@ void DecoderArchiveFactory::showAbout(QWidget *parent) tr("Compiled against %1").arg(ARCHIVE_VERSION_STRING)+"\n" + tr("Written by: Ilya Kotov <forkotov02@ya.ru>")); } + +QString DecoderArchiveFactory::translation() const +{ + return QLatin1String(":/archive_plugin_"); +} diff --git a/src/plugins/Input/archive/decoderarchivefactory.h b/src/plugins/Input/archive/decoderarchivefactory.h index 3bef8ecde..e56b8837f 100644 --- a/src/plugins/Input/archive/decoderarchivefactory.h +++ b/src/plugins/Input/archive/decoderarchivefactory.h @@ -31,12 +31,13 @@ Q_INTERFACES(DecoderFactory) public: bool canDecode(QIODevice *) const; - const DecoderProperties properties() const; + DecoderProperties properties() const; Decoder *create(const QString &url, QIODevice *); QList<TrackInfo *> createPlayList(const QString &path, TrackInfo::Parts parts, QStringList *); MetaDataModel* createMetaDataModel(const QString &path, QObject *parent = 0); void showSettings(QWidget *parent); void showAbout(QWidget *parent); + QString translation() const; }; #endif diff --git a/src/plugins/Input/cdaudio/decodercdaudiofactory.cpp b/src/plugins/Input/cdaudio/decodercdaudiofactory.cpp index 4c7bbcf73..bffc0a18c 100644 --- a/src/plugins/Input/cdaudio/decodercdaudiofactory.cpp +++ b/src/plugins/Input/cdaudio/decodercdaudiofactory.cpp @@ -34,12 +34,11 @@ bool DecoderCDAudioFactory::canDecode(QIODevice *) const return false; } -const DecoderProperties DecoderCDAudioFactory::properties() const +DecoderProperties DecoderCDAudioFactory::properties() const { DecoderProperties properties; properties.name = tr("CD Audio Plugin"); properties.shortName = "cdaudio"; - properties.translation = QLatin1String(":/cdaudio_plugin_"); properties.protocols << "cdda"; properties.hasAbout = true; properties.noInput = true; @@ -89,3 +88,8 @@ void DecoderCDAudioFactory::showAbout(QWidget *parent) tr("Written by: Ilya Kotov <forkotov02@ya.ru>")+"\n"+ tr("Usage: open cdda:/// using Add URL dialog or command line")); } + +QString DecoderCDAudioFactory::translation() const +{ + return QLatin1String(":/cdaudio_plugin_"); +} diff --git a/src/plugins/Input/cdaudio/decodercdaudiofactory.h b/src/plugins/Input/cdaudio/decodercdaudiofactory.h index b836bd594..625ba38ad 100644 --- a/src/plugins/Input/cdaudio/decodercdaudiofactory.h +++ b/src/plugins/Input/cdaudio/decodercdaudiofactory.h @@ -30,12 +30,13 @@ class DecoderCDAudioFactory : public QObject, DecoderFactory Q_INTERFACES(DecoderFactory) public: bool canDecode(QIODevice *input) const; - const DecoderProperties properties() const; + DecoderProperties properties() const; Decoder *create(const QString &, QIODevice *); QList<TrackInfo *> createPlayList(const QString &path, TrackInfo::Parts parts, QStringList *); MetaDataModel* createMetaDataModel(const QString &path, QObject *parent = 0); void showSettings(QWidget *parent); void showAbout(QWidget *parent); + QString translation() const; }; #endif diff --git a/src/plugins/Input/cue/decodercuefactory.cpp b/src/plugins/Input/cue/decodercuefactory.cpp index 06275420d..285a4776d 100644 --- a/src/plugins/Input/cue/decodercuefactory.cpp +++ b/src/plugins/Input/cue/decodercuefactory.cpp @@ -32,12 +32,11 @@ bool DecoderCUEFactory::canDecode(QIODevice *) const return false; } -const DecoderProperties DecoderCUEFactory::properties() const +DecoderProperties DecoderCUEFactory::properties() const { DecoderProperties properties; properties.name = tr("CUE Plugin"); properties.shortName = "cue"; - properties.translation = QLatin1String(":/cue_plugin_"); properties.filters << "*.cue"; properties.description = tr("CUE Files"); properties.protocols << "cue"; @@ -92,3 +91,8 @@ void DecoderCUEFactory::showAbout(QWidget *parent) tr("Qmmp CUE Audio Plugin")+"\n"+ tr("Written by: Ilya Kotov <forkotov02@ya.ru>")); } + +QString DecoderCUEFactory::translation() const +{ + return QLatin1String(":/cue_plugin_"); +} diff --git a/src/plugins/Input/cue/decodercuefactory.h b/src/plugins/Input/cue/decodercuefactory.h index 61ae9c928..10969afc0 100644 --- a/src/plugins/Input/cue/decodercuefactory.h +++ b/src/plugins/Input/cue/decodercuefactory.h @@ -32,12 +32,13 @@ Q_INTERFACES(DecoderFactory) public: bool canDecode(QIODevice *input) const; - const DecoderProperties properties() const; + DecoderProperties properties() const; Decoder *create(const QString &, QIODevice *); QList<TrackInfo *> createPlayList(const QString &path, TrackInfo::Parts parts, QStringList *ignoredPaths); MetaDataModel* createMetaDataModel(const QString &path, QObject *parent = 0); void showSettings(QWidget *parent); void showAbout(QWidget *parent); + QString translation() const; }; #endif diff --git a/src/plugins/Input/ffmpeg/decoderffmpegfactory.cpp b/src/plugins/Input/ffmpeg/decoderffmpegfactory.cpp index 608bff7a5..c14dfb604 100644 --- a/src/plugins/Input/ffmpeg/decoderffmpegfactory.cpp +++ b/src/plugins/Input/ffmpeg/decoderffmpegfactory.cpp @@ -84,7 +84,7 @@ bool DecoderFFmpegFactory::canDecode(QIODevice *i) const return false; } -const DecoderProperties DecoderFFmpegFactory::properties() const +DecoderProperties DecoderFFmpegFactory::properties() const { QSettings settings(Qmmp::configFile(), QSettings::IniFormat); QStringList filters; @@ -141,7 +141,6 @@ const DecoderProperties DecoderFFmpegFactory::properties() const if(filters.contains("*.mka")) properties.contentTypes << "audio/true-hd" << "audio/x-matroska"; properties.shortName = "ffmpeg"; - properties.translation = QLatin1String(":/ffmpeg_plugin_"); properties.hasAbout = true; properties.hasSettings = true; properties.noInput = false; @@ -268,3 +267,8 @@ void DecoderFFmpegFactory::showAbout(QWidget *parent) .arg(LIBAVUTIL_VERSION_MICRO) +"\n"+ tr("Written by: Ilya Kotov <forkotov02@ya.ru>")); } + +QString DecoderFFmpegFactory::translation() const +{ + return QLatin1String(":/ffmpeg_plugin_"); +} diff --git a/src/plugins/Input/ffmpeg/decoderffmpegfactory.h b/src/plugins/Input/ffmpeg/decoderffmpegfactory.h index 980096515..559fa1b4b 100644 --- a/src/plugins/Input/ffmpeg/decoderffmpegfactory.h +++ b/src/plugins/Input/ffmpeg/decoderffmpegfactory.h @@ -32,12 +32,13 @@ Q_INTERFACES(DecoderFactory) public: DecoderFFmpegFactory(); bool canDecode(QIODevice *input) const; - const DecoderProperties properties() const; + DecoderProperties properties() const; Decoder *create(const QString &, QIODevice *); QList<TrackInfo *> createPlayList(const QString &path, TrackInfo::Parts parts, QStringList *); MetaDataModel* createMetaDataModel(const QString &path, QObject *parent = 0); void showSettings(QWidget *parent); void showAbout(QWidget *parent); + QString translation() const; }; #endif diff --git a/src/plugins/Input/flac/decoderflacfactory.cpp b/src/plugins/Input/flac/decoderflacfactory.cpp index 2643c51ac..78ea9608a 100644 --- a/src/plugins/Input/flac/decoderflacfactory.cpp +++ b/src/plugins/Input/flac/decoderflacfactory.cpp @@ -46,7 +46,7 @@ bool DecoderFLACFactory::canDecode(QIODevice *input) const return false; } -const DecoderProperties DecoderFLACFactory::properties() const +DecoderProperties DecoderFLACFactory::properties() const { DecoderProperties properties; properties.name = tr("FLAC Plugin"); @@ -54,7 +54,6 @@ const DecoderProperties DecoderFLACFactory::properties() const properties.description = tr("FLAC Files"); properties.contentTypes << "audio/x-flac" << "audio/flac"; properties.shortName = "flac"; - properties.translation = QLatin1String(":/flac_plugin_"); properties.protocols << "flac"; properties.hasAbout = true; properties.hasSettings = false; @@ -213,3 +212,8 @@ void DecoderFLACFactory::showAbout(QWidget *parent) tr("Qmmp FLAC Audio Plugin")+"\n"+ tr("Written by: Ilya Kotov <forkotov02@ya.ru>")); } + +QString DecoderFLACFactory::translation() const +{ + return QLatin1String(":/flac_plugin_"); +} diff --git a/src/plugins/Input/flac/decoderflacfactory.h b/src/plugins/Input/flac/decoderflacfactory.h index 3647c6de0..3bad513f8 100644 --- a/src/plugins/Input/flac/decoderflacfactory.h +++ b/src/plugins/Input/flac/decoderflacfactory.h @@ -31,12 +31,13 @@ Q_INTERFACES(DecoderFactory) public: bool canDecode(QIODevice *input) const; - const DecoderProperties properties() const; + DecoderProperties properties() const; Decoder *create(const QString &, QIODevice *); QList<TrackInfo*> createPlayList(const QString &path, TrackInfo::Parts parts, QStringList *ignoredFiles); MetaDataModel* createMetaDataModel(const QString &path, QObject *parent = 0); void showSettings(QWidget *parent); void showAbout(QWidget *parent); + QString translation() const; }; #endif diff --git a/src/plugins/Input/gme/decodergmefactory.cpp b/src/plugins/Input/gme/decodergmefactory.cpp index d8de3b50b..0795f3a42 100644 --- a/src/plugins/Input/gme/decodergmefactory.cpp +++ b/src/plugins/Input/gme/decodergmefactory.cpp @@ -32,7 +32,7 @@ bool DecoderGmeFactory::canDecode(QIODevice *) const return false; } -const DecoderProperties DecoderGmeFactory::properties() const +DecoderProperties DecoderGmeFactory::properties() const { DecoderProperties properties; properties.name = tr("GME Plugin"); @@ -41,7 +41,6 @@ const DecoderProperties DecoderGmeFactory::properties() const properties.description = tr("Game Music Files"); //properties.contentType = ; properties.shortName = "gme"; - properties.translation = QLatin1String(":/gme_plugin_"); properties.hasAbout = true; properties.hasSettings = true; properties.noInput = true; @@ -106,3 +105,8 @@ void DecoderGmeFactory::showAbout(QWidget *parent) tr("This plugin uses Game_Music_Emu library to play game music files")+"\n"+ tr("Written by: Ilya Kotov <forkotov02@ya.ru>")); } + +QString DecoderGmeFactory::translation() const +{ + return QLatin1String(":/gme_plugin_"); +} diff --git a/src/plugins/Input/gme/decodergmefactory.h b/src/plugins/Input/gme/decodergmefactory.h index 40c738e11..3936f73a2 100644 --- a/src/plugins/Input/gme/decodergmefactory.h +++ b/src/plugins/Input/gme/decodergmefactory.h @@ -33,12 +33,13 @@ class DecoderGmeFactory : public QObject, DecoderFactory public: bool canDecode(QIODevice *input) const; - const DecoderProperties properties() const; + DecoderProperties properties() const; Decoder *create(const QString &path, QIODevice *input); QList<TrackInfo *> createPlayList(const QString &path, TrackInfo::Parts parts, QStringList *ignoredFiles); MetaDataModel* createMetaDataModel(const QString &path, QObject *parent = 0); void showSettings(QWidget *parent); void showAbout(QWidget *parent); + QString translation() const; }; #endif diff --git a/src/plugins/Input/modplug/decodermodplugfactory.cpp b/src/plugins/Input/modplug/decodermodplugfactory.cpp index c47dded6b..2142f8179 100644 --- a/src/plugins/Input/modplug/decodermodplugfactory.cpp +++ b/src/plugins/Input/modplug/decodermodplugfactory.cpp @@ -40,7 +40,7 @@ bool DecoderModPlugFactory::canDecode(QIODevice *) const return false; } -const DecoderProperties DecoderModPlugFactory::properties() const +DecoderProperties DecoderModPlugFactory::properties() const { DecoderProperties properties; properties.name = tr("ModPlug Plugin"); @@ -52,7 +52,6 @@ const DecoderProperties DecoderModPlugFactory::properties() const properties.description = tr("ModPlug Files"); //properties.contentType = ; properties.shortName = "modplug"; - properties.translation = QLatin1String(":/modplug_plugin_"); properties.hasAbout = true; properties.hasSettings = true; properties.noInput = true; @@ -142,3 +141,8 @@ void DecoderModPlugFactory::showAbout(QWidget *parent) tr("Kenton Varda <temporal@gauge3d.org>")+"\n"+ tr("Konstanty Bialkowski <konstanty@ieee.org>")); } + +QString DecoderModPlugFactory::translation() const +{ + return QLatin1String(":/modplug_plugin_"); +} diff --git a/src/plugins/Input/modplug/decodermodplugfactory.h b/src/plugins/Input/modplug/decodermodplugfactory.h index 1c32eacbf..bd7acab5f 100644 --- a/src/plugins/Input/modplug/decodermodplugfactory.h +++ b/src/plugins/Input/modplug/decodermodplugfactory.h @@ -30,12 +30,13 @@ Q_INTERFACES(DecoderFactory) public: bool canDecode(QIODevice *input) const; - const DecoderProperties properties() const; + DecoderProperties properties() const; Decoder *create(const QString &, QIODevice *); QList<TrackInfo *> createPlayList(const QString &path, TrackInfo::Parts parts, QStringList *); MetaDataModel* createMetaDataModel(const QString &path, QObject *parent = 0); void showSettings(QWidget *parent); void showAbout(QWidget *parent); + QString translation() const; }; #endif diff --git a/src/plugins/Input/mpc/decodermpcfactory.cpp b/src/plugins/Input/mpc/decodermpcfactory.cpp index 77614b0ac..d0664d249 100644 --- a/src/plugins/Input/mpc/decodermpcfactory.cpp +++ b/src/plugins/Input/mpc/decodermpcfactory.cpp @@ -46,7 +46,7 @@ bool DecoderMPCFactory::canDecode(QIODevice *input) const return false; } -const DecoderProperties DecoderMPCFactory::properties() const +DecoderProperties DecoderMPCFactory::properties() const { DecoderProperties properties; properties.name = tr("Musepack Plugin"); @@ -54,7 +54,6 @@ const DecoderProperties DecoderMPCFactory::properties() const properties.description = tr("Musepack Files"); //properties.contentType = ; properties.shortName = "mpc"; - properties.translation = QLatin1String(":/mpc_plugin_"); properties.hasAbout = true; properties.hasSettings = false; return properties; @@ -119,3 +118,8 @@ void DecoderMPCFactory::showAbout(QWidget *parent) tr("Qmmp Musepack Audio Plugin")+"\n"+ tr("Written by: Ilya Kotov <forkotov02@ya.ru>")); } + +QString DecoderMPCFactory::translation() const +{ + return QLatin1String(":/mpc_plugin_"); +} diff --git a/src/plugins/Input/mpc/decodermpcfactory.h b/src/plugins/Input/mpc/decodermpcfactory.h index 15f16a004..3941166bf 100644 --- a/src/plugins/Input/mpc/decodermpcfactory.h +++ b/src/plugins/Input/mpc/decodermpcfactory.h @@ -30,12 +30,13 @@ Q_INTERFACES(DecoderFactory) public: bool canDecode(QIODevice *input) const; - const DecoderProperties properties() const; + DecoderProperties properties() const; Decoder *create(const QString &url, QIODevice *i); QList<TrackInfo *> createPlayList(const QString &path, TrackInfo::Parts parts, QStringList *); MetaDataModel* createMetaDataModel(const QString &path, QObject *parent = 0); void showSettings(QWidget *parent); void showAbout(QWidget *parent); + QString translation() const; }; #endif diff --git a/src/plugins/Input/mpeg/decodermpegfactory.cpp b/src/plugins/Input/mpeg/decodermpegfactory.cpp index ef54eaff0..b617329df 100644 --- a/src/plugins/Input/mpeg/decodermpegfactory.cpp +++ b/src/plugins/Input/mpeg/decodermpegfactory.cpp @@ -160,7 +160,7 @@ bool DecoderMPEGFactory::canDecode(QIODevice *input) const return false; } -const DecoderProperties DecoderMPEGFactory::properties() const +DecoderProperties DecoderMPEGFactory::properties() const { DecoderProperties properties; properties.name = tr("MPEG Plugin"); @@ -168,7 +168,6 @@ const DecoderProperties DecoderMPEGFactory::properties() const properties.filters << "*.mp1" << "*.mp2" << "*.mp3" << "*.wav"; properties.description = tr("MPEG Files"); properties.contentTypes << "audio/mp3" << "audio/mpeg"; - properties.translation = QLatin1String(":/mpeg_plugin_"); properties.hasAbout = true; properties.hasSettings = true; return properties; @@ -392,5 +391,10 @@ void DecoderMPEGFactory::showAbout(QWidget *parent) tr("Written by: Ilya Kotov <forkotov02@ya.ru>")+"\n"+ tr("Source code based on mq3 and madplay projects") - ); + ); +} + +QString DecoderMPEGFactory::translation() const +{ + return QLatin1String(":/mpeg_plugin_"); } diff --git a/src/plugins/Input/mpeg/decodermpegfactory.h b/src/plugins/Input/mpeg/decodermpegfactory.h index 156cb8e44..469a2ed6c 100644 --- a/src/plugins/Input/mpeg/decodermpegfactory.h +++ b/src/plugins/Input/mpeg/decodermpegfactory.h @@ -32,12 +32,13 @@ Q_INTERFACES(DecoderFactory) public: DecoderMPEGFactory(); bool canDecode(QIODevice *input) const; - const DecoderProperties properties() const; + DecoderProperties properties() const; Decoder *create(const QString &, QIODevice *input); QList<TrackInfo *> createPlayList(const QString &path, TrackInfo::Parts parts, QStringList *); MetaDataModel* createMetaDataModel(const QString &path, QObject *parent = 0); void showSettings(QWidget *parent); void showAbout(QWidget *parent); + QString translation() const; private: bool m_using_rusxmms; diff --git a/src/plugins/Input/opus/decoderopusfactory.cpp b/src/plugins/Input/opus/decoderopusfactory.cpp index 39bfab91e..6e98e85ea 100644 --- a/src/plugins/Input/opus/decoderopusfactory.cpp +++ b/src/plugins/Input/opus/decoderopusfactory.cpp @@ -36,12 +36,11 @@ bool DecoderOpusFactory::canDecode(QIODevice *input) const return false; } -const DecoderProperties DecoderOpusFactory::properties() const +DecoderProperties DecoderOpusFactory::properties() const { DecoderProperties properties; properties.name = tr("Opus Plugin"); properties.shortName = "opus"; - properties.translation = QLatin1String(":/opus_plugin_"); properties.filters << "*.opus"; properties.description = tr("Ogg Opus Files"); properties.contentTypes << "audio/opus"; @@ -118,3 +117,8 @@ void DecoderOpusFactory::showAbout(QWidget *parent) tr("Qmmp Opus Audio Plugin")+"\n"+ tr("Written by: Ilya Kotov <forkotov02@ya.ru>")); } + +QString DecoderOpusFactory::translation() const +{ + return QLatin1String(":/opus_plugin_"); +} diff --git a/src/plugins/Input/opus/decoderopusfactory.h b/src/plugins/Input/opus/decoderopusfactory.h index 52a2cd5f1..2e1b2e3a8 100644 --- a/src/plugins/Input/opus/decoderopusfactory.h +++ b/src/plugins/Input/opus/decoderopusfactory.h @@ -34,13 +34,14 @@ Q_INTERFACES(DecoderFactory) public: bool canDecode(QIODevice *input) const; - const DecoderProperties properties() const; + DecoderProperties properties() const; Decoder *create(const QString &path, QIODevice *input); MetaDataModel* createMetaDataModel(const QString &path, QObject *parent = 0); QList<TrackInfo *> createPlayList(const QString &path, TrackInfo::Parts parts, QStringList *); QObject* showDetails(QWidget *parent, const QString &path); void showSettings(QWidget *parent); void showAbout(QWidget *parent); + QString translation() const; }; #endif //DECODEROPUSFACTORY_H diff --git a/src/plugins/Input/sid/decodersidfactory.cpp b/src/plugins/Input/sid/decodersidfactory.cpp index 0ba0b8297..cd7ee8200 100644 --- a/src/plugins/Input/sid/decodersidfactory.cpp +++ b/src/plugins/Input/sid/decodersidfactory.cpp @@ -52,7 +52,7 @@ bool DecoderSIDFactory::canDecode(QIODevice *input) const return (!memcmp(buf, "RSID", 4) || !memcmp(buf, "PSID", 4)); } -const DecoderProperties DecoderSIDFactory::properties() const +DecoderProperties DecoderSIDFactory::properties() const { DecoderProperties properties; properties.name = tr("SID Plugin"); @@ -60,7 +60,6 @@ const DecoderProperties DecoderSIDFactory::properties() const properties.description = tr("SID Files"); //properties.contentType = ; properties.shortName = "sid"; - properties.translation = QLatin1String(":/sid_plugin_"); properties.hasAbout = true; properties.hasSettings = true; properties.noInput = true; @@ -117,3 +116,8 @@ void DecoderSIDFactory::showAbout(QWidget *parent) tr("This plugin plays Commodore 64 music files using libsidplayfp library")+"\n"+ tr("Written by: Ilya Kotov <forkotov02@ya.ru>")); } + +QString DecoderSIDFactory::translation() const +{ + return QLatin1String(":/sid_plugin_"); +} diff --git a/src/plugins/Input/sid/decodersidfactory.h b/src/plugins/Input/sid/decodersidfactory.h index 39c3a8f90..976da14fd 100644 --- a/src/plugins/Input/sid/decodersidfactory.h +++ b/src/plugins/Input/sid/decodersidfactory.h @@ -37,12 +37,13 @@ public: DecoderSIDFactory(); bool canDecode(QIODevice *input) const; - const DecoderProperties properties() const; + DecoderProperties properties() const; Decoder *create(const QString &path, QIODevice *input); QList<TrackInfo *> createPlayList(const QString &path, TrackInfo::Parts parts, QStringList *); MetaDataModel* createMetaDataModel(const QString &path, QObject *parent = 0); void showSettings(QWidget *parent); void showAbout(QWidget *parent); + QString translation() const; private: SidDatabase m_db; diff --git a/src/plugins/Input/sndfile/decodersndfilefactory.cpp b/src/plugins/Input/sndfile/decodersndfilefactory.cpp index ef733357d..d2cedb38c 100644 --- a/src/plugins/Input/sndfile/decodersndfilefactory.cpp +++ b/src/plugins/Input/sndfile/decodersndfilefactory.cpp @@ -79,11 +79,10 @@ bool DecoderSndFileFactory::canDecode(QIODevice *input) const return false; } -const DecoderProperties DecoderSndFileFactory::properties() const +DecoderProperties DecoderSndFileFactory::properties() const { DecoderProperties properties; properties.name = tr("Sndfile Plugin"); - properties.translation = QLatin1String(":/sndfile_plugin_"); properties.filters << "*.wav" << "*.au" << "*.snd" << "*.aif" << "*.aiff" << "*.8svx"; properties.filters << "*.sph" << "*.sf" << "*.voc" << "*.w64"; properties.description = tr("PCM Files"); @@ -194,3 +193,8 @@ void DecoderSndFileFactory::showAbout(QWidget *parent) tr("Compiled against")+" "+QString(version)+"\n" + tr("Written by: Ilya Kotov <forkotov02@ya.ru>")); } + +QString DecoderSndFileFactory::translation() const +{ + return QLatin1String(":/sndfile_plugin_"); +} diff --git a/src/plugins/Input/sndfile/decodersndfilefactory.h b/src/plugins/Input/sndfile/decodersndfilefactory.h index 0d0707792..f15cea73e 100644 --- a/src/plugins/Input/sndfile/decodersndfilefactory.h +++ b/src/plugins/Input/sndfile/decodersndfilefactory.h @@ -31,12 +31,13 @@ Q_INTERFACES(DecoderFactory) public: bool canDecode(QIODevice *input) const; - const DecoderProperties properties() const; + DecoderProperties properties() const; Decoder *create(const QString &, QIODevice *); QList<TrackInfo *> createPlayList(const QString &path, TrackInfo::Parts parts, QStringList *); MetaDataModel* createMetaDataModel(const QString &path, QObject *parent = 0); void showSettings(QWidget *parent); void showAbout(QWidget *parent); + QString translation() const; }; #endif diff --git a/src/plugins/Input/vorbis/decodervorbisfactory.cpp b/src/plugins/Input/vorbis/decodervorbisfactory.cpp index 3e25c5814..fc7e2f9e2 100644 --- a/src/plugins/Input/vorbis/decodervorbisfactory.cpp +++ b/src/plugins/Input/vorbis/decodervorbisfactory.cpp @@ -38,12 +38,11 @@ bool DecoderVorbisFactory::canDecode(QIODevice *input) const return false; } -const DecoderProperties DecoderVorbisFactory::properties() const +DecoderProperties DecoderVorbisFactory::properties() const { DecoderProperties properties; properties.name = tr("Ogg Vorbis Plugin"); properties.shortName = "vorbis"; - properties.translation = QLatin1String(":/vorbis_plugin_"); properties.filters << "*.ogg"; properties.description = tr("Ogg Vorbis Files"); properties.contentTypes << "application/ogg" << "audio/x-vorbis+ogg"; @@ -121,5 +120,10 @@ void DecoderVorbisFactory::showAbout(QWidget *parent) tr("Qmmp Ogg Vorbis Audio Plugin")+"\n"+ tr("Written by: Ilya Kotov <forkotov02@ya.ru>")+"\n"+ tr("Source code based on mq3 project") - ); + ); +} + +QString DecoderVorbisFactory::translation() const +{ + return QLatin1String(":/vorbis_plugin_"); } diff --git a/src/plugins/Input/vorbis/decodervorbisfactory.h b/src/plugins/Input/vorbis/decodervorbisfactory.h index 7f57918f0..dc0a39264 100644 --- a/src/plugins/Input/vorbis/decodervorbisfactory.h +++ b/src/plugins/Input/vorbis/decodervorbisfactory.h @@ -34,13 +34,14 @@ Q_INTERFACES(DecoderFactory) public: bool canDecode(QIODevice *input) const; - const DecoderProperties properties() const; + DecoderProperties properties() const; Decoder *create(const QString &, QIODevice *input); MetaDataModel* createMetaDataModel(const QString &path, QObject *parent = 0); QList<TrackInfo *> createPlayList(const QString &path, TrackInfo::Parts parts, QStringList *); QObject* showDetails(QWidget *parent, const QString &path); void showSettings(QWidget *parent); void showAbout(QWidget *parent); + QString translation() const; }; #endif diff --git a/src/plugins/Input/wavpack/decoderwavpackfactory.cpp b/src/plugins/Input/wavpack/decoderwavpackfactory.cpp index 2383f87f3..bed6f1eab 100644 --- a/src/plugins/Input/wavpack/decoderwavpackfactory.cpp +++ b/src/plugins/Input/wavpack/decoderwavpackfactory.cpp @@ -31,13 +31,12 @@ bool DecoderWavPackFactory::canDecode(QIODevice *input) const return (input->peek(buf, 4) == 4 && !memcmp(buf, "wvpk", 4)); } -const DecoderProperties DecoderWavPackFactory::properties() const +DecoderProperties DecoderWavPackFactory::properties() const { DecoderProperties properties; properties.name = tr("WavPack Plugin"); properties.filters << "*.wv"; properties.description = tr("WavPack Files"); - properties.translation = QLatin1String(":/wavpack_plugin_"); //properties.contentType = ; properties.shortName = "wavpack"; properties.hasAbout = true; @@ -180,3 +179,8 @@ void DecoderWavPackFactory::showAbout(QWidget *parent) QString(" %1").arg(WavpackGetLibraryVersionString ())+"\n"+ tr("Written by: Ilya Kotov <forkotov02@ya.ru>")); } + +QString DecoderWavPackFactory::translation() const +{ + return QLatin1String(":/wavpack_plugin_"); +} diff --git a/src/plugins/Input/wavpack/decoderwavpackfactory.h b/src/plugins/Input/wavpack/decoderwavpackfactory.h index 52f7b2e2d..86f21184f 100644 --- a/src/plugins/Input/wavpack/decoderwavpackfactory.h +++ b/src/plugins/Input/wavpack/decoderwavpackfactory.h @@ -31,12 +31,13 @@ class DecoderWavPackFactory : public QObject, public: bool canDecode(QIODevice *input) const; - const DecoderProperties properties() const; + DecoderProperties properties() const; Decoder *create(const QString &p, QIODevice *i); QList<TrackInfo *> createPlayList(const QString &path, TrackInfo::Parts parts, QStringList *ignoredFiles); MetaDataModel* createMetaDataModel(const QString &path, QObject *parent = 0); void showSettings(QWidget *parent); void showAbout(QWidget *parent); + QString translation() const; }; #endif diff --git a/src/plugins/Input/wildmidi/decoderwildmidifactory.cpp b/src/plugins/Input/wildmidi/decoderwildmidifactory.cpp index e16e35cd5..1a9df8c9f 100644 --- a/src/plugins/Input/wildmidi/decoderwildmidifactory.cpp +++ b/src/plugins/Input/wildmidi/decoderwildmidifactory.cpp @@ -43,7 +43,7 @@ bool DecoderWildMidiFactory::canDecode(QIODevice *input) const #endif } -const DecoderProperties DecoderWildMidiFactory::properties() const +DecoderProperties DecoderWildMidiFactory::properties() const { DecoderProperties properties; properties.name = tr("WildMidi Plugin"); @@ -54,7 +54,6 @@ const DecoderProperties DecoderWildMidiFactory::properties() const properties.description = tr("Midi Files"); //properties.contentType = ; properties.shortName = "wildmidi"; - properties.translation = QLatin1String(":/wildmidi_plugin_"); properties.hasAbout = true; properties.hasSettings = true; properties.noInput = true; @@ -109,3 +108,8 @@ void DecoderWildMidiFactory::showAbout(QWidget *parent) tr("This plugin uses WildMidi library to play midi files")+"\n"+ tr("Written by: Ilya Kotov <forkotov02@ya.ru>")); } + +QString DecoderWildMidiFactory::translation() const +{ + return QLatin1String(":/wildmidi_plugin_"); +} diff --git a/src/plugins/Input/wildmidi/decoderwildmidifactory.h b/src/plugins/Input/wildmidi/decoderwildmidifactory.h index 606ff43ef..295e76712 100644 --- a/src/plugins/Input/wildmidi/decoderwildmidifactory.h +++ b/src/plugins/Input/wildmidi/decoderwildmidifactory.h @@ -31,12 +31,13 @@ class DecoderWildMidiFactory : public QObject, DecoderFactory public: DecoderWildMidiFactory(); bool canDecode(QIODevice *input) const; - const DecoderProperties properties() const; + DecoderProperties properties() const; Decoder *create(const QString &path, QIODevice *input); QList<TrackInfo *> createPlayList(const QString &path, TrackInfo::Parts parts, QStringList *); MetaDataModel* createMetaDataModel(const QString &path, QObject *parent = 0); void showSettings(QWidget *parent); void showAbout(QWidget *parent); + QString translation() const; }; #endif diff --git a/src/plugins/Output/alsa/outputalsafactory.cpp b/src/plugins/Output/alsa/outputalsafactory.cpp index d5529101b..82a50d7dd 100644 --- a/src/plugins/Output/alsa/outputalsafactory.cpp +++ b/src/plugins/Output/alsa/outputalsafactory.cpp @@ -25,12 +25,11 @@ #include "outputalsafactory.h" -const OutputProperties OutputALSAFactory::properties() const +OutputProperties OutputALSAFactory::properties() const { OutputProperties properties; properties.name = tr("ALSA Plugin"); properties.shortName = "alsa"; - properties.translation = QLatin1String(":/alsa_plugin_"); properties.hasAbout = true; properties.hasSettings = true; return properties; @@ -54,7 +53,12 @@ void OutputALSAFactory::showSettings(QWidget* parent) void OutputALSAFactory::showAbout(QWidget *parent) { - QMessageBox::about (parent, tr("About ALSA Output Plugin"), + QMessageBox::about (parent, tr("About ALSA Output Plugin"), tr("Qmmp ALSA Output Plugin")+"\n"+ tr("Written by: Ilya Kotov <forkotov02@ya.ru>")); } + +QString OutputALSAFactory::translation() const +{ + return QLatin1String(":/alsa_plugin_"); +} diff --git a/src/plugins/Output/alsa/outputalsafactory.h b/src/plugins/Output/alsa/outputalsafactory.h index 873474687..5a942c06a 100644 --- a/src/plugins/Output/alsa/outputalsafactory.h +++ b/src/plugins/Output/alsa/outputalsafactory.h @@ -24,7 +24,6 @@ #include <QString> #include <QIODevice> #include <QWidget> - #include <qmmp/output.h> #include <qmmp/outputfactory.h> @@ -37,11 +36,12 @@ Q_PLUGIN_METADATA(IID "org.qmmp.qmmp.OutputFactoryInterface.1.0") Q_INTERFACES(OutputFactory) public: - const OutputProperties properties() const; + OutputProperties properties() const; Output* create(); Volume *createVolume(); void showSettings(QWidget* parent); void showAbout(QWidget *parent); + QString translation() const; }; #endif diff --git a/src/plugins/Output/directsound/outputdirectsoundfactory.cpp b/src/plugins/Output/directsound/outputdirectsoundfactory.cpp index a05a9f3aa..81acc8426 100644 --- a/src/plugins/Output/directsound/outputdirectsoundfactory.cpp +++ b/src/plugins/Output/directsound/outputdirectsoundfactory.cpp @@ -22,7 +22,7 @@ #include "outputdirectsound.h"
#include "outputdirectsoundfactory.h"
-const OutputProperties OutputDirectSoundFactory::properties() const
+OutputProperties OutputDirectSoundFactory::properties() const
{
OutputProperties properties;
properties.name = tr("DirectSound Plugin");
diff --git a/src/plugins/Output/directsound/outputdirectsoundfactory.h b/src/plugins/Output/directsound/outputdirectsoundfactory.h index 4e34d191c..72090c4e5 100644 --- a/src/plugins/Output/directsound/outputdirectsoundfactory.h +++ b/src/plugins/Output/directsound/outputdirectsoundfactory.h @@ -34,7 +34,7 @@ Q_PLUGIN_METADATA(IID "org.qmmp.qmmp.OutputFactoryInterface.1.0") Q_INTERFACES(OutputFactory)
public:
- const OutputProperties properties() const;
+ OutputProperties properties() const;
Output* create();
Volume *createVolume();
void showSettings(QWidget* parent);
diff --git a/src/plugins/Output/jack/outputjackfactory.cpp b/src/plugins/Output/jack/outputjackfactory.cpp index 1ef4f48fd..2995e4290 100644 --- a/src/plugins/Output/jack/outputjackfactory.cpp +++ b/src/plugins/Output/jack/outputjackfactory.cpp @@ -24,14 +24,13 @@ #include "outputjackfactory.h" -const OutputProperties OutputJACKFactory::properties() const +OutputProperties OutputJACKFactory::properties() const { OutputProperties properties; properties.name = tr("JACK Plugin"); properties.hasAbout = true; properties.hasSettings = false; properties.shortName = "jack"; - properties.translation = QLatin1String(":/jack_plugin_"); return properties; } @@ -55,3 +54,8 @@ void OutputJACKFactory::showAbout(QWidget *parent) tr("Qmmp Jack Output Plugin")+"\n"+ tr("Written by: Yuriy Zhuravlev <slalkerg@gmail.com>")); } + +QString OutputJACKFactory::translation() const +{ + return QLatin1String(":/jack_plugin_"); +} diff --git a/src/plugins/Output/jack/outputjackfactory.h b/src/plugins/Output/jack/outputjackfactory.h index 8deb7dbf5..b004dbbc6 100644 --- a/src/plugins/Output/jack/outputjackfactory.h +++ b/src/plugins/Output/jack/outputjackfactory.h @@ -37,11 +37,12 @@ Q_PLUGIN_METADATA(IID "org.qmmp.qmmp.OutputFactoryInterface.1.0") Q_INTERFACES(OutputFactory) public: - const OutputProperties properties() const; + OutputProperties properties() const; Output* create(); Volume *createVolume(); void showSettings(QWidget* parent); void showAbout(QWidget *parent); + QString translation() const; }; #endif diff --git a/src/plugins/Output/null/outputnullfactory.cpp b/src/plugins/Output/null/outputnullfactory.cpp index 590a9dfc9..b7a96921b 100644 --- a/src/plugins/Output/null/outputnullfactory.cpp +++ b/src/plugins/Output/null/outputnullfactory.cpp @@ -24,14 +24,13 @@ #include "outputnullfactory.h" -const OutputProperties OutputNullFactory::properties() const +OutputProperties OutputNullFactory::properties() const { OutputProperties properties; properties.name = tr("Null Plugin"); properties.hasAbout = true; properties.hasSettings = false; properties.shortName = "null"; - properties.translation = QLatin1String(":/null_plugin_"); return properties; } @@ -54,5 +53,10 @@ void OutputNullFactory::showAbout(QWidget *parent) { QMessageBox::about (parent, tr("About Null Output Plugin"), tr("Qmmp Null Output Plugin")+"\n"+ - tr("Written by: Ilya Kotov <forkotov02@ya.ru>")); + tr("Written by: Ilya Kotov <forkotov02@ya.ru>")); +} + +QString OutputNullFactory::translation() const +{ + return QLatin1String(":/null_plugin_"); } diff --git a/src/plugins/Output/null/outputnullfactory.h b/src/plugins/Output/null/outputnullfactory.h index 931c0f6a3..543f20846 100644 --- a/src/plugins/Output/null/outputnullfactory.h +++ b/src/plugins/Output/null/outputnullfactory.h @@ -37,11 +37,12 @@ Q_PLUGIN_METADATA(IID "org.qmmp.qmmp.OutputFactoryInterface.1.0") Q_INTERFACES(OutputFactory) public: - const OutputProperties properties() const; + OutputProperties properties() const; Output* create(); Volume *createVolume(); void showSettings(QWidget* parent); void showAbout(QWidget *parent); + QString translation() const; }; #endif diff --git a/src/plugins/Output/oss/outputossfactory.cpp b/src/plugins/Output/oss/outputossfactory.cpp index 6686d86c6..fa83130f8 100644 --- a/src/plugins/Output/oss/outputossfactory.cpp +++ b/src/plugins/Output/oss/outputossfactory.cpp @@ -30,12 +30,11 @@ Output* OutputOSSFactory::create() return new OutputOSS(); } -const OutputProperties OutputOSSFactory::properties() const +OutputProperties OutputOSSFactory::properties() const { OutputProperties properties; properties.name = tr("OSS Plugin"); properties.shortName = "oss"; - properties.translation = QLatin1String(":/oss_plugin_"); properties.hasAbout = true; properties.hasSettings = true; return properties; @@ -57,5 +56,10 @@ void OutputOSSFactory::showAbout(QWidget *parent) QMessageBox::about (parent, tr("About OSS Output Plugin"), tr("Qmmp OSS Output Plugin")+"\n"+ tr("Written by: Yuriy Zhuravlev <slalkerg@gmail.com>")+"\n"+ - tr("Based on code by: Brad Hughes <bhughes@trolltech.com>")); + tr("Based on code by: Brad Hughes <bhughes@trolltech.com>")); +} + +QString OutputOSSFactory::translation() const +{ + return QLatin1String(":/oss_plugin_"); } diff --git a/src/plugins/Output/oss/outputossfactory.h b/src/plugins/Output/oss/outputossfactory.h index 1a9ff7e36..fa18c136e 100644 --- a/src/plugins/Output/oss/outputossfactory.h +++ b/src/plugins/Output/oss/outputossfactory.h @@ -37,11 +37,12 @@ Q_PLUGIN_METADATA(IID "org.qmmp.qmmp.OutputFactoryInterface.1.0") Q_INTERFACES(OutputFactory) public: - const OutputProperties properties() const; + OutputProperties properties() const; Output* create(); Volume *createVolume(); void showSettings(QWidget* parent); void showAbout(QWidget *parent); + QString translation() const; }; #endif diff --git a/src/plugins/Output/oss4/outputoss4factory.cpp b/src/plugins/Output/oss4/outputoss4factory.cpp index d8a183f64..c7f9eb97a 100644 --- a/src/plugins/Output/oss4/outputoss4factory.cpp +++ b/src/plugins/Output/oss4/outputoss4factory.cpp @@ -30,7 +30,7 @@ Output* OutputOSS4Factory::create() return new OutputOSS4(); } -const OutputProperties OutputOSS4Factory::properties() const +OutputProperties OutputOSS4Factory::properties() const { OutputProperties properties; properties.name = tr("OSS4 Plugin"); diff --git a/src/plugins/Output/oss4/outputoss4factory.h b/src/plugins/Output/oss4/outputoss4factory.h index 56fa4fd2f..f73d992a6 100644 --- a/src/plugins/Output/oss4/outputoss4factory.h +++ b/src/plugins/Output/oss4/outputoss4factory.h @@ -36,7 +36,7 @@ Q_PLUGIN_METADATA(IID "org.qmmp.qmmp.OutputFactoryInterface.1.0") Q_INTERFACES(OutputFactory) public: - const OutputProperties properties() const; + OutputProperties properties() const; Output* create(); Volume *createVolume(); void showSettings(QWidget* parent); diff --git a/src/plugins/Output/pulseaudio/outputpulseaudiofactory.cpp b/src/plugins/Output/pulseaudio/outputpulseaudiofactory.cpp index da8d8f2d1..049bc110a 100644 --- a/src/plugins/Output/pulseaudio/outputpulseaudiofactory.cpp +++ b/src/plugins/Output/pulseaudio/outputpulseaudiofactory.cpp @@ -24,14 +24,13 @@ #include "outputpulseaudiofactory.h" -const OutputProperties OutputPulseAudioFactory::properties() const +OutputProperties OutputPulseAudioFactory::properties() const { OutputProperties properties; properties.name = tr("PulseAudio Plugin"); properties.hasAbout = true; properties.hasSettings = false; properties.shortName = "pulse"; - properties.translation = QLatin1String(":/pulseaudio_plugin_"); return properties; } @@ -54,5 +53,10 @@ void OutputPulseAudioFactory::showAbout(QWidget *parent) { QMessageBox::about (parent, tr("About PulseAudio Output Plugin"), tr("Qmmp PulseAudio Output Plugin")+"\n"+ - tr("Written by: Ilya Kotov <forkotov02@ya.ru>")); + tr("Written by: Ilya Kotov <forkotov02@ya.ru>")); +} + +QString OutputPulseAudioFactory::translation() const +{ + return QLatin1String(":/pulseaudio_plugin_"); } diff --git a/src/plugins/Output/pulseaudio/outputpulseaudiofactory.h b/src/plugins/Output/pulseaudio/outputpulseaudiofactory.h index bfd4b07e9..3628b2f2b 100644 --- a/src/plugins/Output/pulseaudio/outputpulseaudiofactory.h +++ b/src/plugins/Output/pulseaudio/outputpulseaudiofactory.h @@ -38,11 +38,12 @@ Q_PLUGIN_METADATA(IID "org.qmmp.qmmp.OutputFactoryInterface.1.0") Q_INTERFACES(OutputFactory) public: - const OutputProperties properties() const; + OutputProperties properties() const; Output* create(); Volume *createVolume(); void showSettings(QWidget* parent); void showAbout(QWidget *parent); + QString translation() const; }; #endif diff --git a/src/plugins/Output/qtmultimedia/outputqtmultimediafactory.cpp b/src/plugins/Output/qtmultimedia/outputqtmultimediafactory.cpp index 070bd5f23..6bf8676a1 100644 --- a/src/plugins/Output/qtmultimedia/outputqtmultimediafactory.cpp +++ b/src/plugins/Output/qtmultimedia/outputqtmultimediafactory.cpp @@ -26,14 +26,13 @@ #include "outputqtmultimedia.h" -const OutputProperties OutputQtMultimediaFactory::properties() const +OutputProperties OutputQtMultimediaFactory::properties() const { OutputProperties properties; properties.name = tr("Qt Multimedia Plugin"); properties.hasAbout = true; properties.hasSettings = true; properties.shortName = "qtmultimedia"; - properties.translation = QLatin1String(":/qtmultimedia_plugin_"); return properties; } @@ -57,5 +56,10 @@ void OutputQtMultimediaFactory::showAbout(QWidget *parent) { QMessageBox::about (parent, tr("About Qt Multimedia Output Plugin"), tr("Qmmp Qt Multimedia Output Plugin")+"\n"+ - tr("Written by: Ivan Ponomarev <ivantrue@gmail.com>")); + tr("Written by: Ivan Ponomarev <ivantrue@gmail.com>")); +} + +QString OutputQtMultimediaFactory::translation() const +{ + return QLatin1String(":/qtmultimedia_plugin_"); } diff --git a/src/plugins/Output/qtmultimedia/outputqtmultimediafactory.h b/src/plugins/Output/qtmultimedia/outputqtmultimediafactory.h index ae109db28..08c077c95 100644 --- a/src/plugins/Output/qtmultimedia/outputqtmultimediafactory.h +++ b/src/plugins/Output/qtmultimedia/outputqtmultimediafactory.h @@ -37,11 +37,12 @@ Q_PLUGIN_METADATA(IID "org.qmmp.qmmp.OutputFactoryInterface.1.0") Q_INTERFACES(OutputFactory) public: - virtual const OutputProperties properties() const; + virtual OutputProperties properties() const; virtual Output* create(); virtual Volume *createVolume(); virtual void showSettings(QWidget* parent); virtual void showAbout(QWidget *parent); + virtual QString translation() const; }; #endif diff --git a/src/plugins/Output/shout/outputshoutfactory.cpp b/src/plugins/Output/shout/outputshoutfactory.cpp index 80e875ec6..47937a7a9 100644 --- a/src/plugins/Output/shout/outputshoutfactory.cpp +++ b/src/plugins/Output/shout/outputshoutfactory.cpp @@ -33,14 +33,13 @@ OutputShoutFactory::OutputShoutFactory() m_connection = new ShoutClient(qApp); } -const OutputProperties OutputShoutFactory::properties() const +OutputProperties OutputShoutFactory::properties() const { OutputProperties properties; properties.name = tr("Icecast Plugin"); properties.hasAbout = true; properties.hasSettings = true; properties.shortName = "shout"; - properties.translation = QLatin1String(":/shout_plugin_"); return properties; } @@ -67,3 +66,8 @@ void OutputShoutFactory::showAbout(QWidget *parent) tr("Compiled against libshout-%1").arg(shout_version(0,0,0))+"\n"+ tr("Written by: Ilya Kotov <forkotov02@ya.ru>")); } + +QString OutputShoutFactory::translation() const +{ + return QLatin1String(":/shout_plugin_"); +} diff --git a/src/plugins/Output/shout/outputshoutfactory.h b/src/plugins/Output/shout/outputshoutfactory.h index f1288cd4a..174d42807 100644 --- a/src/plugins/Output/shout/outputshoutfactory.h +++ b/src/plugins/Output/shout/outputshoutfactory.h @@ -37,11 +37,12 @@ Q_INTERFACES(OutputFactory) public: OutputShoutFactory(); - const OutputProperties properties() const; + OutputProperties properties() const; Output* create(); Volume *createVolume(); void showSettings(QWidget* parent); void showAbout(QWidget *parent); + QString translation() const; private: ShoutClient *m_connection; diff --git a/src/plugins/Output/wasapi/outputwasapifactory.cpp b/src/plugins/Output/wasapi/outputwasapifactory.cpp index e3516ce72..b4297e669 100644 --- a/src/plugins/Output/wasapi/outputwasapifactory.cpp +++ b/src/plugins/Output/wasapi/outputwasapifactory.cpp @@ -23,7 +23,7 @@ #include "outputwasapi.h"
#include "outputwasapifactory.h"
-const OutputProperties OutputWASAPIFactory::properties() const
+OutputProperties OutputWASAPIFactory::properties() const
{
OutputProperties properties;
properties.name = tr("WASAPI Plugin");
diff --git a/src/plugins/Output/wasapi/outputwasapifactory.h b/src/plugins/Output/wasapi/outputwasapifactory.h index 23a77eb50..5ff92b910 100644 --- a/src/plugins/Output/wasapi/outputwasapifactory.h +++ b/src/plugins/Output/wasapi/outputwasapifactory.h @@ -34,7 +34,7 @@ Q_PLUGIN_METADATA(IID "org.qmmp.qmmp.OutputFactoryInterface.1.0") Q_INTERFACES(OutputFactory)
public:
- const OutputProperties properties() const;
+ OutputProperties properties() const;
Output* create();
Volume *createVolume();
void showSettings(QWidget* parent);
diff --git a/src/plugins/Output/waveout/outputwaveoutfactory.cpp b/src/plugins/Output/waveout/outputwaveoutfactory.cpp index 85a94e615..14140c428 100644 --- a/src/plugins/Output/waveout/outputwaveoutfactory.cpp +++ b/src/plugins/Output/waveout/outputwaveoutfactory.cpp @@ -23,7 +23,7 @@ #include "outputwaveoutfactory.h"
-const OutputProperties OutputWaveOutFactory::properties() const
+OutputProperties OutputWaveOutFactory::properties() const
{
OutputProperties properties;
properties.name = tr("WaveOut Plugin");
diff --git a/src/plugins/Output/waveout/outputwaveoutfactory.h b/src/plugins/Output/waveout/outputwaveoutfactory.h index c8b992408..8867cf151 100644 --- a/src/plugins/Output/waveout/outputwaveoutfactory.h +++ b/src/plugins/Output/waveout/outputwaveoutfactory.h @@ -35,7 +35,7 @@ Q_PLUGIN_METADATA(IID "org.qmmp.qmmp.OutputFactoryInterface.1.0") Q_INTERFACES(OutputFactory)
public:
- const OutputProperties properties() const;
+ OutputProperties properties() const;
Output* create();
Volume *createVolume();
void showSettings(QWidget* parent);
diff --git a/src/plugins/Transports/http/httpinputfactory.cpp b/src/plugins/Transports/http/httpinputfactory.cpp index b733492b0..230eaeb7e 100644 --- a/src/plugins/Transports/http/httpinputfactory.cpp +++ b/src/plugins/Transports/http/httpinputfactory.cpp @@ -26,13 +26,12 @@ #include "httpinputsource.h" #include "httpinputfactory.h" -const InputSourceProperties HTTPInputFactory::properties() const +InputSourceProperties HTTPInputFactory::properties() const { InputSourceProperties properties; properties.protocols << "http" << "https"; properties.name = tr("HTTP Plugin"); properties.shortName = "http"; - properties.translation = QLatin1String(":/http_plugin_"); properties.hasAbout = true; properties.hasSettings = true; return properties; @@ -56,3 +55,8 @@ void HTTPInputFactory::showAbout(QWidget *parent) tr("Compiled against libcurl-%1").arg(LIBCURL_VERSION) + "\n" + tr("Written by: Ilya Kotov <forkotov02@ya.ru>")); } + +QString HTTPInputFactory::translation() const +{ + return QLatin1String(":/http_plugin_"); +} diff --git a/src/plugins/Transports/http/httpinputfactory.h b/src/plugins/Transports/http/httpinputfactory.h index 7bd7f3bce..215bacb56 100644 --- a/src/plugins/Transports/http/httpinputfactory.h +++ b/src/plugins/Transports/http/httpinputfactory.h @@ -34,10 +34,11 @@ Q_OBJECT Q_PLUGIN_METADATA(IID "org.qmmp.qmmp.InputSourceFactoryInterface.1.0") Q_INTERFACES(InputSourceFactory) public: - const InputSourceProperties properties() const; + InputSourceProperties properties() const; InputSource *create(const QString &url, QObject *parent = 0); void showSettings(QWidget *parent); void showAbout(QWidget *parent); + QString translation() const; }; #endif // HTTPINPUTFACTORY_H diff --git a/src/plugins/Transports/mms/mmsinputfactory.cpp b/src/plugins/Transports/mms/mmsinputfactory.cpp index 2257392b2..8ab97b5c3 100644 --- a/src/plugins/Transports/mms/mmsinputfactory.cpp +++ b/src/plugins/Transports/mms/mmsinputfactory.cpp @@ -25,13 +25,12 @@ #include "mmsinputsource.h" #include "mmsinputfactory.h" -const InputSourceProperties MMSInputFactory::properties() const +InputSourceProperties MMSInputFactory::properties() const { InputSourceProperties properties; properties.protocols << "mms" << "mmsh" << "mmst" << "mmsu"; properties.name = tr("MMS Plugin"); properties.shortName = "mms"; - properties.translation = QLatin1String(":/mms_plugin_"); properties.hasAbout = true; properties.hasSettings = true; return properties; @@ -54,3 +53,8 @@ void MMSInputFactory::showAbout(QWidget *parent) tr("Qmmp MMS Transport Plugin")+"\n"+ tr("Written by: Ilya Kotov <forkotov02@ya.ru>")); } + +QString MMSInputFactory::translation() const +{ + return QLatin1String(":/mms_plugin_"); +} diff --git a/src/plugins/Transports/mms/mmsinputfactory.h b/src/plugins/Transports/mms/mmsinputfactory.h index 756d3ea19..d9f083262 100644 --- a/src/plugins/Transports/mms/mmsinputfactory.h +++ b/src/plugins/Transports/mms/mmsinputfactory.h @@ -34,10 +34,11 @@ Q_OBJECT Q_PLUGIN_METADATA(IID "org.qmmp.qmmp.InputSourceFactoryInterface.1.0") Q_INTERFACES(InputSourceFactory) public: - const InputSourceProperties properties() const; + InputSourceProperties properties() const; InputSource *create(const QString &url, QObject *parent = 0); void showSettings(QWidget *parent); void showAbout(QWidget *parent); + QString translation() const; }; #endif // MMSINPUTFACTORY_H diff --git a/src/plugins/Ui/qsui/qsuifactory.cpp b/src/plugins/Ui/qsui/qsuifactory.cpp index 374104ea6..012a054ef 100644 --- a/src/plugins/Ui/qsui/qsuifactory.cpp +++ b/src/plugins/Ui/qsui/qsuifactory.cpp @@ -25,13 +25,12 @@ #include "aboutqsuidialog.h" #include "qsuifactory.h" -const UiProperties QSUIFactory::properties() const +UiProperties QSUIFactory::properties() const { UiProperties props; props.hasAbout = true; props.name = tr("Simple User Interface"); props.shortName = "qsui"; - props.translation = QLatin1String(":/qsui_plugin_"); return props; } @@ -46,3 +45,8 @@ void QSUIFactory::showAbout(QWidget *parent) AboutQSUIDialog about(parent); about.exec(); } + +QString QSUIFactory::translation() const +{ + return QLatin1String(":/qsui_plugin_"); +} diff --git a/src/plugins/Ui/qsui/qsuifactory.h b/src/plugins/Ui/qsui/qsuifactory.h index fcaf06452..259dfa6b7 100644 --- a/src/plugins/Ui/qsui/qsuifactory.h +++ b/src/plugins/Ui/qsui/qsuifactory.h @@ -32,9 +32,10 @@ class QSUIFactory : public QObject, public UiFactory Q_PLUGIN_METADATA(IID "org.qmmp.qmmpui.UiFactoryInterface.1.0") Q_INTERFACES(UiFactory) public: - const UiProperties properties() const; + UiProperties properties() const; QObject *create(); void showAbout(QWidget *parent); + QString translation() const; }; #endif diff --git a/src/plugins/Ui/skinned/skinnedfactory.cpp b/src/plugins/Ui/skinned/skinnedfactory.cpp index 8b146e233..3d9e91ed0 100644 --- a/src/plugins/Ui/skinned/skinnedfactory.cpp +++ b/src/plugins/Ui/skinned/skinnedfactory.cpp @@ -24,13 +24,12 @@ #include "mainwindow.h" #include "skinnedfactory.h" -const UiProperties SkinnedFactory::properties() const +UiProperties SkinnedFactory::properties() const { UiProperties props; props.hasAbout = true; props.name = tr("Skinned User Interface"); props.shortName = "skinned"; - props.translation = QLatin1String(":/skinned_plugin_"); return props; } @@ -53,3 +52,8 @@ void SkinnedFactory::showAbout(QWidget *parent) tr("sixixfive <http://sixsixfive.deviantart.com/>")); } + +QString SkinnedFactory::translation() const +{ + return QLatin1String(":/skinned_plugin_"); +} diff --git a/src/plugins/Ui/skinned/skinnedfactory.h b/src/plugins/Ui/skinned/skinnedfactory.h index 4ee3b1b71..8133314e0 100644 --- a/src/plugins/Ui/skinned/skinnedfactory.h +++ b/src/plugins/Ui/skinned/skinnedfactory.h @@ -32,9 +32,10 @@ class SkinnedFactory : public QObject, public UiFactory Q_PLUGIN_METADATA(IID "org.qmmp.qmmpui.UiFactoryInterface.1.0") Q_INTERFACES(UiFactory) public: - const UiProperties properties() const; + UiProperties properties() const; QObject *create(); void showAbout(QWidget *parent); + QString translation() const; }; #endif diff --git a/src/plugins/Visual/analyzer/visualanalyzerfactory.cpp b/src/plugins/Visual/analyzer/visualanalyzerfactory.cpp index 21210f0dc..b96f9d088 100644 --- a/src/plugins/Visual/analyzer/visualanalyzerfactory.cpp +++ b/src/plugins/Visual/analyzer/visualanalyzerfactory.cpp @@ -24,12 +24,11 @@ #include "visualanalyzerfactory.h" #include "analyzer.h" -const VisualProperties VisualAnalyzerFactory::properties() const +VisualProperties VisualAnalyzerFactory::properties() const { VisualProperties properties; properties.name = tr("Analyzer Plugin"); properties.shortName = "analyzer"; - properties.translation = QLatin1String(":/analyzer_plugin_"); properties.hasSettings = true; properties.hasAbout = true; return properties; @@ -51,3 +50,8 @@ void VisualAnalyzerFactory::showAbout(QWidget *parent) tr("Qmmp Analyzer Visual Plugin")+"\n"+ tr("Written by: Ilya Kotov <forkotov02@ya.ru>")); } + +QString VisualAnalyzerFactory::translation() const +{ + return QLatin1String(":/analyzer_plugin_"); +} diff --git a/src/plugins/Visual/analyzer/visualanalyzerfactory.h b/src/plugins/Visual/analyzer/visualanalyzerfactory.h index 837fbb686..8457e29a7 100644 --- a/src/plugins/Visual/analyzer/visualanalyzerfactory.h +++ b/src/plugins/Visual/analyzer/visualanalyzerfactory.h @@ -36,10 +36,11 @@ Q_PLUGIN_METADATA(IID "org.qmmp.qmmp.VisualFactoryInterface.1.0") Q_INTERFACES(VisualFactory) public: - const VisualProperties properties() const; + VisualProperties properties() const; Visual *create(QWidget *parent); QDialog *createConfigDialog(QWidget *parent); void showAbout(QWidget *parent); + QString translation() const; }; diff --git a/src/plugins/Visual/projectm/visualprojectmfactory.cpp b/src/plugins/Visual/projectm/visualprojectmfactory.cpp index 15b90d648..60698c067 100644 --- a/src/plugins/Visual/projectm/visualprojectmfactory.cpp +++ b/src/plugins/Visual/projectm/visualprojectmfactory.cpp @@ -23,12 +23,11 @@ #include "visualprojectmfactory.h" #include "projectmplugin.h" -const VisualProperties VisualProjectMFactory::properties() const +VisualProperties VisualProjectMFactory::properties() const { VisualProperties properties; properties.name = tr("ProjectM"); properties.shortName = "projectm"; - properties.translation = QLatin1String(":/projectm_plugin_"); properties.hasSettings = false; properties.hasAbout = true; return properties; @@ -53,3 +52,8 @@ void VisualProjectMFactory::showAbout(QWidget *parent) tr("Written by: Ilya Kotov <forkotov02@ya.ru>")+"\n"+ tr("Based on libprojectM-qt library")); } + +QString VisualProjectMFactory::translation() const +{ + return QLatin1String(":/projectm_plugin_"); +} diff --git a/src/plugins/Visual/projectm/visualprojectmfactory.h b/src/plugins/Visual/projectm/visualprojectmfactory.h index 5c6f18fcd..bd348c886 100644 --- a/src/plugins/Visual/projectm/visualprojectmfactory.h +++ b/src/plugins/Visual/projectm/visualprojectmfactory.h @@ -34,10 +34,11 @@ Q_PLUGIN_METADATA(IID "org.qmmp.qmmp.VisualFactoryInterface.1.0") Q_INTERFACES(VisualFactory) public: - const VisualProperties properties() const; + VisualProperties properties() const; Visual *create(QWidget *parent); QDialog *createConfigDialog(QWidget *parent); void showAbout(QWidget *parent); + QString translation() const; }; diff --git a/src/qmmp/decoderfactory.h b/src/qmmp/decoderfactory.h index b077e3f8e..7156e2ed5 100644 --- a/src/qmmp/decoderfactory.h +++ b/src/qmmp/decoderfactory.h @@ -48,7 +48,6 @@ public: } QString name; /*!< Input plugin full name */ QString shortName; /*!< Input plugin short name for internal usage */ - QString translation; /*!< Translation file path without locale code and extension */ QStringList filters; /*!< File filters (example: "*.mp3") */ QString description; /*!< File filters description */ QStringList contentTypes; /*!< Supported content types */ @@ -76,7 +75,7 @@ public: /*! * Returns decoder plugin properties. */ - virtual const DecoderProperties properties() const = 0; + virtual DecoderProperties properties() const = 0; /*! * Creates decoder object. * @param path File path @@ -109,6 +108,11 @@ public: * @param parent Parent widget. */ virtual void showAbout(QWidget *parent) = 0; + /*! + * Returns translation file path without locale code and extension + */ + virtual QString translation() const = 0; + }; Q_DECLARE_INTERFACE(DecoderFactory, "DecoderFactory/1.0") diff --git a/src/qmmp/effectfactory.h b/src/qmmp/effectfactory.h index c95db93ff..4232e1165 100644 --- a/src/qmmp/effectfactory.h +++ b/src/qmmp/effectfactory.h @@ -53,7 +53,6 @@ public: } QString name; /*!< Effect plugin full name */ QString shortName; /*!< Effect plugin short name for internal usage */ - QString translation; /*!< Translation file path without locale code and extension */ 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 */ @@ -82,6 +81,10 @@ public: * @param parent Parent widget. */ virtual void showAbout(QWidget *parent) = 0; + /*! + * Returns translation file path without locale code and extension + */ + virtual QString translation() const = 0; }; Q_DECLARE_INTERFACE(EffectFactory, "EffectFactory/1.0") diff --git a/src/qmmp/enginefactory.h b/src/qmmp/enginefactory.h index 338111efe..26301b466 100644 --- a/src/qmmp/enginefactory.h +++ b/src/qmmp/enginefactory.h @@ -49,7 +49,6 @@ public: } QString name; /*!< Input plugin full name */ QString shortName; /*!< Input plugin short name for internal usage */ - QString translation; /*!< Translation file path without locale code and extension */ QStringList filters; /*!< File filters (example: "*.mp3,*.ogg") */ QString description; /*!< File filter description */ QStringList contentTypes; /*!< Supported content types */ @@ -74,7 +73,7 @@ public: /*! * Returns general plugin properties. */ - virtual const EngineProperties properties() const = 0; + virtual EngineProperties properties() const = 0; /*! * Creates engine object. * @param parent Parent object File path @@ -105,6 +104,10 @@ public: * @param parent Parent widget. */ virtual void showAbout(QWidget *parent) = 0; + /*! + * Returns translation file path without locale code and extension + */ + virtual QString translation() const = 0; }; Q_DECLARE_INTERFACE(EngineFactory, "EngineFactory/1.0") diff --git a/src/qmmp/inputsourcefactory.h b/src/qmmp/inputsourcefactory.h index 10fde8f68..d8c59db14 100644 --- a/src/qmmp/inputsourcefactory.h +++ b/src/qmmp/inputsourcefactory.h @@ -44,7 +44,6 @@ public: QString name; /*!< Transport plugin full name */ QString shortName; /*!< Transport plugin name for internal usage */ - QString translation; /*!< Translation file path without locale code and extension */ 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 */ @@ -60,7 +59,7 @@ public: /*! * Returns transport plugin properties. */ - virtual const InputSourceProperties properties() const = 0; + virtual InputSourceProperties properties() const = 0; /*! * Creates transport provided by plugin. * @param url URL of the stream. @@ -77,6 +76,10 @@ public: * @param parent Parent widget. */ virtual void showAbout(QWidget *parent) = 0; + /*! + * Returns translation file path without locale code and extension + */ + virtual QString translation() const = 0; }; Q_DECLARE_INTERFACE(InputSourceFactory, "InputSourceFactory/1.0") diff --git a/src/qmmp/outputfactory.h b/src/qmmp/outputfactory.h index de40cca0b..5fe4c135f 100644 --- a/src/qmmp/outputfactory.h +++ b/src/qmmp/outputfactory.h @@ -47,7 +47,6 @@ public: } QString name; /*!< Effect plugin full name */ QString shortName; /*!< Effect plugin short name for internal usage */ - QString translation; /*!< Translation file path without locale code and extension */ 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 */ }; @@ -64,7 +63,7 @@ public: /*! * Returns output plugin properties. */ - virtual const OutputProperties properties() const = 0; + virtual OutputProperties properties() const = 0; /*! * Creates output provided by plugin. */ @@ -84,6 +83,10 @@ public: * @param parent Parent widget. */ virtual void showAbout(QWidget *parent) = 0; + /*! + * Returns translation file path without locale code and extension + */ + virtual QString translation() const = 0; }; Q_DECLARE_INTERFACE(OutputFactory, "OutputFactory/1.0") diff --git a/src/qmmp/qmmpplugincache.cpp b/src/qmmp/qmmpplugincache.cpp index b76b44fa3..323166883 100644 --- a/src/qmmp/qmmpplugincache.cpp +++ b/src/qmmp/qmmpplugincache.cpp @@ -135,7 +135,7 @@ DecoderFactory *QmmpPluginCache::decoderFactory() { m_decoderFactory = qobject_cast<DecoderFactory *> (instance()); if(m_decoderFactory) - loadTranslation(m_decoderFactory->properties().translation); + loadTranslation(m_decoderFactory->translation()); } return m_decoderFactory; } @@ -146,7 +146,7 @@ OutputFactory *QmmpPluginCache::outputFactory() { m_outputFactory = qobject_cast<OutputFactory *> (instance()); if(m_outputFactory) - loadTranslation(m_outputFactory->properties().translation); + loadTranslation(m_outputFactory->translation()); } return m_outputFactory; } @@ -157,7 +157,7 @@ EngineFactory *QmmpPluginCache::engineFactory() { m_engineFactory = qobject_cast<EngineFactory *> (instance()); if(m_engineFactory) - loadTranslation(m_engineFactory->properties().translation); + loadTranslation(m_engineFactory->translation()); } return m_engineFactory; } @@ -168,7 +168,7 @@ EffectFactory *QmmpPluginCache::effectFactory() { m_effectFactory = qobject_cast<EffectFactory *> (instance()); if(m_effectFactory) - loadTranslation(m_effectFactory->properties().translation); + loadTranslation(m_effectFactory->translation()); } return m_effectFactory; } @@ -179,7 +179,7 @@ InputSourceFactory *QmmpPluginCache::inputSourceFactory() { m_inputSourceFactory = qobject_cast<InputSourceFactory *> (instance()); if(m_inputSourceFactory) - loadTranslation(m_inputSourceFactory->properties().translation); + loadTranslation(m_inputSourceFactory->translation()); } return m_inputSourceFactory; } diff --git a/src/qmmp/visual.cpp b/src/qmmp/visual.cpp index 5738f1aec..5c347ab0a 100644 --- a/src/qmmp/visual.cpp +++ b/src/qmmp/visual.cpp @@ -262,10 +262,10 @@ void Visual::checkFactories() { m_factories->append(factory); m_files->insert(factory, filePath); - if(!factory->properties().translation.isEmpty()) + if(!factory->translation().isEmpty()) { QTranslator *translator = new QTranslator(qApp); - translator->load(factory->properties().translation + Qmmp::systemLanguageID()); + translator->load(factory->translation() + Qmmp::systemLanguageID()); qApp->installTranslator(translator); } } diff --git a/src/qmmp/visualfactory.h b/src/qmmp/visualfactory.h index 597f284d6..e38e0bb0e 100644 --- a/src/qmmp/visualfactory.h +++ b/src/qmmp/visualfactory.h @@ -44,7 +44,6 @@ public: } QString name; /*!< Effect plugin full name */ QString shortName; /*!< Effect plugin short name for internal usage */ - QString translation; /*!< Translation file path without locale code and extension */ 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 */ }; @@ -61,7 +60,7 @@ public: /*! * Returns visual plugin properties. */ - virtual const VisualProperties properties() const = 0; + virtual VisualProperties properties() const = 0; /*! * Creates visualization provided by plugin. * @param parent Parent object. @@ -78,6 +77,10 @@ public: * @param parent Parent widget. */ virtual void showAbout(QWidget *parent) = 0; + /*! + * Returns translation file path without locale code and extension + */ + virtual QString translation() const = 0; }; Q_DECLARE_INTERFACE(VisualFactory, "VisualFactory/1.0") diff --git a/src/qmmpui/commandlinemanager.cpp b/src/qmmpui/commandlinemanager.cpp index 08424fa41..f2571839f 100644 --- a/src/qmmpui/commandlinemanager.cpp +++ b/src/qmmpui/commandlinemanager.cpp @@ -61,10 +61,10 @@ void CommandLineManager::checkOptions() { m_options->append(option); m_files->insert(option, filePath); - if(!option->properties().translation.isEmpty()) + if(!option->translation().isEmpty()) { QTranslator *translator = new QTranslator(qApp); - translator->load(option->properties().translation + Qmmp::systemLanguageID()); + translator->load(option->translation() + Qmmp::systemLanguageID()); qApp->installTranslator(translator); } } diff --git a/src/qmmpui/commandlineoption.h b/src/qmmpui/commandlineoption.h index f6f67d5e5..1b2255dc5 100644 --- a/src/qmmpui/commandlineoption.h +++ b/src/qmmpui/commandlineoption.h @@ -34,7 +34,6 @@ class CommandLineProperties { public: QString shortName; /*!< Input plugin short name for internal usage */ - QString translation; /*!< Translation file path without locale code and extension */ QStringList helpString; /*!< A list of specially formatted help strings. Example: "--help||Display this text and exit" */ }; @@ -48,7 +47,7 @@ public: /*! * Returns command line plugin properties. */ - virtual const CommandLineProperties properties() const = 0; + virtual CommandLineProperties properties() const = 0; /*! * Returns \b true if \b opt_str string can be processed, * otherise \b false @@ -65,6 +64,10 @@ public: * Object destructor */ virtual ~CommandLineOption() {} + /*! + * Returns translation file path without locale code and extension + */ + virtual QString translation() const = 0; }; Q_DECLARE_INTERFACE(CommandLineOption,"CommandLineOptionInterface/1.0") diff --git a/src/qmmpui/filedialogfactory.h b/src/qmmpui/filedialogfactory.h index 5174a8f1b..32d5bf031 100644 --- a/src/qmmpui/filedialogfactory.h +++ b/src/qmmpui/filedialogfactory.h @@ -44,7 +44,6 @@ public: * otherwise should be \b false */ QString name; /*!< File dialog plugin full name */ QString shortName; /*!< File dialog short name for internal usage */ - QString translation; /*!< Translation file path without locale code and extension */ bool modal; /*!< Should be \b true if the file dialog doesn't support nonmodal mode, * otherwise should be \b false */ }; @@ -65,12 +64,16 @@ public: /*! * Returns file dialog plugin properties. */ - virtual const FileDialogProperties properties() const = 0; + virtual FileDialogProperties properties() const = 0; /*! * Shows about dialog. * @param parent Parent widget. */ virtual void showAbout(QWidget *parent) = 0; + /*! + * Returns translation file path without locale code and extension + */ + virtual QString translation() const = 0; }; Q_DECLARE_INTERFACE(FileDialogFactory, "FileDialogFactory/1.0") diff --git a/src/qmmpui/generalfactory.h b/src/qmmpui/generalfactory.h index 5075f60d7..7bd2dc5a2 100644 --- a/src/qmmpui/generalfactory.h +++ b/src/qmmpui/generalfactory.h @@ -45,7 +45,6 @@ public: } QString name; /*!< File dialog plugin full name */ QString shortName; /*!< File dialog short name for internal usage */ - QString translation; /*!< Translation file path without locale code and extension */ 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, @@ -64,7 +63,7 @@ public: /*! * Returns general plugin properties. */ - virtual const GeneralProperties properties() const = 0; + virtual GeneralProperties properties() const = 0; /*! * Creates object of the General class. */ @@ -80,6 +79,10 @@ public: * @param parent Parent widget. */ virtual void showAbout(QWidget *parent) = 0; + /*! + * Returns translation file path without locale code and extension + */ + virtual QString translation() const = 0; }; Q_DECLARE_INTERFACE(GeneralFactory, "GeneralFactory/1.0") diff --git a/src/qmmpui/qmmpuiplugincache.cpp b/src/qmmpui/qmmpuiplugincache.cpp index 9495f6fa1..ed739168d 100644 --- a/src/qmmpui/qmmpuiplugincache.cpp +++ b/src/qmmpui/qmmpuiplugincache.cpp @@ -160,7 +160,7 @@ GeneralFactory *QmmpUiPluginCache::generalFactory() { m_generalFactory = qobject_cast<GeneralFactory *> (instance()); if(m_generalFactory) - loadTranslation(m_generalFactory->properties().translation); + loadTranslation(m_generalFactory->translation()); } return m_generalFactory; } @@ -171,7 +171,7 @@ UiFactory *QmmpUiPluginCache::uiFactory() { m_uiFactory = qobject_cast<UiFactory *> (instance()); if(m_uiFactory) - loadTranslation(m_uiFactory->properties().translation); + loadTranslation(m_uiFactory->translation()); } return m_uiFactory; } @@ -182,7 +182,7 @@ FileDialogFactory *QmmpUiPluginCache::fileDialogFactory() { m_fileDialogFactory = qobject_cast<FileDialogFactory *> (instance()); if(m_fileDialogFactory) - loadTranslation(m_fileDialogFactory->properties().translation); + loadTranslation(m_fileDialogFactory->translation()); } return m_fileDialogFactory; } diff --git a/src/qmmpui/qtfiledialog.cpp b/src/qmmpui/qtfiledialog.cpp index 7ec53c5f9..a4f51846a 100644 --- a/src/qmmpui/qtfiledialog.cpp +++ b/src/qmmpui/qtfiledialog.cpp @@ -29,7 +29,7 @@ FileDialog* QtFileDialogFactory::create() return new QtFileDialog(); } -const FileDialogProperties QtFileDialogFactory::properties() const +FileDialogProperties QtFileDialogFactory::properties() const { FileDialogProperties properties; properties.name = tr("Qt File Dialog"); @@ -41,6 +41,11 @@ const FileDialogProperties QtFileDialogFactory::properties() const void QtFileDialogFactory::showAbout(QWidget*){} +QString QtFileDialogFactory::translation() const +{ + return QString(); +} + QtFileDialog::~QtFileDialog() { qDebug("QtFileDialog::~QtFileDialog()"); diff --git a/src/qmmpui/qtfiledialog_p.h b/src/qmmpui/qtfiledialog_p.h index bbc60282d..a6f555647 100644 --- a/src/qmmpui/qtfiledialog_p.h +++ b/src/qmmpui/qtfiledialog_p.h @@ -34,8 +34,9 @@ class QtFileDialogFactory : public QObject, public FileDialogFactory public: QtFileDialogFactory(){} FileDialog* create(); - const FileDialogProperties properties() const; + FileDialogProperties properties() const; void showAbout(QWidget*); + QString translation() const; virtual ~QtFileDialogFactory() { ; diff --git a/src/qmmpui/uifactory.h b/src/qmmpui/uifactory.h index 9b4acad39..88a1f9af3 100644 --- a/src/qmmpui/uifactory.h +++ b/src/qmmpui/uifactory.h @@ -43,7 +43,6 @@ public: } QString name; /*!< File dialog plugin full name */ QString shortName; /*!< File dialog short name for internal usage */ - QString translation; /*!< Translation file path without locale code and extension */ bool hasAbout; /*!< Should be \b true if plugin has about dialog, otherwise returns \b false */ }; /*! @brief User interface plugin interface. @@ -59,7 +58,7 @@ public: /*! * Returns user interface plugin properties. */ - virtual const UiProperties properties() const = 0; + virtual UiProperties properties() const = 0; /*! * Creates user interface instance. */ @@ -69,6 +68,10 @@ public: * @param parent Parent widget. */ virtual void showAbout(QWidget *parent) = 0; + /*! + * Returns translation file path without locale code and extension + */ + virtual QString translation() const = 0; }; Q_DECLARE_INTERFACE(UiFactory, "UiFactory/1.0") |
