PACK WOC
$VERSION$
Main Page
Classes
Files
File List
File Members
doxyout.h
Go to the documentation of this file.
1
// Copyright (C) 2012 by Konrad Rosenbaum <konrad@silmor.de>
2
// protected under the GNU GPL version 3 or at your option any newer.
3
// See COPYING.GPL file that comes with this distribution.
4
//
5
6
#ifndef WOC_DOXYOUT_H
7
#define WOC_DOXYOUT_H
8
#include <QStringList>
9
10
inline
QString
doxyFormat
(
const
QString&in,
int
level=0)
11
{
12
//split to lines
13
QStringList inl=in.trimmed().split(
'\n'
);
14
QString pre,ret;
15
//create indent and comment prefix
16
for
(
int
i=0;i<level;i++)pre+=
'\t'
;
17
pre+=
"/// "
;
18
//add comment
19
foreach
(QString line,inl){
20
ret+=pre;
21
ret+=line;
22
ret+=
"\n"
;
23
}
24
//done
25
return
ret;
26
}
27
28
inline
QString
doxyFormat
(
const
QStringList&inl,
int
level=0)
29
{
30
QString ret;
31
foreach
(QString
in
,inl){
32
in=in.trimmed();
33
if
(in.isEmpty())
continue
;
34
if
(!ret.isEmpty())ret+=
doxyFormat
(
""
,level);
35
ret+=
doxyFormat
(in,level);
36
}
37
return
ret;
38
}
39
40
#endif
doxyFormat
QString doxyFormat(const QString &in, int level=0)
Definition:
doxyout.h:10
Generated on Mon Sep 25 2017 21:47:41 for PACK WOC by
1.8.8