23 #include "dmflagshtmlgenerator.h" 25 #include "serverapi/server.h" 28 DClass<DmflagsHtmlGenerator>
36 for (
int i = 0; i < section.
count(); ++i)
38 result +=
"<li>" + section[i].
name() +
"</li>";
51 DmflagsHtmlGenerator::~DmflagsHtmlGenerator()
55 QString DmflagsHtmlGenerator::generate()
58 const QList<DMFlagsSection> sections = d->server->dmFlags();
63 result += QString(
"<li><b>%1 (%2):</b></li>").arg(section.
name()).arg(section.
combineValues());
65 result += d->mkSectionContents(section);
69 if (!result.isEmpty())
71 result =
"<ul>" + result +
"</ul>";
A group of DMFlag objects that can be safely OR'ed together to form a meaningful value.
int count() const
Number of DMFlag objects inside the collection.
unsigned combineValues() const
Logical OR of all DMFlag::value() results in this collection.
const QString & name() const
User-displayable name of this section, ex. "Compatibility flags".
bool isEmpty() const
Does this section contain any dmflag?