File: q3textedit.html

package info (click to toggle)
qt4-x11 4%3A4.8.2%2Bdfsg-11
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 701,696 kB
  • sloc: cpp: 2,686,179; ansic: 375,485; python: 25,859; sh: 19,349; xml: 17,091; perl: 14,765; yacc: 5,383; asm: 5,038; makefile: 1,259; lex: 555; ruby: 526; objc: 347; cs: 112; pascal: 112; php: 54; sed: 34
file content (1323 lines) | stat: -rw-r--r-- 162,766 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
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
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- q3textedit.cpp -->
  <title>Qt 4.8: Q3TextEdit Class Reference</title>
  <link rel="stylesheet" type="text/css" href="style/offline.css" />
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="content"> 
    <a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a>
  </div>
  <div class="breadcrumb toolblock">
    <ul>
      <li class="first"><a href="index.html">Home</a></li>
      <!--  Breadcrumbs go here -->
<li><a href="modules.html">Modules</a></li>
<li>Qt3SupportLight</li>
<li>Q3TextEdit</li>
    </ul>
  </div>
</div>
<div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-types">Public Types</a></li>
<li class="level1"><a href="#properties">Properties</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#public-slots">Public Slots</a></li>
<li class="level1"><a href="#signals">Signals</a></li>
<li class="level1"><a href="#protected-functions">Protected Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
<li class="level2"><a href="#introduction-and-concepts">Introduction and Concepts</a></li>
<li class="level2"><a href="#using-q3textedit-as-a-display-widget">Using Q3TextEdit as a Display Widget</a></li>
<li class="level3"><a href="#read-only-key-bindings">Read-only key bindings</a></li>
<li class="level3"><a href="#using-q3textedit-in-qt-logtext-mode">Using Q3TextEdit in Qt::LogText Mode</a></li>
<li class="level2"><a href="#using-q3textedit-as-an-editor">Using Q3TextEdit as an Editor</a></li>
<li class="level3"><a href="#editing-key-bindings">Editing key bindings</a></li>
</ul>
</div>
<h1 class="title">Q3TextEdit Class Reference</h1>
<!-- $$$Q3TextEdit-brief -->
<p>The Q3TextEdit widget provides a powerful single-page rich text editor. <a href="#details">More...</a></p>
<!-- @@@Q3TextEdit -->
<pre class="cpp"> <span class="preprocessor">#include &lt;Q3TextEdit&gt;</span></pre><p><b>This class is part of the Qt 3 support library.</b> It is provided to keep old source code working. We strongly advise against using it in new code. See <a href="porting4.html#qtextedit">Porting to Qt 4</a> for more information.</p>
<p><b>Inherits: </b><a href="q3scrollview.html">Q3ScrollView</a>.</p>
<p><b>Inherited by: </b><a href="q3multilineedit.html">Q3MultiLineEdit</a>, <a href="q3textbrowser.html">Q3TextBrowser</a>, and <a href="q3textview.html">Q3TextView</a>.</p>
<ul>
<li><a href="q3textedit-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-types"></a>
<h2>Public Types</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> flags </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#AutoFormattingFlag-enum">AutoFormatting</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#AutoFormattingFlag-enum">AutoFormattingFlag</a></b> { AutoNone, AutoBulletList, AutoAll }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#CursorAction-enum">CursorAction</a></b> { MoveBackward, MoveWordBackward, MoveForward, MoveWordForward, ..., MovePgDown }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#KeyboardAction-enum">KeyboardAction</a></b> { ActionBackspace, ActionDelete, ActionReturn, ActionKill, ActionWordBackspace, ActionWordDelete }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#VerticalAlignment-enum">VerticalAlignment</a></b> { AlignNormal, AlignSuperScript, AlignSubScript }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#WordWrap-enum">WordWrap</a></b> { NoWrap, WidgetWidth, FixedPixelWidth, FixedColumnWidth }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#WrapPolicy-enum">WrapPolicy</a></b> { AtWhiteSpace, Anywhere, AtWordBoundary, AtWordOrDocumentBoundary }</td></tr>
</table>
<a name="properties"></a>
<h2>Properties</h2>
<table class="propsummary">
<tr><td class="topAlign"><ul>
<li class="fn"><b><a href="q3textedit.html#autoFormatting-prop">autoFormatting</a></b> : AutoFormattingFlag</li>
<li class="fn"><b><a href="q3textedit.html#documentTitle-prop">documentTitle</a></b> : const QString</li>
<li class="fn"><b><a href="q3textedit.html#hasSelectedText-prop">hasSelectedText</a></b> : const bool</li>
<li class="fn"><b><a href="q3textedit.html#length-prop">length</a></b> : const int</li>
<li class="fn"><b><a href="q3textedit.html#linkUnderline-prop">linkUnderline</a></b> : bool</li>
<li class="fn"><b><a href="q3textedit.html#modified-prop">modified</a></b> : bool</li>
<li class="fn"><b><a href="q3textedit.html#overwriteMode-prop">overwriteMode</a></b> : bool</li>
<li class="fn"><b><a href="q3textedit.html#paper-prop">paper</a></b> : QBrush</li>
<li class="fn"><b><a href="q3textedit.html#readOnly-prop">readOnly</a></b> : bool</li>
<li class="fn"><b><a href="q3textedit.html#selectedText-prop">selectedText</a></b> : const QString</li>
</ul></td><td class="topAlign"><ul>
<li class="fn"><b><a href="q3textedit.html#tabChangesFocus-prop">tabChangesFocus</a></b> : bool</li>
<li class="fn"><b><a href="q3textedit.html#tabStopWidth-prop">tabStopWidth</a></b> : int</li>
<li class="fn"><b><a href="q3textedit.html#text-prop">text</a></b> : QString</li>
<li class="fn"><b><a href="q3textedit.html#textFormat-prop">textFormat</a></b> : Qt::TextFormat</li>
<li class="fn"><b><a href="q3textedit.html#undoDepth-prop">undoDepth</a></b> : int</li>
<li class="fn"><b><a href="q3textedit.html#undoRedoEnabled-prop">undoRedoEnabled</a></b> : bool</li>
<li class="fn"><b><a href="q3textedit.html#wordWrap-prop">wordWrap</a></b> : WordWrap</li>
<li class="fn"><b><a href="q3textedit.html#wrapColumnOrWidth-prop">wrapColumnOrWidth</a></b> : int</li>
<li class="fn"><b><a href="q3textedit.html#wrapPolicy-prop">wrapPolicy</a></b> : WrapPolicy</li>
</ul>
</td></tr>
</table>
<ul>
<li class="fn">10 properties inherited from <a href="q3scrollview.html#properties">Q3ScrollView</a></li>
<li class="fn">2 properties inherited from <a href="q3frame.html#properties">Q3Frame</a></li>
<li class="fn">6 properties inherited from <a href="qframe.html#properties">QFrame</a></li>
<li class="fn">58 properties inherited from <a href="qwidget.html#properties">QWidget</a></li>
<li class="fn">1 property inherited from <a href="qobject.html#properties">QObject</a></li>
</ul>
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#Q3TextEdit">Q3TextEdit</a></b> ( const QString &amp; <i>text</i>, const QString &amp; <i>context</i> = QString(), QWidget * <i>parent</i> = 0, const char * <i>name</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#Q3TextEdit-2">Q3TextEdit</a></b> ( QWidget * <i>parent</i> = 0, const char * <i>name</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#dtor.Q3TextEdit">~Q3TextEdit</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#alignment">alignment</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#anchorAt">anchorAt</a></b> ( const QPoint &amp; <i>pos</i>, Qt::AnchorAttribute <i>attr</i> = Qt::AnchorHref )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> AutoFormatting </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#autoFormatting-prop">autoFormatting</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#bold">bold</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#charAt">charAt</a></b> ( const QPoint &amp; <i>pos</i>, int * <i>para</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QColor </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#color">color</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#context">context</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QFont </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#currentFont">currentFont</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#documentTitle-prop">documentTitle</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#family">family</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#find">find</a></b> ( const QString &amp; <i>expr</i>, bool <i>cs</i>, bool <i>wo</i>, bool <i>forward</i> = true, int * <i>para</i> = 0, int * <i>index</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QFont </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#font">font</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#getCursorPosition">getCursorPosition</a></b> ( int * <i>para</i>, int * <i>index</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#getSelection">getSelection</a></b> ( int * <i>paraFrom</i>, int * <i>indexFrom</i>, int * <i>paraTo</i>, int * <i>indexTo</i>, int <i>selNum</i> = 0 ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#hasSelectedText-prop">hasSelectedText</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#modified-prop">isModified</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#overwriteMode-prop">isOverwriteMode</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#readOnly-prop">isReadOnly</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#isRedoAvailable">isRedoAvailable</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#isUndoAvailable">isUndoAvailable</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#undoRedoEnabled-prop">isUndoRedoEnabled</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#italic">italic</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#length-prop">length</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#lineOfChar">lineOfChar</a></b> ( int <i>para</i>, int <i>index</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#lines">lines</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#linesOfParagraph">linesOfParagraph</a></b> ( int <i>para</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#linkUnderline-prop">linkUnderline</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3MimeSourceFactory * </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#mimeSourceFactory">mimeSourceFactory</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QBrush </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#paper-prop">paper</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#paragraphAt">paragraphAt</a></b> ( const QPoint &amp; <i>pos</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QColor </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#paragraphBackgroundColor">paragraphBackgroundColor</a></b> ( int <i>para</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#paragraphLength">paragraphLength</a></b> ( int <i>para</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRect </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#paragraphRect">paragraphRect</a></b> ( int <i>para</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#paragraphs">paragraphs</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#pointSize">pointSize</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#selectedText-prop">selectedText</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#autoFormatting-prop">setAutoFormatting</a></b> ( AutoFormatting )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3StyleSheet * </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#styleSheet">styleSheet</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3SyntaxHighlighter * </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#syntaxHighlighter">syntaxHighlighter</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#tabChangesFocus-prop">tabChangesFocus</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#tabStopWidth-prop">tabStopWidth</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#text-prop">text</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#text-prop">text</a></b> ( int <i>para</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Qt::TextFormat </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#textFormat-prop">textFormat</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#underline">underline</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#undoDepth-prop">undoDepth</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> VerticalAlignment </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#verticalAlignment">verticalAlignment</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> WordWrap </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#wordWrap-prop">wordWrap</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#wrapColumnOrWidth-prop">wrapColumnOrWidth</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> WrapPolicy </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#wrapPolicy-prop">wrapPolicy</a></b> () const</td></tr>
</table>
<a name="reimplemented-public-functions"></a>
<h2>Reimplemented Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#eventFilter">eventFilter</a></b> ( QObject * <i>o</i>, QEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual int </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#heightForWidth">heightForWidth</a></b> ( int <i>w</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QSize </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#sizeHint">sizeHint</a></b> () const</td></tr>
</table>
<ul>
<li class="fn">49 public functions inherited from <a href="q3scrollview.html#public-functions">Q3ScrollView</a></li>
<li class="fn">4 public functions inherited from <a href="q3frame.html#public-functions">Q3Frame</a></li>
<li class="fn">14 public functions inherited from <a href="qframe.html#public-functions">QFrame</a></li>
<li class="fn">221 public functions inherited from <a href="qwidget.html#public-functions">QWidget</a></li>
<li class="fn">29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
<li class="fn">13 public functions inherited from <a href="qpaintdevice.html#public-functions">QPaintDevice</a></li>
</ul>
<a name="public-slots"></a>
<h2>Public Slots</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#append">append</a></b> ( const QString &amp; <i>text</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#clear">clear</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#clearParagraphBackground">clearParagraphBackground</a></b> ( int <i>para</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#copy">copy</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#cut">cut</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#del">del</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#doKeyboardAction">doKeyboardAction</a></b> ( Q3TextEdit::KeyboardAction <i>action</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#ensureCursorVisible">ensureCursorVisible</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#insert">insert</a></b> ( const QString &amp; <i>text</i>, uint <i>insertionFlags</i> = CheckNewLines | RemoveSelected )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#insert-2">insert</a></b> ( const QString &amp; <i>text</i>, bool <i>indent</i>, bool <i>checkNewLine</i> = true, bool <i>removeSelected</i> = true )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#insertAt">insertAt</a></b> ( const QString &amp; <i>text</i>, int <i>para</i>, int <i>index</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#insertParagraph">insertParagraph</a></b> ( const QString &amp; <i>text</i>, int <i>para</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#moveCursor">moveCursor</a></b> ( Q3TextEdit::CursorAction <i>action</i>, bool <i>select</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#paste">paste</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#pasteSubType">pasteSubType</a></b> ( const QByteArray &amp; <i>subtype</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#placeCursor">placeCursor</a></b> ( const QPoint &amp; <i>pos</i>, Q3TextCursor * <i>c</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#redo">redo</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#removeParagraph">removeParagraph</a></b> ( int <i>para</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#removeSelectedText">removeSelectedText</a></b> ( int <i>selNum</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#removeSelection">removeSelection</a></b> ( int <i>selNum</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#scrollToAnchor">scrollToAnchor</a></b> ( const QString &amp; <i>name</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#scrollToBottom">scrollToBottom</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#selectAll">selectAll</a></b> ( bool <i>select</i> = true )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#setAlignment">setAlignment</a></b> ( int <i>a</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#setBold">setBold</a></b> ( bool <i>b</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#setColor">setColor</a></b> ( const QColor &amp; <i>c</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#setCurrentFont">setCurrentFont</a></b> ( const QFont &amp; <i>f</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#setCursorPosition">setCursorPosition</a></b> ( int <i>para</i>, int <i>index</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#setFamily">setFamily</a></b> ( const QString &amp; <i>fontFamily</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#setItalic">setItalic</a></b> ( bool <i>b</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#linkUnderline-prop">setLinkUnderline</a></b> ( bool )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#setMimeSourceFactory">setMimeSourceFactory</a></b> ( Q3MimeSourceFactory * <i>factory</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#modified-prop">setModified</a></b> ( bool <i>m</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#overwriteMode-prop">setOverwriteMode</a></b> ( bool <i>b</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#paper-prop">setPaper</a></b> ( const QBrush &amp; <i>pap</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#setParagraphBackgroundColor">setParagraphBackgroundColor</a></b> ( int <i>para</i>, const QColor &amp; <i>bg</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#setPointSize">setPointSize</a></b> ( int <i>s</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#readOnly-prop">setReadOnly</a></b> ( bool <i>b</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#setSelection">setSelection</a></b> ( int <i>paraFrom</i>, int <i>indexFrom</i>, int <i>paraTo</i>, int <i>indexTo</i>, int <i>selNum</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#setSelectionAttributes">setSelectionAttributes</a></b> ( int <i>selNum</i>, const QColor &amp; <i>back</i>, bool <i>invertText</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#setStyleSheet">setStyleSheet</a></b> ( Q3StyleSheet * <i>styleSheet</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#tabChangesFocus-prop">setTabChangesFocus</a></b> ( bool <i>b</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#tabStopWidth-prop">setTabStopWidth</a></b> ( int <i>ts</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#text-prop">setText</a></b> ( const QString &amp; <i>txt</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#text-prop">setText</a></b> ( const QString &amp; <i>text</i>, const QString &amp; <i>context</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#textFormat-prop">setTextFormat</a></b> ( Qt::TextFormat <i>f</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#setUnderline">setUnderline</a></b> ( bool <i>b</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#undoDepth-prop">setUndoDepth</a></b> ( int <i>d</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#undoRedoEnabled-prop">setUndoRedoEnabled</a></b> ( bool <i>b</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#setVerticalAlignment">setVerticalAlignment</a></b> ( Q3TextEdit::VerticalAlignment <i>a</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#wordWrap-prop">setWordWrap</a></b> ( Q3TextEdit::WordWrap <i>mode</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#wrapColumnOrWidth-prop">setWrapColumnOrWidth</a></b> ( int )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#wrapPolicy-prop">setWrapPolicy</a></b> ( Q3TextEdit::WrapPolicy <i>policy</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#sync">sync</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#undo">undo</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#zoomIn">zoomIn</a></b> ( int <i>range</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#zoomIn-2">zoomIn</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#zoomOut">zoomOut</a></b> ( int <i>range</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#zoomOut-2">zoomOut</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#zoomTo">zoomTo</a></b> ( int <i>size</i> )</td></tr>
</table>
<ul>
<li class="fn">8 public slots inherited from <a href="q3scrollview.html#public-slots">Q3ScrollView</a></li>
<li class="fn">19 public slots inherited from <a href="qwidget.html#public-slots">QWidget</a></li>
<li class="fn">1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
</ul>
<a name="signals"></a>
<h2>Signals</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#clicked">clicked</a></b> ( int <i>para</i>, int <i>pos</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#copyAvailable">copyAvailable</a></b> ( bool <i>yes</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#currentAlignmentChanged">currentAlignmentChanged</a></b> ( int <i>a</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#currentColorChanged">currentColorChanged</a></b> ( const QColor &amp; <i>c</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#currentFontChanged">currentFontChanged</a></b> ( const QFont &amp; <i>f</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#currentVerticalAlignmentChanged">currentVerticalAlignmentChanged</a></b> ( Q3TextEdit::VerticalAlignment <i>a</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#cursorPositionChanged">cursorPositionChanged</a></b> ( int <i>para</i>, int <i>pos</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#doubleClicked">doubleClicked</a></b> ( int <i>para</i>, int <i>pos</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#modificationChanged">modificationChanged</a></b> ( bool <i>m</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#redoAvailable">redoAvailable</a></b> ( bool <i>yes</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#returnPressed">returnPressed</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#selectionChanged">selectionChanged</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#textChanged">textChanged</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#undoAvailable">undoAvailable</a></b> ( bool <i>yes</i> )</td></tr>
</table>
<ul>
<li class="fn">5 signals inherited from <a href="q3scrollview.html#signals">Q3ScrollView</a></li>
<li class="fn">1 signal inherited from <a href="qwidget.html#signals">QWidget</a></li>
<li class="fn">1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
</ul>
<a name="protected-functions"></a>
<h2>Protected Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual Q3PopupMenu * </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#createPopupMenu">createPopupMenu</a></b> ( const QPoint &amp; <i>pos</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual Q3PopupMenu * </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#createPopupMenu-2">createPopupMenu</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#repaintChanged">repaintChanged</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3TextCursor * </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#textCursor">textCursor</a></b> () const</td></tr>
</table>
<a name="reimplemented-protected-functions"></a>
<h2>Reimplemented Protected Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#changeEvent">changeEvent</a></b> ( QEvent * <i>ev</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#contentsContextMenuEvent">contentsContextMenuEvent</a></b> ( QContextMenuEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#contentsDragEnterEvent">contentsDragEnterEvent</a></b> ( QDragEnterEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#contentsDragLeaveEvent">contentsDragLeaveEvent</a></b> ( QDragLeaveEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#contentsDragMoveEvent">contentsDragMoveEvent</a></b> ( QDragMoveEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#contentsDropEvent">contentsDropEvent</a></b> ( QDropEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#contentsMouseDoubleClickEvent">contentsMouseDoubleClickEvent</a></b> ( QMouseEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#contentsMouseMoveEvent">contentsMouseMoveEvent</a></b> ( QMouseEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#contentsMousePressEvent">contentsMousePressEvent</a></b> ( QMouseEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#contentsMouseReleaseEvent">contentsMouseReleaseEvent</a></b> ( QMouseEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#contentsWheelEvent">contentsWheelEvent</a></b> ( QWheelEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#drawContents">drawContents</a></b> ( QPainter * <i>p</i>, int <i>cx</i>, int <i>cy</i>, int <i>cw</i>, int <i>ch</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#event">event</a></b> ( QEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#focusNextPrevChild">focusNextPrevChild</a></b> ( bool <i>n</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#inputMethodEvent">inputMethodEvent</a></b> ( QInputMethodEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#keyPressEvent">keyPressEvent</a></b> ( QKeyEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#resizeEvent">resizeEvent</a></b> ( QResizeEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3textedit.html#viewportResizeEvent">viewportResizeEvent</a></b> ( QResizeEvent * <i>e</i> )</td></tr>
</table>
<ul>
<li class="fn">26 protected functions inherited from <a href="q3scrollview.html#protected-functions">Q3ScrollView</a></li>
<li class="fn">5 protected functions inherited from <a href="q3frame.html#protected-functions">Q3Frame</a></li>
<li class="fn">3 protected functions inherited from <a href="qframe.html#protected-functions">QFrame</a></li>
<li class="fn">37 protected functions inherited from <a href="qwidget.html#protected-functions">QWidget</a></li>
<li class="fn">8 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
<li class="fn">1 protected function inherited from <a href="qpaintdevice.html#protected-functions">QPaintDevice</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">4 static public members inherited from <a href="qwidget.html#static-public-members">QWidget</a></li>
<li class="fn">7 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
<li class="fn">1 protected slot inherited from <a href="qwidget.html#protected-slots">QWidget</a></li>
</ul>
<a name="details"></a>
<!-- $$$Q3TextEdit-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The Q3TextEdit widget provides a powerful single-page rich text editor.</p>
<a name="introduction-and-concepts"></a>
<h3>Introduction and Concepts</h3>
<p>Q3TextEdit is an advanced WYSIWYG viewer/editor supporting rich text formatting using HTML-style tags. It is optimized to handle large documents and to respond quickly to user input.</p>
<p>Q3TextEdit has four modes of operation:</p>
<table class="generic">
<thead><tr class="qt-style"><th >Mode</th><th >Command</th><th >Notes</th></tr></thead>
<tr valign="top" class="odd"><td >Plain Text Editor</td><td >setTextFormat(<a href="qt.html#TextFormat-enum">Qt::PlainText</a>)</td><td >Set text with <a href="q3textedit.html#text-prop">setText</a>(); <a href="q3textedit.html#text-prop">text</a>() returns plain text. Text attributes (e.g&#x2e; colors) can be set, but plain text is always returned.</td></tr>
<tr valign="top" class="even"><td >Rich Text Editor</td><td >setTextFormat(<a href="qt.html#TextFormat-enum">Qt::RichText</a>)</td><td >Set text with <a href="q3textedit.html#text-prop">setText</a>(); <a href="q3textedit.html#text-prop">text</a>() returns rich text. Rich text editing is fairly limited. You can't set margins or insert images for example (although you can read and correctly display files that have margins set and that include images). This mode is mostly useful for editing small amounts of rich text.</td></tr>
<tr valign="top" class="odd"><td >Text Viewer</td><td >setReadOnly(true)</td><td >Set text with <a href="q3textedit.html#text-prop">setText</a>() or <a href="q3textedit.html#append">append</a>() (which has no undo history so is faster and uses less memory); <a href="q3textedit.html#text-prop">text</a>() returns plain or rich text depending on the <a href="q3textedit.html#textFormat-prop">textFormat</a>(). This mode can correctly display a large subset of HTML tags.</td></tr>
<tr valign="top" class="even"><td >Log Viewer</td><td >setTextFormat(<a href="qt.html#TextFormat-enum">Qt::LogText</a>)</td><td >Append text using <a href="q3textedit.html#append">append</a>(). The widget is set to be read only and rich text support is disabled although a few HTML tags (for color, bold, italic and underline) may be used. (See <a href="#logtextmode">Qt::LogText mode</a> for details.)</td></tr>
</table>
<p>Q3TextEdit can be used as a syntax highlighting editor when used in conjunction with <a href="qsyntaxhighlighter.html">QSyntaxHighlighter</a>.</p>
<p>We recommend that you always call <a href="q3textedit.html#textFormat-prop">setTextFormat</a>() to set the mode you want to use. If you use <a href="qt.html#TextFormat-enum">Qt::AutoText</a> then <a href="q3textedit.html#text-prop">setText</a>() and <a href="q3textedit.html#append">append</a>() will try to determine whether the text they are given is plain text or rich text. If you use <a href="qt.html#TextFormat-enum">Qt::RichText</a> then <a href="q3textedit.html#text-prop">setText</a>() and <a href="q3textedit.html#append">append</a>() will assume that the text they are given is rich text. <a href="q3textedit.html#insert">insert</a>() simply inserts the text it is given.</p>
<p>Q3TextEdit works on paragraphs and characters. A paragraph is a formatted string which is word-wrapped to fit into the width of the widget. By default when reading plain text, one newline signify a paragraph. A document consists of zero or more paragraphs, indexed from 0. Characters are indexed on a per-paragraph basis, also indexed from 0. The words in the paragraph are aligned in accordance with the paragraph's <a href="q3textedit.html#alignment">alignment</a>(). Paragraphs are separated by hard line breaks. Each character within a paragraph has its own attributes, for example, font and color.</p>
<p>The text edit documentation uses the following concepts:</p>
<ul>
<li><i>current format</i> -- this is the format at the current cursor position, <i>and</i> it is the format of the selected text if any.</li>
<li><i>current paragraph</i> -- the paragraph which contains the cursor.</li>
</ul>
<p>Q3TextEdit can display images (using <a href="q3mimesourcefactory.html">Q3MimeSourceFactory</a>), lists and tables. If the text is too large to view within the text edit's viewport, scroll bars will appear. The text edit can load both plain text and HTML files (a subset of HTML 3.2 and 4). The rendering style and the set of valid tags are defined by a <a href="q3textedit.html#styleSheet">styleSheet</a>(). Custom tags can be created and placed in a custom style sheet. Change the style sheet with <a href="q3textedit.html#setStyleSheet">setStyleSheet</a>(); see <a href="q3stylesheet.html">Q3StyleSheet</a> for details. The images identified by image tags are displayed if they can be interpreted using the text edit's <a href="q3mimesourcefactory.html">Q3MimeSourceFactory</a>; see <a href="q3textedit.html#setMimeSourceFactory">setMimeSourceFactory</a>().</p>
<p>If you want a text browser with more navigation use <a href="qtextbrowser.html">QTextBrowser</a>. If you just need to display a small piece of rich text use <a href="qlabel.html">QLabel</a> or <a href="porting4.html#qsimplerichtext">QSimpleRichText</a>.</p>
<p>If you create a new Q3TextEdit, and want to allow the user to edit rich text, call setTextFormat(<a href="qt.html#TextFormat-enum">Qt::RichText</a>) to ensure that the text is treated as rich text. (Rich text uses HTML tags to set text formatting attributes. See <a href="q3stylesheet.html">Q3StyleSheet</a> for information on the HTML tags that are supported.)&#x2e; If you don't call <a href="q3textedit.html#textFormat-prop">setTextFormat</a>() explicitly the text edit will guess from the text itself whether it is rich text or plain text. This means that if the text looks like HTML or XML it will probably be interpreted as rich text, so you should call setTextFormat(<a href="qt.html#TextFormat-enum">Qt::PlainText</a>) to preserve such text.</p>
<p>Note that we do not intend to add a full-featured web browser widget to Qt (because that would easily double Qt's size and only a few applications would benefit from it). The rich text support in Qt is designed to provide a fast, portable and efficient way to add reasonable online help facilities to applications, and to provide a basis for rich text editors.</p>
<a name="using-q3textedit-as-a-display-widget"></a>
<h3>Using Q3TextEdit as a Display Widget</h3>
<p>Q3TextEdit can display a large HTML subset, including tables and images.</p>
<p>The text is set or replaced using <a href="q3textedit.html#text-prop">setText</a>() which deletes any existing text and replaces it with the text passed in the <a href="q3textedit.html#text-prop">setText</a>() call. If you call <a href="q3textedit.html#text-prop">setText</a>() with legacy HTML (with setTextFormat(<a href="qt.html#TextFormat-enum">Qt::RichText</a>) in force), and then call <a href="q3textedit.html#text-prop">text</a>(), the text that is returned may have different markup, but will render the same. Text can be inserted with <a href="q3textedit.html#insert">insert</a>(), <a href="q3textedit.html#paste">paste</a>(), <a href="q3textedit.html#pasteSubType">pasteSubType</a>() and <a href="q3textedit.html#append">append</a>(). Text that is appended does not go into the undo history; this makes <a href="q3textedit.html#append">append</a>() faster and consumes less memory. Text can also be <a href="q3textedit.html#cut">cut</a>(). The entire text is deleted with <a href="q3textedit.html#clear">clear</a>() and the selected text is deleted with <a href="q3textedit.html#removeSelectedText">removeSelectedText</a>(). Selected (marked) text can also be deleted with <a href="q3textedit.html#del">del</a>() (which will delete the character to the right of the cursor if no text is selected).</p>
<p>Loading and saving text is achieved using <a href="q3textedit.html#text-prop">setText</a>() and <a href="q3textedit.html#text-prop">text</a>(), for example:</p>
<pre class="cpp"> <span class="type"><a href="qfile.html">QFile</a></span> file(fileName); <span class="comment">// Read the text from a file</span>
 <span class="keyword">if</span> (file<span class="operator">.</span>open(IO_ReadOnly)) {
     <span class="type"><a href="qtextstream.html">QTextStream</a></span> stream(<span class="operator">&amp;</span>file);
     textEdit<span class="operator">-</span><span class="operator">&gt;</span>setText(stream<span class="operator">.</span>read());
 }

 <span class="type"><a href="qfile.html">QFile</a></span> file(fileName); <span class="comment">// Write the text to a file</span>
 <span class="keyword">if</span> (file<span class="operator">.</span>open(IO_WriteOnly)) {
     <span class="type"><a href="qtextstream.html">QTextStream</a></span> stream(<span class="operator">&amp;</span>file);
     stream <span class="operator">&lt;</span><span class="operator">&lt;</span> textEdit<span class="operator">-</span><span class="operator">&gt;</span>text();
     textEdit<span class="operator">-</span><span class="operator">&gt;</span>setModified(<span class="keyword">false</span>);
 }</pre>
<p>By default the text edit wraps words at whitespace to fit within the text edit widget. The <a href="q3textedit.html#wordWrap-prop">setWordWrap</a>() function is used to specify the kind of word wrap you want, or <tt>NoWrap</tt> if you don't want any wrapping. Call <a href="q3textedit.html#wordWrap-prop">setWordWrap</a>() to set a fixed pixel width <tt>FixedPixelWidth</tt>, or character column (e.g&#x2e; 80 column) <tt>FixedColumnWidth</tt> with the pixels or columns specified with <a href="q3textedit.html#wrapColumnOrWidth-prop">setWrapColumnOrWidth</a>(). If you use word wrap to the widget's width <tt>WidgetWidth</tt>, you can specify whether to break on whitespace or anywhere with <a href="q3textedit.html#wrapPolicy-prop">setWrapPolicy</a>().</p>
<p>The background color is set differently than other widgets, using <a href="q3textedit.html#paper-prop">setPaper</a>(). You specify a brush style which could be a plain color or a complex pixmap.</p>
<p>Hypertext links are automatically underlined; this can be changed with <a href="q3textedit.html#linkUnderline-prop">setLinkUnderline</a>(). The tab stop width is set with <a href="q3textedit.html#tabStopWidth-prop">setTabStopWidth</a>().</p>
<p>The <a href="q3textedit.html#zoomIn">zoomIn</a>() and <a href="q3textedit.html#zoomOut">zoomOut</a>() functions can be used to resize the text by increasing (decreasing for <a href="q3textedit.html#zoomOut">zoomOut</a>()) the point size used. Images are not affected by the zoom functions.</p>
<p>The <a href="q3textedit.html#lines">lines</a>() function returns the number of lines in the text and <a href="q3textedit.html#paragraphs">paragraphs</a>() returns the number of paragraphs. The number of lines within a particular paragraph is returned by <a href="q3textedit.html#linesOfParagraph">linesOfParagraph</a>(). The length of the entire text in characters is returned by <a href="q3textedit.html#length-prop">length</a>().</p>
<p>You can scroll to an anchor in the text, e.g&#x2e; <tt>&lt;a name=&quot;anchor&quot;&gt;</tt> with <a href="q3textedit.html#scrollToAnchor">scrollToAnchor</a>(). The <a href="q3textedit.html#find">find</a>() function can be used to find and select a given string within the text.</p>
<p>A read-only Q3TextEdit provides the same functionality as the (obsolete) <a href="porting4.html#qtextview">QTextView</a>. (<a href="porting4.html#qtextview">QTextView</a> is still supplied for compatibility with old code.)</p>
<a name="read-only-key-bindings"></a>
<h4>Read-only key bindings</h4>
<p>When Q3TextEdit is used read-only the key-bindings are limited to navigation, and text may only be selected with the mouse:</p>
<table class="generic">
<thead><tr class="qt-style"><th >Keypresses</th><th >Action</th></tr></thead>
<tr valign="top" class="odd"><td >Up</td><td >Move one line up</td></tr>
<tr valign="top" class="even"><td >Down</td><td >Move one line down</td></tr>
<tr valign="top" class="odd"><td >Left</td><td >Move one character left</td></tr>
<tr valign="top" class="even"><td >Right</td><td >Move one character right</td></tr>
<tr valign="top" class="odd"><td >PageUp</td><td >Move one (viewport) page up</td></tr>
<tr valign="top" class="even"><td >PageDown</td><td >Move one (viewport) page down</td></tr>
<tr valign="top" class="odd"><td >Home</td><td >Move to the beginning of the text</td></tr>
<tr valign="top" class="even"><td >End</td><td >Move to the end of the text</td></tr>
<tr valign="top" class="odd"><td >Shift+Wheel</td><td >Scroll the page horizontally (the Wheel is the mouse wheel)</td></tr>
<tr valign="top" class="even"><td >Ctrl+Wheel</td><td >Zoom the text</td></tr>
</table>
<p>The text edit may be able to provide some meta-information. For example, the <a href="q3textedit.html#documentTitle-prop">documentTitle</a>() function will return the text from within HTML <tt>&lt;title&gt;</tt> tags.</p>
<p>The text displayed in a text edit has a <i>context</i>. The context is a path which the text edit's <a href="q3mimesourcefactory.html">Q3MimeSourceFactory</a> uses to resolve the locations of files and images. It is passed to the <a href="q3textedit.html#mimeSourceFactory">mimeSourceFactory</a>() when quering data. (See <a href="q3textedit.html#Q3TextEdit">Q3TextEdit</a>() and <a href="q3textedit.html#context">context</a>().)</p>
<a name="logtextmode"></a><a name="using-q3textedit-in-qt-logtext-mode"></a>
<h4>Using Q3TextEdit in Qt::LogText Mode</h4>
<p>Setting the text format to <a href="qt.html#TextFormat-enum">Qt::LogText</a> puts the widget in a special mode which is optimized for very large texts. In this mode editing and rich text support are disabled (the widget is explicitly set to read-only mode). This allows the text to be stored in a different, more memory efficient manner. However, a certain degree of text formatting is supported through the use of formatting tags. A tag is delimited by <tt>&lt;</tt> and <tt>&gt;</tt>. The characters <tt>&lt;</tt>, <tt>&gt;</tt> and <tt>&amp;</tt> are escaped by using <tt>&amp;lt;</tt>, <tt>&amp;gt;</tt> and <tt>&amp;amp;</tt>. A tag pair consists of a left and a right tag (or open/close tags). Left-tags mark the starting point for formatting, while right-tags mark the ending point. A right-tag always start with a <tt>/</tt> before the tag keyword. For example <tt>&lt;b&gt;</tt> and <tt>&lt;/b&gt;</tt> are a tag pair. Tags can be nested, but they have to be closed in the same order as they are opened. For example, <tt>&lt;b&gt;&lt;u&gt;&lt;/u&gt;&lt;/b&gt;</tt> is valid, while <tt>&lt;b&gt;&lt;u&gt;&lt;/b&gt;&lt;/u&gt;</tt> will output an error message.</p>
<p>By using tags it is possible to change the color, bold, italic and underline settings for a piece of text. A color can be specified by using the HTML font tag <tt>&lt;font color=colorname&gt;</tt>. The color name can be one of the color names from the X11 color database, or a RGB hex value (e.g <tt>#00ff00</tt>). Example of valid color tags: <tt>&lt;font color=red&gt;</tt>, <tt>&lt;font color=&quot;light blue&quot;&gt;</tt>,<tt>&lt;font color=&quot;#223344&quot;&gt;</tt>. Bold, italic and underline settings can be specified by the tags <tt>&lt;b&gt;</tt>, <tt>&lt;i&gt;</tt> and <tt>&lt;u&gt;</tt>. Note that a tag does not necessarily have to be closed. A valid example:</p>
<pre class="cpp"> This is <span class="operator">&lt;</span>font color<span class="operator">=</span>red<span class="operator">&gt;</span>red<span class="operator">&lt;</span><span class="operator">/</span>font<span class="operator">&gt;</span> <span class="keyword">while</span> <span class="operator">&lt;</span>b<span class="operator">&gt;</span><span class="keyword">this</span><span class="operator">&lt;</span><span class="operator">/</span>b<span class="operator">&gt;</span> is <span class="operator">&lt;</span>font color<span class="operator">=</span>blue<span class="operator">&gt;</span>blue<span class="operator">&lt;</span><span class="operator">/</span>font<span class="operator">&gt;</span><span class="operator">.</span>
 <span class="operator">&lt;</span>font color<span class="operator">=</span>green<span class="operator">&gt;</span><span class="operator">&lt;</span>font color<span class="operator">=</span>yellow<span class="operator">&gt;</span>Yellow<span class="operator">,</span><span class="operator">&lt;</span><span class="operator">/</span>font<span class="operator">&gt;</span> <span class="keyword">and</span> <span class="operator">&lt;</span>u<span class="operator">&gt;</span>green<span class="operator">&lt;</span><span class="operator">/</span>u<span class="operator">&gt;</span><span class="operator">.</span></pre>
<p>Stylesheets can also be used in <a href="qt.html#TextFormat-enum">Qt::LogText</a> mode. To create and use a custom tag, you could do the following:</p>
<pre class="cpp"> <span class="type">Q3TextEdit</span> <span class="operator">*</span> log <span class="operator">=</span> <span class="keyword">new</span> <span class="type">Q3TextEdit</span>(<span class="keyword">this</span>);
 log<span class="operator">-</span><span class="operator">&gt;</span><a href="q3textedit.html#textFormat-prop">setTextFormat</a>(<span class="type"><a href="qt.html">Qt</a></span><span class="operator">::</span>LogText);
 <span class="type"><a href="q3stylesheetitem.html">Q3StyleSheetItem</a></span> <span class="operator">*</span> item <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="q3stylesheetitem.html">Q3StyleSheetItem</a></span>(log<span class="operator">-</span><span class="operator">&gt;</span>styleSheet()<span class="operator">,</span> <span class="string">&quot;mytag&quot;</span>);
 item<span class="operator">-</span><span class="operator">&gt;</span><a href="q3textedit.html#setColor">setColor</a>(<span class="string">&quot;red&quot;</span>);
 item<span class="operator">-</span><span class="operator">&gt;</span>setFontWeight(<span class="type"><a href="qfont.html">QFont</a></span><span class="operator">::</span>Bold);
 item<span class="operator">-</span><span class="operator">&gt;</span>setFontUnderline(<span class="keyword">true</span>);
 log<span class="operator">-</span><span class="operator">&gt;</span><a href="q3textedit.html#append">append</a>(<span class="string">&quot;This is a &lt;mytag&gt;custom tag&lt;/mytag&gt;!&quot;</span>);</pre>
<p>Note that only the color, bold, underline and italic attributes of a <a href="q3stylesheetitem.html">Q3StyleSheetItem</a> is used in <a href="qt.html#TextFormat-enum">Qt::LogText</a> mode.</p>
<p>Note that you can use setMaxLogLines() to limit the number of lines the widget can hold in <a href="qt.html#TextFormat-enum">Qt::LogText</a> mode.</p>
<p>There are a few things that you need to be aware of when the widget is in this mode:</p>
<ul>
<li>Functions that deal with rich text formatting and cursor movement will not work or return anything valid.</li>
<li>Lines are equivalent to paragraphs.</li>
</ul>
<a name="using-q3textedit-as-an-editor"></a>
<h3>Using Q3TextEdit as an Editor</h3>
<p>All the information about using Q3TextEdit as a display widget also applies here.</p>
<p>The current format's attributes are set with <a href="q3textedit.html#setItalic">setItalic</a>(), <a href="q3textedit.html#setBold">setBold</a>(), <a href="q3textedit.html#setUnderline">setUnderline</a>(), <a href="q3textedit.html#setFamily">setFamily</a>() (font family), <a href="q3textedit.html#setPointSize">setPointSize</a>(), <a href="q3textedit.html#setColor">setColor</a>() and <a href="q3textedit.html#setCurrentFont">setCurrentFont</a>(). The current paragraph's alignment is set with <a href="q3textedit.html#setAlignment">setAlignment</a>().</p>
<p>Use <a href="q3textedit.html#setSelection">setSelection</a>() to select text. The <a href="q3textedit.html#setSelectionAttributes">setSelectionAttributes</a>() function is used to indicate how selected text should be displayed. Use <a href="q3textedit.html#hasSelectedText-prop">hasSelectedText</a>() to find out if any text is selected. The currently selected text's position is available using <a href="q3textedit.html#getSelection">getSelection</a>() and the selected text itself is returned by <a href="q3textedit.html#selectedText-prop">selectedText</a>(). The selection can be copied to the clipboard with <a href="q3textedit.html#copy">copy</a>(), or cut to the clipboard with <a href="q3textedit.html#cut">cut</a>(). It can be deleted with <a href="q3textedit.html#removeSelectedText">removeSelectedText</a>(). The entire text can be selected (or unselected) using <a href="q3textedit.html#selectAll">selectAll</a>(). Q3TextEdit supports multiple selections. Most of the selection functions operate on the default selection, selection 0. If the user presses a non-selecting key, e.g&#x2e; a cursor key without also holding down Shift, all selections are cleared.</p>
<p>Set and get the position of the cursor with <a href="q3textedit.html#setCursorPosition">setCursorPosition</a>() and <a href="q3textedit.html#getCursorPosition">getCursorPosition</a>() respectively. When the cursor is moved, the signals <a href="q3textedit.html#currentFontChanged">currentFontChanged</a>(), <a href="q3textedit.html#currentColorChanged">currentColorChanged</a>() and <a href="q3textedit.html#currentAlignmentChanged">currentAlignmentChanged</a>() are emitted to reflect the font, color and alignment at the new cursor position.</p>
<p>If the text changes, the <a href="q3textedit.html#textChanged">textChanged</a>() signal is emitted, and if the user inserts a new line by pressing Return or Enter, <a href="q3textedit.html#returnPressed">returnPressed</a>() is emitted. The <a href="q3textedit.html#modified-prop">isModified</a>() function will return true if the text has been modified.</p>
<p>Q3TextEdit provides command-based undo and redo. To set the depth of the command history use <a href="q3textedit.html#undoDepth-prop">setUndoDepth</a>() which defaults to 100 steps. To undo or redo the last operation call <a href="q3textedit.html#undo">undo</a>() or <a href="q3textedit.html#redo">redo</a>(). The signals <a href="q3textedit.html#undoAvailable">undoAvailable</a>() and <a href="q3textedit.html#redoAvailable">redoAvailable</a>() indicate whether the undo and redo operations can be executed.</p>
<a name="editing-key-bindings"></a>
<h4>Editing key bindings</h4>
<p>The list of key-bindings which are implemented for editing:</p>
<table class="generic">
<thead><tr class="qt-style"><th >Keypresses</th><th >Action</th></tr></thead>
<tr valign="top" class="odd"><td >Backspace</td><td >Delete the character to the left of the cursor</td></tr>
<tr valign="top" class="even"><td >Delete</td><td >Delete the character to the right of the cursor</td></tr>
<tr valign="top" class="odd"><td >Ctrl+A</td><td >Move the cursor to the beginning of the line</td></tr>
<tr valign="top" class="even"><td >Ctrl+B</td><td >Move the cursor one character left</td></tr>
<tr valign="top" class="odd"><td >Ctrl+C</td><td >Copy the marked text to the clipboard (also Ctrl+Insert under Windows)</td></tr>
<tr valign="top" class="even"><td >Ctrl+D</td><td >Delete the character to the right of the cursor</td></tr>
<tr valign="top" class="odd"><td >Ctrl+E</td><td >Move the cursor to the end of the line</td></tr>
<tr valign="top" class="even"><td >Ctrl+F</td><td >Move the cursor one character right</td></tr>
<tr valign="top" class="odd"><td >Ctrl+H</td><td >Delete the character to the left of the cursor</td></tr>
<tr valign="top" class="even"><td >Ctrl+K</td><td >Delete to end of line</td></tr>
<tr valign="top" class="odd"><td >Ctrl+N</td><td >Move the cursor one line down</td></tr>
<tr valign="top" class="even"><td >Ctrl+P</td><td >Move the cursor one line up</td></tr>
<tr valign="top" class="odd"><td >Ctrl+V</td><td >Paste the clipboard text into line edit (also Shift+Insert under Windows)</td></tr>
<tr valign="top" class="even"><td >Ctrl+X</td><td >Cut the marked text, copy to clipboard (also Shift+Delete under Windows)</td></tr>
<tr valign="top" class="odd"><td >Ctrl+Z</td><td >Undo the last operation</td></tr>
<tr valign="top" class="even"><td >Ctrl+Y</td><td >Redo the last operation</td></tr>
<tr valign="top" class="odd"><td >Left</td><td >Move the cursor one character left</td></tr>
<tr valign="top" class="even"><td >Ctrl+Left</td><td >Move the cursor one word left</td></tr>
<tr valign="top" class="odd"><td >Right</td><td >Move the cursor one character right</td></tr>
<tr valign="top" class="even"><td >Ctrl+Right</td><td >Move the cursor one word right</td></tr>
<tr valign="top" class="odd"><td >Up</td><td >Move the cursor one line up</td></tr>
<tr valign="top" class="even"><td >Ctrl+Qt::Up</td><td >Move the cursor one word up</td></tr>
<tr valign="top" class="odd"><td >DownArrow</td><td >Move the cursor one line down</td></tr>
<tr valign="top" class="even"><td >Ctrl+Down</td><td >Move the cursor one word down</td></tr>
<tr valign="top" class="odd"><td >PageUp</td><td >Move the cursor one page up</td></tr>
<tr valign="top" class="even"><td >PageDown</td><td >Move the cursor one page down</td></tr>
<tr valign="top" class="odd"><td >Home</td><td >Move the cursor to the beginning of the line</td></tr>
<tr valign="top" class="even"><td >Ctrl+Home</td><td >Move the cursor to the beginning of the text</td></tr>
<tr valign="top" class="odd"><td >End</td><td >Move the cursor to the end of the line</td></tr>
<tr valign="top" class="even"><td >Ctrl+End</td><td >Move the cursor to the end of the text</td></tr>
<tr valign="top" class="odd"><td >Shift+Wheel</td><td >Scroll the page horizontally (the Wheel is the mouse wheel)</td></tr>
<tr valign="top" class="even"><td >Ctrl+Wheel</td><td >Zoom the text</td></tr>
</table>
<p>To select (mark) text hold down the Shift key whilst pressing one of the movement keystrokes, for example, <i>Shift+Right</i> will select the character to the right, and <i>Shift+Ctrl+Right</i> will select the word to the right, etc.</p>
<p>By default the text edit widget operates in insert mode so all text that the user enters is inserted into the text edit and any text to the right of the cursor is moved out of the way. The mode can be changed to overwrite, where new text overwrites any text to the right of the cursor, using <a href="q3textedit.html#overwriteMode-prop">setOverwriteMode</a>().</p>
</div>
<!-- @@@Q3TextEdit -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$AutoFormattingFlag$$$AutoNone$$$AutoBulletList$$$AutoAll -->
<h3 class="flags"><a name="AutoFormattingFlag-enum"></a>enum Q3TextEdit::<span class="name">AutoFormattingFlag</span><br/>flags Q3TextEdit::<span class="name">AutoFormatting</span></h3>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>Q3TextEdit::AutoNone</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">Do not perform any automatic formatting</td></tr>
<tr><td class="topAlign"><tt>Q3TextEdit::AutoBulletList</tt></td><td class="topAlign"><tt>0x00000001</tt></td><td class="topAlign">Only automatically format bulletted lists</td></tr>
<tr><td class="topAlign"><tt>Q3TextEdit::AutoAll</tt></td><td class="topAlign"><tt>0xffffffff</tt></td><td class="topAlign">Apply all available autoformatting</td></tr>
</table>
<p>The AutoFormatting type is a typedef for <a href="qflags.html">QFlags</a>&lt;AutoFormattingFlag&gt;. It stores an OR combination of AutoFormattingFlag values.</p>
<!-- @@@AutoFormattingFlag -->
<!-- $$$CursorAction$$$MoveBackward$$$MoveForward$$$MoveWordBackward$$$MoveWordForward$$$MoveUp$$$MoveDown$$$MoveLineStart$$$MoveLineEnd$$$MoveHome$$$MoveEnd$$$MovePgUp$$$MovePgDown -->
<h3 class="fn"><a name="CursorAction-enum"></a>enum Q3TextEdit::<span class="name">CursorAction</span></h3>
<p>This enum is used by <a href="q3textedit.html#moveCursor">moveCursor</a>() to specify in which direction the cursor should be moved:</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>Q3TextEdit::MoveBackward</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">Moves the cursor one character backward</td></tr>
<tr><td class="topAlign"><tt>Q3TextEdit::MoveWordBackward</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">Moves the cursor one word backward</td></tr>
<tr><td class="topAlign"><tt>Q3TextEdit::MoveForward</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">Moves the cursor one character forward</td></tr>
<tr><td class="topAlign"><tt>Q3TextEdit::MoveWordForward</tt></td><td class="topAlign"><tt>3</tt></td><td class="topAlign">Moves the cursor one word forward</td></tr>
<tr><td class="topAlign"><tt>Q3TextEdit::MoveUp</tt></td><td class="topAlign"><tt>4</tt></td><td class="topAlign">Moves the cursor up one line</td></tr>
<tr><td class="topAlign"><tt>Q3TextEdit::MoveDown</tt></td><td class="topAlign"><tt>5</tt></td><td class="topAlign">Moves the cursor down one line</td></tr>
<tr><td class="topAlign"><tt>Q3TextEdit::MoveLineStart</tt></td><td class="topAlign"><tt>6</tt></td><td class="topAlign">Moves the cursor to the beginning of the line</td></tr>
<tr><td class="topAlign"><tt>Q3TextEdit::MoveLineEnd</tt></td><td class="topAlign"><tt>7</tt></td><td class="topAlign">Moves the cursor to the end of the line</td></tr>
<tr><td class="topAlign"><tt>Q3TextEdit::MoveHome</tt></td><td class="topAlign"><tt>8</tt></td><td class="topAlign">Moves the cursor to the beginning of the document</td></tr>
<tr><td class="topAlign"><tt>Q3TextEdit::MoveEnd</tt></td><td class="topAlign"><tt>9</tt></td><td class="topAlign">Moves the cursor to the end of the document</td></tr>
<tr><td class="topAlign"><tt>Q3TextEdit::MovePgUp</tt></td><td class="topAlign"><tt>10</tt></td><td class="topAlign">Moves the cursor one viewport page up</td></tr>
<tr><td class="topAlign"><tt>Q3TextEdit::MovePgDown</tt></td><td class="topAlign"><tt>11</tt></td><td class="topAlign">Moves the cursor one viewport page down</td></tr>
</table>
<!-- @@@CursorAction -->
<!-- $$$KeyboardAction$$$ActionBackspace$$$ActionDelete$$$ActionReturn$$$ActionKill$$$ActionWordBackspace$$$ActionWordDelete -->
<h3 class="fn"><a name="KeyboardAction-enum"></a>enum Q3TextEdit::<span class="name">KeyboardAction</span></h3>
<p>This enum is used by <a href="q3textedit.html#doKeyboardAction">doKeyboardAction</a>() to specify which action should be executed:</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>Q3TextEdit::ActionBackspace</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">Delete the character to the left of the cursor.</td></tr>
<tr><td class="topAlign"><tt>Q3TextEdit::ActionDelete</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">Delete the character to the right of the cursor.</td></tr>
<tr><td class="topAlign"><tt>Q3TextEdit::ActionReturn</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">Split the paragraph at the cursor position.</td></tr>
<tr><td class="topAlign"><tt>Q3TextEdit::ActionKill</tt></td><td class="topAlign"><tt>3</tt></td><td class="topAlign">If the cursor is not at the end of the paragraph, delete the text from the cursor position until the end of the paragraph. If the cursor is at the end of the paragraph, delete the hard line break at the end of the paragraph: this will cause this paragraph to be joined with the following paragraph.</td></tr>
<tr><td class="topAlign"><tt>Q3TextEdit::ActionWordBackspace</tt></td><td class="topAlign"><tt>4</tt></td><td class="topAlign">Delete the word to the left of the cursor position.</td></tr>
<tr><td class="topAlign"><tt>Q3TextEdit::ActionWordDelete</tt></td><td class="topAlign"><tt>5</tt></td><td class="topAlign">Delete the word to the right of the cursor position</td></tr>
</table>
<!-- @@@KeyboardAction -->
<!-- $$$VerticalAlignment$$$AlignNormal$$$AlignSuperScript$$$AlignSubScript -->
<h3 class="fn"><a name="VerticalAlignment-enum"></a>enum Q3TextEdit::<span class="name">VerticalAlignment</span></h3>
<p>This enum is used to set the vertical alignment of the text.</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>Q3TextEdit::AlignNormal</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">Normal alignment</td></tr>
<tr><td class="topAlign"><tt>Q3TextEdit::AlignSuperScript</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">Superscript</td></tr>
<tr><td class="topAlign"><tt>Q3TextEdit::AlignSubScript</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">Subscript</td></tr>
</table>
<!-- @@@VerticalAlignment -->
<!-- $$$WordWrap$$$NoWrap$$$WidgetWidth$$$FixedPixelWidth$$$FixedColumnWidth -->
<h3 class="fn"><a name="WordWrap-enum"></a>enum Q3TextEdit::<span class="name">WordWrap</span></h3>
<p>This enum defines the <a href="q3textedit.html" class="compat">Q3TextEdit</a>'s word wrap modes.</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>Q3TextEdit::NoWrap</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">Do not wrap the text.</td></tr>
<tr><td class="topAlign"><tt>Q3TextEdit::WidgetWidth</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">Wrap the text at the current width of the widget (this is the default). Wrapping is at whitespace by default; this can be changed with <a href="q3textedit.html#wrapPolicy-prop">setWrapPolicy</a>().</td></tr>
<tr><td class="topAlign"><tt>Q3TextEdit::FixedPixelWidth</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">Wrap the text at a fixed number of pixels from the widget's left side. The number of pixels is set with <a href="q3textedit.html#wrapColumnOrWidth-prop">wrapColumnOrWidth</a>().</td></tr>
<tr><td class="topAlign"><tt>Q3TextEdit::FixedColumnWidth</tt></td><td class="topAlign"><tt>3</tt></td><td class="topAlign">Wrap the text at a fixed number of character columns from the widget's left side. The number of characters is set with <a href="q3textedit.html#wrapColumnOrWidth-prop">wrapColumnOrWidth</a>(). This is useful if you need formatted text that can also be displayed gracefully on devices with monospaced fonts, for example a standard VT100 terminal, where you might set <a href="q3textedit.html#wrapColumnOrWidth-prop">wrapColumnOrWidth</a>() to 80.</td></tr>
</table>
<p><b>See also </b><a href="q3textedit.html#wordWrap-prop">setWordWrap</a>() and <a href="q3textedit.html#wordWrap-prop">wordWrap</a>().</p>
<!-- @@@WordWrap -->
<!-- $$$WrapPolicy$$$AtWordBoundary$$$AtWhiteSpace$$$Anywhere$$$AtWordOrDocumentBoundary -->
<h3 class="fn"><a name="WrapPolicy-enum"></a>enum Q3TextEdit::<span class="name">WrapPolicy</span></h3>
<p>This enum defines where text can be wrapped in word wrap mode.</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>Q3TextEdit::AtWhiteSpace</tt></td><td class="topAlign"><tt>AtWordBoundary</tt></td><td class="topAlign">Don't use this deprecated value (it is a synonym for <tt>AtWordBoundary</tt> which you should use instead).</td></tr>
<tr><td class="topAlign"><tt>Q3TextEdit::Anywhere</tt></td><td class="topAlign">?</td><td class="topAlign">Break anywhere, including within words.</td></tr>
<tr><td class="topAlign"><tt>Q3TextEdit::AtWordBoundary</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">Break lines at word boundaries, e.g&#x2e; spaces or newlines</td></tr>
<tr><td class="topAlign"><tt>Q3TextEdit::AtWordOrDocumentBoundary</tt></td><td class="topAlign">?</td><td class="topAlign">Break lines at whitespace, e.g&#x2e; spaces or newlines if possible. Break it anywhere otherwise.</td></tr>
</table>
<p><b>See also </b><a href="q3textedit.html#wrapPolicy-prop">setWrapPolicy</a>().</p>
<!-- @@@WrapPolicy -->
</div>
<div class="prop">
<h2>Property Documentation</h2>
<!-- $$$autoFormatting-prop$$$autoFormatting$$$setAutoFormattingAutoFormatting -->
<h3 class="fn"><a name="autoFormatting-prop"></a><span class="name">autoFormatting</span> : <span class="type"><a href="q3textedit.html#AutoFormattingFlag-enum">AutoFormattingFlag</a></span></h3>
<p>This property holds the enabled set of auto formatting features.</p>
<p>The value can be any combination of the values in the <tt>AutoFormattingFlag</tt> enum. The default is <tt>AutoAll</tt>. Choose <tt>AutoNone</tt> to disable all automatic formatting.</p>
<p>Currently, the only automatic formatting feature provided is <tt>AutoBulletList</tt>; future versions of Qt may offer more.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> AutoFormatting </td><td class="memItemRight bottomAlign"><span class="name"><b>autoFormatting</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setAutoFormatting</b></span> ( AutoFormatting )</td></tr>
</table>
<!-- @@@autoFormatting -->
<!-- $$$documentTitle-prop$$$documentTitle -->
<h3 class="fn"><a name="documentTitle-prop"></a><span class="name">documentTitle</span> : const <span class="type"><a href="qstring.html">QString</a></span></h3>
<p>This property holds the title of the document parsed from the text.</p>
<p>For <a href="qt.html#TextFormat-enum">Qt::PlainText</a> the title will be an empty string. For <tt>Qt::RichText</tt> the title will be the text between the <tt>&lt;title&gt;</tt> tags, if present, otherwise an empty string.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QString </td><td class="memItemRight bottomAlign"><span class="name"><b>documentTitle</b></span> () const</td></tr>
</table>
<!-- @@@documentTitle -->
<!-- $$$hasSelectedText-prop$$$hasSelectedText -->
<h3 class="fn"><a name="hasSelectedText-prop"></a><span class="name">hasSelectedText</span> : const <span class="type">bool</span></h3>
<p>This property holds whether some text is selected in selection 0.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>hasSelectedText</b></span> () const</td></tr>
</table>
<!-- @@@hasSelectedText -->
<!-- $$$length-prop$$$length -->
<h3 class="fn"><a name="length-prop"></a><span class="name">length</span> : const <span class="type">int</span></h3>
<p>This property holds the number of characters in the text.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> int </td><td class="memItemRight bottomAlign"><span class="name"><b>length</b></span> () const</td></tr>
</table>
<!-- @@@length -->
<!-- $$$linkUnderline-prop$$$linkUnderline$$$setLinkUnderlinebool -->
<h3 class="fn"><a name="linkUnderline-prop"></a><span class="name">linkUnderline</span> : <span class="type">bool</span></h3>
<p>This property holds whether hypertext links will be underlined.</p>
<p>If true (the default) hypertext links will be displayed underlined. If false links will not be displayed underlined.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>linkUnderline</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> virtual void </td><td class="memItemRight bottomAlign"><span class="name"><b>setLinkUnderline</b></span> ( bool )</td></tr>
</table>
<!-- @@@linkUnderline -->
<!-- $$$modified-prop$$$isModified$$$setModifiedbool -->
<h3 class="fn"><a name="modified-prop"></a><span class="name">modified</span> : <span class="type">bool</span></h3>
<p>This property holds whether the document has been modified by the user.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>isModified</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> virtual void </td><td class="memItemRight bottomAlign"><span class="name"><b>setModified</b></span> ( bool <i>m</i> )</td></tr>
</table>
<!-- @@@modified -->
<!-- $$$overwriteMode-prop$$$isOverwriteMode$$$setOverwriteModebool -->
<h3 class="fn"><a name="overwriteMode-prop"></a><span class="name">overwriteMode</span> : <span class="type">bool</span></h3>
<p>This property holds the text edit's overwrite mode.</p>
<p>If false (the default) characters entered by the user are inserted with any characters to the right being moved out of the way. If true, the editor is in overwrite mode, i.e&#x2e; characters entered by the user overwrite any characters to the right of the cursor position.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>isOverwriteMode</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> virtual void </td><td class="memItemRight bottomAlign"><span class="name"><b>setOverwriteMode</b></span> ( bool <i>b</i> )</td></tr>
</table>
<!-- @@@overwriteMode -->
<!-- $$$paper-prop$$$paper$$$setPaperconstQBrush& -->
<h3 class="fn"><a name="paper-prop"></a><span class="name">paper</span> : <span class="type"><a href="qbrush.html">QBrush</a></span></h3>
<p>This property holds the background (paper) brush.</p>
<p>The brush that is currently used to draw the background of the text edit. The initial setting is an empty brush.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QBrush </td><td class="memItemRight bottomAlign"><span class="name"><b>paper</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> virtual void </td><td class="memItemRight bottomAlign"><span class="name"><b>setPaper</b></span> ( const QBrush &amp; <i>pap</i> )</td></tr>
</table>
<!-- @@@paper -->
<!-- $$$readOnly-prop$$$isReadOnly$$$setReadOnlybool -->
<h3 class="fn"><a name="readOnly-prop"></a><span class="name">readOnly</span> : <span class="type">bool</span></h3>
<p>This property holds whether the text edit is read-only.</p>
<p>In a read-only text edit the user can only navigate through the text and select text; modifying the text is not possible.</p>
<p>This property's default is false.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>isReadOnly</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> virtual void </td><td class="memItemRight bottomAlign"><span class="name"><b>setReadOnly</b></span> ( bool <i>b</i> )</td></tr>
</table>
<!-- @@@readOnly -->
<!-- $$$selectedText-prop$$$selectedText -->
<h3 class="fn"><a name="selectedText-prop"></a><span class="name">selectedText</span> : const <span class="type"><a href="qstring.html">QString</a></span></h3>
<p>This property holds the selected text (from selection 0) or an empty string if there is no currently selected text (in selection 0).</p>
<p>The text is always returned as <a href="qt.html#TextFormat-enum">Qt::PlainText</a> if the <a href="q3textedit.html#textFormat-prop">textFormat</a>() is <a href="qt.html#TextFormat-enum">Qt::PlainText</a> or <a href="qt.html#TextFormat-enum">Qt::AutoText</a>, otherwise it is returned as HTML.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QString </td><td class="memItemRight bottomAlign"><span class="name"><b>selectedText</b></span> () const</td></tr>
</table>
<p><b>See also </b><a href="q3textedit.html#hasSelectedText-prop">hasSelectedText</a>.</p>
<!-- @@@selectedText -->
<!-- $$$tabChangesFocus-prop$$$tabChangesFocus$$$setTabChangesFocusbool -->
<h3 class="fn"><a name="tabChangesFocus-prop"></a><span class="name">tabChangesFocus</span> : <span class="type">bool</span></h3>
<p>This property holds whether TAB changes focus or is accepted as input.</p>
<p>In some occasions text edits should not allow the user to input tabulators or change indentation using the TAB key, as this breaks the focus chain. The default is false.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>tabChangesFocus</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> virtual void </td><td class="memItemRight bottomAlign"><span class="name"><b>setTabChangesFocus</b></span> ( bool <i>b</i> )</td></tr>
</table>
<!-- @@@tabChangesFocus -->
<!-- $$$tabStopWidth-prop$$$tabStopWidth$$$setTabStopWidthint -->
<h3 class="fn"><a name="tabStopWidth-prop"></a><span class="name">tabStopWidth</span> : <span class="type">int</span></h3>
<p>This property holds the tab stop width in pixels.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> int </td><td class="memItemRight bottomAlign"><span class="name"><b>tabStopWidth</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> virtual void </td><td class="memItemRight bottomAlign"><span class="name"><b>setTabStopWidth</b></span> ( int <i>ts</i> )</td></tr>
</table>
<!-- @@@tabStopWidth -->
<!-- $$$text-prop$$$text$$$textint$$$setTextconstQString&$$$setTextconstQString&constQString& -->
<h3 class="fn"><a name="text-prop"></a><span class="name">text</span> : <span class="type"><a href="qstring.html">QString</a></span></h3>
<p>This property holds the text edit's text.</p>
<p>There is no default text.</p>
<p>On setting, any previous text is deleted.</p>
<p>The text may be interpreted either as plain text or as rich text, depending on the <a href="q3textedit.html#textFormat-prop">textFormat</a>(). The default setting is <a href="qt.html#TextFormat-enum">Qt::AutoText</a>, i.e&#x2e; the text edit auto-detects the format of the text.</p>
<p>For richtext, calling text() on an editable <a href="q3textedit.html" class="compat">Q3TextEdit</a> will cause the text to be regenerated from the textedit. This may mean that the <a href="qstring.html">QString</a> returned may not be exactly the same as the one that was set.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QString </td><td class="memItemRight bottomAlign"><span class="name"><b>text</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> QString </td><td class="memItemRight bottomAlign"><span class="name"><b>text</b></span> ( int <i>para</i> ) const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setText</b></span> ( const QString &amp; <i>txt</i> )</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> virtual void </td><td class="memItemRight bottomAlign"><span class="name"><b>setText</b></span> ( const QString &amp; <i>text</i>, const QString &amp; <i>context</i> )</td></tr>
</table>
<p><b>See also </b><a href="q3textedit.html#textFormat-prop">textFormat</a>.</p>
<!-- @@@text -->
<!-- $$$textFormat-prop$$$textFormat$$$setTextFormatQt::TextFormat -->
<h3 class="fn"><a name="textFormat-prop"></a><span class="name">textFormat</span> : <span class="type"><a href="qt.html#TextFormat-enum">Qt::TextFormat</a></span></h3>
<p>This property holds the text format: rich text, plain text, log text or auto text.</p>
<p>The text format is one of the following:</p>
<ul>
<li><a href="qt.html#TextFormat-enum">Qt::PlainText</a> - all characters, except newlines, are displayed verbatim, including spaces. Whenever a newline appears in the text the text edit inserts a hard line break and begins a new paragraph.</li>
<li><a href="qt.html#TextFormat-enum">Qt::RichText</a> - rich text rendering. The available styles are defined in the default stylesheet <a href="q3stylesheet.html#defaultSheet">Q3StyleSheet::defaultSheet</a>().</li>
<li><a href="qt.html#TextFormat-enum">Qt::LogText</a> - optimized mode for very large texts. Supports a very limited set of formatting tags (color, bold, underline and italic settings).</li>
<li><a href="qt.html#TextFormat-enum">Qt::AutoText</a> - this is the default. The text edit autodetects which rendering style is best, <a href="qt.html#TextFormat-enum">Qt::PlainText</a> or <a href="qt.html#TextFormat-enum">Qt::RichText</a>. This is done by using the <a href="q3stylesheet.html#mightBeRichText">Q3StyleSheet::mightBeRichText</a>() function.</li>
</ul>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> Qt::TextFormat </td><td class="memItemRight bottomAlign"><span class="name"><b>textFormat</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> virtual void </td><td class="memItemRight bottomAlign"><span class="name"><b>setTextFormat</b></span> ( Qt::TextFormat <i>f</i> )</td></tr>
</table>
<!-- @@@textFormat -->
<!-- $$$undoDepth-prop$$$undoDepth$$$setUndoDepthint -->
<h3 class="fn"><a name="undoDepth-prop"></a><span class="name">undoDepth</span> : <span class="type">int</span></h3>
<p>This property holds the depth of the undo history.</p>
<p>The maximum number of steps in the undo/redo history. The default is 100.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> int </td><td class="memItemRight bottomAlign"><span class="name"><b>undoDepth</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> virtual void </td><td class="memItemRight bottomAlign"><span class="name"><b>setUndoDepth</b></span> ( int <i>d</i> )</td></tr>
</table>
<p><b>See also </b><a href="q3textedit.html#undo">undo</a>() and <a href="q3textedit.html#redo">redo</a>().</p>
<!-- @@@undoDepth -->
<!-- $$$undoRedoEnabled-prop$$$isUndoRedoEnabled$$$setUndoRedoEnabledbool -->
<h3 class="fn"><a name="undoRedoEnabled-prop"></a><span class="name">undoRedoEnabled</span> : <span class="type">bool</span></h3>
<p>This property holds whether undo/redo is enabled.</p>
<p>When changing this property, the undo/redo history is cleared.</p>
<p>The default is true.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>isUndoRedoEnabled</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> virtual void </td><td class="memItemRight bottomAlign"><span class="name"><b>setUndoRedoEnabled</b></span> ( bool <i>b</i> )</td></tr>
</table>
<!-- @@@undoRedoEnabled -->
<!-- $$$wordWrap-prop$$$wordWrap$$$setWordWrapQ3TextEdit::WordWrap -->
<h3 class="fn"><a name="wordWrap-prop"></a><span class="name">wordWrap</span> : <span class="type"><a href="q3textedit.html#WordWrap-enum">WordWrap</a></span></h3>
<p>This property holds the word wrap mode.</p>
<p>The default mode is <tt>WidgetWidth</tt> which causes words to be wrapped at the right edge of the text edit. Wrapping occurs at whitespace, keeping whole words intact. If you want wrapping to occur within words use <a href="q3textedit.html#wrapPolicy-prop">setWrapPolicy</a>(). If you set a wrap mode of <tt>FixedPixelWidth</tt> or <tt>FixedColumnWidth</tt> you should also call <a href="q3textedit.html#wrapColumnOrWidth-prop">setWrapColumnOrWidth</a>() with the width you want.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> WordWrap </td><td class="memItemRight bottomAlign"><span class="name"><b>wordWrap</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> virtual void </td><td class="memItemRight bottomAlign"><span class="name"><b>setWordWrap</b></span> ( Q3TextEdit::WordWrap <i>mode</i> )</td></tr>
</table>
<p><b>See also </b><a href="q3textedit.html#WordWrap-enum">WordWrap</a>, <a href="q3textedit.html#wrapColumnOrWidth-prop">wrapColumnOrWidth</a>, and <a href="q3textedit.html#wrapPolicy-prop">wrapPolicy</a>.</p>
<!-- @@@wordWrap -->
<!-- $$$wrapColumnOrWidth-prop$$$wrapColumnOrWidth$$$setWrapColumnOrWidthint -->
<h3 class="fn"><a name="wrapColumnOrWidth-prop"></a><span class="name">wrapColumnOrWidth</span> : <span class="type">int</span></h3>
<p>This property holds the position (in pixels or columns depending on the wrap mode) where text will be wrapped.</p>
<p>If the wrap mode is <tt>FixedPixelWidth</tt>, the value is the number of pixels from the left edge of the text edit at which text should be wrapped. If the wrap mode is <tt>FixedColumnWidth</tt>, the value is the column number (in character columns) from the left edge of the text edit at which text should be wrapped.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> int </td><td class="memItemRight bottomAlign"><span class="name"><b>wrapColumnOrWidth</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> virtual void </td><td class="memItemRight bottomAlign"><span class="name"><b>setWrapColumnOrWidth</b></span> ( int )</td></tr>
</table>
<p><b>See also </b><a href="q3textedit.html#wordWrap-prop">wordWrap</a>.</p>
<!-- @@@wrapColumnOrWidth -->
<!-- $$$wrapPolicy-prop$$$wrapPolicy$$$setWrapPolicyQ3TextEdit::WrapPolicy -->
<h3 class="fn"><a name="wrapPolicy-prop"></a><span class="name">wrapPolicy</span> : <span class="type"><a href="q3textedit.html#WrapPolicy-enum">WrapPolicy</a></span></h3>
<p>This property holds the word wrap policy, at whitespace or anywhere.</p>
<p>Defines where text can be wrapped when word wrap mode is not <tt>NoWrap</tt>. The choices are <tt>AtWordBoundary</tt> (the default), <tt>Anywhere</tt> and <tt>AtWordOrDocumentBoundary</tt></p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> WrapPolicy </td><td class="memItemRight bottomAlign"><span class="name"><b>wrapPolicy</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> virtual void </td><td class="memItemRight bottomAlign"><span class="name"><b>setWrapPolicy</b></span> ( Q3TextEdit::WrapPolicy <i>policy</i> )</td></tr>
</table>
<p><b>See also </b><a href="q3textedit.html#wordWrap-prop">wordWrap</a>.</p>
<!-- @@@wrapPolicy -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$Q3TextEdit[overload1]$$$Q3TextEditconstQString&constQString&QWidget*constchar* -->
<h3 class="fn"><a name="Q3TextEdit"></a>Q3TextEdit::<span class="name">Q3TextEdit</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>text</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>context</i> = QString(), <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>parent</i> = 0, const <span class="type">char</span> * <i>name</i> = 0 )</h3>
<p>Constructs a <a href="q3textedit.html" class="compat">Q3TextEdit</a> called <i>name</i>, with parent <i>parent</i>. The text edit will display the text <i>text</i> using context <i>context</i>.</p>
<p>The <i>context</i> is a path which the text edit's <a href="q3mimesourcefactory.html" class="compat">Q3MimeSourceFactory</a> uses to resolve the locations of files and images. It is passed to the <a href="q3textedit.html#mimeSourceFactory">mimeSourceFactory</a>() when quering data.</p>
<p>For example if the text contains an image tag, <tt>&lt;img src=&quot;image.png&quot;&gt;</tt>, and the context is &quot;path/to/look/in&quot;, the <a href="q3mimesourcefactory.html" class="compat">Q3MimeSourceFactory</a> will try to load the image from &quot;path/to/look/in/image.png&quot;. If the tag was <tt>&lt;img src=&quot;/image.png&quot;&gt;</tt>, the context will not be used (because <a href="q3mimesourcefactory.html" class="compat">Q3MimeSourceFactory</a> recognizes that we have used an absolute path) and will try to load &quot;/image.png&quot;. The context is applied in exactly the same way to <i>hrefs</i>, for example, <tt>&lt;a href=&quot;target.html&quot;&gt;Target&lt;/a&gt;</tt>, would resolve to &quot;path/to/look/in/target.html&quot;.</p>
<!-- @@@Q3TextEdit -->
<!-- $$$Q3TextEdit$$$Q3TextEditQWidget*constchar* -->
<h3 class="fn"><a name="Q3TextEdit-2"></a>Q3TextEdit::<span class="name">Q3TextEdit</span> ( <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>parent</i> = 0, const <span class="type">char</span> * <i>name</i> = 0 )</h3>
<p>Constructs an empty <a href="q3textedit.html" class="compat">Q3TextEdit</a> called <i>name</i>, with parent <i>parent</i>.</p>
<!-- @@@Q3TextEdit -->
<!-- $$$~Q3TextEdit[overload1]$$$~Q3TextEdit -->
<h3 class="fn"><a name="dtor.Q3TextEdit"></a>Q3TextEdit::<span class="name">~Q3TextEdit</span> ()<tt> [virtual]</tt></h3>
<p>Destructor.</p>
<!-- @@@~Q3TextEdit -->
<!-- $$$alignment[overload1]$$$alignment -->
<h3 class="fn"><a name="alignment"></a><span class="type">int</span> Q3TextEdit::<span class="name">alignment</span> () const</h3>
<p>Returns the alignment of the current paragraph.</p>
<p><b>See also </b><a href="q3textedit.html#setAlignment">setAlignment</a>().</p>
<!-- @@@alignment -->
<!-- $$$anchorAt[overload1]$$$anchorAtconstQPoint&Qt::AnchorAttribute -->
<h3 class="fn"><a name="anchorAt"></a><span class="type"><a href="qstring.html">QString</a></span> Q3TextEdit::<span class="name">anchorAt</span> ( const <span class="type"><a href="qpoint.html">QPoint</a></span> &amp; <i>pos</i>, <span class="type"><a href="qt.html#AnchorAttribute-enum">Qt::AnchorAttribute</a></span> <i>attr</i> = Qt::AnchorHref )</h3>
<p>Returns the text for the attribute <i>attr</i> (<a href="qt.html#AnchorAttribute-enum">Qt::AnchorHref</a> by default) if there is an anchor at position <i>pos</i> (in contents coordinates); otherwise returns an empty string.</p>
<!-- @@@anchorAt -->
<!-- $$$append[overload1]$$$appendconstQString& -->
<h3 class="fn"><a name="append"></a><span class="type">void</span> Q3TextEdit::<span class="name">append</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>text</i> )<tt> [virtual slot]</tt></h3>
<p>Appends a new paragraph with <i>text</i> to the end of the text edit. Note that the undo/redo history is cleared by this function, and no undo history is kept for appends which makes them faster than <a href="q3textedit.html#insert">insert</a>()s. If you want to append text which is added to the undo/redo history as well, use <a href="q3textedit.html#insertParagraph">insertParagraph</a>().</p>
<!-- @@@append -->
<!-- $$$bold[overload1]$$$bold -->
<h3 class="fn"><a name="bold"></a><span class="type">bool</span> Q3TextEdit::<span class="name">bold</span> () const</h3>
<p>Returns true if the current format is bold; otherwise returns false.</p>
<p><b>See also </b><a href="q3textedit.html#setBold">setBold</a>().</p>
<!-- @@@bold -->
<!-- $$$changeEvent[overload1]$$$changeEventQEvent* -->
<h3 class="fn"><a name="changeEvent"></a><span class="type">void</span> Q3TextEdit::<span class="name">changeEvent</span> ( <span class="type"><a href="qevent.html">QEvent</a></span> * <i>ev</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#changeEvent">QWidget::changeEvent</a>().</p>
<!-- @@@changeEvent -->
<!-- $$$charAt[overload1]$$$charAtconstQPoint&int* -->
<h3 class="fn"><a name="charAt"></a><span class="type">int</span> Q3TextEdit::<span class="name">charAt</span> ( const <span class="type"><a href="qpoint.html">QPoint</a></span> &amp; <i>pos</i>, <span class="type">int</span> * <i>para</i> ) const</h3>
<p>Returns the index of the character (relative to its paragraph) at position <i>pos</i> (in contents coordinates). If <i>para</i> is not 0, <tt>*</tt><i>para</i> is set to the character's paragraph.</p>
<!-- @@@charAt -->
<!-- $$$clear[overload1]$$$clear -->
<h3 class="fn"><a name="clear"></a><span class="type">void</span> Q3TextEdit::<span class="name">clear</span> ()<tt> [virtual slot]</tt></h3>
<p>Deletes all the text in the text edit.</p>
<p><b>See also </b><a href="q3textedit.html#cut">cut</a>(), <a href="q3textedit.html#removeSelectedText">removeSelectedText</a>(), and <a href="q3textedit.html#text-prop">setText</a>().</p>
<!-- @@@clear -->
<!-- $$$clearParagraphBackground[overload1]$$$clearParagraphBackgroundint -->
<h3 class="fn"><a name="clearParagraphBackground"></a><span class="type">void</span> Q3TextEdit::<span class="name">clearParagraphBackground</span> ( <span class="type">int</span> <i>para</i> )<tt> [virtual slot]</tt></h3>
<p>Clears the background color of the paragraph <i>para</i>, so that the default color is used again.</p>
<!-- @@@clearParagraphBackground -->
<!-- $$$clicked[overload1]$$$clickedintint -->
<h3 class="fn"><a name="clicked"></a><span class="type">void</span> Q3TextEdit::<span class="name">clicked</span> ( <span class="type">int</span> <i>para</i>, <span class="type">int</span> <i>pos</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted when the mouse is clicked on the paragraph <i>para</i> at character position <i>pos</i>.</p>
<p><b>See also </b><a href="q3textedit.html#doubleClicked">doubleClicked</a>().</p>
<!-- @@@clicked -->
<!-- $$$color[overload1]$$$color -->
<h3 class="fn"><a name="color"></a><span class="type"><a href="qcolor.html">QColor</a></span> Q3TextEdit::<span class="name">color</span> () const</h3>
<p>Returns the color of the current format.</p>
<p><b>See also </b><a href="q3textedit.html#setColor">setColor</a>() and <a href="q3textedit.html#paper-prop">setPaper</a>().</p>
<!-- @@@color -->
<!-- $$$contentsContextMenuEvent[overload1]$$$contentsContextMenuEventQContextMenuEvent* -->
<h3 class="fn"><a name="contentsContextMenuEvent"></a><span class="type">void</span> Q3TextEdit::<span class="name">contentsContextMenuEvent</span> ( <span class="type"><a href="qcontextmenuevent.html">QContextMenuEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="q3scrollview.html#contentsContextMenuEvent">Q3ScrollView::contentsContextMenuEvent</a>().</p>
<!-- @@@contentsContextMenuEvent -->
<!-- $$$contentsDragEnterEvent[overload1]$$$contentsDragEnterEventQDragEnterEvent* -->
<h3 class="fn"><a name="contentsDragEnterEvent"></a><span class="type">void</span> Q3TextEdit::<span class="name">contentsDragEnterEvent</span> ( <span class="type"><a href="qdragenterevent.html">QDragEnterEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="q3scrollview.html#contentsDragEnterEvent">Q3ScrollView::contentsDragEnterEvent</a>().</p>
<!-- @@@contentsDragEnterEvent -->
<!-- $$$contentsDragLeaveEvent[overload1]$$$contentsDragLeaveEventQDragLeaveEvent* -->
<h3 class="fn"><a name="contentsDragLeaveEvent"></a><span class="type">void</span> Q3TextEdit::<span class="name">contentsDragLeaveEvent</span> ( <span class="type"><a href="qdragleaveevent.html">QDragLeaveEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="q3scrollview.html#contentsDragLeaveEvent">Q3ScrollView::contentsDragLeaveEvent</a>().</p>
<!-- @@@contentsDragLeaveEvent -->
<!-- $$$contentsDragMoveEvent[overload1]$$$contentsDragMoveEventQDragMoveEvent* -->
<h3 class="fn"><a name="contentsDragMoveEvent"></a><span class="type">void</span> Q3TextEdit::<span class="name">contentsDragMoveEvent</span> ( <span class="type"><a href="qdragmoveevent.html">QDragMoveEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="q3scrollview.html#contentsDragMoveEvent">Q3ScrollView::contentsDragMoveEvent</a>().</p>
<!-- @@@contentsDragMoveEvent -->
<!-- $$$contentsDropEvent[overload1]$$$contentsDropEventQDropEvent* -->
<h3 class="fn"><a name="contentsDropEvent"></a><span class="type">void</span> Q3TextEdit::<span class="name">contentsDropEvent</span> ( <span class="type"><a href="qdropevent.html">QDropEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="q3scrollview.html#contentsDropEvent">Q3ScrollView::contentsDropEvent</a>().</p>
<!-- @@@contentsDropEvent -->
<!-- $$$contentsMouseDoubleClickEvent[overload1]$$$contentsMouseDoubleClickEventQMouseEvent* -->
<h3 class="fn"><a name="contentsMouseDoubleClickEvent"></a><span class="type">void</span> Q3TextEdit::<span class="name">contentsMouseDoubleClickEvent</span> ( <span class="type"><a href="qmouseevent.html">QMouseEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="q3scrollview.html#contentsMouseDoubleClickEvent">Q3ScrollView::contentsMouseDoubleClickEvent</a>().</p>
<!-- @@@contentsMouseDoubleClickEvent -->
<!-- $$$contentsMouseMoveEvent[overload1]$$$contentsMouseMoveEventQMouseEvent* -->
<h3 class="fn"><a name="contentsMouseMoveEvent"></a><span class="type">void</span> Q3TextEdit::<span class="name">contentsMouseMoveEvent</span> ( <span class="type"><a href="qmouseevent.html">QMouseEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="q3scrollview.html#contentsMouseMoveEvent">Q3ScrollView::contentsMouseMoveEvent</a>().</p>
<!-- @@@contentsMouseMoveEvent -->
<!-- $$$contentsMousePressEvent[overload1]$$$contentsMousePressEventQMouseEvent* -->
<h3 class="fn"><a name="contentsMousePressEvent"></a><span class="type">void</span> Q3TextEdit::<span class="name">contentsMousePressEvent</span> ( <span class="type"><a href="qmouseevent.html">QMouseEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="q3scrollview.html#contentsMousePressEvent">Q3ScrollView::contentsMousePressEvent</a>().</p>
<!-- @@@contentsMousePressEvent -->
<!-- $$$contentsMouseReleaseEvent[overload1]$$$contentsMouseReleaseEventQMouseEvent* -->
<h3 class="fn"><a name="contentsMouseReleaseEvent"></a><span class="type">void</span> Q3TextEdit::<span class="name">contentsMouseReleaseEvent</span> ( <span class="type"><a href="qmouseevent.html">QMouseEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="q3scrollview.html#contentsMouseReleaseEvent">Q3ScrollView::contentsMouseReleaseEvent</a>().</p>
<!-- @@@contentsMouseReleaseEvent -->
<!-- $$$contentsWheelEvent[overload1]$$$contentsWheelEventQWheelEvent* -->
<h3 class="fn"><a name="contentsWheelEvent"></a><span class="type">void</span> Q3TextEdit::<span class="name">contentsWheelEvent</span> ( <span class="type"><a href="qwheelevent.html">QWheelEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="q3scrollview.html#contentsWheelEvent">Q3ScrollView::contentsWheelEvent</a>().</p>
<!-- @@@contentsWheelEvent -->
<!-- $$$context[overload1]$$$context -->
<h3 class="fn"><a name="context"></a><span class="type"><a href="qstring.html">QString</a></span> Q3TextEdit::<span class="name">context</span> () const</h3>
<p>Returns the context of the text edit. The context is a path which the text edit's <a href="q3mimesourcefactory.html" class="compat">Q3MimeSourceFactory</a> uses to resolve the locations of files and images.</p>
<p><b>See also </b><a href="q3textedit.html#text-prop">text</a>.</p>
<!-- @@@context -->
<!-- $$$copy[overload1]$$$copy -->
<h3 class="fn"><a name="copy"></a><span class="type">void</span> Q3TextEdit::<span class="name">copy</span> ()<tt> [virtual slot]</tt></h3>
<p>Copies any selected text (from selection 0) to the clipboard.</p>
<p><b>See also </b><a href="q3textedit.html#hasSelectedText-prop">hasSelectedText</a>() and <a href="q3textedit.html#copyAvailable">copyAvailable</a>().</p>
<!-- @@@copy -->
<!-- $$$copyAvailable[overload1]$$$copyAvailablebool -->
<h3 class="fn"><a name="copyAvailable"></a><span class="type">void</span> Q3TextEdit::<span class="name">copyAvailable</span> ( <span class="type">bool</span> <i>yes</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted when text is selected or de-selected in the text edit.</p>
<p>When text is selected this signal will be emitted with <i>yes</i> set to true. If no text has been selected or if the selected text is de-selected this signal is emitted with <i>yes</i> set to false.</p>
<p>If <i>yes</i> is true then <a href="q3textedit.html#copy">copy</a>() can be used to copy the selection to the clipboard. If <i>yes</i> is false then <a href="q3textedit.html#copy">copy</a>() does nothing.</p>
<p><b>See also </b><a href="q3textedit.html#selectionChanged">selectionChanged</a>().</p>
<!-- @@@copyAvailable -->
<!-- $$$createPopupMenu[overload1]$$$createPopupMenuconstQPoint& -->
<h3 class="fn"><a name="createPopupMenu"></a><span class="type"><a href="q3popupmenu.html">Q3PopupMenu</a></span> * Q3TextEdit::<span class="name">createPopupMenu</span> ( const <span class="type"><a href="qpoint.html">QPoint</a></span> &amp; <i>pos</i> )<tt> [virtual protected]</tt></h3>
<p>This function is called to create a right mouse button popup menu at the document position <i>pos</i>. If you want to create a custom popup menu, reimplement this function and return the created popup menu. Ownership of the popup menu is transferred to the caller.</p>
<p><b>Warning:</b> The <a href="porting4.html#qpopupmenu">QPopupMenu</a> ID values 0-7 are reserved, and they map to the standard operations. When inserting items into your custom popup menu, be sure to specify ID values larger than 7.</p>
<!-- @@@createPopupMenu -->
<!-- $$$createPopupMenu$$$createPopupMenu -->
<h3 class="fn"><a name="createPopupMenu-2"></a><span class="type"><a href="q3popupmenu.html">Q3PopupMenu</a></span> * Q3TextEdit::<span class="name">createPopupMenu</span> ()<tt> [virtual protected]</tt></h3>
<p>This is an overloaded function.</p>
<p>This function is called to create a right mouse button popup menu. If you want to create a custom popup menu, reimplement this function and return the created popup menu. Ownership of the popup menu is transferred to the caller.</p>
<p>This function is only called if createPopupMenu(const <a href="qpoint.html">QPoint</a> &amp;) returns 0.</p>
<!-- @@@createPopupMenu -->
<!-- $$$currentAlignmentChanged[overload1]$$$currentAlignmentChangedint -->
<h3 class="fn"><a name="currentAlignmentChanged"></a><span class="type">void</span> Q3TextEdit::<span class="name">currentAlignmentChanged</span> ( <span class="type">int</span> <i>a</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted if the alignment of the current paragraph has changed.</p>
<p>The new alignment is <i>a</i>.</p>
<p><b>See also </b><a href="q3textedit.html#setAlignment">setAlignment</a>().</p>
<!-- @@@currentAlignmentChanged -->
<!-- $$$currentColorChanged[overload1]$$$currentColorChangedconstQColor& -->
<h3 class="fn"><a name="currentColorChanged"></a><span class="type">void</span> Q3TextEdit::<span class="name">currentColorChanged</span> ( const <span class="type"><a href="qcolor.html">QColor</a></span> &amp; <i>c</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted if the color of the current format has changed.</p>
<p>The new color is <i>c</i>.</p>
<p><b>See also </b><a href="q3textedit.html#setColor">setColor</a>().</p>
<!-- @@@currentColorChanged -->
<!-- $$$currentFont[overload1]$$$currentFont -->
<h3 class="fn"><a name="currentFont"></a><span class="type"><a href="qfont.html">QFont</a></span> Q3TextEdit::<span class="name">currentFont</span> () const</h3>
<p>Returns the font of the current format.</p>
<p><b>See also </b><a href="q3textedit.html#setCurrentFont">setCurrentFont</a>(), <a href="q3textedit.html#setFamily">setFamily</a>(), and <a href="q3textedit.html#setPointSize">setPointSize</a>().</p>
<!-- @@@currentFont -->
<!-- $$$currentFontChanged[overload1]$$$currentFontChangedconstQFont& -->
<h3 class="fn"><a name="currentFontChanged"></a><span class="type">void</span> Q3TextEdit::<span class="name">currentFontChanged</span> ( const <span class="type"><a href="qfont.html">QFont</a></span> &amp; <i>f</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted if the font of the current format has changed.</p>
<p>The new font is <i>f</i>.</p>
<p><b>See also </b><a href="q3textedit.html#setCurrentFont">setCurrentFont</a>().</p>
<!-- @@@currentFontChanged -->
<!-- $$$currentVerticalAlignmentChanged[overload1]$$$currentVerticalAlignmentChangedQ3TextEdit::VerticalAlignment -->
<h3 class="fn"><a name="currentVerticalAlignmentChanged"></a><span class="type">void</span> Q3TextEdit::<span class="name">currentVerticalAlignmentChanged</span> ( <span class="type"><a href="q3textedit.html#VerticalAlignment-enum">Q3TextEdit::VerticalAlignment</a></span> <i>a</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted if the vertical alignment of the current format has changed.</p>
<p>The new vertical alignment is <i>a</i>.</p>
<!-- @@@currentVerticalAlignmentChanged -->
<!-- $$$cursorPositionChanged[overload1]$$$cursorPositionChangedintint -->
<h3 class="fn"><a name="cursorPositionChanged"></a><span class="type">void</span> Q3TextEdit::<span class="name">cursorPositionChanged</span> ( <span class="type">int</span> <i>para</i>, <span class="type">int</span> <i>pos</i> )<tt> [signal]</tt></h3>
<p>This is an overloaded function.</p>
<p>This signal is emitted if the position of the cursor has changed. <i>para</i> contains the paragraph index and <i>pos</i> contains the character position within the paragraph.</p>
<p><b>See also </b><a href="q3textedit.html#setCursorPosition">setCursorPosition</a>().</p>
<!-- @@@cursorPositionChanged -->
<!-- $$$cut[overload1]$$$cut -->
<h3 class="fn"><a name="cut"></a><span class="type">void</span> Q3TextEdit::<span class="name">cut</span> ()<tt> [virtual slot]</tt></h3>
<p>Copies the selected text (from selection 0) to the clipboard and deletes it from the text edit.</p>
<p>If there is no selected text (in selection 0) nothing happens.</p>
<p><b>See also </b><a href="q3textedit.html#copy">Q3TextEdit::copy</a>(), <a href="q3textedit.html#paste">paste</a>(), and <a href="q3textedit.html#pasteSubType">pasteSubType</a>().</p>
<!-- @@@cut -->
<!-- $$$del[overload1]$$$del -->
<h3 class="fn"><a name="del"></a><span class="type">void</span> Q3TextEdit::<span class="name">del</span> ()<tt> [virtual slot]</tt></h3>
<p>If there is some selected text (in selection 0) it is deleted. If there is no selected text (in selection 0) the character to the right of the text cursor is deleted.</p>
<p><b>See also </b><a href="q3textedit.html#removeSelectedText">removeSelectedText</a>() and <a href="q3textedit.html#cut">cut</a>().</p>
<!-- @@@del -->
<!-- $$$doKeyboardAction[overload1]$$$doKeyboardActionQ3TextEdit::KeyboardAction -->
<h3 class="fn"><a name="doKeyboardAction"></a><span class="type">void</span> Q3TextEdit::<span class="name">doKeyboardAction</span> ( <span class="type"><a href="q3textedit.html#KeyboardAction-enum">Q3TextEdit::KeyboardAction</a></span> <i>action</i> )<tt> [virtual slot]</tt></h3>
<p>Executes keyboard action <i>action</i>. This is normally called by a key event handler.</p>
<!-- @@@doKeyboardAction -->
<!-- $$$doubleClicked[overload1]$$$doubleClickedintint -->
<h3 class="fn"><a name="doubleClicked"></a><span class="type">void</span> Q3TextEdit::<span class="name">doubleClicked</span> ( <span class="type">int</span> <i>para</i>, <span class="type">int</span> <i>pos</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted when the mouse is double-clicked on the paragraph <i>para</i> at character position <i>pos</i>.</p>
<p><b>See also </b><a href="q3textedit.html#clicked">clicked</a>().</p>
<!-- @@@doubleClicked -->
<!-- $$$drawContents[overload1]$$$drawContentsQPainter*intintintint -->
<h3 class="fn"><a name="drawContents"></a><span class="type">void</span> Q3TextEdit::<span class="name">drawContents</span> ( <span class="type"><a href="qpainter.html">QPainter</a></span> * <i>p</i>, <span class="type">int</span> <i>cx</i>, <span class="type">int</span> <i>cy</i>, <span class="type">int</span> <i>cw</i>, <span class="type">int</span> <i>ch</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="q3scrollview.html#drawContents">Q3ScrollView::drawContents</a>().</p>
<!-- @@@drawContents -->
<!-- $$$ensureCursorVisible[overload1]$$$ensureCursorVisible -->
<h3 class="fn"><a name="ensureCursorVisible"></a><span class="type">void</span> Q3TextEdit::<span class="name">ensureCursorVisible</span> ()<tt> [virtual slot]</tt></h3>
<p>Ensures that the cursor is visible by scrolling the text edit if necessary.</p>
<p><b>See also </b><a href="q3textedit.html#setCursorPosition">setCursorPosition</a>().</p>
<!-- @@@ensureCursorVisible -->
<!-- $$$event[overload1]$$$eventQEvent* -->
<h3 class="fn"><a name="event"></a><span class="type">bool</span> Q3TextEdit::<span class="name">event</span> ( <span class="type"><a href="qevent.html">QEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qobject.html#event">QObject::event</a>().</p>
<!-- @@@event -->
<!-- $$$eventFilter[overload1]$$$eventFilterQObject*QEvent* -->
<h3 class="fn"><a name="eventFilter"></a><span class="type">bool</span> Q3TextEdit::<span class="name">eventFilter</span> ( <span class="type"><a href="qobject.html">QObject</a></span> * <i>o</i>, <span class="type"><a href="qevent.html">QEvent</a></span> * <i>e</i> )<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qobject.html#eventFilter">QObject::eventFilter</a>().</p>
<!-- @@@eventFilter -->
<!-- $$$family[overload1]$$$family -->
<h3 class="fn"><a name="family"></a><span class="type"><a href="qstring.html">QString</a></span> Q3TextEdit::<span class="name">family</span> () const</h3>
<p>Returns the font family of the current format.</p>
<p><b>See also </b><a href="q3textedit.html#setFamily">setFamily</a>(), <a href="q3textedit.html#setCurrentFont">setCurrentFont</a>(), and <a href="q3textedit.html#setPointSize">setPointSize</a>().</p>
<!-- @@@family -->
<!-- $$$find[overload1]$$$findconstQString&boolboolboolint*int* -->
<h3 class="fn"><a name="find"></a><span class="type">bool</span> Q3TextEdit::<span class="name">find</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>expr</i>, <span class="type">bool</span> <i>cs</i>, <span class="type">bool</span> <i>wo</i>, <span class="type">bool</span> <i>forward</i> = true, <span class="type">int</span> * <i>para</i> = 0, <span class="type">int</span> * <i>index</i> = 0 )<tt> [virtual]</tt></h3>
<p>Finds the next occurrence of the string, <i>expr</i>. Returns true if <i>expr</i> was found; otherwise returns false.</p>
<p>If <i>para</i> and <i>index</i> are both 0 the search begins from the current cursor position. If <i>para</i> and <i>index</i> are both not 0, the search begins from the <tt>*</tt><i>index</i> character position in the <tt>*</tt><i>para</i> paragraph.</p>
<p>If <i>cs</i> is true the search is case sensitive, otherwise it is case insensitive. If <i>wo</i> is true the search looks for whole word matches only; otherwise it searches for any matching text. If <i>forward</i> is true (the default) the search works forward from the starting position to the end of the text, otherwise it works backwards to the beginning of the text.</p>
<p>If <i>expr</i> is found the function returns true. If <i>index</i> and <i>para</i> are not 0, the number of the paragraph in which the first character of the match was found is put into <tt>*</tt><i>para</i>, and the index position of that character within the paragraph is put into <tt>*</tt><i>index</i>.</p>
<p>If <i>expr</i> is not found the function returns false. If <i>index</i> and <i>para</i> are not 0 and <i>expr</i> is not found, <tt>*</tt><i>index</i> and <tt>*</tt><i>para</i> are undefined.</p>
<p>Please note that this function will make the next occurrence of the string (if found) the current selection, and will thus modify the cursor position.</p>
<p>Using the <i>para</i> and <i>index</i> parameters will not work correctly in case the document contains tables.</p>
<!-- @@@find -->
<!-- $$$focusNextPrevChild[overload1]$$$focusNextPrevChildbool -->
<h3 class="fn"><a name="focusNextPrevChild"></a><span class="type">bool</span> Q3TextEdit::<span class="name">focusNextPrevChild</span> ( <span class="type">bool</span> <i>n</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#focusNextPrevChild">QWidget::focusNextPrevChild</a>().</p>
<p>Reimplemented to allow tabbing through links. If <i>n</i> is true the tab moves the focus to the next child; if <i>n</i> is false the tab moves the focus to the previous child. Returns true if the focus was moved; otherwise returns false.</p>
<!-- @@@focusNextPrevChild -->
<!-- $$$font[overload1]$$$font -->
<h3 class="fn"><a name="font"></a><span class="type"><a href="qfont.html">QFont</a></span> Q3TextEdit::<span class="name">font</span> () const</h3>
<p>Returns <a href="qwidget.html#font-prop">Q3ScrollView::font</a>()</p>
<p><b>Warning:</b> In previous versions this function returned the font of the current format. This lead to confusion. Please use <a href="q3textedit.html#currentFont">currentFont</a>() instead.</p>
<!-- @@@font -->
<!-- $$$getCursorPosition[overload1]$$$getCursorPositionint*int* -->
<h3 class="fn"><a name="getCursorPosition"></a><span class="type">void</span> Q3TextEdit::<span class="name">getCursorPosition</span> ( <span class="type">int</span> * <i>para</i>, <span class="type">int</span> * <i>index</i> ) const</h3>
<p>This function sets the <tt>*</tt><i>para</i> and <tt>*</tt><i>index</i> parameters to the current cursor position. <i>para</i> and <i>index</i> must not be 0.</p>
<p><b>See also </b><a href="q3textedit.html#setCursorPosition">setCursorPosition</a>().</p>
<!-- @@@getCursorPosition -->
<!-- $$$getSelection[overload1]$$$getSelectionint*int*int*int*int -->
<h3 class="fn"><a name="getSelection"></a><span class="type">void</span> Q3TextEdit::<span class="name">getSelection</span> ( <span class="type">int</span> * <i>paraFrom</i>, <span class="type">int</span> * <i>indexFrom</i>, <span class="type">int</span> * <i>paraTo</i>, <span class="type">int</span> * <i>indexTo</i>, <span class="type">int</span> <i>selNum</i> = 0 ) const</h3>
<p>If there is a selection, <tt>*</tt><i>paraFrom</i> is set to the number of the paragraph in which the selection begins and <tt>*</tt><i>paraTo</i> is set to the number of the paragraph in which the selection ends. (They could be the same.) <tt>*</tt><i>indexFrom</i> is set to the index at which the selection begins within <tt>*</tt><i>paraFrom</i>, and <tt>*</tt><i>indexTo</i> is set to the index at which the selection ends within <tt>*</tt><i>paraTo</i>.</p>
<p>If there is no selection, <tt>*</tt><i>paraFrom</i>, <tt>*</tt><i>indexFrom</i>, <tt>*</tt><i>paraTo</i> and <tt>*</tt><i>indexTo</i> are all set to -1.</p>
<p>If <i>paraFrom</i>, <i>indexFrom</i>, <i>paraTo</i> or <i>indexTo</i> is 0 this function does nothing.</p>
<p>The <i>selNum</i> is the number of the selection (multiple selections are supported). It defaults to 0 (the default selection).</p>
<p><b>See also </b><a href="q3textedit.html#setSelection">setSelection</a>() and <a href="q3textedit.html#selectedText-prop">selectedText</a>.</p>
<!-- @@@getSelection -->
<!-- $$$heightForWidth[overload1]$$$heightForWidthint -->
<h3 class="fn"><a name="heightForWidth"></a><span class="type">int</span> Q3TextEdit::<span class="name">heightForWidth</span> ( <span class="type">int</span> <i>w</i> ) const<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#heightForWidth">QWidget::heightForWidth</a>().</p>
<p>Returns how many pixels high the text edit needs to be to display all the text if the text edit is <i>w</i> pixels wide.</p>
<!-- @@@heightForWidth -->
<!-- $$$inputMethodEvent[overload1]$$$inputMethodEventQInputMethodEvent* -->
<h3 class="fn"><a name="inputMethodEvent"></a><span class="type">void</span> Q3TextEdit::<span class="name">inputMethodEvent</span> ( <span class="type"><a href="qinputmethodevent.html">QInputMethodEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#inputMethodEvent">QWidget::inputMethodEvent</a>().</p>
<!-- @@@inputMethodEvent -->
<!-- $$$insert[overload1]$$$insertconstQString&uint -->
<h3 class="fn"><a name="insert"></a><span class="type">void</span> Q3TextEdit::<span class="name">insert</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>text</i>, <span class="type"><a href="qtglobal.html#uint-typedef">uint</a></span> <i>insertionFlags</i> = CheckNewLines | RemoveSelected )<tt> [virtual slot]</tt></h3>
<p>Inserts <i>text</i> at the current cursor position.</p>
<p>The <i>insertionFlags</i> define how the text is inserted. If <tt>RedoIndentation</tt> is set, the paragraph is re-indented. If <tt>CheckNewLines</tt> is set, newline characters in <i>text</i> result in hard line breaks (i.e&#x2e; new paragraphs). If <tt>checkNewLine</tt> is not set, the behavior of the editor is undefined if the <i>text</i> contains newlines. (It is not possible to change <a href="q3textedit.html" class="compat">Q3TextEdit</a>'s newline handling behavior, but you can use <a href="qstring.html#replace">QString::replace</a>() to preprocess text before inserting it.) If <tt>RemoveSelected</tt> is set, any selected text (in selection 0) is removed before the text is inserted.</p>
<p>The default flags are <tt>CheckNewLines</tt> | <tt>RemoveSelected</tt>.</p>
<p>If the widget is in <a href="qt.html#TextFormat-enum">Qt::LogText</a> mode this function will do nothing.</p>
<p><b>See also </b><a href="q3textedit.html#paste">paste</a>() and <a href="q3textedit.html#pasteSubType">pasteSubType</a>().</p>
<!-- @@@insert -->
<!-- $$$insert$$$insertconstQString&boolboolbool -->
<h3 class="fn"><a name="insert-2"></a><span class="type">void</span> Q3TextEdit::<span class="name">insert</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>text</i>, <span class="type">bool</span> <i>indent</i>, <span class="type">bool</span> <i>checkNewLine</i> = true, <span class="type">bool</span> <i>removeSelected</i> = true )<tt> [virtual slot]</tt></h3>
<p>Inserts the given <i>text</i>. If <i>indent</i> is true the paragraph that contains the text is reindented; if <i>checkNewLine</i> is true the <i>text</i> is checked for newlines and relaid out. If <i>removeSelected</i> is true and there is a selection, the insertion replaces the selected text.</p>
<!-- @@@insert -->
<!-- $$$insertAt[overload1]$$$insertAtconstQString&intint -->
<h3 class="fn"><a name="insertAt"></a><span class="type">void</span> Q3TextEdit::<span class="name">insertAt</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>text</i>, <span class="type">int</span> <i>para</i>, <span class="type">int</span> <i>index</i> )<tt> [virtual slot]</tt></h3>
<p>Inserts <i>text</i> in the paragraph <i>para</i> at position <i>index</i>.</p>
<!-- @@@insertAt -->
<!-- $$$insertParagraph[overload1]$$$insertParagraphconstQString&int -->
<h3 class="fn"><a name="insertParagraph"></a><span class="type">void</span> Q3TextEdit::<span class="name">insertParagraph</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>text</i>, <span class="type">int</span> <i>para</i> )<tt> [virtual slot]</tt></h3>
<p>Inserts <i>text</i> as a new paragraph at position <i>para</i>. If <i>para</i> is -1, the text is appended. Use <a href="q3textedit.html#append">append</a>() if the append operation is performance critical.</p>
<!-- @@@insertParagraph -->
<!-- $$$isRedoAvailable[overload1]$$$isRedoAvailable -->
<h3 class="fn"><a name="isRedoAvailable"></a><span class="type">bool</span> Q3TextEdit::<span class="name">isRedoAvailable</span> () const</h3>
<p>Returns true if redo is available; otherwise returns false.</p>
<!-- @@@isRedoAvailable -->
<!-- $$$isUndoAvailable[overload1]$$$isUndoAvailable -->
<h3 class="fn"><a name="isUndoAvailable"></a><span class="type">bool</span> Q3TextEdit::<span class="name">isUndoAvailable</span> () const</h3>
<p>Returns true if undo is available; otherwise returns false.</p>
<!-- @@@isUndoAvailable -->
<!-- $$$italic[overload1]$$$italic -->
<h3 class="fn"><a name="italic"></a><span class="type">bool</span> Q3TextEdit::<span class="name">italic</span> () const</h3>
<p>Returns true if the current format is italic; otherwise returns false.</p>
<p><b>See also </b><a href="q3textedit.html#setItalic">setItalic</a>().</p>
<!-- @@@italic -->
<!-- $$$keyPressEvent[overload1]$$$keyPressEventQKeyEvent* -->
<h3 class="fn"><a name="keyPressEvent"></a><span class="type">void</span> Q3TextEdit::<span class="name">keyPressEvent</span> ( <span class="type"><a href="qkeyevent.html">QKeyEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#keyPressEvent">QWidget::keyPressEvent</a>().</p>
<p>Processes the key event, <i>e</i>. By default key events are used to provide keyboard navigation and text editing.</p>
<!-- @@@keyPressEvent -->
<!-- $$$lineOfChar[overload1]$$$lineOfCharintint -->
<h3 class="fn"><a name="lineOfChar"></a><span class="type">int</span> Q3TextEdit::<span class="name">lineOfChar</span> ( <span class="type">int</span> <i>para</i>, <span class="type">int</span> <i>index</i> )</h3>
<p>Returns the line number of the line in paragraph <i>para</i> in which the character at position <i>index</i> appears. The <i>index</i> position is relative to the beginning of the paragraph. If there is no such paragraph or no such character at the <i>index</i> position (e.g&#x2e; the index is out of range) -1 is returned.</p>
<!-- @@@lineOfChar -->
<!-- $$$lines[overload1]$$$lines -->
<h3 class="fn"><a name="lines"></a><span class="type">int</span> Q3TextEdit::<span class="name">lines</span> () const</h3>
<p>Returns the number of lines in the text edit; this could be 0.</p>
<p><b>Warning:</b> This function may be slow. Lines change all the time during word wrapping, so this function has to iterate over all the paragraphs and get the number of lines from each one individually.</p>
<!-- @@@lines -->
<!-- $$$linesOfParagraph[overload1]$$$linesOfParagraphint -->
<h3 class="fn"><a name="linesOfParagraph"></a><span class="type">int</span> Q3TextEdit::<span class="name">linesOfParagraph</span> ( <span class="type">int</span> <i>para</i> ) const</h3>
<p>Returns the number of lines in paragraph <i>para</i>, or -1 if there is no paragraph with index <i>para</i>.</p>
<!-- @@@linesOfParagraph -->
<!-- $$$mimeSourceFactory[overload1]$$$mimeSourceFactory -->
<h3 class="fn"><a name="mimeSourceFactory"></a><span class="type"><a href="q3mimesourcefactory.html">Q3MimeSourceFactory</a></span> * Q3TextEdit::<span class="name">mimeSourceFactory</span> () const</h3>
<p>Returns the <a href="q3mimesourcefactory.html" class="compat">Q3MimeSourceFactory</a> which is being used by this text edit.</p>
<p><b>See also </b><a href="q3textedit.html#setMimeSourceFactory">setMimeSourceFactory</a>().</p>
<!-- @@@mimeSourceFactory -->
<!-- $$$modificationChanged[overload1]$$$modificationChangedbool -->
<h3 class="fn"><a name="modificationChanged"></a><span class="type">void</span> Q3TextEdit::<span class="name">modificationChanged</span> ( <span class="type">bool</span> <i>m</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted when the modification status of the document has changed. If <i>m</i> is true, the document was modified, otherwise the modification state has been reset to unmodified.</p>
<p><b>See also </b><a href="q3textedit.html#modified-prop">modified</a>.</p>
<!-- @@@modificationChanged -->
<!-- $$$moveCursor[overload1]$$$moveCursorQ3TextEdit::CursorActionbool -->
<h3 class="fn"><a name="moveCursor"></a><span class="type">void</span> Q3TextEdit::<span class="name">moveCursor</span> ( <span class="type"><a href="q3textedit.html#CursorAction-enum">Q3TextEdit::CursorAction</a></span> <i>action</i>, <span class="type">bool</span> <i>select</i> )<tt> [virtual slot]</tt></h3>
<p>Moves the text cursor according to <i>action</i>. This is normally used by some key event handler. <i>select</i> specifies whether the text between the current cursor position and the new position should be selected.</p>
<!-- @@@moveCursor -->
<!-- $$$paragraphAt[overload1]$$$paragraphAtconstQPoint& -->
<h3 class="fn"><a name="paragraphAt"></a><span class="type">int</span> Q3TextEdit::<span class="name">paragraphAt</span> ( const <span class="type"><a href="qpoint.html">QPoint</a></span> &amp; <i>pos</i> ) const</h3>
<p>Returns the paragraph which is at position <i>pos</i> (in contents coordinates).</p>
<!-- @@@paragraphAt -->
<!-- $$$paragraphBackgroundColor[overload1]$$$paragraphBackgroundColorint -->
<h3 class="fn"><a name="paragraphBackgroundColor"></a><span class="type"><a href="qcolor.html">QColor</a></span> Q3TextEdit::<span class="name">paragraphBackgroundColor</span> ( <span class="type">int</span> <i>para</i> ) const</h3>
<p>Returns the background color of the paragraph <i>para</i> or an invalid color if <i>para</i> is out of range or the paragraph has no background set</p>
<p><b>See also </b><a href="q3textedit.html#setParagraphBackgroundColor">setParagraphBackgroundColor</a>().</p>
<!-- @@@paragraphBackgroundColor -->
<!-- $$$paragraphLength[overload1]$$$paragraphLengthint -->
<h3 class="fn"><a name="paragraphLength"></a><span class="type">int</span> Q3TextEdit::<span class="name">paragraphLength</span> ( <span class="type">int</span> <i>para</i> ) const</h3>
<p>Returns the length of the paragraph <i>para</i> (i.e&#x2e; the number of characters), or -1 if there is no paragraph with index <i>para</i>.</p>
<p>This function ignores newlines.</p>
<!-- @@@paragraphLength -->
<!-- $$$paragraphRect[overload1]$$$paragraphRectint -->
<h3 class="fn"><a name="paragraphRect"></a><span class="type"><a href="qrect.html">QRect</a></span> Q3TextEdit::<span class="name">paragraphRect</span> ( <span class="type">int</span> <i>para</i> ) const</h3>
<p>Returns the rectangle of the paragraph <i>para</i> in contents coordinates, or an invalid rectangle if <i>para</i> is out of range.</p>
<!-- @@@paragraphRect -->
<!-- $$$paragraphs[overload1]$$$paragraphs -->
<h3 class="fn"><a name="paragraphs"></a><span class="type">int</span> Q3TextEdit::<span class="name">paragraphs</span> () const</h3>
<p>Returns the number of paragraphs in the text; an empty textedit is always considered to have one paragraph, so 1 is returned in this case.</p>
<!-- @@@paragraphs -->
<!-- $$$paste[overload1]$$$paste -->
<h3 class="fn"><a name="paste"></a><span class="type">void</span> Q3TextEdit::<span class="name">paste</span> ()<tt> [virtual slot]</tt></h3>
<p>Pastes the text from the clipboard into the text edit at the current cursor position. Only plain text is pasted.</p>
<p>If there is no text in the clipboard nothing happens.</p>
<p><b>See also </b><a href="q3textedit.html#pasteSubType">pasteSubType</a>(), <a href="q3textedit.html#cut">cut</a>(), and <a href="q3textedit.html#copy">Q3TextEdit::copy</a>().</p>
<!-- @@@paste -->
<!-- $$$pasteSubType[overload1]$$$pasteSubTypeconstQByteArray& -->
<h3 class="fn"><a name="pasteSubType"></a><span class="type">void</span> Q3TextEdit::<span class="name">pasteSubType</span> ( const <span class="type"><a href="qbytearray.html">QByteArray</a></span> &amp; <i>subtype</i> )<tt> [virtual slot]</tt></h3>
<p>Pastes the text with format <i>subtype</i> from the clipboard into the text edit at the current cursor position. The <i>subtype</i> can be &quot;plain&quot; or &quot;html&quot;.</p>
<p>If there is no text with format <i>subtype</i> in the clipboard nothing happens.</p>
<p><b>See also </b><a href="q3textedit.html#paste">paste</a>(), <a href="q3textedit.html#cut">cut</a>(), and <a href="q3textedit.html#copy">Q3TextEdit::copy</a>().</p>
<!-- @@@pasteSubType -->
<!-- $$$placeCursor[overload1]$$$placeCursorconstQPoint&Q3TextCursor* -->
<h3 class="fn"><a name="placeCursor"></a><span class="type">void</span> Q3TextEdit::<span class="name">placeCursor</span> ( const <span class="type"><a href="qpoint.html">QPoint</a></span> &amp; <i>pos</i>, <span class="type">Q3TextCursor</span> * <i>c</i> = 0 )<tt> [virtual slot]</tt></h3>
<p>Places the cursor <i>c</i> at the character which is closest to position <i>pos</i> (in contents coordinates). If <i>c</i> is 0, the default text cursor is used.</p>
<p><b>See also </b><a href="q3textedit.html#setCursorPosition">setCursorPosition</a>().</p>
<!-- @@@placeCursor -->
<!-- $$$pointSize[overload1]$$$pointSize -->
<h3 class="fn"><a name="pointSize"></a><span class="type">int</span> Q3TextEdit::<span class="name">pointSize</span> () const</h3>
<p>Returns the point size of the font of the current format.</p>
<p><b>See also </b><a href="q3textedit.html#setFamily">setFamily</a>(), <a href="q3textedit.html#setCurrentFont">setCurrentFont</a>(), and <a href="q3textedit.html#setPointSize">setPointSize</a>().</p>
<!-- @@@pointSize -->
<!-- $$$redo[overload1]$$$redo -->
<h3 class="fn"><a name="redo"></a><span class="type">void</span> Q3TextEdit::<span class="name">redo</span> ()<tt> [virtual slot]</tt></h3>
<p>Redoes the last operation.</p>
<p>If there is no operation to redo, i.e&#x2e; there is no redo step in the undo/redo history, nothing happens.</p>
<p><b>See also </b><a href="q3textedit.html#redoAvailable">redoAvailable</a>(), <a href="q3textedit.html#undo">undo</a>(), and <a href="q3textedit.html#undoDepth-prop">undoDepth</a>().</p>
<!-- @@@redo -->
<!-- $$$redoAvailable[overload1]$$$redoAvailablebool -->
<h3 class="fn"><a name="redoAvailable"></a><span class="type">void</span> Q3TextEdit::<span class="name">redoAvailable</span> ( <span class="type">bool</span> <i>yes</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted when the availability of redo changes. If <i>yes</i> is true, then <a href="q3textedit.html#redo">redo</a>() will work until redoAvailable(false) is next emitted.</p>
<p><b>See also </b><a href="q3textedit.html#redo">redo</a>() and <a href="q3textedit.html#undoDepth-prop">undoDepth</a>().</p>
<!-- @@@redoAvailable -->
<!-- $$$removeParagraph[overload1]$$$removeParagraphint -->
<h3 class="fn"><a name="removeParagraph"></a><span class="type">void</span> Q3TextEdit::<span class="name">removeParagraph</span> ( <span class="type">int</span> <i>para</i> )<tt> [virtual slot]</tt></h3>
<p>Removes the paragraph <i>para</i>.</p>
<!-- @@@removeParagraph -->
<!-- $$$removeSelectedText[overload1]$$$removeSelectedTextint -->
<h3 class="fn"><a name="removeSelectedText"></a><span class="type">void</span> Q3TextEdit::<span class="name">removeSelectedText</span> ( <span class="type">int</span> <i>selNum</i> = 0 )<tt> [virtual slot]</tt></h3>
<p>Deletes the text of selection <i>selNum</i> (by default, the default selection, 0). If there is no selected text nothing happens.</p>
<p><b>See also </b><a href="q3textedit.html#selectedText-prop">selectedText</a> and <a href="q3textedit.html#removeSelection">removeSelection</a>().</p>
<!-- @@@removeSelectedText -->
<!-- $$$removeSelection[overload1]$$$removeSelectionint -->
<h3 class="fn"><a name="removeSelection"></a><span class="type">void</span> Q3TextEdit::<span class="name">removeSelection</span> ( <span class="type">int</span> <i>selNum</i> = 0 )<tt> [virtual slot]</tt></h3>
<p>Removes the selection <i>selNum</i> (by default 0). This does not remove the selected text.</p>
<p><b>See also </b><a href="q3textedit.html#removeSelectedText">removeSelectedText</a>().</p>
<!-- @@@removeSelection -->
<!-- $$$repaintChanged[overload1]$$$repaintChanged -->
<h3 class="fn"><a name="repaintChanged"></a><span class="type">void</span> Q3TextEdit::<span class="name">repaintChanged</span> ()<tt> [protected]</tt></h3>
<p>Repaints any paragraphs that have changed.</p>
<p>Although used extensively internally you shouldn't need to call this yourself.</p>
<!-- @@@repaintChanged -->
<!-- $$$resizeEvent[overload1]$$$resizeEventQResizeEvent* -->
<h3 class="fn"><a name="resizeEvent"></a><span class="type">void</span> Q3TextEdit::<span class="name">resizeEvent</span> ( <span class="type"><a href="qresizeevent.html">QResizeEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#resizeEvent">QWidget::resizeEvent</a>().</p>
<!-- @@@resizeEvent -->
<!-- $$$returnPressed[overload1]$$$returnPressed -->
<h3 class="fn"><a name="returnPressed"></a><span class="type">void</span> Q3TextEdit::<span class="name">returnPressed</span> ()<tt> [signal]</tt></h3>
<p>This signal is emitted if the user pressed the Return or the Enter key.</p>
<!-- @@@returnPressed -->
<!-- $$$scrollToAnchor[overload1]$$$scrollToAnchorconstQString& -->
<h3 class="fn"><a name="scrollToAnchor"></a><span class="type">void</span> Q3TextEdit::<span class="name">scrollToAnchor</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>name</i> )<tt> [virtual slot]</tt></h3>
<p>Scrolls the text edit to make the text at the anchor called <i>name</i> visible, if it can be found in the document. If the anchor isn't found no scrolling will occur. An anchor is defined using the HTML anchor tag, e.g&#x2e; <tt>&lt;a name=&quot;target&quot;&gt;</tt>.</p>
<!-- @@@scrollToAnchor -->
<!-- $$$scrollToBottom[overload1]$$$scrollToBottom -->
<h3 class="fn"><a name="scrollToBottom"></a><span class="type">void</span> Q3TextEdit::<span class="name">scrollToBottom</span> ()<tt> [virtual slot]</tt></h3>
<p>Scrolls to the bottom of the document and does formatting if required.</p>
<!-- @@@scrollToBottom -->
<!-- $$$selectAll[overload1]$$$selectAllbool -->
<h3 class="fn"><a name="selectAll"></a><span class="type">void</span> Q3TextEdit::<span class="name">selectAll</span> ( <span class="type">bool</span> <i>select</i> = true )<tt> [virtual slot]</tt></h3>
<p>If <i>select</i> is true (the default), all the text is selected as selection 0. If <i>select</i> is false any selected text is unselected, i.e&#x2e; the default selection (selection 0) is cleared.</p>
<p><b>See also </b><a href="q3textedit.html#selectedText-prop">selectedText</a>.</p>
<!-- @@@selectAll -->
<!-- $$$selectionChanged[overload1]$$$selectionChanged -->
<h3 class="fn"><a name="selectionChanged"></a><span class="type">void</span> Q3TextEdit::<span class="name">selectionChanged</span> ()<tt> [signal]</tt></h3>
<p>This signal is emitted whenever the selection changes.</p>
<p><b>See also </b><a href="q3textedit.html#setSelection">setSelection</a>() and <a href="q3textedit.html#copyAvailable">copyAvailable</a>().</p>
<!-- @@@selectionChanged -->
<!-- $$$setAlignment[overload1]$$$setAlignmentint -->
<h3 class="fn"><a name="setAlignment"></a><span class="type">void</span> Q3TextEdit::<span class="name">setAlignment</span> ( <span class="type">int</span> <i>a</i> )<tt> [virtual slot]</tt></h3>
<p>Sets the alignment of the current paragraph to <i>a</i>. Valid alignments are <a href="qt.html#AlignmentFlag-enum">Qt::AlignLeft</a>, <a href="qt.html#AlignmentFlag-enum">Qt::AlignRight</a>, <a href="qt.html#AlignmentFlag-enum">Qt::AlignJustify</a> and <a href="qt.html#AlignmentFlag-enum">Qt::AlignCenter</a> (which centers horizontally).</p>
<p><b>See also </b><a href="q3textedit.html#alignment">alignment</a>().</p>
<!-- @@@setAlignment -->
<!-- $$$setBold[overload1]$$$setBoldbool -->
<h3 class="fn"><a name="setBold"></a><span class="type">void</span> Q3TextEdit::<span class="name">setBold</span> ( <span class="type">bool</span> <i>b</i> )<tt> [virtual slot]</tt></h3>
<p>If <i>b</i> is true sets the current format to bold; otherwise sets the current format to non-bold.</p>
<p><b>See also </b><a href="q3textedit.html#bold">bold</a>().</p>
<!-- @@@setBold -->
<!-- $$$setColor[overload1]$$$setColorconstQColor& -->
<h3 class="fn"><a name="setColor"></a><span class="type">void</span> Q3TextEdit::<span class="name">setColor</span> ( const <span class="type"><a href="qcolor.html">QColor</a></span> &amp; <i>c</i> )<tt> [virtual slot]</tt></h3>
<p>Sets the color of the current format, i.e&#x2e; of the text, to <i>c</i>.</p>
<p><b>See also </b><a href="q3textedit.html#color">color</a>() and <a href="q3textedit.html#paper-prop">setPaper</a>().</p>
<!-- @@@setColor -->
<!-- $$$setCurrentFont[overload1]$$$setCurrentFontconstQFont& -->
<h3 class="fn"><a name="setCurrentFont"></a><span class="type">void</span> Q3TextEdit::<span class="name">setCurrentFont</span> ( const <span class="type"><a href="qfont.html">QFont</a></span> &amp; <i>f</i> )<tt> [virtual slot]</tt></h3>
<p>Sets the font of the current format to <i>f</i>.</p>
<p>If the widget is in <a href="qt.html#TextFormat-enum">Qt::LogText</a> mode this function will do nothing. Use <a href="qwidget.html#font-prop">setFont</a>() instead.</p>
<p><b>See also </b><a href="q3textedit.html#currentFont">currentFont</a>(), <a href="q3textedit.html#setPointSize">setPointSize</a>(), and <a href="q3textedit.html#setFamily">setFamily</a>().</p>
<!-- @@@setCurrentFont -->
<!-- $$$setCursorPosition[overload1]$$$setCursorPositionintint -->
<h3 class="fn"><a name="setCursorPosition"></a><span class="type">void</span> Q3TextEdit::<span class="name">setCursorPosition</span> ( <span class="type">int</span> <i>para</i>, <span class="type">int</span> <i>index</i> )<tt> [virtual slot]</tt></h3>
<p>Sets the cursor to position <i>index</i> in paragraph <i>para</i>.</p>
<p><b>See also </b><a href="q3textedit.html#getCursorPosition">getCursorPosition</a>().</p>
<!-- @@@setCursorPosition -->
<!-- $$$setFamily[overload1]$$$setFamilyconstQString& -->
<h3 class="fn"><a name="setFamily"></a><span class="type">void</span> Q3TextEdit::<span class="name">setFamily</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>fontFamily</i> )<tt> [virtual slot]</tt></h3>
<p>Sets the font family of the current format to <i>fontFamily</i>.</p>
<p><b>See also </b><a href="q3textedit.html#family">family</a>() and <a href="q3textedit.html#setCurrentFont">setCurrentFont</a>().</p>
<!-- @@@setFamily -->
<!-- $$$setItalic[overload1]$$$setItalicbool -->
<h3 class="fn"><a name="setItalic"></a><span class="type">void</span> Q3TextEdit::<span class="name">setItalic</span> ( <span class="type">bool</span> <i>b</i> )<tt> [virtual slot]</tt></h3>
<p>If <i>b</i> is true sets the current format to italic; otherwise sets the current format to non-italic.</p>
<p><b>See also </b><a href="q3textedit.html#italic">italic</a>().</p>
<!-- @@@setItalic -->
<!-- $$$setMimeSourceFactory[overload1]$$$setMimeSourceFactoryQ3MimeSourceFactory* -->
<h3 class="fn"><a name="setMimeSourceFactory"></a><span class="type">void</span> Q3TextEdit::<span class="name">setMimeSourceFactory</span> ( <span class="type"><a href="q3mimesourcefactory.html">Q3MimeSourceFactory</a></span> * <i>factory</i> )<tt> [virtual slot]</tt></h3>
<p>Sets the text edit's mimesource factory to <i>factory</i>. See <a href="q3mimesourcefactory.html" class="compat">Q3MimeSourceFactory</a> for further details.</p>
<p><b>See also </b><a href="q3textedit.html#mimeSourceFactory">mimeSourceFactory</a>().</p>
<!-- @@@setMimeSourceFactory -->
<!-- $$$setParagraphBackgroundColor[overload1]$$$setParagraphBackgroundColorintconstQColor& -->
<h3 class="fn"><a name="setParagraphBackgroundColor"></a><span class="type">void</span> Q3TextEdit::<span class="name">setParagraphBackgroundColor</span> ( <span class="type">int</span> <i>para</i>, const <span class="type"><a href="qcolor.html">QColor</a></span> &amp; <i>bg</i> )<tt> [virtual slot]</tt></h3>
<p>Sets the background color of the paragraph <i>para</i> to <i>bg</i>.</p>
<p><b>See also </b><a href="q3textedit.html#paragraphBackgroundColor">paragraphBackgroundColor</a>().</p>
<!-- @@@setParagraphBackgroundColor -->
<!-- $$$setPointSize[overload1]$$$setPointSizeint -->
<h3 class="fn"><a name="setPointSize"></a><span class="type">void</span> Q3TextEdit::<span class="name">setPointSize</span> ( <span class="type">int</span> <i>s</i> )<tt> [virtual slot]</tt></h3>
<p>Sets the point size of the current format to <i>s</i>.</p>
<p>Note that if <i>s</i> is zero or negative, the behavior of this function is not defined.</p>
<p><b>See also </b><a href="q3textedit.html#pointSize">pointSize</a>(), <a href="q3textedit.html#setCurrentFont">setCurrentFont</a>(), and <a href="q3textedit.html#setFamily">setFamily</a>().</p>
<!-- @@@setPointSize -->
<!-- $$$setSelection[overload1]$$$setSelectionintintintintint -->
<h3 class="fn"><a name="setSelection"></a><span class="type">void</span> Q3TextEdit::<span class="name">setSelection</span> ( <span class="type">int</span> <i>paraFrom</i>, <span class="type">int</span> <i>indexFrom</i>, <span class="type">int</span> <i>paraTo</i>, <span class="type">int</span> <i>indexTo</i>, <span class="type">int</span> <i>selNum</i> = 0 )<tt> [virtual slot]</tt></h3>
<p>Sets a selection which starts at position <i>indexFrom</i> in paragraph <i>paraFrom</i> and ends at position <i>indexTo</i> in paragraph <i>paraTo</i>.</p>
<p>Any existing selections which have a different id (<i>selNum</i>) are left alone, but if an existing selection has the same id as <i>selNum</i> it is removed and replaced by this selection.</p>
<p>Uses the selection settings of selection <i>selNum</i>. If <i>selNum</i> is 0, this is the default selection.</p>
<p>The cursor is moved to the end of the selection if <i>selNum</i> is 0, otherwise the cursor position remains unchanged.</p>
<p><b>See also </b><a href="q3textedit.html#getSelection">getSelection</a>() and <a href="q3textedit.html#selectedText-prop">selectedText</a>.</p>
<!-- @@@setSelection -->
<!-- $$$setSelectionAttributes[overload1]$$$setSelectionAttributesintconstQColor&bool -->
<h3 class="fn"><a name="setSelectionAttributes"></a><span class="type">void</span> Q3TextEdit::<span class="name">setSelectionAttributes</span> ( <span class="type">int</span> <i>selNum</i>, const <span class="type"><a href="qcolor.html">QColor</a></span> &amp; <i>back</i>, <span class="type">bool</span> <i>invertText</i> )<tt> [virtual slot]</tt></h3>
<p>Sets the background color of selection number <i>selNum</i> to <i>back</i> and specifies whether the text of this selection should be inverted with <i>invertText</i>.</p>
<p>This only works for <i>selNum</i> &gt; 0. The default selection (<i>selNum</i> == 0) gets its attributes from the text edit's <a href="qwidget.html#palette-prop">palette</a>().</p>
<!-- @@@setSelectionAttributes -->
<!-- $$$setStyleSheet[overload1]$$$setStyleSheetQ3StyleSheet* -->
<h3 class="fn"><a name="setStyleSheet"></a><span class="type">void</span> Q3TextEdit::<span class="name">setStyleSheet</span> ( <span class="type"><a href="q3stylesheet.html">Q3StyleSheet</a></span> * <i>styleSheet</i> )<tt> [virtual slot]</tt></h3>
<p>Sets the stylesheet to use with this text edit to <i>styleSheet</i>. Changes will only take effect for new text added with <a href="q3textedit.html#text-prop">setText</a>() or <a href="q3textedit.html#append">append</a>().</p>
<p><b>See also </b><a href="q3textedit.html#styleSheet">styleSheet</a>().</p>
<!-- @@@setStyleSheet -->
<!-- $$$setUnderline[overload1]$$$setUnderlinebool -->
<h3 class="fn"><a name="setUnderline"></a><span class="type">void</span> Q3TextEdit::<span class="name">setUnderline</span> ( <span class="type">bool</span> <i>b</i> )<tt> [virtual slot]</tt></h3>
<p>If <i>b</i> is true sets the current format to underline; otherwise sets the current format to non-underline.</p>
<p><b>See also </b><a href="q3textedit.html#underline">underline</a>().</p>
<!-- @@@setUnderline -->
<!-- $$$setVerticalAlignment[overload1]$$$setVerticalAlignmentQ3TextEdit::VerticalAlignment -->
<h3 class="fn"><a name="setVerticalAlignment"></a><span class="type">void</span> Q3TextEdit::<span class="name">setVerticalAlignment</span> ( <span class="type"><a href="q3textedit.html#VerticalAlignment-enum">Q3TextEdit::VerticalAlignment</a></span> <i>a</i> )<tt> [virtual slot]</tt></h3>
<p>Sets the vertical alignment of the current format, i.e&#x2e; of the text, to <i>a</i>.</p>
<p><b>See also </b><a href="q3textedit.html#verticalAlignment">verticalAlignment</a>(), <a href="q3textedit.html#color">color</a>(), and <a href="q3textedit.html#paper-prop">setPaper</a>().</p>
<!-- @@@setVerticalAlignment -->
<!-- $$$sizeHint[overload1]$$$sizeHint -->
<h3 class="fn"><a name="sizeHint"></a><span class="type"><a href="qsize.html">QSize</a></span> Q3TextEdit::<span class="name">sizeHint</span> () const<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#sizeHint-prop">QWidget::sizeHint</a>().</p>
<!-- @@@sizeHint -->
<!-- $$$styleSheet[overload1]$$$styleSheet -->
<h3 class="fn"><a name="styleSheet"></a><span class="type"><a href="q3stylesheet.html">Q3StyleSheet</a></span> * Q3TextEdit::<span class="name">styleSheet</span> () const</h3>
<p>Returns the <a href="q3stylesheet.html" class="compat">Q3StyleSheet</a> which is being used by this text edit.</p>
<p><b>See also </b><a href="q3textedit.html#setStyleSheet">setStyleSheet</a>().</p>
<!-- @@@styleSheet -->
<!-- $$$sync[overload1]$$$sync -->
<h3 class="fn"><a name="sync"></a><span class="type">void</span> Q3TextEdit::<span class="name">sync</span> ()<tt> [virtual slot]</tt></h3>
<p><a href="q3textedit.html" class="compat">Q3TextEdit</a> is optimized for large amounts text. One of its optimizations is to format only the visible text, formatting the rest on demand, e.g&#x2e; as the user scrolls, so you don't usually need to call this function.</p>
<p>In some situations you may want to force the whole text to be formatted. For example, if after calling <a href="q3textedit.html#text-prop">setText</a>(), you wanted to know the height of the document (using <a href="q3scrollview.html#contentsHeight-prop">contentsHeight</a>()), you would call this function first.</p>
<!-- @@@sync -->
<!-- $$$syntaxHighlighter[overload1]$$$syntaxHighlighter -->
<h3 class="fn"><a name="syntaxHighlighter"></a><span class="type"><a href="q3syntaxhighlighter.html">Q3SyntaxHighlighter</a></span> * Q3TextEdit::<span class="name">syntaxHighlighter</span> () const</h3>
<p>Returns the <a href="qsyntaxhighlighter.html">QSyntaxHighlighter</a> set on this <a href="q3textedit.html" class="compat">Q3TextEdit</a>. 0 is returned if no syntax highlighter is set.</p>
<!-- @@@syntaxHighlighter -->
<!-- $$$textChanged[overload1]$$$textChanged -->
<h3 class="fn"><a name="textChanged"></a><span class="type">void</span> Q3TextEdit::<span class="name">textChanged</span> ()<tt> [signal]</tt></h3>
<p>This signal is emitted whenever the text in the text edit changes.</p>
<p><b>See also </b><a href="q3textedit.html#text-prop">setText</a>() and <a href="q3textedit.html#append">append</a>().</p>
<!-- @@@textChanged -->
<!-- $$$textCursor[overload1]$$$textCursor -->
<h3 class="fn"><a name="textCursor"></a><span class="type">Q3TextCursor</span> * Q3TextEdit::<span class="name">textCursor</span> () const<tt> [protected]</tt></h3>
<p>Returns the text edit's text cursor.</p>
<p><b>Warning:</b> Q3TextCursor is not in the public API, but in special circumstances you might wish to use it.</p>
<!-- @@@textCursor -->
<!-- $$$underline[overload1]$$$underline -->
<h3 class="fn"><a name="underline"></a><span class="type">bool</span> Q3TextEdit::<span class="name">underline</span> () const</h3>
<p>Returns true if the current format is underlined; otherwise returns false.</p>
<p><b>See also </b><a href="q3textedit.html#setUnderline">setUnderline</a>().</p>
<!-- @@@underline -->
<!-- $$$undo[overload1]$$$undo -->
<h3 class="fn"><a name="undo"></a><span class="type">void</span> Q3TextEdit::<span class="name">undo</span> ()<tt> [virtual slot]</tt></h3>
<p>Undoes the last operation.</p>
<p>If there is no operation to undo, i.e&#x2e; there is no undo step in the undo/redo history, nothing happens.</p>
<p><b>See also </b><a href="q3textedit.html#undoAvailable">undoAvailable</a>(), <a href="q3textedit.html#redo">redo</a>(), and <a href="q3textedit.html#undoDepth-prop">undoDepth</a>().</p>
<!-- @@@undo -->
<!-- $$$undoAvailable[overload1]$$$undoAvailablebool -->
<h3 class="fn"><a name="undoAvailable"></a><span class="type">void</span> Q3TextEdit::<span class="name">undoAvailable</span> ( <span class="type">bool</span> <i>yes</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted when the availability of undo changes. If <i>yes</i> is true, then <a href="q3textedit.html#undo">undo</a>() will work until undoAvailable(false) is next emitted.</p>
<p><b>See also </b><a href="q3textedit.html#undo">undo</a>() and <a href="q3textedit.html#undoDepth-prop">undoDepth</a>().</p>
<!-- @@@undoAvailable -->
<!-- $$$verticalAlignment[overload1]$$$verticalAlignment -->
<h3 class="fn"><a name="verticalAlignment"></a><span class="type"><a href="q3textedit.html#VerticalAlignment-enum">VerticalAlignment</a></span> Q3TextEdit::<span class="name">verticalAlignment</span> () const</h3>
<p>Returns the vertical alignment of the current format.</p>
<p><b>See also </b><a href="q3textedit.html#setVerticalAlignment">setVerticalAlignment</a>().</p>
<!-- @@@verticalAlignment -->
<!-- $$$viewportResizeEvent[overload1]$$$viewportResizeEventQResizeEvent* -->
<h3 class="fn"><a name="viewportResizeEvent"></a><span class="type">void</span> Q3TextEdit::<span class="name">viewportResizeEvent</span> ( <span class="type"><a href="qresizeevent.html">QResizeEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="q3scrollview.html#viewportResizeEvent">Q3ScrollView::viewportResizeEvent</a>().</p>
<!-- @@@viewportResizeEvent -->
<!-- $$$zoomIn[overload1]$$$zoomInint -->
<h3 class="fn"><a name="zoomIn"></a><span class="type">void</span> Q3TextEdit::<span class="name">zoomIn</span> ( <span class="type">int</span> <i>range</i> )<tt> [virtual slot]</tt></h3>
<p>Zooms in on the text by making the base font size <i>range</i> points larger and recalculating all font sizes to be the new size. This does not change the size of any images.</p>
<p><b>See also </b><a href="q3textedit.html#zoomOut">zoomOut</a>().</p>
<!-- @@@zoomIn -->
<!-- $$$zoomIn$$$zoomIn -->
<h3 class="fn"><a name="zoomIn-2"></a><span class="type">void</span> Q3TextEdit::<span class="name">zoomIn</span> ()<tt> [virtual slot]</tt></h3>
<p>This is an overloaded function.</p>
<p>Zooms in on the text by making the base font size one point larger and recalculating all font sizes to be the new size. This does not change the size of any images.</p>
<p><b>See also </b><a href="q3textedit.html#zoomOut">zoomOut</a>().</p>
<!-- @@@zoomIn -->
<!-- $$$zoomOut[overload1]$$$zoomOutint -->
<h3 class="fn"><a name="zoomOut"></a><span class="type">void</span> Q3TextEdit::<span class="name">zoomOut</span> ( <span class="type">int</span> <i>range</i> )<tt> [virtual slot]</tt></h3>
<p>Zooms out on the text by making the base font size <i>range</i> points smaller and recalculating all font sizes to be the new size. This does not change the size of any images.</p>
<p><b>See also </b><a href="q3textedit.html#zoomIn">zoomIn</a>().</p>
<!-- @@@zoomOut -->
<!-- $$$zoomOut$$$zoomOut -->
<h3 class="fn"><a name="zoomOut-2"></a><span class="type">void</span> Q3TextEdit::<span class="name">zoomOut</span> ()<tt> [virtual slot]</tt></h3>
<p>This is an overloaded function.</p>
<p>Zooms out on the text by making the base font size one point smaller and recalculating all font sizes to be the new size. This does not change the size of any images.</p>
<p><b>See also </b><a href="q3textedit.html#zoomIn">zoomIn</a>().</p>
<!-- @@@zoomOut -->
<!-- $$$zoomTo[overload1]$$$zoomToint -->
<h3 class="fn"><a name="zoomTo"></a><span class="type">void</span> Q3TextEdit::<span class="name">zoomTo</span> ( <span class="type">int</span> <i>size</i> )<tt> [virtual slot]</tt></h3>
<p>Zooms the text by making the base font size <i>size</i> points and recalculating all font sizes to be the new size. This does not change the size of any images.</p>
<!-- @@@zoomTo -->
</div>
  <div class="ft">
    <span></span>
  </div>
</div> 
<div class="footer">
    <p>
      <acronym title="Copyright">&copy;</acronym> 2012 Nokia Corporation and/or its
      subsidiaries. Documentation contributions included herein are the copyrights of
      their respective owners.</p>
    <br />
    <p>
      The documentation provided herein is licensed under the terms of the
      <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation
      License version 1.3</a> as published by the Free Software Foundation.</p>
    <p>
      Documentation sources may be obtained from <a href="http://www.qt-project.org">
      www.qt-project.org</a>.</p>
    <br />
    <p>
      Nokia, Qt and their respective logos are trademarks of Nokia Corporation 
      in Finland and/or other countries worldwide. All other trademarks are property
      of their respective owners. <a title="Privacy Policy"
      href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p>
</div>
</body>
</html>