1// qcommandlineparser.sip generated by MetaSIP
2//
3// This file is part of the QtCore Python extension module.
4//
5// Copyright (c) 2021 Riverbank Computing Limited <info@riverbankcomputing.com>
6//
7// This file is part of PyQt5.
8//
9// This file may be used under the terms of the GNU General Public License
10// version 3.0 as published by the Free Software Foundation and appearing in
11// the file LICENSE included in the packaging of this file.  Please review the
12// following information to ensure the GNU General Public License version 3.0
13// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
14//
15// If you do not wish to use this file under the terms of the GPL version 3.0
16// then you may purchase a commercial license.  For more information contact
17// info@riverbankcomputing.com.
18//
19// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
20// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
21
22
23%If (Qt_5_2_0 -)
24
25class QCommandLineParser
26{
27%TypeHeaderCode
28#include <qcommandlineparser.h>
29%End
30
31public:
32    QCommandLineParser();
33    ~QCommandLineParser();
34
35    enum SingleDashWordOptionMode
36    {
37        ParseAsCompactedShortOptions,
38        ParseAsLongOptions,
39    };
40
41    void setSingleDashWordOptionMode(QCommandLineParser::SingleDashWordOptionMode parsingMode);
42    bool addOption(const QCommandLineOption &commandLineOption);
43    QCommandLineOption addVersionOption();
44    QCommandLineOption addHelpOption();
45    void setApplicationDescription(const QString &description);
46    QString applicationDescription() const;
47    void addPositionalArgument(const QString &name, const QString &description, const QString &syntax = QString());
48    void clearPositionalArguments();
49    void process(const QStringList &arguments) /ReleaseGIL/;
50    void process(const QCoreApplication &app) /ReleaseGIL/;
51    bool parse(const QStringList &arguments);
52    QString errorText() const;
53    bool isSet(const QString &name) const;
54    QString value(const QString &name) const;
55    QStringList values(const QString &name) const;
56    bool isSet(const QCommandLineOption &option) const;
57    QString value(const QCommandLineOption &option) const;
58    QStringList values(const QCommandLineOption &option) const;
59    QStringList positionalArguments() const;
60    QStringList optionNames() const;
61    QStringList unknownOptionNames() const;
62    void showHelp(int exitCode = 0) /ReleaseGIL/;
63    QString helpText() const;
64%If (Qt_5_4_0 -)
65    bool addOptions(const QList<QCommandLineOption> &options);
66%End
67%If (Qt_5_4_0 -)
68    void showVersion();
69%End
70%If (Qt_5_6_0 -)
71
72    enum OptionsAfterPositionalArgumentsMode
73    {
74        ParseAsOptions,
75        ParseAsPositionalArguments,
76    };
77
78%End
79%If (Qt_5_6_0 -)
80    void setOptionsAfterPositionalArgumentsMode(QCommandLineParser::OptionsAfterPositionalArgumentsMode mode);
81%End
82
83private:
84    QCommandLineParser(const QCommandLineParser &);
85};
86
87%End
88