mirror of
https://github.com/EdgeTX/edgetx.git
synced 2025-07-19 14:25:09 +03:00
Refactoring
This commit is contained in:
parent
62b64862d8
commit
38a639cef6
102 changed files with 3055 additions and 2978 deletions
31
companion/src/helpers_html.cpp
Executable file
31
companion/src/helpers_html.cpp
Executable file
|
@ -0,0 +1,31 @@
|
|||
#include "helpers_html.h"
|
||||
|
||||
QString tdAlign(const QString &s, const QString &align, const QString &color, bool bold)
|
||||
{
|
||||
QString str = s;
|
||||
if (bold) str = "<b>" + str + "</b>";
|
||||
if (!color.isEmpty()) str = "<font color=" + color + ">" + str + "</font>";
|
||||
return "<td align=" + align + ">" + str + "</td>";
|
||||
}
|
||||
|
||||
QString doTC(const QString &s, const QString &color, bool bold)
|
||||
{
|
||||
return tdAlign(s, "center", color, bold);
|
||||
}
|
||||
|
||||
QString doTR(const QString &s, const QString &color, bool bold)
|
||||
{
|
||||
return tdAlign(s, "right", color, bold);
|
||||
}
|
||||
|
||||
QString doTL(const QString &s, const QString &color, bool bold)
|
||||
{
|
||||
return tdAlign(s, "left", color, bold);
|
||||
}
|
||||
|
||||
QString fv(const QString &name, const QString &value, const QString &color)
|
||||
{
|
||||
return "<b>" + name + ": </b><font color=" +color + ">" + value + "</font><br>";
|
||||
}
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue