QuasarAppLib
optiondata.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2021-2025 QuasarApp.
3 * Distributed under the lgplv3 software license, see the accompanying
4 * Everyone is permitted to copy and distribute verbatim copies
5 * of this license document, but changing it is not allowed.
6*/
7
8
9#ifndef OPTIONDATA_H
10#define OPTIONDATA_H
11
12#include "quasarapp_global.h"
13#include "helpdata.h"
14
15namespace QuasarAppUtils{
16
21{
22public:
23
33 OptionData(const QStringList& names,
34 const QString& arguments = "",
35 const QString& description = "",
36 const QString& example = "",
37 const QString& depricatedMsg = "",
38 bool removed = false);
39
44 const QStringList &names() const;
45
50 const QString &description() const;
51
56 const QString &example() const;
57
62 const QString &arguments() const;
63
69 const QString &depricatedMsg() const;
70
79 Help::Options toHelp() const;
80
85 bool isValid() const;
86
91 bool isRemoved() const;
92
97 bool isDepricated() const;
98
99protected:
105 void setNames(const QStringList &newNames);
106
113 void setDescription(const QString &newDescription);
114
121 void setExample(const QString &newExample);
122
129 void setArguments(const QString &newArguments);
130
136 void setDepricatedMsg(const QString &newDepricatedMsg);
137
138private:
139 QStringList _name;
140 QString _description;
141 QString _example;
142 QString _arguments;
143 QString _depricatedMsg;
144 bool _removed;
145};
146
150typedef QMultiHash<QString, OptionData> OptionsDataList;
151}
152#endif // OPTIONDATA_H
The OptionData class contains information about one option.
Definition optiondata.h:21
QMultiMap< QString, QString > Options
Options this is list of key-descriptions pairs of help. The key is name of the available argument and...
Definition helpdata.h:32
The QuasaraAppUtils class This lib include base functions for the all applications of QuasarApp group...
Definition helpdata.cpp:18
QMultiHash< QString, OptionData > OptionsDataList
OptionsList is Hash map of the OptionData items. Where the key it is group name and value it is optio...
Definition optiondata.h:150
#define QUASARAPPSHARED_EXPORT