aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/CommandLineOptions/SeekOption
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2018-07-21 15:26:02 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2018-07-21 15:26:02 +0000
commitab49308ad778ddc4822cda48e218fbc06f7b8e34 (patch)
tree6a315cbb2b9dff0d5590d5d28ec4c3d6c9868b0d /src/plugins/CommandLineOptions/SeekOption
parent0006966c0f307ec7dff51130ce26bbe3c7061418 (diff)
downloadqmmp-ab49308ad778ddc4822cda48e218fbc06f7b8e34.tar.gz
qmmp-ab49308ad778ddc4822cda48e218fbc06f7b8e34.tar.bz2
qmmp-ab49308ad778ddc4822cda48e218fbc06f7b8e34.zip
fixed command line translation
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@8197 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/CommandLineOptions/SeekOption')
-rw-r--r--src/plugins/CommandLineOptions/SeekOption/seekoption.cpp32
-rw-r--r--src/plugins/CommandLineOptions/SeekOption/seekoption.h5
2 files changed, 13 insertions, 24 deletions
diff --git a/src/plugins/CommandLineOptions/SeekOption/seekoption.cpp b/src/plugins/CommandLineOptions/SeekOption/seekoption.cpp
index 29c70728f..ed367fd9f 100644
--- a/src/plugins/CommandLineOptions/SeekOption/seekoption.cpp
+++ b/src/plugins/CommandLineOptions/SeekOption/seekoption.cpp
@@ -24,6 +24,17 @@
#include <qmmp/soundcore.h>
#include "seekoption.h"
+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");
+ return properties;
+}
+
bool SeekOption::identify(const QString &str) const
{
QStringList opts;
@@ -31,14 +42,6 @@ bool SeekOption::identify(const QString &str) const
return opts.contains(str);
}
-const QStringList SeekOption::helpString() const
-{
- return QStringList()
- << 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");
-}
-
QString SeekOption::executeCommand(const QString &opt_str, const QStringList &args)
{
SoundCore *core = SoundCore::instance();
@@ -73,16 +76,3 @@ QString SeekOption::executeCommand(const QString &opt_str, const QStringList &ar
return QString();
return QString();
}
-
-const QString SeekOption::name() const
-{
- return "SeekOption";
-}
-
-/*QTranslator *SeekOption::createTranslator(QObject *parent)
-{
- QTranslator *translator = new QTranslator(parent);
- QString locale = Qmmp::systemLanguageID();
- translator->load(QString(":/seek_plugin_") + locale);
- return translator;
-}*/
diff --git a/src/plugins/CommandLineOptions/SeekOption/seekoption.h b/src/plugins/CommandLineOptions/SeekOption/seekoption.h
index 80113cd38..24bc608e3 100644
--- a/src/plugins/CommandLineOptions/SeekOption/seekoption.h
+++ b/src/plugins/CommandLineOptions/SeekOption/seekoption.h
@@ -34,9 +34,8 @@ Q_OBJECT
Q_PLUGIN_METADATA(IID "org.qmmp.qmmpui.CommandLineOptionInterface.1.0")
Q_INTERFACES(CommandLineOption)
public:
- virtual bool identify(const QString& opt_str) const;
- virtual const QString name() const;
- virtual const QStringList helpString() const;
+ virtual const CommandLineProperties properties() const;
+ virtual bool identify(const QString &opt_str) const;
virtual QString executeCommand(const QString& opt_str, const QStringList &args);
};