File: QwtPushButton.3

package info (click to toggle)
libqwt 4.2.0-4.1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 9,832 kB
  • ctags: 5,512
  • sloc: cpp: 22,973; ansic: 244; makefile: 66
file content (228 lines) | stat: -rw-r--r-- 5,627 bytes parent folder | download | duplicates (5)
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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
.TH "QwtPushButton" 3 "16 Nov 2004" "Version 4.2.0" "Qwt User's Guide" \" -*- nroff -*-
.ad l
.nh
.SH NAME
QwtPushButton \- 
.SH SYNOPSIS
.br
.PP
Inherited by \fBQwtLegendButton\fP.
.PP
.SH "Detailed Description"
.PP 
A push button that allows alignment of button labels, and use of rich texts, as provided by QLabel.
.PP
\fBWarning:\fP
.RS 4
The layout of the text label might be broken for a couple of styles. At least the KDE 3.3 Keramik style is known. 
.RE
.PP

.PP
Definition at line 24 of file qwt_push_button.h.
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBQwtPushButton\fP (QWidget *=NULL, const char *name=NULL)"
.br
.ti -1c
.RI "\fBQwtPushButton\fP (const QString &text, QWidget *=NULL, const char *name=NULL)"
.br
.ti -1c
.RI "\fBQwtPushButton\fP (const QIconSet &, const QString &, QWidget *=NULL, const char *name=NULL)"
.br
.ti -1c
.RI "TextFormat \fBtextFormat\fP () const"
.br
.ti -1c
.RI "void \fBsetTextFormat\fP (TextFormat)"
.br
.ti -1c
.RI "virtual Qt::TextFormat \fBusedTextFormat\fP () const"
.br
.ti -1c
.RI "int \fBalignment\fP () const"
.br
.ti -1c
.RI "virtual void \fBsetAlignment\fP (int alignment)"
.br
.ti -1c
.RI "void \fBsetIndent\fP (int)"
.br
.ti -1c
.RI "int \fBindent\fP () const"
.br
.ti -1c
.RI "virtual QSize \fBsizeHint\fP () const"
.br
.ti -1c
.RI "virtual int \fBheightForWidth\fP (int) const"
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "virtual void \fBdrawButtonLabel\fP (QPainter *)"
.br
.in -1c
.SH "Constructor & Destructor Documentation"
.PP 
.SS "QwtPushButton::QwtPushButton (QWidget * parent = \fCNULL\fP, const char * name = \fCNULL\fP)"
.PP
Constructs a push button with no text. Definition at line 217 of file qwt_push_button.cpp.
.SS "QwtPushButton::QwtPushButton (const QString & text, QWidget * parent = \fCNULL\fP, const char * name = \fCNULL\fP)"
.PP
Constructs a push button called name with the parent parent and the text text. Definition at line 227 of file qwt_push_button.cpp.
.SS "QwtPushButton::QwtPushButton (const QIconSet & iconSet, const QString & text, QWidget * parent = \fCNULL\fP, const char * name = \fCNULL\fP)"
.PP
Constructs a push button with an icon and a text. Definition at line 237 of file qwt_push_button.cpp.
.SH "Member Function Documentation"
.PP 
.SS "int QwtPushButton::alignment () const"
.PP
\fBReturns:\fP
.RS 4
Alignment of the button label's contents. 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBQwtPushButton::setAlignment\fP 
.RE
.PP
Definition at line 301 of file qwt_push_button.cpp.
.PP
Referenced by QwtLegendButton::titleText().
.SS "void QwtPushButton::drawButtonLabel (QPainter *)\fC [protected, virtual]\fP"
.PP
Draws the button text or pixmap. 
.PP
Definition at line 417 of file qwt_push_button.cpp.
.SS "int QwtPushButton::heightForWidth (int width) const\fC [virtual]\fP"
.PP
Find the preferred height, given the width w.
.PP
\fBParameters:\fP
.RS 4
\fIwidth\fP Width 
.RE
.PP
\fBReturns:\fP
.RS 4
preferred height 
.RE
.PP
Definition at line 352 of file qwt_push_button.cpp.
.PP
References QwtText::boundingRect(), QwtText::heightForWidth(), QwtText::makeText(), sizeHint(), and usedTextFormat().
.SS "int QwtPushButton::indent () const"
.PP
\fBReturns:\fP
.RS 4
Indent of the button label's contents. 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBQwtPushButton::setIndent\fP 
.RE
.PP
Definition at line 325 of file qwt_push_button.cpp.
.SS "void QwtPushButton::setAlignment (int alignment)\fC [virtual]\fP"
.PP
Sets the alignment of the button labels contents. 
.PP
The default format is Qt::AlignCenter | Qt::ExpandTabs | Qt::WordBreak.
.PP
\fBParameters:\fP
.RS 4
\fIalignment\fP Bitwise OR of Qt::AlignmentFlags and Qt::TextFlags values.
.RE
.PP
\fBSee also:\fP
.RS 4
\fBQwtPushButton::alignment()\fP 
.RE
.PP
Definition at line 315 of file qwt_push_button.cpp.
.SS "void QwtPushButton::setIndent (int indent)"
.PP
Sets the button label's contents indent in pixels. 
.PP
The default value is 4 pixels.
.PP
\fBParameters:\fP
.RS 4
\fIindent\fP Indent
.RE
.PP
\fBSee also:\fP
.RS 4
\fBQwtPushButton::indent()\fP 
.RE
.PP
Definition at line 340 of file qwt_push_button.cpp.
.SS "void QwtPushButton::setTextFormat (TextFormat textFormat)"
.PP
Sets the button label's text format. The default format is AutoText. 
.PP
\fBParameters:\fP
.RS 4
\fItextFormat\fP Text format for the button label text
.RE
.PP
\fBSee also:\fP
.RS 4
\fBQwtPushButton::textFormat()\fP 
.RE
.PP
Definition at line 291 of file qwt_push_button.cpp.
.SS "QSize QwtPushButton::sizeHint () const\fC [virtual]\fP"
.PP
Return sizeHint. 
.PP
Definition at line 370 of file qwt_push_button.cpp.
.PP
References QwtRichText::boundingRect(), textFormat(), and usedTextFormat().
.PP
Referenced by heightForWidth().
.SS "Qt::TextFormat QwtPushButton::textFormat () const"
.PP
\fBReturns:\fP
.RS 4
The button label's text format 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBQwtPushButton::setTextFormat\fP 
.RE
.PP
Definition at line 277 of file qwt_push_button.cpp.
.PP
Referenced by sizeHint().
.SS "Qt::TextFormat QwtPushButton::usedTextFormat () const\fC [virtual]\fP"
.PP
Find the text format that is used for painting the button label. 
.PP
In case of Qt::AutoText the format is found by evaluating text(), otherwise it is \fBtextFormat()\fP
.PP
\fBReturns:\fP
.RS 4
Text format that is used for painting 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBtextFormat()\fP, \fBsetTextFormat()\fP, QStyleSheet::mightBeRichText() 
.RE
.PP
Definition at line 262 of file qwt_push_button.cpp.
.PP
Referenced by heightForWidth(), sizeHint(), and QwtLegendButton::titleText().

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