Qmmp
commandlineoption.h
1 /***************************************************************************
2  * Copyright (C) 2008-2017 by Ilya Kotov *
3  * forkotov02@ya.ru *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
19  ***************************************************************************/
20 #ifndef COMMANDLINEOPTION_H
21 #define COMMANDLINEOPTION_H
22 
23 #include "qmmpui_export.h"
24 
25 class CommandLineManager;
26 class QString;
27 class QObject;
28 class QStringList;
29 
34 {
35 public:
36  QString shortName;
37  QStringList helpString;
39 };
40 
44 class QMMPUI_EXPORT CommandLineOption
45 {
46 public:
50  virtual CommandLineProperties properties() const = 0;
55  virtual bool identify(const QString& opt_str) const = 0;
62  virtual QString executeCommand(const QString &opt_str, const QStringList &args) = 0;
66  virtual ~CommandLineOption() {}
70  virtual QString translation() const = 0;
71 };
72 
73 Q_DECLARE_INTERFACE(CommandLineOption,"CommandLineOptionInterface/1.0")
74 
75 #endif
virtual ~CommandLineOption()
Definition: commandlineoption.h:66
QStringList helpString
Definition: commandlineoption.h:37
Helper class to store command line plugin properties.
Definition: commandlineoption.h:33
QString shortName
Definition: commandlineoption.h:36
Abstract base class of the command line plugins.
Definition: commandlineoption.h:44
Helper class used for handle command line plugins.
Definition: commandlinemanager.h:32