16class KDReports::TextElementPrivate
24 bool m_boldIsSet =
false;
25 bool m_italic =
false;
26 bool m_italicIsSet =
false;
27 bool m_underline =
false;
28 bool m_underlineIsSet =
false;
29 bool m_strikeout =
false;
30 bool m_strikeoutIsSet =
false;
31 bool m_fontSet =
false;
32 qreal m_pointSize = 0;
39 , d(new TextElementPrivate)
46 , d(new TextElementPrivate(*other.d))
66 const int charPosition = cursor.
position();
70#if QT_VERSION >= QT_VERSION_CHECK(5, 3, 0)
80 if (d->m_underlineIsSet)
82 if (d->m_strikeoutIsSet)
84 if (d->m_pointSize > 0)
86 if (!d->m_fontFamily.isEmpty())
87#
if QT_VERSION >= QT_VERSION_CHECK(6, 1, 0)
92 if (d->m_foreground.isValid())
102 if (!d->m_id.isEmpty())
108 d->m_string.append(str);
119 d->m_fontFamily = family;
125 d->m_boldIsSet =
true;
130 d->m_italic = italic;
131 d->m_italicIsSet =
true;
136 d->m_underline = underline;
137 d->m_underlineIsSet =
true;
142 d->m_strikeout = strikeout;
143 d->m_strikeoutIsSet =
true;
148 d->m_pointSize = size;
159 d->m_foreground = color;
164 return d->m_foreground;
Element & operator=(const Element &other)
TextDocumentData & currentDocumentData()
void setTextValueMarker(int pos, const QString &id, int valueLength, bool html)
TextElement & operator=(const TextElement &other)
void setTextColor(const QColor &color)
void setFontFamily(const QString &family)
Set font attribute: family.
void setUnderline(bool underline)
Set font attribute: underline.
void setStrikeOut(bool strikeout)
Set font attribute: strike out.
void setItalic(bool italic)
Set font attribute: italic.
void setFont(const QFont &)
void setText(const QString &text)
TextElement(const QString &string=QString())
void setPointSize(qreal size)
Set font attribute: size in points. Can be integer or decimal.
void setBold(bool bold)
Set font attribute: bold.
void build(ReportBuilder &builder) const override
TextElement & operator<<(const QString &)
Element * clone() const override
void setId(const QString &id)
void cleanupVariableProperties(QTextCharFormat &charFormat)
FontPropertiesSpecifiedOnly
void setFont(const QFont &font, QTextCharFormat::FontPropertiesInheritanceBehavior behavior)
void setFontFamilies(const QStringList &families)
void setFontFamily(const QString &family)
void setFontItalic(bool italic)
void setFontPointSize(qreal size)
void setFontStrikeOut(bool strikeOut)
void setFontUnderline(bool underline)
void setFontWeight(int weight)
QTextCharFormat charFormat() const const
void insertText(const QString &text)
int position() const const
void setCharFormat(const QTextCharFormat &format)
void setBackground(const QBrush &brush)
void setForeground(const QBrush &brush)