KD Reports API Documentation 2.2
Loading...
Searching...
No Matches
KDReportsTextElement.h
Go to the documentation of this file.
1/****************************************************************************
2**
3** This file is part of the KD Reports library.
4**
5** SPDX-FileCopyrightText: 2007 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
6**
7** SPDX-License-Identifier: MIT
8**
9****************************************************************************/
10
11#ifndef KDREPORTSTEXTELEMENT_H
12#define KDREPORTSTEXTELEMENT_H
13
14#include "KDReportsElement.h"
15#include <QTextCharFormat>
16#include <QtCore/QString>
17
18QT_BEGIN_NAMESPACE
19class QColor;
20class QFont;
21QT_END_NAMESPACE
22
23namespace KDReports {
24class TextElementPrivate;
25
31{
32public:
36 explicit TextElement(const QString &string = QString());
40 ~TextElement() override;
41
46 TextElement(const TextElement &other);
50 TextElement &operator=(const TextElement &other);
51
55 void setText(const QString &text);
56
61
63 void setFontFamily(const QString &family);
65 void setBold(bool bold);
67 void setItalic(bool italic);
69 void setUnderline(bool underline);
71 void setStrikeOut(bool strikeout);
73 void setPointSize(qreal size);
74
82 void setFont(const QFont &);
83
88 QFont font() const;
89
94 void setTextColor(const QColor &color);
95
100 QColor textColor() const;
101
106 void setId(const QString &id);
107
112 QString id() const;
113
118 QString text() const;
119
124 void build(ReportBuilder &builder) const override;
129 Element *clone() const override;
130
131private:
132 friend class ReportBuilder;
133 void setCharFormat(const QTextCharFormat &format);
134
135 std::unique_ptr<TextElementPrivate> d;
136};
137
138}
139
140#endif /* KDREPORTSTEXTELEMENT_H */
#define KDREPORTS_EXPORT
QDebug operator<<(QDebug &dbg, QTextOption::Tab tab)

© Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
https://www.kdab.com/development-resources/qt-tools/kd-reports/
Generated on Wed Apr 24 2024 04:08:15 for KD Reports API Documentation by doxygen 1.9.8