From c28061c4cf64e468dd3e230df1b96d1a72e295fd Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Tue, 25 Dec 2018 20:50:08 +0000 Subject: fixed command line plugins git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@8532 90c681e8-e032-0410-971d-27865f9a5e38 --- .../PlayListOption/playlistoption.h | 30 +++++++++++++++------- 1 file changed, 21 insertions(+), 9 deletions(-) (limited to 'src/plugins/CommandLineOptions/PlayListOption/playlistoption.h') diff --git a/src/plugins/CommandLineOptions/PlayListOption/playlistoption.h b/src/plugins/CommandLineOptions/PlayListOption/playlistoption.h index 22d67d048..de6d35ae4 100644 --- a/src/plugins/CommandLineOptions/PlayListOption/playlistoption.h +++ b/src/plugins/CommandLineOptions/PlayListOption/playlistoption.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2011-2017 by Ilya Kotov * + * Copyright (C) 2011-2019 by Ilya Kotov * * forkotov02@ya.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -24,24 +24,36 @@ #include #include #include -#include +#include #include /** @author Ilya Kotov */ -class PlayListOption : public QObject, public CommandLineOption +class PlayListOption : public QObject, public CommandLineHandler { Q_OBJECT -Q_PLUGIN_METADATA(IID "org.qmmp.qmmpui.CommandLineOptionInterface.1.0") -Q_INTERFACES(CommandLineOption) +Q_PLUGIN_METADATA(IID "org.qmmp.qmmpui.CommandLineHandlerInterface.1.0") +Q_INTERFACES(CommandLineHandler) public: - 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; + PlayListOption(); + QString shortName() const; + QString translation() const; + QString executeCommand(int id, const QStringList &args); private: + enum Command + { + PL_HELP = 0, + PL_LIST, + PL_DUMP, + PL_PLAY, + PL_CLEAR, + PL_REPEATE_TOGGLE, + PL_SHUFFLE_TOGGLE, + PL_STATE + }; + QString boolToText(bool enabled); }; -- cgit v1.2.3-13-gbd6f