Qmmp
Loading...
Searching...
No Matches
commandlinemanager.h
1/***************************************************************************
2 * Copyright (C) 2008-2022 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 COMMANDLINEMANAGER_H
21#define COMMANDLINEMANAGER_H
22
23#include <QHash>
24#include "general.h"
25#include "commandlinehandler.h"
26#include "qmmpui_export.h"
27
28
32class QMMPUI_EXPORT CommandLineManager
33{
34public:
41 static QString executeCommand(const QString &name, const QStringList &args = QStringList());
45 static bool hasOption(const QString &opt_str, CommandLineHandler::OptionFlags *flags = nullptr);
49 static void printUsage();
54 static QString formatHelpString(const QString &line);
55
56private:
57 static void checkOptions();
58 static QList<CommandLineHandler *> *m_options;
59 static QHash<CommandLineHandler*, QString> *m_files;
60};
61
62#endif
Helper class used for handle command line plugins.
Definition commandlinemanager.h:33
static void printUsage()
static QString executeCommand(const QString &name, const QStringList &args=QStringList())
static bool hasOption(const QString &opt_str, CommandLineHandler::OptionFlags *flags=nullptr)
static QString formatHelpString(const QString &line)