1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
-
-
- #ifndef QCOMMANDLINEOPTION_H
- #define QCOMMANDLINEOPTION_H
-
- #include <QtCore/qstringlist.h>
- #include <QtCore/qshareddata.h>
-
- class QCommandLineOptionPrivate;
-
- class Q_CORE_EXPORT QCommandLineOption
- {
- public:
- explicit QCommandLineOption(const QString &name);
- explicit QCommandLineOption(const QStringList &names);
- QCommandLineOption(const QString &name, const QString &description,
- const QString &valueName = QString(),
- const QString &defaultValue = QString());
- QCommandLineOption(const QStringList &names, const QString &description,
- const QString &valueName = QString(),
- const QString &defaultValue = QString());
- QCommandLineOption(const QCommandLineOption &other);
-
- ~QCommandLineOption();
-
- QCommandLineOption &operator=(const QCommandLineOption &other);
- #ifdef Q_COMPILER_RVALUE_REFS
- inline QCommandLineOption &operator=(QCommandLineOption &&other)
- { qSwap(d, other.d); return *this; }
- #endif
-
- inline void swap(QCommandLineOption &other)
- { qSwap(d, other.d); }
-
- QStringList names() const;
-
- void setValueName(const QString &name);
- QString valueName() const;
-
- void setDescription(const QString &description);
- QString description() const;
-
- void setDefaultValue(const QString &defaultValue);
- void setDefaultValues(const QStringList &defaultValues);
- QStringList defaultValues() const;
-
- private:
- QSharedDataPointer<QCommandLineOptionPrivate> d;
- };
-
-
- #endif
|