File: QwtTextEngine.3

package info (click to toggle)
qwt5 5.2.2-3
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 13,340 kB
  • sloc: cpp: 32,645; makefile: 23; sh: 4
file content (167 lines) | stat: -rw-r--r-- 4,645 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
.TH "QwtTextEngine" 3 "Mon Aug 1 2011" "Version 5.2.2" "Qwt User's Guide" \" -*- nroff -*-
.ad l
.nh
.SH NAME
QwtTextEngine \- 
.PP
Abstract base class for rendering text strings.  

.SH SYNOPSIS
.br
.PP
.PP
\fC#include <qwt_text_engine.h>\fP
.PP
Inherited by \fBQwtMathMLTextEngine\fP, \fBQwtPlainTextEngine\fP, and \fBQwtRichTextEngine\fP.
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "virtual void \fBdraw\fP (QPainter *painter, const QRect &rect, int flags, const QString &text) const =0"
.br
.ti -1c
.RI "virtual int \fBheightForWidth\fP (const QFont &font, int flags, const QString &text, int width) const =0"
.br
.ti -1c
.RI "virtual bool \fBmightRender\fP (const QString &text) const =0"
.br
.ti -1c
.RI "virtual void \fBtextMargins\fP (const QFont &font, const QString &text, int &left, int &right, int &top, int &bottom) const =0"
.br
.ti -1c
.RI "virtual QSize \fBtextSize\fP (const QFont &font, int flags, const QString &text) const =0"
.br
.ti -1c
.RI "virtual \fB~QwtTextEngine\fP ()"
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "\fBQwtTextEngine\fP ()"
.br
.in -1c
.SH "Detailed Description"
.PP 
Abstract base class for rendering text strings. 

A text engine is responsible for rendering texts for a specific text format. They are used by \fBQwtText\fP to render a text.
.PP
\fBQwtPlainTextEngine\fP and \fBQwtRichTextEngine\fP are part of the Qwt library.
.PP
\fBQwtMathMLTextEngine\fP can be found in Qwt MathML extension, that needs the MathML renderer of the Qt solutions package. Unfortunately it is only available with a commercial Qt license.
.PP
\fBSee also:\fP
.RS 4
\fBQwtText::setTextEngine()\fP 
.RE
.PP

.SH "Constructor & Destructor Documentation"
.PP 
.SS "QwtTextEngine::~QwtTextEngine ()\fC [virtual]\fP"
.PP
Destructor. 
.SS "QwtTextEngine::QwtTextEngine ()\fC [protected]\fP"
.PP
Constructor. 
.SH "Member Function Documentation"
.PP 
.SS "virtual void QwtTextEngine::draw (QPainter *painter, const QRect &rect, intflags, const QString &text) const\fC [pure virtual]\fP"Draw the text in a clipping rectangle
.PP
\fBParameters:\fP
.RS 4
\fIpainter\fP Painter 
.br
\fIrect\fP Clipping rectangle 
.br
\fIflags\fP Bitwise OR of the flags like in for QPainter::drawText 
.br
\fItext\fP Text to be rendered 
.RE
.PP

.PP
Implemented in \fBQwtPlainTextEngine\fP, \fBQwtRichTextEngine\fP, and \fBQwtMathMLTextEngine\fP.
.SS "virtual int QwtTextEngine::heightForWidth (const QFont &font, intflags, const QString &text, intwidth) const\fC [pure virtual]\fP"Find the height for a given width
.PP
\fBParameters:\fP
.RS 4
\fIfont\fP Font of the text 
.br
\fIflags\fP Bitwise OR of the flags used like in QPainter::drawText 
.br
\fItext\fP Text to be rendered 
.br
\fIwidth\fP Width
.RE
.PP
\fBReturns:\fP
.RS 4
Calculated height 
.RE
.PP

.PP
Implemented in \fBQwtPlainTextEngine\fP, \fBQwtRichTextEngine\fP, and \fBQwtMathMLTextEngine\fP.
.SS "virtual bool QwtTextEngine::mightRender (const QString &text) const\fC [pure virtual]\fP"Test if a string can be rendered by this text engine
.PP
\fBParameters:\fP
.RS 4
\fItext\fP Text to be tested 
.RE
.PP
\fBReturns:\fP
.RS 4
true, if it can be rendered 
.RE
.PP

.PP
Implemented in \fBQwtPlainTextEngine\fP, \fBQwtRichTextEngine\fP, and \fBQwtMathMLTextEngine\fP.
.SS "virtual void QwtTextEngine::textMargins (const QFont &font, const QString &text, int &left, int &right, int &top, int &bottom) const\fC [pure virtual]\fP"Return margins around the texts
.PP
The textSize might include margins around the text, like QFontMetrics::descent. In situations where texts need to be aligend in detail, knowing these margins might improve the layout calculations.
.PP
\fBParameters:\fP
.RS 4
\fIfont\fP Font of the text 
.br
\fItext\fP Text to be rendered 
.br
\fIleft\fP Return value for the left margin 
.br
\fIright\fP Return value for the right margin 
.br
\fItop\fP Return value for the top margin 
.br
\fIbottom\fP Return value for the bottom margin 
.RE
.PP

.PP
Implemented in \fBQwtPlainTextEngine\fP, \fBQwtRichTextEngine\fP, and \fBQwtMathMLTextEngine\fP.
.SS "virtual QSize QwtTextEngine::textSize (const QFont &font, intflags, const QString &text) const\fC [pure virtual]\fP"Returns the size, that is needed to render text
.PP
\fBParameters:\fP
.RS 4
\fIfont\fP Font of the text 
.br
\fIflags\fP Bitwise OR of the flags like in for QPainter::drawText 
.br
\fItext\fP Text to be rendered
.RE
.PP
\fBReturns:\fP
.RS 4
Caluclated size 
.RE
.PP

.PP
Implemented in \fBQwtPlainTextEngine\fP, \fBQwtRichTextEngine\fP, and \fBQwtMathMLTextEngine\fP.

.SH "Author"
.PP 
Generated automatically by Doxygen for Qwt User's Guide from the source code.