-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetupprojectpage.cpp
executable file
·245 lines (206 loc) · 7.78 KB
/
setupprojectpage.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
#include "setupprojectpage.h"
#include "config.h"
SetupProjectPage::SetupProjectPage(QWidget *parent)
: SetupBasePage(tr("Project"), parent)
{
addSection(tr("General"));
addGroup();
addOption(tr("Name"), "PROJECT_NAME");
addOption(tr("Version"), "PROJECT_NUMBER");
addGroup();
addOption(tr("Symbol cache"), "SYMBOL_CACHE_SIZE");
addSection("Sources");
addGroup();
addOptionWidget(new OptionLanguage(tr("Code language"), this));
addOption(tr("STL support"), "BUILTIN_STL_SUPPORT");
addOption(tr("CLI support"), "CPP_CLI_SUPPORT");
addOption(tr("SIP support"), "SIP_SUPPORT");
addOption(tr("IDL support"), "IDL_PROPERTY_SUPPORT");
addGroup();
addOptionWidget(new OptionEncoding(tr("Encoding"), getString("INPUT_ENCODING"), this));
addColumn2();
addSection(tr("Output"));
addGroup();
addOption("Directory", "OUTPUT_DIRECTORY");
addOption("Make subdirectories", "CREATE_SUBDIRS");
addOption("Short file names", "SHORT_NAMES");
addOption("Use upper case", "CASE_SENSE_NAMES");
addGroup();
addOption("Language", "OUTPUT_LANGUAGE");
//addOptionWidget(new OptionEncoding("Language & Encoding", this));
addOptionWidget(new OptionEncoding("Encoding", getString("DOXYFILE_ENCODING"), this));
addColumn();
addSection(tr("Input"));
addGroup(tr("Include"));
addOption("Files & Directories", "INPUT");
addOption("Recursive", "RECURSIVE");
addOption("File patterns", "FILE_PATTERNS");
addColumn2();
addGroup(tr("Exclude"));
addOption("Files & Directories", "EXCLUDE");
addOption("Symlinks", "EXCLUDE_SYMLINKS");
addOption("File patterns", "EXCLUDE_PATTERNS");
addGroup(tr("Examples"));
addOption("Path", "EXAMPLE_PATH");
addOption("Recursive", "EXAMPLE_RECURSIVE");
addOption("File patterns", "EXAMPLE_PATTERNS");
addGroup(tr("Images"));
addOption("Path", "IMAGE_PATH");
addGroup(tr("Filter"));
addOption("Input filter", "INPUT_FILTER");
addOption("File patterns", "FILTER_PATTERNS");
addOption("Sources", "FILTER_SOURCE_FILES"); // probably should go to source browser?
finishPage();
}
SetupProjectPage::~SetupProjectPage()
{
}
/////////////////////////////////////////////
const QString langHint = ("Choose the language of input sources to let Doxygen "
"generate output that is more tailored for it.\n\n"
"For instance, for Java namespaces will be presented as packages, qualified "
"scopes will look different, etc. \n\n"
"For C some of the names that are used will be different. The list "
"of all members will be omitted, etc."
);
const char* langID[] = { "OPTIMIZE_OUTPUT_FOR_C", "", "OPTIMIZE_OUTPUT_JAVA", "OPTIMIZE_OUTPUT_JAVA", "OPTIMIZE_FOR_FORTRAN", "OPTIMIZE_OUTPUT_VHDL" };
OptionLanguage::OptionLanguage(const QString &title, QWidget *parent)
: OptionCustom(title, langHint, parent)
{
QStringList sl;
sl << "C" << "C++" << "C#" << "Java" << "Fortran" << "VHDL";
myCombo = new QComboBox(this);
myCombo->addItems(sl);
myLayout->addWidget(myCombo);
if (!getInt("LangIndex")) {
Config::instance()->addInt("LangIndex", "", 0, myCombo->count(), 0);
}
readValue();
}
OptionLanguage::~OptionLanguage()
{
}
void OptionLanguage::readValue()
{
// for (int i = 0; i < myCombo->count(); i++) {
// if (getBoolValue(langID[i])) {
// myCombo->setCurrentIndex(i);
// break;
// }
// }
myCombo->setCurrentIndex(Config_getInt("LangIndex"));
}
void OptionLanguage::storeValue()
{
int idx = myCombo->currentIndex();
setIntValue("LangIndex", idx);
// first, clear rest values
for (int i = 0; i < myCombo->count(); i++) {
if (i != idx) {
setBoolValue(langID[i], false);
}
}
setBoolValue(langID[idx], true);
switch (idx) {
case 2: // C#
setBoolValue("EXTRACT_STATIC", true);
setBoolValue("EXTRACT_LOCAL_CLASSES", true);
break;
default:;
}
}
/////////////////////////////////////////////
//
//const QString encHint = ("The OUTPUT_LANGUAGE tag is used to specify the language in which all "
// "documentation generated by doxygen is written. Doxygen will use this "
// "information to generate all constant output in the proper language. "
// "The default language is English.\n\n"
//
// "The DOXYFILE_ENCODING tag specifies the encoding used for all characters in the config file "
// "that follow. The default is UTF-8 which is also the encoding used for all "
// "text before the first occurrence of this tag. Doxygen uses libiconv (or the "
// "iconv built into libc) for the transcoding. See "
// "http://www.gnu.org/software/libiconv for the list of possible encodings."
// );
//
//OptionEncoding::OptionEncoding(const QString &title, QWidget *parent)
// : OptionCustom(title, encHint, parent)
//{
// myComboLang = new QComboBox(this);
//// myComboLang->addItems(sl);
// myLayout->addWidget(myComboLang);
//
// OptionEnum::initCombo(myComboLang, getEnum("OUTPUT_LANGUAGE"));
//
// QStringList sl;
// sl << "ASCII" << "ISO-8859-1" << "ISO-8859-2" << "ISO-8859-3" << "ISO-8859-4" << "ISO-8859-5"
// << "ISO-8859-7" << "ISO-8859-9" << "ISO-8859-10" << "ISO-8859-13" << "ISO-8859-14" << "ISO-8859-15" << "ISO-8859-16"
// << "KOI8-R" << "KOI8-U" << "KOI8-RU"
// << "CP1250" << "CP1251" << "CP1252" << "CP1253" << "CP1254" << "CP1257"
// << "CP850" << "CP866"
// << "MacRoman" << "MacCentralEurope" << "MacIceland" << "MacCroatian" << "MacRomania"
// << "MacCyrillic" << "MacUkraine" << "MacGreek" << "MacTurkish" << "Macintosh"
// // Semitic languages
// << "ISO-8859-6" << "ISO-8859-8" << "CP1255" << "CP1256" << "CP862" << "MacHebrew" << "MacArabic"
// // Japanese
// << "EUC-JP" << "SHIFT_JIS" << "CP932" << "ISO-2022-JP" << "ISO-2022-JP-2" << "ISO-2022-JP-1"
// // Chinese
// << "EUC-CN" << "HZ" << "GBK" << "CP936" << "GB18030" << "EUC-TW" << "BIG5" << "CP950"
// << "BIG5-HKSCS" << "BIG5-HKSCS:2001" << "BIG5-HKSCS:1999" << "ISO-2022-CN" << "ISO-2022-CN-EXT"
// // Korean
// << "EUC-KR" << "CP949" << "ISO-2022-KR" << "JOHAB"
// // Armenian
// << "ARMSCII-8"
// //Georgian
// << "Georgian-Academy" << "Georgian-PS"
// //Tajik
// << "KOI8-T"
// //Kazakh
// << "PT154" << "RK1048"
// //Thai
// << "ISO-8859-11" << "TIS-620" << "CP874" << "MacThai"
// //Laotian
// << "MuleLao-1" << "CP1133"
// //Vietnamese
// << "VISCII" << "TCVN" << "CP1258"
// //Platform specifics
// << "HP-ROMAN8" << "NEXTSTEP"
// //Full Unicode
// << "UTF-8"
// << "UCS-2" << "UCS-2BE" << "UCS-2LE"
// << "UCS-4" << "UCS-4BE" << "UCS-4LE"
// << "UTF-16" << "UTF-16BE" << "UTF-16LE"
// << "UTF-32" << "UTF-32BE" << "UTF-32LE"
// << "UTF-7"
// << "C99" << "JAVA"
// //Full Unicode, in terms of uint16_t or uint32_t (with machine dependent endianness and alignment)
// << "UCS-2-INTERNAL" << "UCS-4-INTERNAL"
// ;
//
// myComboEnc = new QComboBox(this);
// myComboEnc->addItems(sl);
// myComboEnc->setEditable(true);
// myLayout->addWidget(myComboEnc);
//
// myComboEnc->setCurrentIndex(myComboEnc->findText(
// getString("DOXYFILE_ENCODING")->defaultValue()
// ));
//}
//
//OptionEncoding::~OptionEncoding()
//{
//}
//
//void OptionEncoding::readValue()
//{
// int i = myComboLang->findText(getEnumValue("OUTPUT_LANGUAGE"));
// myComboLang->setCurrentIndex(i);
// myComboEnc->lineEdit()->setText(getStringValue("DOXYFILE_ENCODING"));
//}
//
//void OptionEncoding::storeValue()
//{
// setEnumValue("OUTPUT_LANGUAGE", myComboLang->currentText());
// setStringValue("DOXYFILE_ENCODING", myComboEnc->currentText());
//}
/////////////////////////////////////////////