|
KD Reports API Documentation
2.1
|
Go to the documentation of this file.
22 class KDReports::TextElementPrivate
30 bool m_boldIsSet =
false;
31 bool m_italic =
false;
32 bool m_italicIsSet =
false;
33 bool m_underline =
false;
34 bool m_underlineIsSet =
false;
35 bool m_strikeout =
false;
36 bool m_strikeoutIsSet =
false;
37 bool m_fontSet =
false;
38 qreal m_pointSize = 0;
45 , d(new TextElementPrivate)
52 , d(new TextElementPrivate(*other.d))
72 const int charPosition = cursor.
position();
76 #if QT_VERSION >= QT_VERSION_CHECK(5, 3, 0)
86 if (d->m_underlineIsSet)
88 if (d->m_strikeoutIsSet)
90 if (d->m_pointSize > 0)
92 if (!d->m_fontFamily.isEmpty())
94 if (d->m_foreground.isValid())
104 if (!d->m_id.isEmpty())
110 d->m_string.append(str);
121 d->m_fontFamily = family;
127 d->m_boldIsSet =
true;
132 d->m_italic = italic;
133 d->m_italicIsSet =
true;
138 d->m_underline = underline;
139 d->m_underlineIsSet =
true;
144 d->m_strikeout = strikeout;
145 d->m_strikeoutIsSet =
true;
150 d->m_pointSize = size;
161 d->m_foreground = color;
166 return d->m_foreground;
TextDocumentData & currentDocumentData()
void setFontPointSize(qreal size)
void cleanupVariableProperties(QTextCharFormat &charFormat)
TextElement & operator=(const TextElement &other)
void setFontWeight(int weight)
TextElement(const QString &string=QString())
void setTextValueMarker(int pos, const QString &id, int valueLength, bool html)
void build(ReportBuilder &builder) const override
void setBold(bool bold)
Set font attribute: bold.
void setFont(const QFont &)
void setFontStrikeOut(bool strikeOut)
void setBackground(const QBrush &brush)
void setItalic(bool italic)
Set font attribute: italic.
TextElement & operator<<(const QString &)
void setTextColor(const QColor &color)
void setFontItalic(bool italic)
void setCharFormat(const QTextCharFormat &format)
void setForeground(const QBrush &brush)
Element * clone() const override
void setFontFamily(const QString &family)
Element & operator=(const Element &other)
void setFontFamily(const QString &family)
Set font attribute: family.
void setId(const QString &id)
void setFont(const QFont &font, QTextCharFormat::FontPropertiesInheritanceBehavior behavior)
void setStrikeOut(bool strikeout)
Set font attribute: strike out.
void insertText(const QString &text)
void setFontUnderline(bool underline)
FontPropertiesSpecifiedOnly
void setPointSize(qreal size)
Set font attribute: size in points. Can be integer or decimal.
void setUnderline(bool underline)
Set font attribute: underline.
int position() const const
QTextCharFormat charFormat() const const
void setText(const QString &text)