11#include <QXmlStreamWriter>
31 return { std::move (
n1), std::move (
n2) };
43 w.writeStartElement (
tag.Name_);
48 for (
const auto&
node :
tag.Children_)
73 Attrs_.push_back ({ std::move (
key), std::move (
value) });
86 .Attrs_ = { {
"xmlns"_qs,
"http://www.w3.org/1999/xhtml" } },
118 const auto&
w = QString::number (size.width ());
119 const auto&
h = QString::number (size.height ());
123 .Attrs_ = { {
"src"_qs,
url }, {
"width"_qs,
w }, {
"height"_qs,
h } },
147 for (
size_t r = 0;
r <
rows; ++
r)
151 for (
size_t c = 0;
c <
cols; ++
c)
152 rowCells.push_back (
Tag { .Name_ =
"td"_qs, .Children_ = cell (r, c) });
Container< T > Filter(const Container< T > &c, F f)
auto Visit(const Either< Left, Right > &either, Args &&... args)
constexpr auto operator+(RawStr< N1, Char > s1, CtString< N2, Char > s2) noexcept
std::variant< Tag, QString > Node
UTIL_SLL_API T ToHtml(T prefix={}) const
UTIL_SLL_API Tag & WithAttr(QString, QString) &&
static UTIL_SLL_API Tag WithText(const QString &name, const QString &contents)