summaryrefslogtreecommitdiffstats
path: root/examples/textedit
diff options
context:
space:
mode:
Diffstat (limited to 'examples/textedit')
-rw-r--r--examples/textedit/editcopy.xpm36
-rw-r--r--examples/textedit/editcut.xpm32
-rw-r--r--examples/textedit/editpaste.xpm36
-rw-r--r--examples/textedit/editredo.xpm36
-rw-r--r--examples/textedit/editundo.xpm36
-rw-r--r--examples/textedit/example.html24
-rw-r--r--examples/textedit/filenew.xpm36
-rw-r--r--examples/textedit/fileopen.xpm36
-rw-r--r--examples/textedit/fileprint.xpm117
-rw-r--r--examples/textedit/filesave.xpm36
-rw-r--r--examples/textedit/main.cpp22
-rw-r--r--examples/textedit/textbold.xpm27
-rw-r--r--examples/textedit/textcenter.xpm27
-rw-r--r--examples/textedit/textedit.cpp455
-rw-r--r--examples/textedit/textedit.doc18
-rw-r--r--examples/textedit/textedit.h82
-rw-r--r--examples/textedit/textedit.pro11
-rw-r--r--examples/textedit/textitalic.xpm27
-rw-r--r--examples/textedit/textjustify.xpm27
-rw-r--r--examples/textedit/textleft.xpm27
-rw-r--r--examples/textedit/textright.xpm27
-rw-r--r--examples/textedit/textunder.xpm27
22 files changed, 1202 insertions, 0 deletions
diff --git a/examples/textedit/editcopy.xpm b/examples/textedit/editcopy.xpm
new file mode 100644
index 0000000..cc6fb7a
--- /dev/null
+++ b/examples/textedit/editcopy.xpm
@@ -0,0 +1,36 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"22 22 8 1",
+" c Gray100",
+". c #8b8bfd",
+"X c #3c3cfd",
+"o c #000082",
+"O c Gray0",
+"+ c None",
+"@ c Gray0",
+"# c Gray0",
+/* pixels */
+"++++++++++++++++++++++",
+"++++++++++++++++++++++",
+"OOOOOOOO++++++++++++++",
+"O OO+++++++++++++",
+"O OOOO O O++++++++++++",
+"O O O+++++++++++",
+"O OOOO Ooooooooo++++++",
+"O Oo oo+++++",
+"O OOOOO o OOOO oXo++++",
+"O o o.Xo+++",
+"O OOOOO o OOOO o .Xo++",
+"O o oooooo+",
+"O OOOOO o OOOO o+",
+"O o o+",
+"O OOOOO o OOOOOOOOO o+",
+"O o o+",
+"OOOOOOOOo OOOOOOOOO o+",
+"++++++++o o+",
+"++++++++o OOOOOOOOO o+",
+"++++++++o o+",
+"++++++++ooooooooooooo+",
+"++++++++++++++++++++++"
+};
diff --git a/examples/textedit/editcut.xpm b/examples/textedit/editcut.xpm
new file mode 100644
index 0000000..2391add
--- /dev/null
+++ b/examples/textedit/editcut.xpm
@@ -0,0 +1,32 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"22 22 4 1",
+" c Gray100",
+". c #000082",
+"X c Gray0",
+"o c None",
+/* pixels */
+"oooooooooooooooooooooo",
+"oooooooXoooooXoooooooo",
+"oooooooXoooooXoooooooo",
+"oooooooXoooooXoooooooo",
+"oooooooXooooXXoooooooo",
+"oooooooXXoooXooooooooo",
+"ooooooooXoooXooooooooo",
+"ooooooooXXoXXooooooooo",
+"oooooooooXXXoooooooooo",
+"oooooooooXXXoooooooooo",
+"ooooooooooXooooooooooo",
+"ooooooooo.X.oooooooooo",
+"oooooooo..o...oooooooo",
+"ooooooo.o.o.oo.ooooooo",
+"oooooo.oo.o.ooo.oooooo",
+"ooooo.ooo.o.oooo.ooooo",
+"oooo.oooo.o.oooo.ooooo",
+"oooo.oooo.oo.ooo.ooooo",
+"oooo.oooo.oo.oo.oooooo",
+"oooo.ooo.oooo..ooooooo",
+"ooooo...oooooooooooooo",
+"oooooooooooooooooooooo"
+};
diff --git a/examples/textedit/editpaste.xpm b/examples/textedit/editpaste.xpm
new file mode 100644
index 0000000..3f77592
--- /dev/null
+++ b/examples/textedit/editpaste.xpm
@@ -0,0 +1,36 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"22 22 8 1",
+" c Gray100",
+". c Yellow",
+"X c #c6c3c6",
+"o c #848284",
+"O c #848200",
+"+ c #000084",
+"@ c Gray0",
+"# c None",
+/* pixels */
+"######################",
+"#######@@@@@##########",
+"##@@@@@@...@@@@@@#####",
+"#@@@@@@.....@@@@@@####",
+"@@oOo@@.@@@.@@oOo@@###",
+"@oOo@XXXXXXXXX@oOo@###",
+"@OoO@XXXXXXXXX@OoO@###",
+"@oOo@@@@@@@@@@@oOo@###",
+"@OoOoOoOoOoOoOoOoO@###",
+"@oOoOoOoOoOoOoOoOo@###",
+"@OoOoOoO++++++++++@###",
+"@oOoOoOo+ + +###",
+"@OoOoOoO+ +++++ + +##",
+"@oOoOoOo+ + +#",
+"@OoOoOoO+ +++++ + +",
+"@oOoOoOo+ ++++++",
+"@OoOoOoO+ +++++ +",
+"@oOoOoOo+ +",
+"@OoOoOoO+ ++++++++++ +",
+"#@@@@@@@+ +",
+"########++++++++++++++",
+"######################"
+};
diff --git a/examples/textedit/editredo.xpm b/examples/textedit/editredo.xpm
new file mode 100644
index 0000000..46dc033
--- /dev/null
+++ b/examples/textedit/editredo.xpm
@@ -0,0 +1,36 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"22 22 8 1",
+" c Gray100",
+". c #848284",
+"X c #000084",
+"o c Gray0",
+"O c None",
+"+ c Gray0",
+"@ c Gray0",
+"# c Gray0",
+/* pixels */
+"OOOOOOOOOOOOOOOOOOOOOO",
+"OOOOOOOOOOOOOOOOOOOOOO",
+"OOOOOOOOOOOOOOOOOOOOOO",
+"OOOOOOOOOOOOOOOOOOOOOO",
+"OOOOOOOOOOOOOOOOOOOOOO",
+"OOOO.XXXXXXOOOOOOOOOOO",
+"OOOXXXXXXXXXXOOOOOOXOO",
+"OO.XXOOOOOOXXXXOOOXXOO",
+"OOXXOOOOOOOOOXXXOXXXOO",
+"OOXXOOOOOOOOOOXXXXXXOO",
+"OOXXOOOOOOOOOOOXXXXXOO",
+"OOXXOOOOOOOOOOXXXXXXOO",
+"OOXXOOOOOOOOOXXXXXXXOO",
+"OO.XXOOOOOOOXXXXXXXXOO",
+"OOOXXX.OOOOOOOOOOOOOOO",
+"OOOOXXXOOOOOOOOOOOOOOO",
+"OOOOOOOOOOOOOOOOOOOOOO",
+"OOOOOOOOOOOOOOOOOOOOOO",
+"OOOOOOOOOOOOOOOOOOOOOO",
+"OOOOOOOOOOOOOOOOOOOOOO",
+"OOOOOOOOOOOOOOOOOOOOOO",
+"OOOOOOOOOOOOOOOOOOOOOO"
+};
diff --git a/examples/textedit/editundo.xpm b/examples/textedit/editundo.xpm
new file mode 100644
index 0000000..229c163
--- /dev/null
+++ b/examples/textedit/editundo.xpm
@@ -0,0 +1,36 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"22 22 8 1",
+" c Gray100",
+". c #848284",
+"X c #000084",
+"o c Gray0",
+"O c None",
+"+ c Gray0",
+"@ c Gray0",
+"# c Gray0",
+/* pixels */
+"OOOOOOOOOOOOOOOOOOOOOO",
+"OOOOOOOOOOOOOOOOOOOOOO",
+"OOOOOOOOOOOOOOOOOOOOOO",
+"OOOOOOOOOOOOOOOOOOOOOO",
+"OOOOOOOOOOOOOOOOOOOOOO",
+"OOOOOOOOOOOXXXXXX.OOOO",
+"OOXOOOOOOXXXXXXXXXXOOO",
+"OOXXOOOXXXXOOOOOOXX.OO",
+"OOXXXOXXXOOOOOOOOOXXOO",
+"OOXXXXXXOOOOOOOOOOXXOO",
+"OOXXXXXOOOOOOOOOOOXXOO",
+"OOXXXXXXOOOOOOOOOOXXOO",
+"OOXXXXXXXOOOOOOOOOXXOO",
+"OOXXXXXXXXOOOOOOOXX.OO",
+"OOOOOOOOOOOOOOO.XXXOOO",
+"OOOOOOOOOOOOOOOXXXOOOO",
+"OOOOOOOOOOOOOOOOOOOOOO",
+"OOOOOOOOOOOOOOOOOOOOOO",
+"OOOOOOOOOOOOOOOOOOOOOO",
+"OOOOOOOOOOOOOOOOOOOOOO",
+"OOOOOOOOOOOOOOOOOOOOOO",
+"OOOOOOOOOOOOOOOOOOOOOO"
+};
diff --git a/examples/textedit/example.html b/examples/textedit/example.html
new file mode 100644
index 0000000..0c8d342
--- /dev/null
+++ b/examples/textedit/example.html
@@ -0,0 +1,24 @@
+<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:12pt;font-family:helvetica">
+<p align="center"><span style="font-size:24pt;font-weight:600">QTextEdit</span></p>
+<p align="justify">QTextEdit is an advanced WYSIWYG editor supporting richtext formatting. It is optimized to handle large documents and to respond quickly to user input.</p>
+<p align="justify">QTextEdit supports font styles such as <span style="font-weight:600">bold</span>, <span style="font-style:italic">italic, </span><span style="text-decoration:underline">underlined</span> as well as various <span style="font-weight:600;color:#00007f">c</span><span style="font-weight:600;color:#aa0000">o</span><span style="font-weight:600;color:#005500">l</span><span style="font-weight:600;color:#aa5500">o</span><span style="font-weight:600;color:#00aa00">r</span><span style="font-weight:600;color:#ff0000">s </span>and <span style="font-size:16pt">s</span><span style="font-size:18pt">i</span><span style="font-size:20pt">z</span><span style="font-size:22pt">e</span><span style="font-size:28pt">s</span>. You can select different font families, for example <span style="font-family:Times;font-weight:600">Times New Roman</span> or <span style="font-family:Courier;font-weight:600">Courier</span>. Futhermore the widget supports different paragraph alignments such as justified,</p>
+<p>left aligned,</p>
+<p align="center">centered,</p>
+<p align="right">and right aligned.</p>
+<p align="justify"></p>
+<!-- Not public API
+<p>In addition to the mentioned character styles, the editor supports both bullet lists</p>
+<ul type="disc"><li>Disc</li>
+<ul type="circle"><li>Circle</li>
+<ul type="square"><li>Square</li></ul></ul></ul>
+<p>and ordered lists</p>
+<ol><li>One</li>
+<li>Two</li>
+<ol type="a"><li>Two.a</li>
+<li>Two.b</li>
+<ol type="A"><li>Two.b.A</li>
+<li>Two.b.B</li></ol>
+<li>Two.c</li></ol>
+<li>Three.</li></ol>
+-->
+</body></html>
diff --git a/examples/textedit/filenew.xpm b/examples/textedit/filenew.xpm
new file mode 100644
index 0000000..884d7cb
--- /dev/null
+++ b/examples/textedit/filenew.xpm
@@ -0,0 +1,36 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"22 22 8 1",
+" c Gray100",
+". c Gray76",
+"X c Gray53",
+"o c Gray36",
+"O c Gray18",
+"+ c Gray0",
+"@ c None",
+"# c Gray0",
+/* pixels */
+"@@@@@@@@@@@@@@@@@@@@@@",
+"@@@@++++++++++@@@@@@@@",
+"@@@@+ +O+@@@@@@@",
+"@@@@+ +oO+@@@@@@",
+"@@@@+ +XoO+@@@@@",
+"@@@@+ +.XoO+@@@@",
+"@@@@+ + .XoO+@@@",
+"@@@@+ +++++++@@@",
+"@@@@+ +@@@",
+"@@@@+ +@@@",
+"@@@@+ +@@@",
+"@@@@+ +@@@",
+"@@@@+ +@@@",
+"@@@@+ +@@@",
+"@@@@+ +@@@",
+"@@@@+ +@@@",
+"@@@@+ +@@@",
+"@@@@+ +@@@",
+"@@@@+ +@@@",
+"@@@@+++++++++++++++@@@",
+"@@@@@@@@@@@@@@@@@@@@@@",
+"@@@@@@@@@@@@@@@@@@@@@@"
+};
diff --git a/examples/textedit/fileopen.xpm b/examples/textedit/fileopen.xpm
new file mode 100644
index 0000000..82effcf
--- /dev/null
+++ b/examples/textedit/fileopen.xpm
@@ -0,0 +1,36 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"22 22 8 1",
+" c Gray100",
+". c Yellow",
+"X c #848200",
+"o c Gray0",
+"O c None",
+"+ c Gray0",
+"@ c Gray0",
+"# c Gray0",
+/* pixels */
+"OOOOOOOOOOOOOOOOOOOOOO",
+"OOOOOOOOOOOOOOOOOOOOOO",
+"OOOOOOOOOOOOOOOOOOOOOO",
+"OOOOOOOOOOOOooooOOOOoO",
+"OOOOOOOOOOOoOOOOooOooO",
+"OOOOOOOOOOOOOOOOOOoooO",
+"OOOOOOOOOOOOOOOOOooooO",
+"OooooOOOOOOOOOOOoooooO",
+"o. . ooooooooooOOOOOOO",
+"o . . . . . . oOOOOOOO",
+"o. . . . . . .oOOOOOOO",
+"o . . . . . . oOOOOOOO",
+"o. . . ooooooooooooooo",
+"o . . ooXXXXXXXXXXXXoo",
+"o. . ooXXXXXXXXXXXXooO",
+"o . ooXXXXXXXXXXXXooOO",
+"o. ooXXXXXXXXXXXXooOOO",
+"o ooXXXXXXXXXXXXooOOOO",
+"oooXXXXXXXXXXXXooOOOOO",
+"ooXXXXXXXXXXXXooOOOOOO",
+"oooooooooooooooOOOOOOO",
+"OOOOOOOOOOOOOOOOOOOOOO"
+};
diff --git a/examples/textedit/fileprint.xpm b/examples/textedit/fileprint.xpm
new file mode 100644
index 0000000..8701d46
--- /dev/null
+++ b/examples/textedit/fileprint.xpm
@@ -0,0 +1,117 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"22 22 89 1",
+" c Gray0",
+". c #101008081010",
+"X c #101010101010",
+"o c #101010101818",
+"O c #181810101818",
+"+ c #181818181818",
+"@ c #181818182121",
+"# c #212118182121",
+"$ c Gray13",
+"% c #212121212929",
+"& c #292921212929",
+"* c Gray16",
+"= c #292929293131",
+"- c #313129293131",
+"; c #313131313131",
+": c #313131313939",
+"> c #393931313939",
+", c #393939393939",
+"< c #393939394242",
+"1 c #424239394242",
+"2 c Gray26",
+"3 c #4a4a4a4a5252",
+"4 c #5a5a52525a5a",
+"5 c #5a5a5a5a6363",
+"6 c #6b6b63636b6b",
+"7 c Gray42",
+"8 c #6b6b6b6b7373",
+"9 c #73736b6b7373",
+"0 c #7b7b73737b7b",
+"q c #7b7b73738484",
+"w c #0808ffff0808",
+"e c #2929ffff2929",
+"r c #3131ffff3131",
+"t c #5a5acece5a5a",
+"y c #6b6bffff6363",
+"u c #7b7bffff7b7b",
+"i c #84847b7b8484",
+"p c #84847b7b8c8c",
+"a c #8c8c7b7b9494",
+"s c #848484848c8c",
+"d c #8c8c84848c8c",
+"f c Gray55",
+"g c #8c8c84849494",
+"h c #8c8c8c8c9494",
+"j c #94948c8c9494",
+"k c #94948c8c9c9c",
+"l c Gray58",
+"z c #949494949c9c",
+"x c #9c9c94949c9c",
+"c c Gray61",
+"v c #9c9c9494a5a5",
+"b c #9c9c9c9ca5a5",
+"n c #a5a59c9ca5a5",
+"m c #a5a59c9cadad",
+"M c #adad9c9cadad",
+"N c #a5a5a5a5a5a5",
+"B c #a5a5a5a5adad",
+"V c #adada5a5adad",
+"C c Gray68",
+"Z c #adadadadb5b5",
+"A c #b5b5adadb5b5",
+"S c Gray71",
+"D c Gray74",
+"F c #9494c6c69494",
+"G c #9c9ccecea5a5",
+"H c #bdbdd6d6bdbd",
+"J c #c0c0c0c0c0c0",
+"K c #c6c6c6c6c6c6",
+"L c #cecec6c6cece",
+"P c #cececececece",
+"I c #cecececed6d6",
+"U c #d6d6ceced6d6",
+"Y c #d6d6cecedede",
+"T c Gray84",
+"R c #d6d6d6d6dede",
+"E c #deded6d6dede",
+"W c Gray87",
+"Q c #deded6d6e7e7",
+"! c #dedededee7e7",
+"~ c #d6d6ffffd6d6",
+"^ c #e7e7dedee7e7",
+"/ c #e7e7e7e7e7e7",
+"( c #e7e7e7e7efef",
+") c #efefe7e7efef",
+"_ c #efefefefefef",
+"` c #e7e7ffffe7e7",
+"' c Gray97",
+"] c Gray100",
+"[ c None",
+/* pixels */
+"[[[[[[SDPPPPKKDDCD[[[[",
+"[[[[[[D_/////___WD[[[[",
+"[[[[[[DKKKPPKKKKDK[[[[",
+"[[[[[[SDDDDSDDSSCD[[[[",
+"[[[[[KCKDKKKDDDKS[[[[[",
+"[[[[[DDSDDDDDDKKS[[[[[",
+"[[[[[DSKDDDDDKDKC[[[[[",
+"[[[[[KDDDDDDDDDDS[[[[[",
+"[[[[[CP/WWWWWWTWNNZ[[[",
+"[[[Dc9STPTPTPTWWj427S[",
+"[[Dziq0000000pag8<%@2N",
+"[DcE(!ERRRRUYGtFn2##O<",
+"Db)]]]]]]]]]~ewePa;@X#",
+"V']]]]]]]]]]`yru]Q0@ #",
+"BRILITRRW^!E!RHUILhO @",
+"jAZVBmBnmmNmnmMvzh6o #",
+"jZZmBnnnbnbbbbvxxg6o +",
+"lmmnbnbbbvcvxxxvjs6O 3",
+"jBnnvcvxvcvxvxzjhd8o+C",
+"lsdgfgdhgdhhjhjkhg6+l[",
+"S9%@$%&&&=--::>>:-:l[[",
+"[[C511,:;;;**%++.2c[[["
+};
diff --git a/examples/textedit/filesave.xpm b/examples/textedit/filesave.xpm
new file mode 100644
index 0000000..71cbd33
--- /dev/null
+++ b/examples/textedit/filesave.xpm
@@ -0,0 +1,36 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"22 22 8 1",
+" c Gray100",
+". c #cab5d1",
+"X c #c1c1c1",
+"o c #848200",
+"O c Gray0",
+"+ c None",
+"@ c Gray0",
+"# c Gray0",
+/* pixels */
+"++++++++++++++++++++++",
+"+OOOOOOOOOOOOOOOOOOOO+",
+"+OooOXXXXXXXXXXXXOXXO+",
+"+OooOXXXXXXXXXXXXOXXO+",
+"+OooOXXXXXXXXX.XXOOOO+",
+"+OooOXXX..XXXXXXXOooO+",
+"+OooOXXX..XXXXXXXOooO+",
+"+OooOXXXXXXXXXXXXOooO+",
+"+OooOXXXXXXXXXXXXOooO+",
+"+OooOXXXXXXXXXXXXOooO+",
+"+OooOXXXXXXXXXXXXOooO+",
+"+OoooOOOOOOOOOOOOoooO+",
+"+OooooooooooooooooooO+",
+"+OooooooooooooooooooO+",
+"+OoooOOOOOOOOOOOOOooO+",
+"+OoooOOOOOOOOOXXXOooO+",
+"+OoooOOOOOOOOOXXXOooO+",
+"+OoooOOOOOOOOOXXXOooO+",
+"+OoooOOOOOOOOOXXXOooO+",
+"+OoooOOOOOOOOOXXXOooO+",
+"++OOOOOOOOOOOOOOOOOO++",
+"++++++++++++++++++++++"
+};
diff --git a/examples/textedit/main.cpp b/examples/textedit/main.cpp
new file mode 100644
index 0000000..53907dd
--- /dev/null
+++ b/examples/textedit/main.cpp
@@ -0,0 +1,22 @@
+/****************************************************************************
+**
+** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved.
+**
+** This file is part of an example program for Qt. This example
+** program may be used, distributed and modified without limitation.
+**
+*****************************************************************************/
+
+#include <qapplication.h>
+#include "textedit.h"
+
+int main( int argc, char ** argv )
+{
+ QApplication a( argc, argv );
+ TextEdit * mw = new TextEdit();
+ mw->setCaption( "Richtext Editor" );
+ mw->resize( 640, 800 );
+ mw->show();
+ a.connect( &a, SIGNAL( lastWindowClosed() ), &a, SLOT( quit() ) );
+ return a.exec();
+}
diff --git a/examples/textedit/textbold.xpm b/examples/textedit/textbold.xpm
new file mode 100644
index 0000000..8398e2e
--- /dev/null
+++ b/examples/textedit/textbold.xpm
@@ -0,0 +1,27 @@
+/* XPM */
+static char * bold_xpm[] = {
+"22 22 2 1",
+" c None",
+". c #000000",
+" ",
+" ",
+" ",
+" ",
+" ......... ",
+" ... ... ",
+" ... ... ",
+" ... ... ",
+" ... ... ",
+" ... ... ",
+" ........ ",
+" ... .... ",
+" ... .... ",
+" ... ... ",
+" ... ... ",
+" ... ... ",
+" ... ... ",
+" .......... ",
+" ",
+" ",
+" ",
+" "};
diff --git a/examples/textedit/textcenter.xpm b/examples/textedit/textcenter.xpm
new file mode 100644
index 0000000..837152f
--- /dev/null
+++ b/examples/textedit/textcenter.xpm
@@ -0,0 +1,27 @@
+/* XPM */
+static char * center_xpm[] = {
+"22 22 2 1",
+" c None",
+". c #000000",
+" ",
+" ",
+" ................. ",
+" ",
+" ............. ",
+" ",
+" ................. ",
+" ",
+" ............. ",
+" ",
+" ................. ",
+" ",
+" ............. ",
+" ",
+" ................. ",
+" ",
+" ............. ",
+" ",
+" ................. ",
+" ",
+" ",
+" "};
diff --git a/examples/textedit/textedit.cpp b/examples/textedit/textedit.cpp
new file mode 100644
index 0000000..1523d18
--- /dev/null
+++ b/examples/textedit/textedit.cpp
@@ -0,0 +1,455 @@
+/****************************************************************************
+**
+** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved.
+**
+** This file is part of an example program for Qt. This example
+** program may be used, distributed and modified without limitation.
+**
+*****************************************************************************/
+
+#include "textedit.h"
+
+#include <qtextedit.h>
+#include <qaction.h>
+#include <qmenubar.h>
+#include <qpopupmenu.h>
+#include <qtoolbar.h>
+#include <qtabwidget.h>
+#include <qapplication.h>
+#include <qfontdatabase.h>
+#include <qcombobox.h>
+#include <qlineedit.h>
+#include <qfileinfo.h>
+#include <qfile.h>
+#include <qfiledialog.h>
+#include <qprinter.h>
+#include <qpaintdevicemetrics.h>
+#include <qsimplerichtext.h>
+#include <qcolordialog.h>
+#include <qpainter.h>
+
+TextEdit::TextEdit( QWidget *parent, const char *name )
+ : QMainWindow( parent, name )
+{
+ setupFileActions();
+ setupEditActions();
+ setupTextActions();
+
+ tabWidget = new QTabWidget( this );
+ connect( tabWidget, SIGNAL( currentChanged( QWidget * ) ),
+ this, SLOT( editorChanged( QWidget * ) ) );
+ setCentralWidget( tabWidget );
+
+ if ( qApp->argc() == 1 ) {
+ load( "example.html" );
+ } else {
+ for ( int i = 1; i < qApp->argc(); ++i )
+ load( qApp->argv()[ i ] );
+ }
+}
+
+void TextEdit::setupFileActions()
+{
+ QToolBar *tb = new QToolBar( this );
+ tb->setLabel( "File Actions" );
+ QPopupMenu *menu = new QPopupMenu( this );
+ menuBar()->insertItem( tr( "&File" ), menu );
+
+ QAction *a;
+ a = new QAction( QPixmap::fromMimeSource( "filenew.xpm" ), tr( "&New..." ), CTRL + Key_N, this, "fileNew" );
+ connect( a, SIGNAL( activated() ), this, SLOT( fileNew() ) );
+ a->addTo( tb );
+ a->addTo( menu );
+ a = new QAction( QPixmap::fromMimeSource( "fileopen.xpm" ), tr( "&Open..." ), CTRL + Key_O, this, "fileOpen" );
+ connect( a, SIGNAL( activated() ), this, SLOT( fileOpen() ) );
+ a->addTo( tb );
+ a->addTo( menu );
+ menu->insertSeparator();
+ a = new QAction( QPixmap::fromMimeSource( "filesave.xpm" ), tr( "&Save..." ), CTRL + Key_S, this, "fileSave" );
+ connect( a, SIGNAL( activated() ), this, SLOT( fileSave() ) );
+ a->addTo( tb );
+ a->addTo( menu );
+ a = new QAction( tr( "Save &As..." ), 0, this, "fileSaveAs" );
+ connect( a, SIGNAL( activated() ), this, SLOT( fileSaveAs() ) );
+ a->addTo( menu );
+ menu->insertSeparator();
+ a = new QAction( QPixmap::fromMimeSource( "fileprint.xpm" ), tr( "&Print..." ), CTRL + Key_P, this, "filePrint" );
+ connect( a, SIGNAL( activated() ), this, SLOT( filePrint() ) );
+ a->addTo( tb );
+ a->addTo( menu );
+ a = new QAction( tr( "&Close" ), 0, this, "fileClose" );
+ connect( a, SIGNAL( activated() ), this, SLOT( fileClose() ) );
+ a->addTo( menu );
+ a = new QAction( tr( "E&xit" ), 0, this, "fileExit" );
+ connect( a, SIGNAL( activated() ), this, SLOT( fileExit() ) );
+ a->addTo( menu );
+}
+
+void TextEdit::setupEditActions()
+{
+ QToolBar *tb = new QToolBar( this );
+ tb->setLabel( "Edit Actions" );
+ QPopupMenu *menu = new QPopupMenu( this );
+ menuBar()->insertItem( tr( "&Edit" ), menu );
+
+ QAction *a;
+ a = new QAction( QPixmap::fromMimeSource( "editundo.xpm" ), tr( "&Undo" ), CTRL + Key_Z, this, "editUndo" );
+ connect( a, SIGNAL( activated() ), this, SLOT( editUndo() ) );
+ a->addTo( tb );
+ a->addTo( menu );
+ a = new QAction( QPixmap::fromMimeSource( "editredo.xpm" ), tr( "&Redo" ), CTRL + Key_Y, this, "editRedo" );
+ connect( a, SIGNAL( activated() ), this, SLOT( editRedo() ) );
+ a->addTo( tb );
+ a->addTo( menu );
+ menu->insertSeparator();
+ a = new QAction( QPixmap::fromMimeSource( "editcopy.xpm" ), tr( "&Copy" ), CTRL + Key_C, this, "editCopy" );
+ connect( a, SIGNAL( activated() ), this, SLOT( editCopy() ) );
+ a->addTo( tb );
+ a->addTo( menu );
+ a = new QAction( QPixmap::fromMimeSource( "editcut.xpm" ), tr( "Cu&t" ), CTRL + Key_X, this, "editCut" );
+ connect( a, SIGNAL( activated() ), this, SLOT( editCut() ) );
+ a->addTo( tb );
+ a->addTo( menu );
+ a = new QAction( QPixmap::fromMimeSource( "editpaste.xpm" ), tr( "&Paste" ), CTRL + Key_V, this, "editPaste" );
+ connect( a, SIGNAL( activated() ), this, SLOT( editPaste() ) );
+ a->addTo( tb );
+ a->addTo( menu );
+}
+
+void TextEdit::setupTextActions()
+{
+ QToolBar *tb = new QToolBar( this );
+ tb->setLabel( "Format Actions" );
+ QPopupMenu *menu = new QPopupMenu( this );
+ menuBar()->insertItem( tr( "F&ormat" ), menu );
+
+ comboFont = new QComboBox( TRUE, tb );
+ QFontDatabase db;
+ comboFont->insertStringList( db.families() );
+ connect( comboFont, SIGNAL( activated( const QString & ) ),
+ this, SLOT( textFamily( const QString & ) ) );
+ comboFont->lineEdit()->setText( QApplication::font().family() );
+
+ comboSize = new QComboBox( TRUE, tb );
+ QValueList<int> sizes = db.standardSizes();
+ QValueList<int>::Iterator it = sizes.begin();
+ for ( ; it != sizes.end(); ++it )
+ comboSize->insertItem( QString::number( *it ) );
+ connect( comboSize, SIGNAL( activated( const QString & ) ),
+ this, SLOT( textSize( const QString & ) ) );
+ comboSize->lineEdit()->setText( QString::number( QApplication::font().pointSize() ) );
+
+ actionTextBold = new QAction( QPixmap::fromMimeSource( "textbold.xpm" ), tr( "&Bold" ), CTRL + Key_B, this, "textBold" );
+ connect( actionTextBold, SIGNAL( activated() ), this, SLOT( textBold() ) );
+ actionTextBold->addTo( tb );
+ actionTextBold->addTo( menu );
+ actionTextBold->setToggleAction( TRUE );
+ actionTextItalic = new QAction( QPixmap::fromMimeSource( "textitalic.xpm" ), tr( "&Italic" ), CTRL + Key_I, this, "textItalic" );
+ connect( actionTextItalic, SIGNAL( activated() ), this, SLOT( textItalic() ) );
+ actionTextItalic->addTo( tb );
+ actionTextItalic->addTo( menu );
+ actionTextItalic->setToggleAction( TRUE );
+ actionTextUnderline = new QAction( QPixmap::fromMimeSource( "textunder.xpm" ), tr( "&Underline" ), CTRL + Key_U, this, "textUnderline" );
+ connect( actionTextUnderline, SIGNAL( activated() ), this, SLOT( textUnderline() ) );
+ actionTextUnderline->addTo( tb );
+ actionTextUnderline->addTo( menu );
+ actionTextUnderline->setToggleAction( TRUE );
+ menu->insertSeparator();
+
+ QActionGroup *grp = new QActionGroup( this );
+ connect( grp, SIGNAL( selected( QAction* ) ), this, SLOT( textAlign( QAction* ) ) );
+
+ actionAlignLeft = new QAction( QPixmap::fromMimeSource( "textleft.xpm" ), tr( "&Left" ), CTRL + Key_L, grp, "textLeft" );
+ actionAlignLeft->setToggleAction( TRUE );
+ actionAlignCenter = new QAction( QPixmap::fromMimeSource( "textcenter.xpm" ), tr( "C&enter" ), CTRL + Key_E, grp, "textCenter" );
+ actionAlignCenter->setToggleAction( TRUE );
+ actionAlignRight = new QAction( QPixmap::fromMimeSource( "textright.xpm" ), tr( "&Right" ), CTRL + Key_R, grp, "textRight" );
+ actionAlignRight->setToggleAction( TRUE );
+ actionAlignJustify = new QAction( QPixmap::fromMimeSource( "textjustify.xpm" ), tr( "&Justify" ), CTRL + Key_J, grp, "textjustify" );
+ actionAlignJustify->setToggleAction( TRUE );
+
+ grp->addTo( tb );
+ grp->addTo( menu );
+
+ menu->insertSeparator();
+
+ QPixmap pix( 16, 16 );
+ pix.fill( black );
+ actionTextColor = new QAction( pix, tr( "&Color..." ), 0, this, "textColor" );
+ connect( actionTextColor, SIGNAL( activated() ), this, SLOT( textColor() ) );
+ actionTextColor->addTo( tb );
+ actionTextColor->addTo( menu );
+}
+
+void TextEdit::load( const QString &f )
+{
+ if ( !QFile::exists( f ) )
+ return;
+ QTextEdit *edit = new QTextEdit( tabWidget );
+ edit->setTextFormat( RichText );
+ doConnections( edit );
+ tabWidget->addTab( edit, QFileInfo( f ).fileName() );
+ QFile file( f );
+ if ( !file.open( IO_ReadOnly ) )
+ return;
+ QTextStream ts( &file );
+ QString txt = ts.read();
+ if ( !QStyleSheet::mightBeRichText( txt ) )
+ txt = QStyleSheet::convertFromPlainText( txt, QStyleSheetItem::WhiteSpacePre );
+ edit->setText( txt );
+ tabWidget->showPage( edit );
+ edit->viewport()->setFocus();
+ filenames.replace( edit, f );
+}
+
+QTextEdit *TextEdit::currentEditor() const
+{
+ if ( tabWidget->currentPage() &&
+ tabWidget->currentPage()->inherits( "QTextEdit" ) )
+ return (QTextEdit*)tabWidget->currentPage();
+ return 0;
+}
+
+void TextEdit::doConnections( QTextEdit *e )
+{
+ connect( e, SIGNAL( currentFontChanged( const QFont & ) ),
+ this, SLOT( fontChanged( const QFont & ) ) );
+ connect( e, SIGNAL( currentColorChanged( const QColor & ) ),
+ this, SLOT( colorChanged( const QColor & ) ) );
+ connect( e, SIGNAL( currentAlignmentChanged( int ) ),
+ this, SLOT( alignmentChanged( int ) ) );
+}
+
+void TextEdit::fileNew()
+{
+ QTextEdit *edit = new QTextEdit( tabWidget );
+ edit->setTextFormat( RichText );
+ doConnections( edit );
+ tabWidget->addTab( edit, tr( "noname" ) );
+ tabWidget->showPage( edit );
+ edit->viewport()->setFocus();
+}
+
+void TextEdit::fileOpen()
+{
+ QString fn = QFileDialog::getOpenFileName( QString::null, tr( "HTML-Files (*.htm *.html);;All Files (*)" ), this );
+ if ( !fn.isEmpty() )
+ load( fn );
+}
+
+void TextEdit::fileSave()
+{
+ if ( !currentEditor() )
+ return;
+ QString fn;
+ if ( filenames.find( currentEditor() ) == filenames.end() ) {
+ fileSaveAs();
+ } else {
+ QFile file( *filenames.find( currentEditor() ) );
+ if ( !file.open( IO_WriteOnly ) )
+ return;
+ QTextStream ts( &file );
+ ts << currentEditor()->text();
+ }
+}
+
+void TextEdit::fileSaveAs()
+{
+ if ( !currentEditor() )
+ return;
+ QString fn = QFileDialog::getSaveFileName( QString::null, tr( "HTML-Files (*.htm *.html);;All Files (*)" ), this );
+ if ( !fn.isEmpty() ) {
+ filenames.replace( currentEditor(), fn );
+ fileSave();
+ tabWidget->setTabLabel( currentEditor(), QFileInfo( fn ).fileName() );
+ }
+}
+
+void TextEdit::filePrint()
+{
+ if ( !currentEditor() )
+ return;
+#ifndef QT_NO_PRINTER
+ QPrinter printer( QPrinter::HighResolution );
+ printer.setFullPage(TRUE);
+ if ( printer.setup( this ) ) {
+ QPainter p( &printer );
+ // Check that there is a valid device to print to.
+ if ( !p.device() ) return;
+ QPaintDeviceMetrics metrics( p.device() );
+ int dpiy = metrics.logicalDpiY();
+ int margin = (int) ( (2/2.54)*dpiy ); // 2 cm margins
+ QRect view( margin, margin, metrics.width() - 2*margin, metrics.height() - 2*margin );
+ QFont font( currentEditor()->QWidget::font() );
+ font.setPointSize( 10 ); // we define 10pt to be a nice base size for printing
+
+ QSimpleRichText richText( currentEditor()->text(), font,
+ currentEditor()->context(),
+ currentEditor()->styleSheet(),
+ currentEditor()->mimeSourceFactory(),
+ view.height() );
+ richText.setWidth( &p, view.width() );
+ int page = 1;
+ do {
+ richText.draw( &p, margin, margin, view, colorGroup() );
+ view.moveBy( 0, view.height() );
+ p.translate( 0 , -view.height() );
+ p.setFont( font );
+ p.drawText( view.right() - p.fontMetrics().width( QString::number( page ) ),
+ view.bottom() + p.fontMetrics().ascent() + 5, QString::number( page ) );
+ if ( view.top() - margin >= richText.height() )
+ break;
+ printer.newPage();
+ page++;
+ } while (TRUE);
+ }
+#endif
+}
+
+void TextEdit::fileClose()
+{
+ delete currentEditor();
+ if ( currentEditor() )
+ currentEditor()->viewport()->setFocus();
+}
+
+void TextEdit::fileExit()
+{
+ qApp->quit();
+}
+
+void TextEdit::editUndo()
+{
+ if ( !currentEditor() )
+ return;
+ currentEditor()->undo();
+}
+
+void TextEdit::editRedo()
+{
+ if ( !currentEditor() )
+ return;
+ currentEditor()->redo();
+}
+
+void TextEdit::editCut()
+{
+ if ( !currentEditor() )
+ return;
+ currentEditor()->cut();
+}
+
+void TextEdit::editCopy()
+{
+ if ( !currentEditor() )
+ return;
+ currentEditor()->copy();
+}
+
+void TextEdit::editPaste()
+{
+ if ( !currentEditor() )
+ return;
+ currentEditor()->paste();
+}
+
+void TextEdit::textBold()
+{
+ if ( !currentEditor() )
+ return;
+ currentEditor()->setBold( actionTextBold->isOn() );
+}
+
+void TextEdit::textUnderline()
+{
+ if ( !currentEditor() )
+ return;
+ currentEditor()->setUnderline( actionTextUnderline->isOn() );
+}
+
+void TextEdit::textItalic()
+{
+ if ( !currentEditor() )
+ return;
+ currentEditor()->setItalic( actionTextItalic->isOn() );
+}
+
+void TextEdit::textFamily( const QString &f )
+{
+ if ( !currentEditor() )
+ return;
+ currentEditor()->setFamily( f );
+ currentEditor()->viewport()->setFocus();
+}
+
+void TextEdit::textSize( const QString &p )
+{
+ if ( !currentEditor() )
+ return;
+ currentEditor()->setPointSize( p.toInt() );
+ currentEditor()->viewport()->setFocus();
+}
+
+void TextEdit::textColor()
+{
+ if ( !currentEditor() )
+ return;
+ QColor col = QColorDialog::getColor( currentEditor()->color(), this );
+ if ( !col.isValid() )
+ return;
+ currentEditor()->setColor( col );
+ QPixmap pix( 16, 16 );
+ pix.fill( black );
+ actionTextColor->setIconSet( pix );
+}
+
+void TextEdit::textAlign( QAction *a )
+{
+ if ( !currentEditor() )
+ return;
+ if ( a == actionAlignLeft )
+ currentEditor()->setAlignment( AlignLeft );
+ else if ( a == actionAlignCenter )
+ currentEditor()->setAlignment( AlignHCenter );
+ else if ( a == actionAlignRight )
+ currentEditor()->setAlignment( AlignRight );
+ else if ( a == actionAlignJustify )
+ currentEditor()->setAlignment( AlignJustify );
+}
+
+void TextEdit::fontChanged( const QFont &f )
+{
+ comboFont->lineEdit()->setText( f.family() );
+ comboSize->lineEdit()->setText( QString::number( f.pointSize() ) );
+ actionTextBold->setOn( f.bold() );
+ actionTextItalic->setOn( f.italic() );
+ actionTextUnderline->setOn( f.underline() );
+}
+
+void TextEdit::colorChanged( const QColor &c )
+{
+ QPixmap pix( 16, 16 );
+ pix.fill( c );
+ actionTextColor->setIconSet( pix );
+}
+
+void TextEdit::alignmentChanged( int a )
+{
+ if ( ( a == AlignAuto ) || ( a & AlignLeft ))
+ actionAlignLeft->setOn( TRUE );
+ else if ( ( a & AlignHCenter ) )
+ actionAlignCenter->setOn( TRUE );
+ else if ( ( a & AlignRight ) )
+ actionAlignRight->setOn( TRUE );
+ else if ( ( a & AlignJustify ) )
+ actionAlignJustify->setOn( TRUE );
+}
+
+void TextEdit::editorChanged( QWidget * )
+{
+ if ( !currentEditor() )
+ return;
+ fontChanged( currentEditor()->currentFont() );
+ colorChanged( currentEditor()->color() );
+ alignmentChanged( currentEditor()->alignment() );
+}
diff --git a/examples/textedit/textedit.doc b/examples/textedit/textedit.doc
new file mode 100644
index 0000000..53279b9
--- /dev/null
+++ b/examples/textedit/textedit.doc
@@ -0,0 +1,18 @@
+/*! \page textedit-example.html
+
+ \ingroup examples
+ \title Text Edit Example
+
+ This example displays a text editor with the user interface written
+ in pure C++.
+
+ A similar example which uses \link designer-manual.book Qt
+ Designer\endlink to produce the user interface is in the \link
+ designer-manual.book Qt Designer manual\endlink.
+
+
+ See \c{$QTDIR/examples/textedit} for the source code.
+
+*/
+
+
diff --git a/examples/textedit/textedit.h b/examples/textedit/textedit.h
new file mode 100644
index 0000000..3c3aacb
--- /dev/null
+++ b/examples/textedit/textedit.h
@@ -0,0 +1,82 @@
+/****************************************************************************
+**
+** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved.
+**
+** This file is part of an example program for Qt. This example
+** program may be used, distributed and modified without limitation.
+**
+*****************************************************************************/
+
+#ifndef TEXTEDIT_H
+#define TEXTEDIT_H
+
+#include <qmainwindow.h>
+#include <qmap.h>
+
+class QAction;
+class QComboBox;
+class QTabWidget;
+class QTextEdit;
+
+class TextEdit : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ TextEdit( QWidget *parent = 0, const char *name = 0 );
+
+private:
+ void setupFileActions();
+ void setupEditActions();
+ void setupTextActions();
+ void load( const QString &f );
+ QTextEdit *currentEditor() const;
+ void doConnections( QTextEdit *e );
+
+private slots:
+ void fileNew();
+ void fileOpen();
+ void fileSave();
+ void fileSaveAs();
+ void filePrint();
+ void fileClose();
+ void fileExit();
+
+ void editUndo();
+ void editRedo();
+ void editCut();
+ void editCopy();
+ void editPaste();
+
+ void textBold();
+ void textUnderline();
+ void textItalic();
+ void textFamily( const QString &f );
+ void textSize( const QString &p );
+ void textColor();
+ void textAlign( QAction *a );
+
+ void fontChanged( const QFont &f );
+ void colorChanged( const QColor &c );
+ void alignmentChanged( int a );
+ void editorChanged( QWidget * );
+
+private:
+ QAction *actionTextBold,
+ *actionTextUnderline,
+ *actionTextItalic,
+ *actionTextColor,
+ *actionAlignLeft,
+ *actionAlignCenter,
+ *actionAlignRight,
+ *actionAlignJustify;
+ QComboBox
+ *comboFont,
+ *comboSize;
+ QTabWidget *tabWidget;
+ QMap<QTextEdit*, QString> filenames;
+
+};
+
+
+#endif
diff --git a/examples/textedit/textedit.pro b/examples/textedit/textedit.pro
new file mode 100644
index 0000000..eeb2067
--- /dev/null
+++ b/examples/textedit/textedit.pro
@@ -0,0 +1,11 @@
+TEMPLATE = app
+TARGET = textedit
+
+CONFIG += qt warn_on release
+
+REQUIRES = full-config nocrosscompiler
+
+HEADERS = textedit.h
+SOURCES = textedit.cpp \
+ main.cpp
+IMAGES = editcopy.xpm editcut.xpm editpaste.xpm editredo.xpm editundo.xpm filenew.xpm fileopen.xpm fileprint.xpm filesave.xpm textbold.xpm textcenter.xpm textitalic.xpm textjustify.xpm textleft.xpm textright.xpm textunder.xpm
diff --git a/examples/textedit/textitalic.xpm b/examples/textedit/textitalic.xpm
new file mode 100644
index 0000000..329e66d
--- /dev/null
+++ b/examples/textedit/textitalic.xpm
@@ -0,0 +1,27 @@
+/* XPM */
+static char * italic_xpm[] = {
+"22 22 2 1",
+" c None",
+". c #000000",
+" ",
+" ",
+" ",
+" ",
+" ..... ",
+" ... ",
+" ... ",
+" ... ",
+" ... ",
+" ... ",
+" ... ",
+" ... ",
+" ... ",
+" ... ",
+" ... ",
+" ... ",
+" ... ",
+" ..... ",
+" ",
+" ",
+" ",
+" "};
diff --git a/examples/textedit/textjustify.xpm b/examples/textedit/textjustify.xpm
new file mode 100644
index 0000000..75b4a27
--- /dev/null
+++ b/examples/textedit/textjustify.xpm
@@ -0,0 +1,27 @@
+/* XPM */
+static char * block_xpm[] = {
+"22 22 2 1",
+" c None",
+". c #000000",
+" ",
+" ",
+" ................. ",
+" ",
+" ................. ",
+" ",
+" ................. ",
+" ",
+" ................. ",
+" ",
+" ................. ",
+" ",
+" ................. ",
+" ",
+" ................. ",
+" ",
+" ................. ",
+" ",
+" ............. ",
+" ",
+" ",
+" "};
diff --git a/examples/textedit/textleft.xpm b/examples/textedit/textleft.xpm
new file mode 100644
index 0000000..a63e7ce
--- /dev/null
+++ b/examples/textedit/textleft.xpm
@@ -0,0 +1,27 @@
+/* XPM */
+static char * left_xpm[] = {
+"22 22 2 1",
+" c None",
+". c #000000",
+" ",
+" ",
+" ................. ",
+" ",
+" ............. ",
+" ",
+" ................. ",
+" ",
+" ............. ",
+" ",
+" ................. ",
+" ",
+" ............. ",
+" ",
+" ................. ",
+" ",
+" ............. ",
+" ",
+" ................. ",
+" ",
+" ",
+" "};
diff --git a/examples/textedit/textright.xpm b/examples/textedit/textright.xpm
new file mode 100644
index 0000000..3e896bd
--- /dev/null
+++ b/examples/textedit/textright.xpm
@@ -0,0 +1,27 @@
+/* XPM */
+static char * right_xpm[] = {
+"22 22 2 1",
+" c None",
+". c #000000",
+" ",
+" ",
+" ................. ",
+" ",
+" ............. ",
+" ",
+" ................. ",
+" ",
+" ............. ",
+" ",
+" ................. ",
+" ",
+" ............. ",
+" ",
+" ................. ",
+" ",
+" ............. ",
+" ",
+" ................. ",
+" ",
+" ",
+" "};
diff --git a/examples/textedit/textunder.xpm b/examples/textedit/textunder.xpm
new file mode 100644
index 0000000..ec962a7
--- /dev/null
+++ b/examples/textedit/textunder.xpm
@@ -0,0 +1,27 @@
+/* XPM */
+static char * under_xpm[] = {
+"22 22 2 1",
+" c None",
+". c #000000",
+" ",
+" ",
+" ",
+" ",
+" ..... .... ",
+" ... . ",
+" ... . ",
+" ... . ",
+" ... . ",
+" ... . ",
+" ... . ",
+" ... . ",
+" ... . ",
+" ... . ",
+" ... .. ",
+" ... .. ",
+" ...... ",
+" ",
+" ............ ",
+" ",
+" ",
+" "};