From 0e787fb7f5b56b4fe87cd8ada64ae740bbca87bc Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Wed, 24 Jul 2024 19:37:05 +0900 Subject: Rename text class nt* related files to equivalent tq* Signed-off-by: Michele Calgaro --- doc/application-walkthrough.doc | 6 +- doc/classchart.doc | 16 +- doc/features.doc | 2 +- doc/focus.doc | 2 +- doc/html/addressbook-example.html | 20 +- doc/html/annotated.html | 16 +- doc/html/basic.html | 4 +- doc/html/canvas-example.html | 2 +- doc/html/chart-optionsform-cpp.html | 14 +- doc/html/chart-optionsform-h.html | 6 +- doc/html/checklists-example.html | 14 +- doc/html/classchart.html | 16 +- doc/html/classes.html | 16 +- doc/html/clientserver-example.html | 8 +- doc/html/cursor-example.html | 22 +- doc/html/customlayout-example.html | 8 +- doc/html/designer-manual-2.html | 2 +- doc/html/designer-manual-4.html | 10 +- doc/html/designer-manual-9.html | 6 +- doc/html/fileiconview-example.html | 12 +- doc/html/focus.html | 2 +- doc/html/ftpclient-example.html | 14 +- doc/html/functions.html | 198 +- doc/html/headerfilesynonyms | 6 +- doc/html/headers.html | 10 +- doc/html/helpsystem-example.html | 12 +- doc/html/helpsystem.html | 2 +- doc/html/helpviewer-example.html | 10 +- doc/html/hierarchy.html | 16 +- doc/html/httpd-example.html | 6 +- doc/html/i18n-example.html | 6 +- doc/html/i18n.html | 10 +- doc/html/index | 260 +- doc/html/layout-example.html | 10 +- doc/html/layout.html | 22 +- doc/html/licenses.html | 2 +- doc/html/lineedits-example.html | 12 +- doc/html/linguist-manual-4.html | 6 +- doc/html/listbox-example.html | 10 +- doc/html/listboxcombo-example.html | 12 +- doc/html/listviews-example.html | 14 +- doc/html/mainclasses.html | 6 +- doc/html/mdi-example.html | 20 +- doc/html/menu-example.html | 26 +- doc/html/motif-walkthrough-2.html | 4 +- doc/html/motif-walkthrough-8.html | 2 +- doc/html/motif-walkthrough-9.html | 4 +- doc/html/movies-example.html | 4 +- doc/html/ntqaccel.html | 8 +- doc/html/ntqaccessible.html | 2 +- doc/html/ntqerrormessage.html | 2 +- doc/html/ntqframe.html | 8 +- doc/html/ntqguardedptr.html | 2 +- doc/html/ntqlabel.html | 420 -- doc/html/ntqlcdnumber.html | 2 +- doc/html/ntqlineedit.html | 4 +- doc/html/ntqlocale.html | 852 --- doc/html/ntqprogressdialog.html | 2 +- doc/html/ntqscrollview.html | 22 +- doc/html/ntqsimplerichtext.html | 223 - doc/html/ntqsyntaxhighlighter.html | 158 - doc/html/ntqt.html | 4 +- doc/html/ntqwhatsthis.html | 239 - doc/html/pictures.html | 2 +- doc/html/popup-example.html | 10 +- doc/html/porting.html | 8 +- doc/html/progress-example.html | 4 +- doc/html/propertydocs | 66 +- doc/html/propertyindex | 12 +- doc/html/qchar-members.html | 74 - doc/html/qchar.html | 599 -- doc/html/qcharref-members.html | 46 - doc/html/qcharref.html | 64 - doc/html/qconststring-members.html | 49 - doc/html/qconststring.html | 91 - doc/html/qfd-example.html | 6 +- doc/html/qgridlayout.html | 2 +- doc/html/qlabel-h.html | 219 - doc/html/qlabel-m.png | Bin 318 -> 0 bytes doc/html/qlabel-members.html | 378 -- doc/html/qlabel-w.png | Bin 318 -> 0 bytes doc/html/qlocale-h.html | 539 -- doc/html/qlocale-members.html | 67 - doc/html/qmag-example.html | 16 +- doc/html/qmake-manual-7.html | 6 +- doc/html/qprogressdialog-h.html | 2 +- doc/html/qsimplerichtext-h.html | 149 - doc/html/qsimplerichtext-members.html | 58 - doc/html/qsyntaxhighlighter-h.html | 126 - doc/html/qsyntaxhighlighter-members.html | 53 - doc/html/qt.dcf | 302 +- doc/html/qwhatsthis-h.html | 126 - doc/html/qwhatsthis-members.html | 59 - doc/html/rangecontrols-example.html | 8 +- doc/html/regexptester-example.html | 18 +- doc/html/scrollview-example.html | 2 +- doc/html/showimg-example.html | 12 +- doc/html/simple-application-example.html | 18 +- doc/html/simple-application.html | 18 +- doc/html/splitter-example.html | 2 +- doc/html/sql-overview-custom1-main-cpp.html | 6 +- doc/html/sql-overview-custom1-main-h.html | 2 +- doc/html/sql-overview-form1-main-cpp.html | 12 +- doc/html/sql-overview-form2-main-h.html | 2 +- doc/html/sql.html | 12 +- doc/html/t12-lcdrange-cpp.html | 10 +- doc/html/t12-lcdrange-h.html | 2 +- doc/html/t13-gamebrd-cpp.html | 6 +- doc/html/t13-lcdrange-cpp.html | 10 +- doc/html/t13-lcdrange-h.html | 2 +- doc/html/t14-gamebrd-cpp.html | 6 +- doc/html/t14-lcdrange-cpp.html | 10 +- doc/html/t14-lcdrange-h.html | 2 +- doc/html/tabdialog-example.html | 30 +- doc/html/tagreader-with-features-example.html | 8 +- doc/html/text.html | 14 +- doc/html/themes-example.html | 4 +- doc/html/tictac-example.html | 10 +- doc/html/titleindex | 42 +- doc/html/toplevel-example.html | 6 +- doc/html/tqaction-application-example.html | 12 +- doc/html/tqaction.html | 2 +- doc/html/tqchar-members.html | 74 + doc/html/tqchar.html | 599 ++ doc/html/tqcharref-members.html | 46 + doc/html/tqcharref.html | 64 + doc/html/tqconststring-members.html | 49 + doc/html/tqconststring.html | 91 + doc/html/tqdir-example.html | 4 +- doc/html/tqfiledialog.html | 18 +- doc/html/tqfontmetrics.html | 12 +- doc/html/tqimageconsumer.html | 2 +- doc/html/tqlabel-h.html | 219 + doc/html/tqlabel-m.png | Bin 0 -> 318 bytes doc/html/tqlabel-members.html | 378 ++ doc/html/tqlabel-w.png | Bin 0 -> 318 bytes doc/html/tqlabel.html | 420 ++ doc/html/tqlocale-h.html | 539 ++ doc/html/tqlocale-members.html | 67 + doc/html/tqlocale.html | 852 +++ doc/html/tqmainwindow.html | 4 +- doc/html/tqmenubar.html | 2 +- doc/html/tqmenudata.html | 2 +- doc/html/tqmimesourcefactory.html | 6 +- doc/html/tqmovie.html | 6 +- doc/html/tqobject.html | 4 +- doc/html/tqpixmap.html | 2 +- doc/html/tqpopupmenu.html | 4 +- doc/html/tqregexp.html | 8 +- doc/html/tqsettings.html | 4 +- doc/html/tqsimplerichtext-h.html | 149 + doc/html/tqsimplerichtext-members.html | 58 + doc/html/tqsimplerichtext.html | 223 + doc/html/tqsizepolicy.html | 2 +- doc/html/tqsqlpropertymap.html | 2 +- doc/html/tqstatusbar.html | 4 +- doc/html/tqstring.html | 106 +- doc/html/tqstringlist.html | 4 +- doc/html/tqstyle.html | 2 +- doc/html/tqstylesheet.html | 14 +- doc/html/tqsyntaxhighlighter-h.html | 126 + doc/html/tqsyntaxhighlighter-members.html | 53 + doc/html/tqsyntaxhighlighter.html | 158 + doc/html/tqtextbrowser.html | 2 +- doc/html/tqtextcodec.html | 6 +- doc/html/tqtextedit.html | 10 +- doc/html/tqtextstream.html | 4 +- doc/html/tqtooltip.html | 2 +- doc/html/tqwhatsthis-h.html | 126 + doc/html/tqwhatsthis-members.html | 59 + doc/html/tqwhatsthis.html | 239 + doc/html/tqwidget.html | 8 +- doc/html/tqxmlinputsource.html | 2 +- doc/html/tutorial1-12.html | 18 +- doc/html/tutorial1-13.html | 6 +- doc/html/tutorial2-09.html | 16 +- doc/html/unicode.html | 2 +- doc/html/whatsthis | 14 +- doc/html/wizard-example.html | 88 +- doc/html/wizard-wizard-cpp.html | 86 +- doc/html/wizard-wizard-h.html | 2 +- doc/html/xform-example.html | 2 +- doc/html/xml-sax-features-walkthrough.html | 8 +- doc/i18n.doc | 8 +- doc/layout.doc | 22 +- doc/man/man3/tqaccel.3qt | 8 +- doc/man/man3/tqaccessible.3qt | 2 +- doc/man/man3/tqaction.3qt | 2 +- doc/man/man3/tqchar.3qt | 86 +- doc/man/man3/tqcharref.3qt | 12 +- doc/man/man3/tqconststring.3qt | 26 +- doc/man/man3/tqerrormessage.3qt | 2 +- doc/man/man3/tqfiledialog.3qt | 20 +- doc/man/man3/tqframe.3qt | 8 +- doc/man/man3/tqgridlayout.3qt | 2 +- doc/man/man3/tqguardedptr.3qt | 4 +- doc/man/man3/tqhebrewcodec.3qt | 2 +- doc/man/man3/tqimageconsumer.3qt | 2 +- doc/man/man3/tqlabel.3qt | 106 +- doc/man/man3/tqlcdnumber.3qt | 2 +- doc/man/man3/tqlineedit.3qt | 2 +- doc/man/man3/tqlocale.3qt | 916 +-- doc/man/man3/tqmainwindow.3qt | 4 +- doc/man/man3/tqmenubar.3qt | 2 +- doc/man/man3/tqmenudata.3qt | 2 +- doc/man/man3/tqmimesourcefactory.3qt | 10 +- doc/man/man3/tqmovie.3qt | 4 +- doc/man/man3/tqobject.3qt | 2 +- doc/man/man3/tqpixmap.3qt | 2 +- doc/man/man3/tqpopupmenu.3qt | 4 +- doc/man/man3/tqprogressdialog.3qt | 4 +- doc/man/man3/tqregexp.3qt | 2 +- doc/man/man3/tqscrollview.3qt | 22 +- doc/man/man3/tqsimplerichtext.3qt | 66 +- doc/man/man3/tqsizepolicy.3qt | 2 +- doc/man/man3/tqsqlpropertymap.3qt | 2 +- doc/man/man3/tqstatusbar.3qt | 4 +- doc/man/man3/tqstring.3qt | 30 +- doc/man/man3/tqstylesheet.3qt | 6 +- doc/man/man3/tqsyntaxhighlighter.3qt | 40 +- doc/man/man3/tqt.3qt | 4 +- doc/man/man3/tqtextbrowser.3qt | 2 +- doc/man/man3/tqtextedit.3qt | 10 +- doc/man/man3/tqtooltip.3qt | 2 +- doc/man/man3/tqwhatsthis.3qt | 62 +- doc/man/man3/tqwidget.3qt | 10 +- doc/pictures.doc | 2 +- doc/porting3.doc | 6 +- doc/tutorial.doc | 20 +- doc/tutorial2.doc | 2 +- doc/unicode.doc | 2 +- doc/xml-sax-features-walkthrough.doc | 2 +- examples/README | 10 +- examples/action/application.cpp | 4 +- examples/addressbook/centralwidget.cpp | 4 +- examples/application/application.cpp | 4 +- examples/canvas/canvas.cpp | 2 +- examples/chart/optionsform.cpp | 2 +- examples/checklists/checklists.cpp | 2 +- examples/cursor/cursor.cpp | 2 +- examples/customlayout/main.cpp | 2 +- examples/demo/dnd/styledbutton.cpp | 2 +- examples/demo/graph.cpp | 2 +- examples/demo/i18n/i18n.cpp | 2 +- examples/demo/qasteroids/toplevel.cpp | 2 +- examples/demo/textdrawing/example.html | 14 +- examples/demo/textdrawing/helpwindow.cpp | 2 +- examples/demo/textdrawing/textedit.cpp | 2 +- examples/dragdrop/dropsite.h | 2 +- examples/dragdrop/main.cpp | 2 +- examples/dragdrop/secret.h | 2 +- examples/fileiconview/mainwindow.cpp | 2 +- examples/helpsystem/helpsystem.doc | 10 +- examples/helpsystem/whatsthis.h | 2 +- examples/helpviewer/helpwindow.cpp | 2 +- examples/i18n/mywidget.cpp | 4 +- examples/layout/layout.cpp | 2 +- examples/life/lifedlg.cpp | 2 +- examples/lineedits/lineedits.cpp | 2 +- examples/listbox/listbox.cpp | 2 +- examples/listboxcombo/listboxcombo.cpp | 2 +- examples/listviews/listviews.cpp | 2 +- examples/mdi/application.cpp | 6 +- examples/menu/menu.h | 2 +- examples/movies/main.cpp | 2 +- examples/movies/movies.doc | 2 +- examples/network/clientserver/client/client.cpp | 2 +- examples/network/clientserver/server/server.cpp | 2 +- examples/network/httpd/httpd.cpp | 2 +- .../network/infoprotocol/infoclient/client.cpp | 2 +- examples/network/mail/composer.cpp | 2 +- examples/network/networkprotocol/view.cpp | 2 +- examples/network/remotecontrol/startup.cpp | 2 +- examples/opengl/glpixmap/globjwin.cpp | 2 +- examples/popup/popup.h | 2 +- examples/qfd/fontdisplayer.cpp | 2 +- examples/qmag/qmag.cpp | 2 +- examples/rangecontrols/rangecontrols.cpp | 2 +- examples/regexptester/regexptester.cpp | 2 +- examples/scrollview/scrollview.cpp | 2 +- examples/showimg/imagetexteditor.cpp | 2 +- examples/showimg/showimg.cpp | 2 +- examples/splitter/splitter.cpp | 2 +- examples/sql/overview/custom1/main.h | 2 +- examples/sql/overview/form1/main.cpp | 2 +- examples/sql/overview/form2/main.h | 2 +- examples/tabdialog/tabdialog.cpp | 2 +- examples/tablet/tabletstats.cpp | 2 +- examples/tetrix/qtetrix.cpp | 2 +- examples/tetrix/qtetrix.h | 2 +- examples/textedit/textedit.cpp | 2 +- examples/themes/metal.cpp | 2 +- examples/themes/wood.cpp | 2 +- examples/thread/prodcons/prodcons.cpp | 2 +- examples/thread/semaphores/main.cpp | 2 +- examples/tictac/tictac.cpp | 2 +- examples/tqdir/tqdir.cpp | 2 +- examples/widgets/widgets.cpp | 4 +- examples/wizard/wizard.cpp | 2 +- examples/xform/xform.cpp | 2 +- examples/xml/tagreader-with-features/tagreader.cpp | 2 +- include/ntqlabel.h | 1 - include/ntqlocale.h | 1 - include/ntqsimplerichtext.h | 1 - include/ntqsyntaxhighlighter.h | 1 - include/ntqwhatsthis.h | 1 - include/private/qlocale_p.h | 1 - include/private/qsyntaxhighlighter_p.h | 1 - include/private/tqlocale_p.h | 1 + include/private/tqsyntaxhighlighter_p.h | 1 + include/tqlabel.h | 1 + include/tqlocale.h | 1 + include/tqsimplerichtext.h | 1 + include/tqsyntaxhighlighter.h | 1 + include/tqwhatsthis.h | 1 + .../src/accessible/widgets/qaccessiblewidget.cpp | 4 +- qmake/Makefile.unix | 8 +- qmake/Makefile.win32-g++ | 6 +- qmake/book/qmake-pch.leaf | 2 +- qmake/examples/precompile/main.cpp | 2 +- qmake/examples/precompile/stable.h | 2 +- src/codecs/tqtextcodec.cpp | 2 +- src/dialogs/ntqprogressdialog.h | 2 +- src/dialogs/qdialog.cpp | 2 +- src/dialogs/qerrormessage.cpp | 2 +- src/dialogs/qinputdialog.cpp | 2 +- src/dialogs/qmessagebox.cpp | 2 +- src/dialogs/qprintdialog.cpp | 2 +- src/dialogs/qwizard.cpp | 2 +- src/dialogs/tqcolordialog.cpp | 2 +- src/dialogs/tqfiledialog.cpp | 2 +- src/dialogs/tqfontdialog.cpp | 2 +- src/kernel/ntqsimplerichtext.h | 104 - src/kernel/ntqt.h | 8 +- src/kernel/qaccel.cpp | 2 +- src/kernel/qapplication_x11.cpp | 2 +- src/kernel/qsimplerichtext.cpp | 421 -- src/kernel/qt_kernel.pri | 4 +- src/kernel/qt_pch.h | 2 +- src/kernel/tqfontengine_x11.cpp | 41 +- src/kernel/tqsimplerichtext.cpp | 421 ++ src/kernel/tqsimplerichtext.h | 104 + src/moc/moc.pro | 2 +- src/sql/tqeditorfactory.cpp | 2 +- src/sql/tqsqleditorfactory.cpp | 2 +- src/styles/qinterlacestyle.cpp | 2 +- src/styles/qwindowsstyle.cpp | 2 +- src/tools/ntqlocale.h | 494 -- src/tools/qfeatures.txt | 2 +- src/tools/qglobal.cpp | 2 +- src/tools/qlocale.cpp | 6322 -------------------- src/tools/qlocale_p.h | 131 - src/tools/qt_tools.pri | 8 +- src/tools/tqlocale.cpp | 6322 ++++++++++++++++++++ src/tools/tqlocale.h | 494 ++ src/tools/tqlocale_p.h | 131 + src/tools/tqstring.cpp | 4 +- src/widgets/ntqlabel.h | 174 - src/widgets/ntqsyntaxhighlighter.h | 81 - src/widgets/ntqwhatsthis.h | 81 - src/widgets/qlabel.cpp | 1191 ---- src/widgets/qlineedit.cpp | 2 +- src/widgets/qsyntaxhighlighter.cpp | 221 - src/widgets/qsyntaxhighlighter_p.h | 97 - src/widgets/qt_widgets.pri | 18 +- src/widgets/qtitlebar_p.h | 2 +- src/widgets/qwhatsthis.cpp | 1001 ---- src/widgets/tqaction.cpp | 2 +- src/widgets/tqlabel.cpp | 1191 ++++ src/widgets/tqlabel.h | 174 + src/widgets/tqmainwindow.cpp | 2 +- src/widgets/tqpopupmenu.cpp | 8 +- src/widgets/tqsyntaxhighlighter.cpp | 221 + src/widgets/tqsyntaxhighlighter.h | 81 + src/widgets/tqsyntaxhighlighter_p.h | 97 + src/widgets/tqtextbrowser.cpp | 2 +- src/widgets/tqtextedit.cpp | 2 +- src/widgets/tqtooltip.cpp | 2 +- src/widgets/tqwhatsthis.cpp | 1001 ++++ src/widgets/tqwhatsthis.h | 81 + src/workspace/tqworkspace.cpp | 2 +- tools/assistant/helpdialogimpl.cpp | 2 +- tools/assistant/mainwindow.ui | 2 +- tools/assistant/topicchooserimpl.cpp | 2 +- tools/designer/designer/actioneditorimpl.cpp | 2 +- tools/designer/designer/customwidgeteditorimpl.cpp | 2 +- tools/designer/designer/designer_pch.h | 4 +- tools/designer/designer/editfunctionsimpl.cpp | 2 +- tools/designer/designer/formwindow.cpp | 4 +- tools/designer/designer/iconvieweditorimpl.cpp | 2 +- tools/designer/designer/listboxeditorimpl.cpp | 2 +- tools/designer/designer/listvieweditorimpl.cpp | 2 +- tools/designer/designer/mainwindow.cpp | 4 +- tools/designer/designer/mainwindowactions.cpp | 2 +- tools/designer/designer/newformimpl.cpp | 2 +- tools/designer/designer/pixmapchooser.cpp | 2 +- tools/designer/designer/projectsettingsimpl.cpp | 2 +- tools/designer/designer/propertyeditor.cpp | 4 +- tools/designer/designer/resource.cpp | 4 +- tools/designer/designer/sizehandle.cpp | 2 +- tools/designer/designer/startdialogimpl.cpp | 2 +- tools/designer/designer/styledbutton.cpp | 2 +- tools/designer/designer/tableeditorimpl.cpp | 2 +- tools/designer/designer/widgetfactory.cpp | 2 +- tools/designer/designer/widgetfactory.h | 2 +- tools/designer/editor/arghintwidget.cpp | 2 +- tools/designer/editor/viewmanager.cpp | 2 +- tools/designer/examples/colortool/mainform.ui | 2 +- tools/designer/examples/credit/creditformbase.cpp | 2 +- .../designer/plugins/wizards/sqlformwizardimpl.cpp | 2 +- tools/designer/shared/widgetdatabase.cpp | 1 + tools/designer/uic/form.cpp | 2 +- tools/designer/uilib/tqwidgetfactory.cpp | 4 +- tools/linguist/book/linguist-programmer.leaf | 6 +- tools/linguist/linguist/finddialog.cpp | 4 +- tools/linguist/linguist/main.cpp | 2 +- tools/linguist/linguist/msgedit.cpp | 4 +- tools/linguist/linguist/phrasebookbox.cpp | 4 +- tools/linguist/linguist/phraselv.cpp | 2 +- tools/linguist/linguist/trwindow.cpp | 4 +- tools/linguist/tutorial/tt3/printpanel.cpp | 2 +- tools/qconfig/main.cpp | 2 +- tools/qtconfig/mainwindow.cpp | 2 +- translations/qt_ar.ts | 2 +- translations/qt_ca.ts | 2 +- translations/qt_cs.ts | 2 +- translations/qt_de.ts | 2 +- translations/qt_es.ts | 2 +- translations/qt_fr.ts | 2 +- translations/qt_he.ts | 2 +- translations/qt_it.ts | 2 +- translations/qt_ja.ts | 2 +- translations/qt_nb.ts | 2 +- translations/qt_pt-br.ts | 2 +- translations/qt_pt.ts | 2 +- translations/qt_ru.ts | 2 +- translations/qt_sk.ts | 2 +- translations/qt_tr.ts | 2 +- translations/qt_zh-cn.ts | 2 +- translations/qt_zh-tw.ts | 2 +- translations/template.ts | 2 +- tutorial/t12/lcdrange.cpp | 2 +- tutorial/t13/gamebrd.cpp | 2 +- tutorial/t13/lcdrange.cpp | 2 +- tutorial/t14/gamebrd.cpp | 2 +- tutorial/t14/lcdrange.cpp | 2 +- 446 files changed, 17026 insertions(+), 17048 deletions(-) delete mode 100644 doc/html/ntqlabel.html delete mode 100644 doc/html/ntqlocale.html delete mode 100644 doc/html/ntqsimplerichtext.html delete mode 100644 doc/html/ntqsyntaxhighlighter.html delete mode 100644 doc/html/ntqwhatsthis.html delete mode 100644 doc/html/qchar-members.html delete mode 100644 doc/html/qchar.html delete mode 100644 doc/html/qcharref-members.html delete mode 100644 doc/html/qcharref.html delete mode 100644 doc/html/qconststring-members.html delete mode 100644 doc/html/qconststring.html delete mode 100644 doc/html/qlabel-h.html delete mode 100644 doc/html/qlabel-m.png delete mode 100644 doc/html/qlabel-members.html delete mode 100644 doc/html/qlabel-w.png delete mode 100644 doc/html/qlocale-h.html delete mode 100644 doc/html/qlocale-members.html delete mode 100644 doc/html/qsimplerichtext-h.html delete mode 100644 doc/html/qsimplerichtext-members.html delete mode 100644 doc/html/qsyntaxhighlighter-h.html delete mode 100644 doc/html/qsyntaxhighlighter-members.html delete mode 100644 doc/html/qwhatsthis-h.html delete mode 100644 doc/html/qwhatsthis-members.html create mode 100644 doc/html/tqchar-members.html create mode 100644 doc/html/tqchar.html create mode 100644 doc/html/tqcharref-members.html create mode 100644 doc/html/tqcharref.html create mode 100644 doc/html/tqconststring-members.html create mode 100644 doc/html/tqconststring.html create mode 100644 doc/html/tqlabel-h.html create mode 100644 doc/html/tqlabel-m.png create mode 100644 doc/html/tqlabel-members.html create mode 100644 doc/html/tqlabel-w.png create mode 100644 doc/html/tqlabel.html create mode 100644 doc/html/tqlocale-h.html create mode 100644 doc/html/tqlocale-members.html create mode 100644 doc/html/tqlocale.html create mode 100644 doc/html/tqsimplerichtext-h.html create mode 100644 doc/html/tqsimplerichtext-members.html create mode 100644 doc/html/tqsimplerichtext.html create mode 100644 doc/html/tqsyntaxhighlighter-h.html create mode 100644 doc/html/tqsyntaxhighlighter-members.html create mode 100644 doc/html/tqsyntaxhighlighter.html create mode 100644 doc/html/tqwhatsthis-h.html create mode 100644 doc/html/tqwhatsthis-members.html create mode 100644 doc/html/tqwhatsthis.html delete mode 120000 include/ntqlabel.h delete mode 120000 include/ntqlocale.h delete mode 120000 include/ntqsimplerichtext.h delete mode 120000 include/ntqsyntaxhighlighter.h delete mode 120000 include/ntqwhatsthis.h delete mode 120000 include/private/qlocale_p.h delete mode 120000 include/private/qsyntaxhighlighter_p.h create mode 120000 include/private/tqlocale_p.h create mode 120000 include/private/tqsyntaxhighlighter_p.h create mode 120000 include/tqlabel.h create mode 120000 include/tqlocale.h create mode 120000 include/tqsimplerichtext.h create mode 120000 include/tqsyntaxhighlighter.h create mode 120000 include/tqwhatsthis.h delete mode 100644 src/kernel/ntqsimplerichtext.h delete mode 100644 src/kernel/qsimplerichtext.cpp create mode 100644 src/kernel/tqsimplerichtext.cpp create mode 100644 src/kernel/tqsimplerichtext.h delete mode 100644 src/tools/ntqlocale.h delete mode 100644 src/tools/qlocale.cpp delete mode 100644 src/tools/qlocale_p.h create mode 100644 src/tools/tqlocale.cpp create mode 100644 src/tools/tqlocale.h create mode 100644 src/tools/tqlocale_p.h delete mode 100644 src/widgets/ntqlabel.h delete mode 100644 src/widgets/ntqsyntaxhighlighter.h delete mode 100644 src/widgets/ntqwhatsthis.h delete mode 100644 src/widgets/qlabel.cpp delete mode 100644 src/widgets/qsyntaxhighlighter.cpp delete mode 100644 src/widgets/qsyntaxhighlighter_p.h delete mode 100644 src/widgets/qwhatsthis.cpp create mode 100644 src/widgets/tqlabel.cpp create mode 100644 src/widgets/tqlabel.h create mode 100644 src/widgets/tqsyntaxhighlighter.cpp create mode 100644 src/widgets/tqsyntaxhighlighter.h create mode 100644 src/widgets/tqsyntaxhighlighter_p.h create mode 100644 src/widgets/tqwhatsthis.cpp create mode 100644 src/widgets/tqwhatsthis.h diff --git a/doc/application-walkthrough.doc b/doc/application-walkthrough.doc index 841285661..0e187654e 100644 --- a/doc/application-walkthrough.doc +++ b/doc/application-walkthrough.doc @@ -48,7 +48,7 @@ TQPopupMenu, \l TQToolBar and \l TQStatusBar - classes that every modern application window tends to use. (See also \link tutorial2.html Tutorial #2\endlink.) -It also illustrates some aspects of \l QWhatsThis (for simple help) and a +It also illustrates some aspects of \l TQWhatsThis (for simple help) and a typical \c main() using \l QApplication. Finally, it shows a typical print function based on \l TQPrinter. @@ -368,10 +368,10 @@ tool button. We present the user with the print setup dialog, and abandon printing if they cancel. -We create a QSimpleRichText object and give it the text. This object +We create a TQSimpleRichText object and give it the text. This object is able to format the text nicely as one long page. We achieve pagination by printing one paper page's worth of text from the -QSimpleRichText page at a time. +TQSimpleRichText page at a time. Now let's see what happens when a user wishes to \e close() diff --git a/doc/classchart.doc b/doc/classchart.doc index ea1134954..432e00c59 100644 --- a/doc/classchart.doc +++ b/doc/classchart.doc @@ -48,11 +48,11 @@ - + - + @@ -189,7 +189,7 @@ - + @@ -239,8 +239,8 @@ - - + + @@ -266,7 +266,7 @@ - + @@ -295,11 +295,11 @@ - + - + diff --git a/doc/features.doc b/doc/features.doc index ee8bbb7ae..c79c24815 100644 --- a/doc/features.doc +++ b/doc/features.doc @@ -103,7 +103,7 @@ The available options are: and tagging typed data (eg. text, images, colors) (\l TQMimeSource) \i   \row \i TQT_NO_RICHTEXT - \i HTML-like text (\l TQStyleSheet, \l QLabel) + \i HTML-like text (\l TQStyleSheet, \l TQLabel) \i TQT_NO_MIME \row \i TQT_NO_DRAGANDDROP \i Drag-and-drop data between applications (\l TQDragObject) diff --git a/doc/focus.doc b/doc/focus.doc index 77d256fd4..baf9ea399 100644 --- a/doc/focus.doc +++ b/doc/focus.doc @@ -163,7 +163,7 @@ click-to-focus. It's not unusual for keyboard shortcuts to move the focus. This can happen implicitly by opening modal dialogs, but also explicitly using -focus accelerators such as those provided by \l QLabel::setBuddy(), \l +focus accelerators such as those provided by \l TQLabel::setBuddy(), \l QGroupBox and \l QTabBar. We advise supporting shortcut focus for all widgets that the user may diff --git a/doc/html/addressbook-example.html b/doc/html/addressbook-example.html index c6210bcbe..0c6181e81 100644 --- a/doc/html/addressbook-example.html +++ b/doc/html/addressbook-example.html @@ -284,10 +284,10 @@ protected: #include <ntqlistview.h> #include <ntqlayout.h> #include <tqwidget.h> -#include <ntqlabel.h> +#include <tqlabel.h> #include <ntqpushbutton.h> #include <ntqlineedit.h> -#include <ntqlabel.h> +#include <tqlabel.h> #include <ntqcheckbox.h> #include <tqfile.h> #include <tqtextstream.h> @@ -352,19 +352,19 @@ void ABCentralWidget::setupTabWidget() TQWidget *input = new TQWidget( tabWidget ); TQGridLayout *grid1 = new TQGridLayout( input, 2, 5, 5, 5 ); - TQLabel *liFirstName = new TQLabel( "First &Name", input ); + TQLabel *liFirstName = new TQLabel( "First &Name", input ); liFirstName->resize( liFirstName->sizeHint() ); grid1->addWidget( liFirstName, 0, 0 ); - TQLabel *liLastName = new TQLabel( "&Last Name", input ); + TQLabel *liLastName = new TQLabel( "&Last Name", input ); liLastName->resize( liLastName->sizeHint() ); grid1->addWidget( liLastName, 0, 1 ); - TQLabel *liAddress = new TQLabel( "Add&ress", input ); + TQLabel *liAddress = new TQLabel( "Add&ress", input ); liAddress->resize( liAddress->sizeHint() ); grid1->addWidget( liAddress, 0, 2 ); - TQLabel *liEMail = new TQLabel( "&E-Mail", input ); + TQLabel *liEMail = new TQLabel( "&E-Mail", input ); liEMail->resize( liEMail->sizeHint() ); grid1->addWidget( liEMail, 0, 3 ); @@ -376,22 +376,22 @@ void ABCentralWidget::setupTabWidget() iFirstName = new TQLineEdit( input ); iFirstName->resize( iFirstName->sizeHint() ); grid1->addWidget( iFirstName, 1, 0 ); - liFirstName->setBuddy( iFirstName ); + liFirstName->setBuddy( iFirstName ); iLastName = new TQLineEdit( input ); iLastName->resize( iLastName->sizeHint() ); grid1->addWidget( iLastName, 1, 1 ); - liLastName->setBuddy( iLastName ); + liLastName->setBuddy( iLastName ); iAddress = new TQLineEdit( input ); iAddress->resize( iAddress->sizeHint() ); grid1->addWidget( iAddress, 1, 2 ); - liAddress->setBuddy( iAddress ); + liAddress->setBuddy( iAddress ); iEMail = new TQLineEdit( input ); iEMail->resize( iEMail->sizeHint() ); grid1->addWidget( iEMail, 1, 3 ); - liEMail->setBuddy( iEMail ); + liEMail->setBuddy( iEMail ); change = new TQPushButton( "&Change", input ); change->resize( change->sizeHint() ); diff --git a/doc/html/annotated.html b/doc/html/annotated.html index 2e4c1b9b8..32bfa1487 100644 --- a/doc/html/annotated.html +++ b/doc/html/annotated.html @@ -76,8 +76,8 @@ body { background: #ffffff; color: black; } TQCanvasSpriteAnimated canvas item on a TQCanvas TQCanvasTextText object on a TQCanvas TQCanvasViewOn-screen view of a TQCanvas -TQCharLightweight Unicode character -TQCharRefHelper class for TQString +TQCharLightweight Unicode character +TQCharRefHelper class for TQString TQCheckBoxCheckbox with a text label TQCheckListItemCheckable list view items TQCheckTableItemCheckboxes in TQTables @@ -91,7 +91,7 @@ body { background: #ffffff; color: black; } TQComboBoxCombined button and popup list TQComboTableItemMeans of using comboboxes in TQTables TQCommonStyleEncapsulates the common Look and Feel of a GUI -TQConstStringString objects using constant Unicode data +TQConstStringString objects using constant Unicode data TQContextMenuEventParameters that describe a context menu event TQCursorMouse cursor with an arbitrary shape TQCustomEventSupport for custom events @@ -211,7 +211,7 @@ body { background: #ffffff; color: black; } TQKeyEventDescribes a key event TQKeySequenceEncapsulates a key sequence as used by accelerators TQLCDNumberDisplays a number with LCD-like digits -TQLabelText or image display +TQLabelText or image display TQLayoutThe base class of geometry managers TQLayoutItemAbstract item that a TQLayout manipulates TQLayoutIteratorIterators over TQLayoutItem @@ -225,7 +225,7 @@ body { background: #ffffff; color: black; } TQListViewItemImplements a list view item TQListViewItemIteratorIterator for collections of TQListViewItems TQLocalFsImplementation of a TQNetworkProtocol that works on the local file system -TQLocaleConverts between numbers and their string representations in various languages +TQLocaleConverts between numbers and their string representations in various languages TQMacMimeMaps open-standard MIME to Mac flavors TQMacStyleImplements an Appearance Manager style TQMainWindowMain application window, with a menu bar, dock windows (e.g. for toolbars), and a status bar @@ -305,7 +305,7 @@ body { background: #ffffff; color: black; } TQShowEventEvent which is sent when a widget is shown TQSignalCan be used to send signals for classes that don't inherit TQObject TQSignalMapperBundles signals from identifiable senders -TQSimpleRichTextSmall displayable piece of rich text +TQSimpleRichTextSmall displayable piece of rich text TQSizeDefines the size of a two-dimensional object TQSizeGripCorner-grip for resizing a top-level window TQSizePolicyLayout attribute describing horizontal and vertical resizing policy @@ -349,7 +349,7 @@ body { background: #ffffff; color: black; } TQStylePluginAbstract base for custom TQStyle plugins TQStyleSheetCollection of styles for rich text rendering and a generator of tags TQStyleSheetItemEncapsulation of a set of text styles -TQSyntaxHighlighterBase class for implementing TQTextEdit syntax highlighters +TQSyntaxHighlighterBase class for implementing TQTextEdit syntax highlighters TQTabThe structures in a TQTabBar TQTabBarTab bar, e.g. for use in tabbed dialogs TQTabDialogStack of tabbed widgets @@ -400,7 +400,7 @@ body { background: #ffffff; color: black; } TQVariantActs like a union for the most common TQt data types TQWMatrix2D transformations of a coordinate system TQWaitConditionAllows waiting/waking for conditions between threads -TQWhatsThisSimple description of any widget, i.e. answering the question "What's this?" +TQWhatsThisSimple description of any widget, i.e. answering the question "What's this?" TQWheelEventParameters that describe a wheel event TQWidgetThe base class of all user interface objects TQWidgetFactoryFor the dynamic creation of widgets from TQt Designer .ui files diff --git a/doc/html/basic.html b/doc/html/basic.html index d03b54b71..f8497d5e1 100644 --- a/doc/html/basic.html +++ b/doc/html/basic.html @@ -43,7 +43,7 @@ widgets. TQCheckBoxCheckbox with a text label TQComboBoxCombined button and popup list TQDialRounded range control (like a speedometer or potentiometer) -TQLabelText or image display +TQLabelText or image display TQLCDNumberDisplays a number with LCD-like digits TQLineEditOne-line text editor TQPopupMenuPopup menu widget @@ -53,7 +53,7 @@ widgets. TQSizeGripCorner-grip for resizing a top-level window TQSliderVertical or horizontal slider TQSpinBoxSpin box widget (spin button) -TQSyntaxHighlighterBase class for implementing TQTextEdit syntax highlighters +TQSyntaxHighlighterBase class for implementing TQTextEdit syntax highlighters TQTextEditPowerful single-page rich text editor TQToolButtonQuick-access button to commands or options, usually used inside a TQToolBar diff --git a/doc/html/canvas-example.html b/doc/html/canvas-example.html index 7b463722d..bc98e34e0 100644 --- a/doc/html/canvas-example.html +++ b/doc/html/canvas-example.html @@ -141,7 +141,7 @@ private: #include <ntqapplication.h> #include <tqpainter.h> #include <tqprinter.h> -#include <ntqlabel.h> +#include <tqlabel.h> #include <tqimage.h> #include <ntqprogressdialog.h> #include "canvas.h" diff --git a/doc/html/chart-optionsform-cpp.html b/doc/html/chart-optionsform-cpp.html index e6c2b89c6..a38061851 100644 --- a/doc/html/chart-optionsform-cpp.html +++ b/doc/html/chart-optionsform-cpp.html @@ -39,7 +39,7 @@ body { background: #ffffff; color: black; } #include <tqfontdialog.h> #include <ntqframe.h> #include <tqimage.h> -#include <ntqlabel.h> +#include <tqlabel.h> #include <ntqlayout.h> #include <ntqpushbutton.h> #include <ntqradiobutton.h> @@ -61,7 +61,7 @@ body { background: #ffffff; color: black; } chartTypeLayout = new TQHBoxLayout( 0, 0, 6 ); - chartTypeTextLabel = new TQLabel( "&Chart Type", this ); + chartTypeTextLabel = new TQLabel( "&Chart Type", this ); chartTypeLayout->addWidget( chartTypeTextLabel ); chartTypeComboBox = new TQComboBox( FALSE, this ); @@ -82,7 +82,7 @@ body { background: #ffffff; color: black; } TQSizePolicy::Minimum ); fontLayout->addItem( spacer ); - fontTextLabel = new TQLabel( this ); // Must be set by caller via setFont() + fontTextLabel = new TQLabel( this ); // Must be set by caller via setFont() fontLayout->addWidget( fontTextLabel ); optionsFormLayout->addLayout( fontLayout ); @@ -113,7 +113,7 @@ body { background: #ffffff; color: black; } decimalPlacesLayout = new TQHBoxLayout( 0, 0, 6 ); - decimalPlacesTextLabel = new TQLabel( "&Decimal Places", addValuesFrame ); + decimalPlacesTextLabel = new TQLabel( "&Decimal Places", addValuesFrame ); decimalPlacesLayout->addWidget( decimalPlacesTextLabel ); decimalPlacesSpinBox = new TQSpinBox( addValuesFrame ); @@ -142,8 +142,8 @@ body { background: #ffffff; color: black; } connect( okPushButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( accept() ) ); connect( cancelPushButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( reject() ) ); - chartTypeTextLabel->setBuddy( chartTypeComboBox ); - decimalPlacesTextLabel->setBuddy( decimalPlacesSpinBox ); + chartTypeTextLabel->setBuddy( chartTypeComboBox ); + decimalPlacesTextLabel->setBuddy( decimalPlacesSpinBox ); } @@ -164,7 +164,7 @@ void OptionsForm::setFont( italic() ) label += " Italic"; - fontTextLabel->setText( label ); + fontTextLabel->setText( label ); m_font = font; } diff --git a/doc/html/chart-optionsform-h.html b/doc/html/chart-optionsform-h.html index 3816533cf..bec50c913 100644 --- a/doc/html/chart-optionsform-h.html +++ b/doc/html/chart-optionsform-h.html @@ -60,16 +60,16 @@ public: TQFont font() const { return m_font; } void setFont( TQFont font ); - TQLabel *chartTypeTextLabel; + TQLabel *chartTypeTextLabel; TQComboBox *chartTypeComboBox; TQPushButton *fontPushButton; - TQLabel *fontTextLabel; + TQLabel *fontTextLabel; TQFrame *addValuesFrame; TQButtonGroup *addValuesButtonGroup; TQRadioButton *noRadioButton; TQRadioButton *yesRadioButton; TQRadioButton *asPercentageRadioButton; - TQLabel *decimalPlacesTextLabel; + TQLabel *decimalPlacesTextLabel; TQSpinBox *decimalPlacesSpinBox; TQPushButton *okPushButton; TQPushButton *cancelPushButton; diff --git a/doc/html/checklists-example.html b/doc/html/checklists-example.html index 29fd97dd1..8c58cfa8d 100644 --- a/doc/html/checklists-example.html +++ b/doc/html/checklists-example.html @@ -64,7 +64,7 @@ public: protected: TQListView *lv1, *lv2; - TQLabel *label; + TQLabel *label; protected slots: void copy1to2(); @@ -91,7 +91,7 @@ protected slots: #include <ntqlistview.h> #include <ntqvbox.h> -#include <ntqlabel.h> +#include <tqlabel.h> #include <tqvaluelist.h> #include <tqstring.h> #include <ntqpushbutton.h> @@ -114,7 +114,7 @@ protected slots: vbox1->setMargin( 5 ); // First child: a Label - vbox1->addWidget( new TQLabel( "Check some items!", this ) ); + vbox1->addWidget( new TQLabel( "Check some items!", this ) ); // Second child: the ListView lv1 = new TQListView( this ); @@ -157,7 +157,7 @@ protected slots: vbox2->setMargin( 5 ); // and another label - vbox2->addWidget( new TQLabel( "Check one item!", this ) ); + vbox2->addWidget( new TQLabel( "Check one item!", this ) ); // create the second listview lv2 = new TQListView( this ); @@ -180,7 +180,7 @@ protected slots: tmp->setMargin( 5 ); // and create a label which will be at the right of the window - label = new TQLabel( "No Item yet...", this ); + label = new TQLabel( "No Item yet...", this ); tmp->addWidget( label ); } @@ -228,7 +228,7 @@ void CheckLists::copy2to3() // create an iterator which operates on the second ListView TQListViewItemIterator it( lv2 ); - label->setText( "No Item checked" ); + label->setText( "No Item checked" ); // iterate through the second ListView... for ( ; it.current(); ++it ) @@ -237,7 +237,7 @@ void CheckLists::copy2to3() // ...if the item is checked... if ( ( (TQCheckListItem*)it.current() )->isOn() ) // ...set the text of the item to the label - label->setText( it.current()->text( 0 ) ); + label->setText( it.current()->text( 0 ) ); } diff --git a/doc/html/classchart.html b/doc/html/classchart.html index 19e358086..521544277 100644 --- a/doc/html/classchart.html +++ b/doc/html/classchart.html @@ -38,11 +38,11 @@ body { background: #ffffff; color: black; } - + - + @@ -179,7 +179,7 @@ body { background: #ffffff; color: black; } - + @@ -229,8 +229,8 @@ body { background: #ffffff; color: black; } - - + + @@ -256,7 +256,7 @@ body { background: #ffffff; color: black; } - + @@ -285,11 +285,11 @@ body { background: #ffffff; color: black; } - + - + diff --git a/doc/html/classes.html b/doc/html/classes.html index c2e9c60c7..5ce0a3358 100644 --- a/doc/html/classes.html +++ b/doc/html/classes.html @@ -295,7 +295,7 @@ classes, see TQt's Main Classes. TQDomText L -TQLabel +TQLabel TQRegExpValidator @@ -449,9 +449,9 @@ classes, see TQt's Main Classes. TQFileDialog -TQLocale +TQLocale -TQSimpleRichText +TQSimpleRichText TQValueList @@ -574,10 +574,10 @@ classes, see TQt's Main Classes. TQSpinBox -TQWhatsThis +TQWhatsThis -TQChar +TQChar TQFrame @@ -588,7 +588,7 @@ classes, see TQt's Main Classes. TQWheelEvent -TQCharRef +TQCharRef TQFtp @@ -741,7 +741,7 @@ classes, see TQt's Main Classes. -TQConstString +TQConstString TQGridView @@ -934,7 +934,7 @@ classes, see TQt's Main Classes. TQPen -TQSyntaxHighlighter +TQSyntaxHighlighter diff --git a/doc/html/clientserver-example.html b/doc/html/clientserver-example.html index d4bcd90bd..01b0c33bd 100644 --- a/doc/html/clientserver-example.html +++ b/doc/html/clientserver-example.html @@ -60,7 +60,7 @@ specified. You can send single lines to the server. #include <ntqapplication.h> #include <ntqvbox.h> #include <tqtextview.h> -#include <ntqlabel.h> +#include <tqlabel.h> #include <ntqpushbutton.h> #include <tqtextstream.h> @@ -163,8 +163,8 @@ public: "This is a small server example.\n" "Connect with the client now." ); - TQLabel *lb = new TQLabel( itext, this ); - lb->setAlignment( AlignHCenter ); + TQLabel *lb = new TQLabel( itext, this ); + lb->setAlignment( AlignHCenter ); infoText = new TQTextView( this ); TQPushButton *quit = new TQPushButton( tr("Quit") , this ); @@ -228,7 +228,7 @@ int main( int argc, char** argv ) #include <ntqhbox.h> #include <tqtextview.h> #include <ntqlineedit.h> -#include <ntqlabel.h> +#include <tqlabel.h> #include <ntqpushbutton.h> #include <tqtextstream.h> diff --git a/doc/html/cursor-example.html b/doc/html/cursor-example.html index b6769df14..1ade74bb7 100644 --- a/doc/html/cursor-example.html +++ b/doc/html/cursor-example.html @@ -46,7 +46,7 @@ This example shows how to set a mouse cursor for a widget. ** *****************************************************************************/ -#include <ntqlabel.h> +#include <tqlabel.h> #include <tqbitmap.h> #include <ntqapplication.h> #include <ntqlayout.h> @@ -130,15 +130,15 @@ CursorView::CursorView() // construct view setCaption( "CursorView" ); // set window caption TQGridLayout* grid = new TQGridLayout( this, 5, 4, 20 ); - TQLabel *label; + TQLabel *label; int i=0; for ( int y=0; y<4; y++ ) { // create the small labels for ( int x=0; x<4; x++ ) { - label = new TQLabel( this ); + label = new TQLabel( this ); label->setCursor( TQCursor( list[i].shape ) ); - label->setText( list[i].name ); - label->setAlignment( AlignCenter ); + label->setText( list[i].name ); + label->setAlignment( AlignCenter ); label->setMargin( 10 ); label->setFrameStyle( TQFrame::Box | TQFrame::Raised ); grid->addWidget( label, x, y ); @@ -147,10 +147,10 @@ CursorView::CursorView() // construct view } - label = new TQLabel( this ); + label = new TQLabel( this ); label->setCursor( TQCursor( list[i].shape ) ); - label->setText( list[i].name ); - label->setAlignment( AlignCenter ); + label->setText( list[i].name ); + label->setAlignment( AlignCenter ); label->setMargin( 10 ); label->setFrameStyle( TQFrame::Box | TQFrame::Raised ); grid->addWidget( label, 4, 0 ); @@ -161,10 +161,10 @@ CursorView::CursorView() // construct view TQBitmap cm( cm_width, cm_height, cm_bits, TRUE ); TQCursor custom( cb, cm ); // create bitmap cursor - label = new TQLabel( this ); // create the big label + label = new TQLabel( this ); // create the big label label->setCursor( custom ); - label->setText( "Custom bitmap cursor" ); - label->setAlignment( AlignCenter ); + label->setText( "Custom bitmap cursor" ); + label->setAlignment( AlignCenter ); label->setMargin( 10 ); label->setFrameStyle( TQFrame::Box | TQFrame::Sunken ); grid->addMultiCellWidget( label, 4, 4, 1, 3 ); diff --git a/doc/html/customlayout-example.html b/doc/html/customlayout-example.html index 1e87be29c..61a72baa6 100644 --- a/doc/html/customlayout-example.html +++ b/doc/html/customlayout-example.html @@ -756,7 +756,7 @@ CardLayout::~CardLayout() #include "card.h" #include <ntqapplication.h> -#include <ntqlabel.h> +#include <tqlabel.h> #include <tqcolor.h> #include <ntqgroupbox.h> #include <ntqpushbutton.h> @@ -824,10 +824,10 @@ int main( int argc, char **argv ) gm->addWidget( wid ); - TQLabel* s = new TQLabel( f ); - s->setText( "outermost box" ); + TQLabel* s = new TQLabel( f ); + s->setText( "outermost box" ); s->setFrameStyle( TQFrame::Panel | TQFrame::Sunken ); - s->setAlignment( TQt::AlignVCenter | TQt::AlignHCenter ); + s->setAlignment( TQt::AlignVCenter | TQt::AlignHCenter ); gm->addWidget( s ); a.setMainWidget( f ); f->setCaption("TQt Example - Custom Layout"); diff --git a/doc/html/designer-manual-2.html b/doc/html/designer-manual-2.html index 059683a0e..81a5f8038 100644 --- a/doc/html/designer-manual-2.html +++ b/doc/html/designer-manual-2.html @@ -95,7 +95,7 @@ body { background: #ffffff; color: black; }

Now we need to relate each of the text labels to the corresponding widget. We do this by creating "buddies".

-

A widget that does not accept focus itself, e.g. a TQLabel, can have an accelerator that will pass the focus to its "buddy", e.g. a TQLineEdit. In TQt Designer, we enable this by setting the first widget's buddy property to the name of the buddy widget.

+

A widget that does not accept focus itself, e.g. a TQLabel, can have an accelerator that will pass the focus to its "buddy", e.g. a TQLineEdit. In TQt Designer, we enable this by setting the first widget's buddy property to the name of the buddy widget.

Includes (in Implementation):

  • TQTableSelection
  • TQTextCodec diff --git a/doc/html/httpd-example.html b/doc/html/httpd-example.html index 6ad8ab235..f2d118ef8 100644 --- a/doc/html/httpd-example.html +++ b/doc/html/httpd-example.html @@ -56,7 +56,7 @@ sending the page, it closes the connection. #include <tqmainwindow.h> #include <tqtextstream.h> #include <ntqvbox.h> -#include <ntqlabel.h> +#include <tqlabel.h> #include <tqtextview.h> #include <ntqpushbutton.h> @@ -137,8 +137,8 @@ public: "You can connect with your\n" "web browser to port %1" ).arg( httpd->port() ); - TQLabel *lb = new TQLabel( itext, this ); - lb->setAlignment( AlignHCenter ); + TQLabel *lb = new TQLabel( itext, this ); + lb->setAlignment( AlignHCenter ); infoText = new TQTextView( this ); TQPushButton *quit = new TQPushButton( "quit" , this ); diff --git a/doc/html/i18n-example.html b/doc/html/i18n-example.html index a11fd1027..da0ce0394 100644 --- a/doc/html/i18n-example.html +++ b/doc/html/i18n-example.html @@ -89,10 +89,10 @@ private: #include <ntqbuttongroup.h> #include <ntqradiobutton.h> -#include <ntqlabel.h> +#include <tqlabel.h> #include <ntqlistbox.h> #include <ntqcombobox.h> -#include <ntqlabel.h> +#include <tqlabel.h> #include <ntqhbox.h> #include <ntqvbox.h> #include <ntqaccel.h> @@ -121,7 +121,7 @@ private: TQString l; statusBar()->message( tr("Language: English") ); - ( void )new TQLabel( tr( "The Main Window" ), central ); + ( void )new TQLabel( tr( "The Main Window" ), central ); TQButtonGroup* gbox = new TQButtonGroup( 1, TQGroupBox::Horizontal, tr( "View" ), central ); diff --git a/doc/html/i18n.html b/doc/html/i18n.html index e24eb2ef3..548640459 100644 --- a/doc/html/i18n.html +++ b/doc/html/i18n.html @@ -134,7 +134,7 @@ the fl and fi ligatures used in typesetting US and European books.

    TQt tries to take care of all the special features listed above. You usually don't have to worry about these features so long as you use TQt's input widgets (e.g. TQLineEdit, TQTextEdit, and derived classes) -and TQt's display widgets (e.g. TQLabel). +and TQt's display widgets (e.g. TQLabel).

    Support for these writing systems is transparent to the programmer and completely encapsulated in TQt's text engine. This means that you don't need to have any knowledge about the writing system used in a @@ -172,7 +172,7 @@ parameter, there is no char* to TQString conversion overhead. and file format texts) need not use TQString; the traditional char* or the TQCString class will suffice.

    You're unlikely to notice that you are using Unicode; -TQString, and TQChar are just like easier versions of the crude +TQString, and TQChar are just like easier versions of the crude const char* and char from traditional C.

    Use tr() for all Literal Text

    @@ -183,7 +183,7 @@ to achieve this is to use TQObject::tr(). For exa

         LoginWidget::LoginWidget()
         {
    -        TQLabel *label = new TQLabel( tr("Password:"), this );
    +        TQLabel *label = new TQLabel( tr("Password:"), this );
             ...
         }
     
    @@ -197,13 +197,13 @@ directly:

         void some_global_function( LoginWidget *logwid )
         {
    -        TQLabel *label = new TQLabel(
    +        TQLabel *label = new TQLabel(
                     LoginWidget::tr("Password:"), logwid );
         }
     
         void same_global_function( LoginWidget *logwid )
         {
    -        TQLabel *label = new TQLabel(
    +        TQLabel *label = new TQLabel(
                     tqApp->translate("LoginWidget", "Password:"),
                     logwid );
         }
    diff --git a/doc/html/index b/doc/html/index
    index aa44a1fd8..480aefb07 100644
    --- a/doc/html/index
    +++ b/doc/html/index
    @@ -793,39 +793,39 @@
     "TQCanvasView::sizeHint" tqcanvasview.html#sizeHint
     "TQCanvasView::worldMatrix" tqcanvasview.html#worldMatrix
     "TQCanvasView::~TQCanvasView" tqcanvasview.html#~TQCanvasView
    -"TQChar" qchar.html
    -"TQChar::Category" qchar.html#Category
    -"TQChar::CombiningClass" qchar.html#CombiningClass
    -"TQChar::Decomposition" qchar.html#Decomposition
    -"TQChar::Direction" qchar.html#Direction
    -"TQChar::Joining" qchar.html#Joining
    -"TQChar::category" qchar.html#category
    -"TQChar::cell" qchar.html#cell
    -"TQChar::combiningClass" qchar.html#combiningClass
    -"TQChar::decomposition" qchar.html#decomposition
    -"TQChar::decompositionTag" qchar.html#decompositionTag
    -"TQChar::digitValue" qchar.html#digitValue
    -"TQChar::direction" qchar.html#direction
    -"TQChar::isDigit" qchar.html#isDigit
    -"TQChar::isLetter" qchar.html#isLetter
    -"TQChar::isLetterOrNumber" qchar.html#isLetterOrNumber
    -"TQChar::isMark" qchar.html#isMark
    -"TQChar::isNull" qchar.html#isNull
    -"TQChar::isNumber" qchar.html#isNumber
    -"TQChar::isPrint" qchar.html#isPrint
    -"TQChar::isPunct" qchar.html#isPunct
    -"TQChar::isSpace" qchar.html#isSpace
    -"TQChar::isSymbol" qchar.html#isSymbol
    -"TQChar::joining" qchar.html#joining
    -"TQChar::latin1" qchar.html#latin1
    -"TQChar::lower" qchar.html#lower
    -"TQChar::mirrored" qchar.html#mirrored
    -"TQChar::mirroredChar" qchar.html#mirroredChar
    -"TQChar::operator char" qchar.html#operator-char
    -"TQChar::row" qchar.html#row
    -"TQChar::unicode" qchar.html#unicode
    -"TQChar::upper" qchar.html#upper
    -"QCharRef" qcharref.html
    +"TQChar" tqchar.html
    +"TQChar::Category" tqchar.html#Category
    +"TQChar::CombiningClass" tqchar.html#CombiningClass
    +"TQChar::Decomposition" tqchar.html#Decomposition
    +"TQChar::Direction" tqchar.html#Direction
    +"TQChar::Joining" tqchar.html#Joining
    +"TQChar::category" tqchar.html#category
    +"TQChar::cell" tqchar.html#cell
    +"TQChar::combiningClass" tqchar.html#combiningClass
    +"TQChar::decomposition" tqchar.html#decomposition
    +"TQChar::decompositionTag" tqchar.html#decompositionTag
    +"TQChar::digitValue" tqchar.html#digitValue
    +"TQChar::direction" tqchar.html#direction
    +"TQChar::isDigit" tqchar.html#isDigit
    +"TQChar::isLetter" tqchar.html#isLetter
    +"TQChar::isLetterOrNumber" tqchar.html#isLetterOrNumber
    +"TQChar::isMark" tqchar.html#isMark
    +"TQChar::isNull" tqchar.html#isNull
    +"TQChar::isNumber" tqchar.html#isNumber
    +"TQChar::isPrint" tqchar.html#isPrint
    +"TQChar::isPunct" tqchar.html#isPunct
    +"TQChar::isSpace" tqchar.html#isSpace
    +"TQChar::isSymbol" tqchar.html#isSymbol
    +"TQChar::joining" tqchar.html#joining
    +"TQChar::latin1" tqchar.html#latin1
    +"TQChar::lower" tqchar.html#lower
    +"TQChar::mirrored" tqchar.html#mirrored
    +"TQChar::mirroredChar" tqchar.html#mirroredChar
    +"TQChar::operator char" tqchar.html#operator-char
    +"TQChar::row" tqchar.html#row
    +"TQChar::unicode" tqchar.html#unicode
    +"TQChar::upper" tqchar.html#upper
    +"TQCharRef" tqcharref.html
     "QCheckBox" ntqcheckbox.html
     "QCheckBox::autoMask" ntqcheckbox.html#autoMask-prop
     "QCheckBox::checked" ntqcheckbox.html#checked-prop
    @@ -1032,9 +1032,9 @@
     "QConnection::numArgs" ntqconnection.html#numArgs
     "QConnection::object" ntqconnection.html#object
     "QConnection::~QConnection" ntqconnection.html#~QConnection
    -"QConstString" qconststring.html
    -"QConstString::string" qconststring.html#string
    -"QConstString::~QConstString" qconststring.html#~QConstString
    +"TQConstString" tqconststring.html
    +"TQConstString::string" tqconststring.html#string
    +"TQConstString::~TQConstString" tqconststring.html#~TQConstString
     "QContextMenuEvent" qcontextmenuevent.html
     "QContextMenuEvent::Reason" qcontextmenuevent.html#Reason
     "QContextMenuEvent::accept" qcontextmenuevent.html#accept
    @@ -3225,39 +3225,39 @@
     "QLCDNumber::value" ntqlcdnumber.html#value-prop
     "QLCDNumber::~QLCDNumber" ntqlcdnumber.html#~QLCDNumber
     "QLNode::getData" qlnode.html#getData
    -"QLabel" ntqlabel.html
    -"QLabel::alignment" ntqlabel.html#alignment
    -"QLabel::alignment" ntqlabel.html#alignment-prop
    -"QLabel::backgroundMode" ntqlabel.html#backgroundMode-prop
    -"QLabel::buddy" ntqlabel.html#buddy
    -"QLabel::clear" ntqlabel.html#clear
    -"QLabel::drawContents" ntqlabel.html#drawContents
    -"QLabel::hasScaledContents" ntqlabel.html#hasScaledContents
    -"QLabel::indent" ntqlabel.html#indent
    -"QLabel::indent" ntqlabel.html#indent-prop
    -"QLabel::movie" ntqlabel.html#movie
    -"QLabel::picture" ntqlabel.html#picture
    -"QLabel::pixmap" ntqlabel.html#pixmap
    -"QLabel::pixmap" ntqlabel.html#pixmap-prop
    -"QLabel::scaledContents" ntqlabel.html#scaledContents-prop
    -"QLabel::setAlignment" ntqlabel.html#setAlignment
    -"QLabel::setBuddy" ntqlabel.html#setBuddy
    -"QLabel::setFont" ntqlabel.html#setFont
    -"QLabel::setIndent" ntqlabel.html#setIndent
    -"QLabel::setMovie" ntqlabel.html#setMovie
    -"QLabel::setNum" ntqlabel.html#setNum
    -"QLabel::setPicture" ntqlabel.html#setPicture
    -"QLabel::setPixmap" ntqlabel.html#setPixmap
    -"QLabel::setScaledContents" ntqlabel.html#setScaledContents
    -"QLabel::setText" ntqlabel.html#setText
    -"QLabel::setTextFormat" ntqlabel.html#setTextFormat
    -"QLabel::sizeForWidth" ntqlabel.html#sizeForWidth
    -"QLabel::text" ntqlabel.html#text
    -"QLabel::text" ntqlabel.html#text-prop
    -"QLabel::textFormat" ntqlabel.html#textFormat
    -"QLabel::textFormat" ntqlabel.html#textFormat-prop
    -"QLabel::updateLabel" ntqlabel.html#updateLabel
    -"QLabel::~QLabel" ntqlabel.html#~QLabel
    +"TQLabel" tqlabel.html
    +"TQLabel::alignment" tqlabel.html#alignment
    +"TQLabel::alignment" tqlabel.html#alignment-prop
    +"TQLabel::backgroundMode" tqlabel.html#backgroundMode-prop
    +"TQLabel::buddy" tqlabel.html#buddy
    +"TQLabel::clear" tqlabel.html#clear
    +"TQLabel::drawContents" tqlabel.html#drawContents
    +"TQLabel::hasScaledContents" tqlabel.html#hasScaledContents
    +"TQLabel::indent" tqlabel.html#indent
    +"TQLabel::indent" tqlabel.html#indent-prop
    +"TQLabel::movie" tqlabel.html#movie
    +"TQLabel::picture" tqlabel.html#picture
    +"TQLabel::pixmap" tqlabel.html#pixmap
    +"TQLabel::pixmap" tqlabel.html#pixmap-prop
    +"TQLabel::scaledContents" tqlabel.html#scaledContents-prop
    +"TQLabel::setAlignment" tqlabel.html#setAlignment
    +"TQLabel::setBuddy" tqlabel.html#setBuddy
    +"TQLabel::setFont" tqlabel.html#setFont
    +"TQLabel::setIndent" tqlabel.html#setIndent
    +"TQLabel::setMovie" tqlabel.html#setMovie
    +"TQLabel::setNum" tqlabel.html#setNum
    +"TQLabel::setPicture" tqlabel.html#setPicture
    +"TQLabel::setPixmap" tqlabel.html#setPixmap
    +"TQLabel::setScaledContents" tqlabel.html#setScaledContents
    +"TQLabel::setText" tqlabel.html#setText
    +"TQLabel::setTextFormat" tqlabel.html#setTextFormat
    +"TQLabel::sizeForWidth" tqlabel.html#sizeForWidth
    +"TQLabel::text" tqlabel.html#text
    +"TQLabel::text" tqlabel.html#text-prop
    +"TQLabel::textFormat" tqlabel.html#textFormat
    +"TQLabel::textFormat" tqlabel.html#textFormat-prop
    +"TQLabel::updateLabel" tqlabel.html#updateLabel
    +"TQLabel::~TQLabel" tqlabel.html#~TQLabel
     "QLayout" ntqlayout.html
     "QLayout::ResizeMode" ntqlayout.html#ResizeMode
     "QLayout::activate" ntqlayout.html#activate
    @@ -3723,29 +3723,29 @@
     "QListViewItemIterator::operator=" qlistviewitemiterator.html#operator-eq
     "QListViewItemIterator::~QListViewItemIterator" qlistviewitemiterator.html#~QListViewItemIterator
     "TQLocalFs" tqlocalfs.html
    -"QLocale" ntqlocale.html
    -"QLocale::Country" ntqlocale.html#Country
    -"QLocale::Language" ntqlocale.html#Language
    -"QLocale::c" ntqlocale.html#c
    -"QLocale::country" ntqlocale.html#country
    -"QLocale::countryToString" ntqlocale.html#countryToString
    -"QLocale::language" ntqlocale.html#language
    -"QLocale::languageToString" ntqlocale.html#languageToString
    -"QLocale::name" ntqlocale.html#name
    -"QLocale::operator=" ntqlocale.html#operator-eq
    -"QLocale::setDefault" ntqlocale.html#setDefault
    -"QLocale::system" ntqlocale.html#system
    -"QLocale::toDouble" ntqlocale.html#toDouble
    -"QLocale::toFloat" ntqlocale.html#toFloat
    -"QLocale::toInt" ntqlocale.html#toInt
    -"QLocale::toLong" ntqlocale.html#toLong
    -"QLocale::toLongLong" ntqlocale.html#toLongLong
    -"QLocale::toShort" ntqlocale.html#toShort
    -"QLocale::toString" ntqlocale.html#toString
    -"QLocale::toUInt" ntqlocale.html#toUInt
    -"QLocale::toULong" ntqlocale.html#toULong
    -"QLocale::toULongLong" ntqlocale.html#toULongLong
    -"QLocale::toUShort" ntqlocale.html#toUShort
    +"TQLocale" tqlocale.html
    +"TQLocale::Country" tqlocale.html#Country
    +"TQLocale::Language" tqlocale.html#Language
    +"TQLocale::c" tqlocale.html#c
    +"TQLocale::country" tqlocale.html#country
    +"TQLocale::countryToString" tqlocale.html#countryToString
    +"TQLocale::language" tqlocale.html#language
    +"TQLocale::languageToString" tqlocale.html#languageToString
    +"TQLocale::name" tqlocale.html#name
    +"TQLocale::operator=" tqlocale.html#operator-eq
    +"TQLocale::setDefault" tqlocale.html#setDefault
    +"TQLocale::system" tqlocale.html#system
    +"TQLocale::toDouble" tqlocale.html#toDouble
    +"TQLocale::toFloat" tqlocale.html#toFloat
    +"TQLocale::toInt" tqlocale.html#toInt
    +"TQLocale::toLong" tqlocale.html#toLong
    +"TQLocale::toLongLong" tqlocale.html#toLongLong
    +"TQLocale::toShort" tqlocale.html#toShort
    +"TQLocale::toString" tqlocale.html#toString
    +"TQLocale::toUInt" tqlocale.html#toUInt
    +"TQLocale::toULong" tqlocale.html#toULong
    +"TQLocale::toULongLong" tqlocale.html#toULongLong
    +"TQLocale::toUShort" tqlocale.html#toUShort
     "TQMacMime" tqmacmime.html
     "TQMacMime::all" tqmacmime.html#all
     "TQMacMime::canConvert" tqmacmime.html#canConvert
    @@ -5257,18 +5257,18 @@
     "TQSignalMapper::removeMappings" tqsignalmapper.html#removeMappings
     "TQSignalMapper::setMapping" tqsignalmapper.html#setMapping
     "TQSignalMapper::~TQSignalMapper" tqsignalmapper.html#~TQSignalMapper
    -"QSimpleRichText" ntqsimplerichtext.html
    -"QSimpleRichText::adjustSize" ntqsimplerichtext.html#adjustSize
    -"QSimpleRichText::anchorAt" ntqsimplerichtext.html#anchorAt
    -"QSimpleRichText::context" ntqsimplerichtext.html#context
    -"QSimpleRichText::draw" ntqsimplerichtext.html#draw
    -"QSimpleRichText::height" ntqsimplerichtext.html#height
    -"QSimpleRichText::inText" ntqsimplerichtext.html#inText
    -"QSimpleRichText::setDefaultFont" ntqsimplerichtext.html#setDefaultFont
    -"QSimpleRichText::setWidth" ntqsimplerichtext.html#setWidth
    -"QSimpleRichText::width" ntqsimplerichtext.html#width
    -"QSimpleRichText::widthUsed" ntqsimplerichtext.html#widthUsed
    -"QSimpleRichText::~QSimpleRichText" ntqsimplerichtext.html#~QSimpleRichText
    +"TQSimpleRichText" tqsimplerichtext.html
    +"TQSimpleRichText::adjustSize" tqsimplerichtext.html#adjustSize
    +"TQSimpleRichText::anchorAt" tqsimplerichtext.html#anchorAt
    +"TQSimpleRichText::context" tqsimplerichtext.html#context
    +"TQSimpleRichText::draw" tqsimplerichtext.html#draw
    +"TQSimpleRichText::height" tqsimplerichtext.html#height
    +"TQSimpleRichText::inText" tqsimplerichtext.html#inText
    +"TQSimpleRichText::setDefaultFont" tqsimplerichtext.html#setDefaultFont
    +"TQSimpleRichText::setWidth" tqsimplerichtext.html#setWidth
    +"TQSimpleRichText::width" tqsimplerichtext.html#width
    +"TQSimpleRichText::widthUsed" tqsimplerichtext.html#widthUsed
    +"TQSimpleRichText::~TQSimpleRichText" tqsimplerichtext.html#~TQSimpleRichText
     "TQSize" tqsize.html
     "TQSize::ScaleMode" tqsize.html#ScaleMode
     "TQSize::boundedTo" tqsize.html#boundedTo
    @@ -6093,13 +6093,13 @@
     "QSvgDevice::setBoundingRect" qsvgdevice.html#setBoundingRect
     "QSvgDevice::toString" qsvgdevice.html#toString
     "QSvgDevice::~QSvgDevice" qsvgdevice.html#~QSvgDevice
    -"QSyntaxHighlighter" ntqsyntaxhighlighter.html
    -"QSyntaxHighlighter::currentParagraph" ntqsyntaxhighlighter.html#currentParagraph
    -"QSyntaxHighlighter::highlightParagraph" ntqsyntaxhighlighter.html#highlightParagraph
    -"QSyntaxHighlighter::rehighlight" ntqsyntaxhighlighter.html#rehighlight
    -"QSyntaxHighlighter::setFormat" ntqsyntaxhighlighter.html#setFormat
    -"QSyntaxHighlighter::textEdit" ntqsyntaxhighlighter.html#textEdit
    -"QSyntaxHighlighter::~QSyntaxHighlighter" ntqsyntaxhighlighter.html#~QSyntaxHighlighter
    +"TQSyntaxHighlighter" tqsyntaxhighlighter.html
    +"TQSyntaxHighlighter::currentParagraph" tqsyntaxhighlighter.html#currentParagraph
    +"TQSyntaxHighlighter::highlightParagraph" tqsyntaxhighlighter.html#highlightParagraph
    +"TQSyntaxHighlighter::rehighlight" tqsyntaxhighlighter.html#rehighlight
    +"TQSyntaxHighlighter::setFormat" tqsyntaxhighlighter.html#setFormat
    +"TQSyntaxHighlighter::textEdit" tqsyntaxhighlighter.html#textEdit
    +"TQSyntaxHighlighter::~TQSyntaxHighlighter" tqsyntaxhighlighter.html#~TQSyntaxHighlighter
     "QTSManip::exec" qtsmanip.html#exec
     "QTab" qtab.html
     "QTab::iconSet" qtab.html#iconSet
    @@ -7254,19 +7254,19 @@
     "TQWaitCondition::wakeAll" tqwaitcondition.html#wakeAll
     "TQWaitCondition::wakeOne" tqwaitcondition.html#wakeOne
     "TQWaitCondition::~TQWaitCondition" tqwaitcondition.html#~TQWaitCondition
    -"QWhatsThis" ntqwhatsthis.html
    -"QWhatsThis::add" ntqwhatsthis.html#add
    -"QWhatsThis::clicked" ntqwhatsthis.html#clicked
    -"QWhatsThis::display" ntqwhatsthis.html#display
    -"QWhatsThis::enterWhatsThisMode" ntqwhatsthis.html#enterWhatsThisMode
    -"QWhatsThis::inWhatsThisMode" ntqwhatsthis.html#inWhatsThisMode
    -"QWhatsThis::leaveWhatsThisMode" ntqwhatsthis.html#leaveWhatsThisMode
    -"QWhatsThis::remove" ntqwhatsthis.html#remove
    -"QWhatsThis::setFont" ntqwhatsthis.html#setFont
    -"QWhatsThis::text" ntqwhatsthis.html#text
    -"QWhatsThis::textFor" ntqwhatsthis.html#textFor
    -"QWhatsThis::whatsThisButton" ntqwhatsthis.html#whatsThisButton
    -"QWhatsThis::~QWhatsThis" ntqwhatsthis.html#~QWhatsThis
    +"TQWhatsThis" tqwhatsthis.html
    +"TQWhatsThis::add" tqwhatsthis.html#add
    +"TQWhatsThis::clicked" tqwhatsthis.html#clicked
    +"TQWhatsThis::display" tqwhatsthis.html#display
    +"TQWhatsThis::enterWhatsThisMode" tqwhatsthis.html#enterWhatsThisMode
    +"TQWhatsThis::inWhatsThisMode" tqwhatsthis.html#inWhatsThisMode
    +"TQWhatsThis::leaveWhatsThisMode" tqwhatsthis.html#leaveWhatsThisMode
    +"TQWhatsThis::remove" tqwhatsthis.html#remove
    +"TQWhatsThis::setFont" tqwhatsthis.html#setFont
    +"TQWhatsThis::text" tqwhatsthis.html#text
    +"TQWhatsThis::textFor" tqwhatsthis.html#textFor
    +"TQWhatsThis::whatsThisButton" tqwhatsthis.html#whatsThisButton
    +"TQWhatsThis::~TQWhatsThis" tqwhatsthis.html#~TQWhatsThis
     "QWheelEvent" qwheelevent.html
     "QWheelEvent::accept" qwheelevent.html#accept
     "QWheelEvent::delta" qwheelevent.html#delta
    @@ -7941,7 +7941,7 @@
     "nsplugin-examples" nsplugin-examples.html
     "objectmodel" objectmodel.html
     "opengl-examples" opengl-examples.html
    -"operator!=" qchar.html#operator!-eq
    +"operator!=" tqchar.html#operator!-eq
     "operator!=" tqcstring.html#operator!-eq
     "operator!=" tqpoint.html#operator!-eq
     "operator!=" tqrect.html#operator!-eq
    @@ -7959,7 +7959,7 @@
     "operator-" tqsize.html#operator-
     "operator/" tqpoint.html#operator/
     "operator/" tqsize.html#operator/
    -"operator<" qchar.html#operator-lt
    +"operator<" tqchar.html#operator-lt
     "operator<" tqcstring.html#operator-lt
     "operator<" tqstring.html#operator-lt
     "operator<<" tqbitarray.html#operator-lt-lt
    @@ -7993,19 +7993,19 @@
     "operator<<" ntquuid.html#operator-lt-lt
     "operator<<" tqvaluelist.html#operator-lt-lt
     "operator<<" tqwmatrix.html#operator-lt-lt
    -"operator<=" qchar.html#operator-lt-eq
    +"operator<=" tqchar.html#operator-lt-eq
     "operator<=" tqcstring.html#operator-lt-eq
     "operator<=" tqstring.html#operator-lt-eq
    -"operator==" qchar.html#operator-eq-eq
    +"operator==" tqchar.html#operator-eq-eq
     "operator==" tqcstring.html#operator-eq-eq
     "operator==" tqpoint.html#operator-eq-eq
     "operator==" tqrect.html#operator-eq-eq
     "operator==" tqsize.html#operator-eq-eq
     "operator==" tqstring.html#operator-eq-eq
    -"operator>" qchar.html#operator-gt
    +"operator>" tqchar.html#operator-gt
     "operator>" tqcstring.html#operator-gt
     "operator>" tqstring.html#operator-gt
    -"operator>=" qchar.html#operator-gt-eq
    +"operator>=" tqchar.html#operator-gt-eq
     "operator>=" tqcstring.html#operator-gt-eq
     "operator>=" tqstring.html#operator-gt-eq
     "operator>>" tqbitarray.html#operator-gt-gt
    diff --git a/doc/html/layout-example.html b/doc/html/layout-example.html
    index 89a7ccee6..272713f50 100644
    --- a/doc/html/layout-example.html
    +++ b/doc/html/layout-example.html
    @@ -48,7 +48,7 @@ classes, TQGridLayout, 
     *****************************************************************************/
     
     #include <ntqapplication.h>
    -#include <ntqlabel.h>
    +#include <tqlabel.h>
     #include <tqcolor.h>
     #include <ntqpushbutton.h>
     #include <ntqlayout.h>
    @@ -148,7 +148,7 @@ public:
             // Make a label that is a buddy of the line edit
             TQString s;
             s.sprintf( "Line &%d", row+1 );
    -        TQLabel *label = new TQLabel( ed, s, this );
    +        TQLabel *label = new TQLabel( ed, s, this );
             // The label goes in the first column.
             grid->addWidget( label, row, labelCol );
         }
    @@ -166,15 +166,15 @@ public:
         grid->setColStretch( multiCol, 20 );
     
         // Add a widget at the bottom.
    -    TQLabel* sb = new TQLabel( this );
    -    sb->setText( "Let's pretend this is a status bar" );
    +    TQLabel* sb = new TQLabel( this );
    +    sb->setText( "Let's pretend this is a status bar" );
         sb->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
         // This widget will use all horizontal space, and have a fixed height.
     
         // we should have made a subclass and implemented sizePolicy there...
         sb->setFixedHeight( sb->sizeHint().height() );
     
    -    sb->setAlignment( AlignVCenter | AlignLeft );
    +    sb->setAlignment( AlignVCenter | AlignLeft );
         topLayout->addWidget( sb );
     
         topLayout->activate();
    diff --git a/doc/html/layout.html b/doc/html/layout.html
    index 0358ed903..e2c643440 100644
    --- a/doc/html/layout.html
    +++ b/doc/html/layout.html
    @@ -80,11 +80,11 @@ resized.
     

    The grid shown above can be produced by the following code:

         TQGrid *mainGrid = new TQGrid( 2 ); // a 2 x n grid
    -    new TQLabel( "One", mainGrid );
    -    new TQLabel( "Two", mainGrid );
    -    new TQLabel( "Three", mainGrid );
    -    new TQLabel( "Four", mainGrid );
    -    new TQLabel( "Five", mainGrid );
    +    new TQLabel( "One", mainGrid );
    +    new TQLabel( "Two", mainGrid );
    +    new TQLabel( "Three", mainGrid );
    +    new TQLabel( "Four", mainGrid );
    +    new TQLabel( "Five", mainGrid );
     

    You can adjust the layout to some extent by calling @@ -144,14 +144,14 @@ improvements: TQGridLayout *grid = new TQGridLayout( main, 1, 1 ); // add the first four widgets with (row, column) addressing - grid->addWidget( new TQLabel( "One", main ), 0, 0 ); - grid->addWidget( new TQLabel( "Two", main ), 0, 1 ); - grid->addWidget( new TQLabel( "Three", main ), 1, 0 ); - grid->addWidget( new TQLabel( "Four", main ), 1, 1 ); + grid->addWidget( new TQLabel( "One", main ), 0, 0 ); + grid->addWidget( new TQLabel( "Two", main ), 0, 1 ); + grid->addWidget( new TQLabel( "Three", main ), 1, 0 ); + grid->addWidget( new TQLabel( "Four", main ), 1, 1 ); // add the last widget on row 2, spanning from column 0 to // column 1, and center aligned - grid->addMultiCellWidget( new TQLabel( "Five", main ), 2, 2, 0, 1, + grid->addMultiCellWidget( new TQLabel( "Five", main ), 2, 2, 0, 1, TQt::AlignCenter ); // let the ratio between the widths of columns 0 and 1 be 2:3 @@ -166,7 +166,7 @@ a parameter in the constructor. TQLineEdit *field = new TQLineEdit( main ); TQPushButton *ok = new TQPushButton( "OK", main ); TQPushButton *cancel = new TQPushButton( "Cancel", main ); - TQLabel *label = new TQLabel( "Write once, compile everywhere.", main ); + TQLabel *label = new TQLabel( "Write once, compile everywhere.", main ); // a layout on a widget TQVBoxLayout *vbox = new TQVBoxLayout( main ); diff --git a/doc/html/licenses.html b/doc/html/licenses.html index d38531010..173079c6b 100644 --- a/doc/html/licenses.html +++ b/doc/html/licenses.html @@ -240,7 +240,7 @@ REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.

    This product includes software developed by the University of California, Berkeley and its contributors.


    Copyright (c) 2002 Jorge Acereda and Peter O'Gorman diff --git a/doc/html/lineedits-example.html b/doc/html/lineedits-example.html index e796a979d..c470dabe2 100644 --- a/doc/html/lineedits-example.html +++ b/doc/html/lineedits-example.html @@ -95,7 +95,7 @@ protected slots: #include <ntqcombobox.h> #include <ntqframe.h> #include <ntqvalidator.h> -#include <ntqlabel.h> +#include <tqlabel.h> #include <ntqlayout.h> #include <ntqhbox.h> @@ -116,7 +116,7 @@ protected slots: row1->setMargin( 5 ); // Create a Label - TQLabel* label = new TQLabel( "Echo Mode: ", this); + TQLabel* label = new TQLabel( "Echo Mode: ", this); row1->addWidget( label ); // Create a Combobox with three items... @@ -138,7 +138,7 @@ protected slots: row2->setMargin( 5 ); // and the second label - label = new TQLabel( "Validator: ", this ); + label = new TQLabel( "Validator: ", this ); row2->addWidget( label ); // A second Combobox with again three items... @@ -159,7 +159,7 @@ protected slots: row3->setMargin( 5 ); // we need a label for this too - label = new TQLabel( "Alignment: ", this ); + label = new TQLabel( "Alignment: ", this ); row3->addWidget( label ); // A combo box for setting alignment @@ -180,7 +180,7 @@ protected slots: row4->setMargin( 5 ); // we need a label for this too - label = new TQLabel( "Input mask: ", this ); + label = new TQLabel( "Input mask: ", this ); row4->addWidget( label ); // A combo box for choosing an input mask @@ -205,7 +205,7 @@ protected slots: row5->setMargin( 5 ); // last label - (void)new TQLabel( "Read-Only: ", row5 ); + (void)new TQLabel( "Read-Only: ", row5 ); // A combo box for setting alignment combo5 = new TQComboBox( FALSE, row5 ); diff --git a/doc/html/linguist-manual-4.html b/doc/html/linguist-manual-4.html index 341700edc..7677a1e80 100644 --- a/doc/html/linguist-manual-4.html +++ b/doc/html/linguist-manual-4.html @@ -431,8 +431,8 @@ TRANSLATIONS = tt3_pt.ts

    PrintPanel is a TQWidget. It needs the TQ_OBJECT macro for tr() to work properly.

    The implementation file is printpanel.cpp.

        /*
    -        TQLabel *lab = new TQLabel( tr("<b>TROLL PRINT</b>"), this );
    -        lab->setAlignment( AlignCenter );
    +        TQLabel *lab = new TQLabel( tr("<b>TROLL PRINT</b>"), this );
    +        lab->setAlignment( AlignCenter );
         */
     

    Some of the code is commented out in Troll Print 1.0; you will uncomment it later, for Troll Print 1.1.

    @@ -518,7 +518,7 @@ TRANSLATIONS = tt3_pt.ts
    Troll Print 1.1

    We'll now prepare release 1.1 of Troll Print. Start your favorite text editor and follow these steps:

    -
    • Uncomment the two lines that create a TQLabel with the text "<b>TROLL PRINT</b>" in printpanel.cpp.

      +
      • Uncomment the two lines that create a TQLabel with the text "<b>TROLL PRINT</b>" in printpanel.cpp.

      • Word-tidying: Replace "2-sided" by "Two-sided" in printpanel.cpp.

      • Replace "1.0" with "1.1" everywhere it occurs in mainwindow.cpp.

      • Update the copyright year to 1999-2000 in mainwindow.cpp.

        diff --git a/doc/html/listbox-example.html b/doc/html/listbox-example.html index a4aa70adf..81fe0c860 100644 --- a/doc/html/listbox-example.html +++ b/doc/html/listbox-example.html @@ -101,7 +101,7 @@ private: #include "listbox.h" -#include <ntqlabel.h> +#include <tqlabel.h> #include <ntqradiobutton.h> #include <ntqcheckbox.h> #include <ntqspinbox.h> @@ -116,8 +116,8 @@ private: { TQGridLayout * g = new TQGridLayout( this, 2, 2, 6 ); - g->addWidget( new TQLabel( "<b>Configuration:</b>", this ), 0, 0 ); - g->addWidget( new TQLabel( "<b>Result:</b>", this ), 0, 1 ); + g->addWidget( new TQLabel( "<b>Configuration:</b>", this ), 0, 0 ); + g->addWidget( new TQLabel( "<b>Result:</b>", this ), 0, 1 ); l = new TQListBox( this ); g->addWidget( l, 1, 1 ); @@ -140,7 +140,7 @@ private: v->addLayout( h ); h->addSpacing( 30 ); h->addSpacing( 100 ); - h->addWidget( new TQLabel( "Columns:", this ) ); + h->addWidget( new TQLabel( "Columns:", this ) ); columns = new TQSpinBox( this ); h->addWidget( columns ); @@ -165,7 +165,7 @@ private: v->addLayout( h ); h->addSpacing( 30 ); h->addSpacing( 100 ); - h->addWidget( new TQLabel( "Rows:", this ) ); + h->addWidget( new TQLabel( "Rows:", this ) ); rows = new TQSpinBox( this ); rows->setEnabled( FALSE ); h->addWidget( rows ); diff --git a/doc/html/listboxcombo-example.html b/doc/html/listboxcombo-example.html index 8b0006a64..d12f9d009 100644 --- a/doc/html/listboxcombo-example.html +++ b/doc/html/listboxcombo-example.html @@ -64,7 +64,7 @@ public: protected: TQListBox *lb1, *lb2; - TQLabel *label1, *label2; + TQLabel *label1, *label2; protected slots: void slotLeft2Right(); @@ -96,7 +96,7 @@ protected slots: #include <ntqpushbutton.h> #include <tqstring.h> #include <tqpixmap.h> -#include <ntqlabel.h> +#include <tqlabel.h> #include <tqimage.h> #include <tqpainter.h> #include <tqstyle.h> @@ -180,7 +180,7 @@ protected: // Create a non-editable Combobox and a label below... TQComboBox *cb1 = new TQComboBox( FALSE, box1 ); - label1 = new TQLabel( "Current Item: Combobox Item 0", box1 ); + label1 = new TQLabel( "Current Item: Combobox Item 0", box1 ); label1->setMaximumHeight( label1->sizeHint().height() * 2 ); label1->setFrameStyle( TQFrame::Panel | TQFrame::Sunken ); @@ -198,7 +198,7 @@ protected: // Create an editable Combobox and a label below... TQComboBox *cb2 = new TQComboBox( TRUE, box2 ); - label2 = new TQLabel( "Current Item: Combobox Item 0", box2 ); + label2 = new TQLabel( "Current Item: Combobox Item 0", box2 ); label2->setMaximumHeight( label2->sizeHint().height() * 2 ); label2->setFrameStyle( TQFrame::Panel | TQFrame::Sunken ); @@ -251,7 +251,7 @@ void ListBoxCombo::slotLeft2Right() void ListBoxCombo::slotCombo1Activated( const TQString &s ) { - label1->setText( TQString( "Current Item: %1" ).arg( s ) ); + label1->setText( TQString( "Current Item: %1" ).arg( s ) ); } /* @@ -264,7 +264,7 @@ void ListBoxCombo::slotCombo1Activated( const ListBoxCombo::slotCombo2Activated( const TQString &s ) { - label2->setText( TQString( "Current Item: %1" ).arg( s ) ); + label2->setText( TQString( "Current Item: %1" ).arg( s ) ); } diff --git a/doc/html/listviews-example.html b/doc/html/listviews-example.html index 0a9f9ce6f..e29097db0 100644 --- a/doc/html/listviews-example.html +++ b/doc/html/listviews-example.html @@ -192,7 +192,7 @@ protected: void setupFolders(); TQListView *messages, *folders; - TQLabel *message; + TQLabel *message; TQPopupMenu* menu; TQPtrList<Folder> lstFolders; @@ -221,7 +221,7 @@ protected slots: #include "listviews.h" -#include <ntqlabel.h> +#include <tqlabel.h> #include <tqpainter.h> #include <tqpalette.h> #include <tqobjectlist.h> @@ -343,8 +343,8 @@ void FolderListItem::insertSubFolders( const TQListViewItem *, const TQPoint &, int ) ) ); vsplitter->setResizeMode( messages, TQSplitter::KeepSize ); - message = new TQLabel( vsplitter ); - message->setAlignment( TQt::AlignTop ); + message = new TQLabel( vsplitter ); + message->setAlignment( TQt::AlignTop ); message->setBackgroundMode( PaletteBase ); connect( folders, TQ_SIGNAL( selectionChanged( TQListViewItem* ) ), @@ -432,7 +432,7 @@ void ListViews::slotFolderChanged( clear(); - message->setText( "" ); + message->setText( "" ); FolderListItem *item = ( FolderListItem* )i; @@ -448,7 +448,7 @@ void ListViews::slotMessageChanged() return; if ( !i->isSelected() ) { - message->setText( "" ); + message->setText( "" ); return; } @@ -466,7 +466,7 @@ void ListViews::slotMessageChanged() arg( tmp ).arg( msg->header().subject() ). arg( msg->header().datetime().toString() ).arg( msg->body() ); - message->setText( text ); + message->setText( text ); msg->setState( Message::Read ); } diff --git a/doc/html/mainclasses.html b/doc/html/mainclasses.html index 6af4729e7..bbf9babb1 100644 --- a/doc/html/mainclasses.html +++ b/doc/html/mainclasses.html @@ -173,7 +173,7 @@ classes), see TQt's Classes. TQDateEdit L -TQLabel +TQLabel TQProgressBar @@ -201,7 +201,7 @@ classes), see TQt's Classes. TQTable W -TQWhatsThis +TQWhatsThis TQDial @@ -263,7 +263,7 @@ classes), see TQt's Classes. TQMenuBar -TQSimpleRichText +TQSimpleRichText TQTimeEdit diff --git a/doc/html/mdi-example.html b/doc/html/mdi-example.html index 36aa1ec7c..aa29c5772 100644 --- a/doc/html/mdi-example.html +++ b/doc/html/mdi-example.html @@ -144,7 +144,7 @@ private: #include <tqmovie.h> #include <tqfile.h> #include <tqfiledialog.h> -#include <ntqlabel.h> +#include <tqlabel.h> #include <tqstatusbar.h> #include <ntqmessagebox.h> #include <tqprinter.h> @@ -155,10 +155,10 @@ private: #include <tqtextedit.h> #include <tqpainter.h> #include <tqpaintdevicemetrics.h> -#include <ntqwhatsthis.h> +#include <tqwhatsthis.h> #include <tqobjectlist.h> #include <ntqvbox.h> -#include <ntqsimplerichtext.h> +#include <tqsimplerichtext.h> #include "filesave.xpm" #include "fileopen.xpm" @@ -203,13 +203,13 @@ const char * filePrintText = "Click this button to print the file you " TQToolButton * filePrint = new TQToolButton( printIcon, "Print File", TQString::null, this, TQ_SLOT(print()), fileTools, "print file" ); - TQWhatsThis::add( filePrint, filePrintText ); + TQWhatsThis::add( filePrint, filePrintText ); #endif (void)TQWhatsThis::whatsThisButton( fileTools ); - TQWhatsThis::add( fileOpen, fileOpenText ); - TQWhatsThis::add( fileSave, fileSaveText ); + TQWhatsThis::add( fileOpen, fileOpenText ); + TQWhatsThis::add( fileSave, fileSaveText ); TQPopupMenu * file = new TQPopupMenu( this ); menuBar()->insertItem( "&File", file ); @@ -530,21 +530,21 @@ void MDIWindow::print( TQPrinter int dpiy = metrics.logicalDpiY(); int margin = (int) ( (2/2.54)*dpiy ); // 2 cm margins TQRect view( margin, margin, metrics.width() - 2*margin, metrics.height() - 2*margin ); - TQSimpleRichText richText( TQStyleSheet::convertFromPlainText(medit->text()), + TQSimpleRichText richText( TQStyleSheet::convertFromPlainText(medit->text()), TQFont(), medit->context(), medit->styleSheet(), medit->mimeSourceFactory(), view.height() ); - richText.setWidth( &p, view.width() ); + richText.setWidth( &p, view.width() ); int page = 1; do { - richText.draw( &p, margin, margin, view, colorGroup() ); + richText.draw( &p, margin, margin, view, colorGroup() ); view.moveBy( 0, view.height() ); p.translate( 0 , -view.height() ); p.drawText( view.right() - p.fontMetrics().width( TQString::number( page ) ), view.bottom() + p.fontMetrics().ascent() + 5, TQString::number( page ) ); - if ( view.top() - margin >= richText.height() ) + if ( view.top() - margin >= richText.height() ) break; TQString msg( "Printing (page " ); msg += TQString::number( ++pageNo ); diff --git a/doc/html/menu-example.html b/doc/html/menu-example.html index ae09aa360..4be978c14 100644 --- a/doc/html/menu-example.html +++ b/doc/html/menu-example.html @@ -53,7 +53,7 @@ context menu. #include <tqwidget.h> #include <tqmenubar.h> -#include <ntqlabel.h> +#include <tqlabel.h> class MenuExample : public TQWidget @@ -90,7 +90,7 @@ private: TQMenuBar *menu; - TQLabel *label; + TQLabel *label; bool isBold; bool isUnderline; int boldID, underlineID; @@ -291,23 +291,23 @@ private: menu->setSeparator( TQMenuBar::InWindowsStyle ); - TQLabel *msg = new TQLabel( this ); + TQLabel *msg = new TQLabel( this ); TQ_CHECK_PTR( msg ); - msg->setText( "A context menu is available.\n" + msg->setText( "A context menu is available.\n" "Invoke it by right-clicking or by" " pressing the 'context' button." ); msg->setGeometry( 0, height() - 60, width(), 60 ); - msg->setAlignment( AlignCenter ); + msg->setAlignment( AlignCenter ); - label = new TQLabel( this ); + label = new TQLabel( this ); TQ_CHECK_PTR( label ); label->setGeometry( 20, rect().center().y()-20, width()-40, 40 ); label->setFrameStyle( TQFrame::Box | TQFrame::Raised ); label->setLineWidth( 1 ); - label->setAlignment( AlignCenter ); + label->setAlignment( AlignCenter ); connect( this, TQ_SIGNAL(explain(const TQString&)), - label, TQ_SLOT(setText(const TQString&)) ); + label, TQ_SLOT(setText(const TQString&)) ); setMinimumSize( 100, 80 ); setFocusPolicy( TQWidget::ClickFocus ); @@ -318,9 +318,9 @@ private: { TQPopupMenu* contextMenu = new TQPopupMenu( this ); TQ_CHECK_PTR( contextMenu ); - TQLabel *caption = new TQLabel( "<font color=darkblue><u><b>" + TQLabel *caption = new TQLabel( "<font color=darkblue><u><b>" "Context Menu</b></u></font>", this ); - caption->setAlignment( TQt::AlignCenter ); + caption->setAlignment( TQt::AlignCenter ); contextMenu->insertItem( caption ); contextMenu->insertItem( "&New", this, TQ_SLOT(news()), CTRL+Key_N ); contextMenu->insertItem( "&Open...", this, TQ_SLOT(open()), CTRL+Key_O ); @@ -376,7 +376,7 @@ void MenuExample::normal() isBold = FALSE; isUnderline = FALSE; TQFont font; - label->setFont( font ); + label->setFont( font ); menu->setItemChecked( boldID, isBold ); menu->setItemChecked( underlineID, isUnderline ); emit explain( "Options/Normal selected" ); @@ -389,7 +389,7 @@ void MenuExample::bold() TQFont font; font.setBold( isBold ); font.setUnderline( isUnderline ); - label->setFont( font ); + label->setFont( font ); menu->setItemChecked( boldID, isBold ); emit explain( "Options/Bold selected" ); } @@ -401,7 +401,7 @@ void MenuExample::underline() TQFont font; font.setBold( isBold ); font.setUnderline( isUnderline ); - label->setFont( font ); + label->setFont( font ); menu->setItemChecked( underlineID, isUnderline ); emit explain( "Options/Underline selected" ); } diff --git a/doc/html/motif-walkthrough-2.html b/doc/html/motif-walkthrough-2.html index d30c28011..013cc6eb5 100644 --- a/doc/html/motif-walkthrough-2.html +++ b/doc/html/motif-walkthrough-2.html @@ -64,7 +64,7 @@ it until we have replaced the View widget.

        The Help dialog is also special. Instead of replacing the Help dialog with a custom TQDialog, we will use the TQt Help System classes to provide a more advanced online help. -However, we cannot start using classes like TQToolTip and TQWhatsThis +However, we cannot start using classes like TQToolTip and TQWhatsThis until we replace the Main Window and View widgets.

        The help text included with the original project is very small and only contains information about the XmNoteBook widget. The use of @@ -83,7 +83,7 @@ creates the Help dialog. We will also remove the code to create the Help menu, since this menu is now empty. Finally, we remove the help_cb() function implementation.

        The Help dialog is now removed from our project. We cannot add -TQToolTip and TQWhatsThis help at the moment, since we are still using +TQToolTip and TQWhatsThis help at the moment, since we are still using XmMainWindow for the Main Window widget. Once we have migrated the Main Window and the popup-menu hierarchy, we can begin using TQToolTip and TQWhatsThis for online help. diff --git a/doc/html/motif-walkthrough-8.html b/doc/html/motif-walkthrough-8.html index ef6b103aa..ce1ceb4fd 100644 --- a/doc/html/motif-walkthrough-8.html +++ b/doc/html/motif-walkthrough-8.html @@ -69,7 +69,7 @@ application on all platforms supported by TQt.

      We will use the first approach to complete the migration of the -example project used in this walkthrough, using TQTextEdit, TQLabel and +example project used in this walkthrough, using TQTextEdit, TQLabel and TQSpinBox to provide a similar look. The only difference is that we will not have tabs.

      We use TQt Designer to add the diff --git a/doc/html/motif-walkthrough-9.html b/doc/html/motif-walkthrough-9.html index a7ce8ee94..b9a912013 100644 --- a/doc/html/motif-walkthrough-9.html +++ b/doc/html/motif-walkthrough-9.html @@ -44,7 +44,7 @@ this function any more, so we remove it. The current MainWindow::filePrint( write a new MainWindow::filePrint() implementation in mainwindow.ui.h.

      Note: The steps involved in using the TQPrinter class are beyond the scope of this walkthrough and will not be discussed here. The -TQPrinter Class Reference, TQSimpleRichText Class Reference and the +TQPrinter Class Reference, TQSimpleRichText Class Reference and the Simple Application Walkthrough contain information on the use of TQPrinter.

      For completeness, the code to initialize a TQPrinter object is included below. @@ -65,7 +65,7 @@ and formatting characters to a printtext variable (which is a TQString).

      
       

      The rest of the MainWindow::filePrint() function is the actual -printing code. Here we simply create a TQSimpleRichText object using +printing code. Here we simply create a TQSimpleRichText object using the string we created above, and draw this string on the TQPrinter object using TQPainter.

      
      diff --git a/doc/html/movies-example.html b/doc/html/movies-example.html
      index 96fdea355..8b0e9ee2e 100644
      --- a/doc/html/movies-example.html
      +++ b/doc/html/movies-example.html
      @@ -34,7 +34,7 @@ body { background: #ffffff; color: black; }
          
       

      The Movies example displays MNG and animated GIF files using the TQMovie and -TQLabel classes. +TQLabel classes.

      The movies will only read an animated GIF if GIF reading was enabled when TQt was built.


      Main: @@ -51,7 +51,7 @@ The Movies example displays MNG and animated GIF files using the ntqapplication.h> #include <tqfiledialog.h> #include <ntqpushbutton.h> -#include <ntqlabel.h> +#include <tqlabel.h> #include <tqpainter.h> #include <ntqmessagebox.h> #include <tqmovie.h> diff --git a/doc/html/ntqaccel.html b/doc/html/ntqaccel.html index 6da44b2f7..f94b0ff6d 100644 --- a/doc/html/ntqaccel.html +++ b/doc/html/ntqaccel.html @@ -87,7 +87,7 @@ used in both menus and toolbars. If you're only interested in menus use TQMenuData::insertItem() or TQMenuData::setAccel() to make accelerators for operations that are also available on menus. Many widgets automatically generate accelerators, such as TQButton, -TQGroupBox, TQLabel (with TQLabel::setBuddy()), TQMenuBar and TQTabBar. +TQGroupBox, TQLabel (with TQLabel::setBuddy()), TQMenuBar and TQTabBar. Example:

               TQPushButton p( "&Exit", parent ); // automatic shortcut ALT+Key_E
      @@ -114,7 +114,7 @@ pressing the key multiple times, users can navigate between all
       matching accelerators. Some standard controls like TQPushButton and
       TQCheckBox connect the activatedAmbiguously() signal to the
       harmless setFocus() slot, whereas activated() is connected to a
      -slot invoking the button's action.	Most controls, like TQLabel and
      +slot invoking the button's action.	Most controls, like TQLabel and
       TQTabBar, treat activated() and activatedAmbiguously() as
       equivalent.
       

      Use setEnabled() to enable or disable all the items in an @@ -141,7 +141,7 @@ combination. TQ_SLOT(printDoc()) ); // printDoc() slot

      -

      See also TQKeyEvent, TQWidget::keyPressEvent(), TQMenuData::setAccel(), TQButton::accel, TQLabel::setBuddy(), TQKeySequence, GUI Design Handbook: Keyboard Shortcuts, and Miscellaneous Classes. +

      See also TQKeyEvent, TQWidget::keyPressEvent(), TQMenuData::setAccel(), TQButton::accel, TQLabel::setBuddy(), TQKeySequence, GUI Design Handbook: Keyboard Shortcuts, and Miscellaneous Classes.


      Member Function Documentation

      TQAccel::TQAccel ( TQWidget * parent, const char * name = 0 ) @@ -282,7 +282,7 @@ Sets a What's This help text for the accelerator item id to text To set What's This help on a menu item (with or without an accelerator key), use TQMenuData::setWhatsThis(). -

      See also whatsThis(), TQWhatsThis::inWhatsThisMode(), TQMenuData::setWhatsThis(), and TQAction::whatsThis. +

      See also whatsThis(), TQWhatsThis::inWhatsThisMode(), TQMenuData::setWhatsThis(), and TQAction::whatsThis.

      TQKeySequence TQAccel::shortcutKey ( const TQString & str ) [static]

      diff --git a/doc/html/ntqaccessible.html b/doc/html/ntqaccessible.html index bc7f68f6e..eec9d3029 100644 --- a/doc/html/ntqaccessible.html +++ b/doc/html/ntqaccessible.html @@ -272,7 +272,7 @@ accessibility information. ValueChange when the position of a slider has been changed. control is the ID of the child element that has changed. When control is 0, the object itself has changed.

      Call this function whenever the state of your accessible object or one of it's sub-elements has been changed either programmatically -(e.g. by calling TQLabel::setText()) or by user interaction. +(e.g. by calling TQLabel::setText()) or by user interaction.

      If there are no accessibility tools listening to this event, the performance penalty for calling this function is minor, but if determining the parameters of the call is expensive you can use isActive() to diff --git a/doc/html/ntqerrormessage.html b/doc/html/ntqerrormessage.html index 7c6d6ede2..a682255dd 100644 --- a/doc/html/ntqerrormessage.html +++ b/doc/html/ntqerrormessage.html @@ -54,7 +54,7 @@ body { background: #ffffff; color: black; }

      The TQErrorMessage class provides an error message display dialog.

      -

      This is basically a TQLabel and a "show this message again" checkbox which +

      This is basically a TQLabel and a "show this message again" checkbox which remembers what not to show.

      There are two ways to use this class:

        diff --git a/doc/html/ntqframe.html b/doc/html/ntqframe.html index 6d2194821..4b66bb896 100644 --- a/doc/html/ntqframe.html +++ b/doc/html/ntqframe.html @@ -35,7 +35,7 @@ body { background: #ffffff; color: black; } More...

        #include <ntqframe.h>

        Inherits TQWidget. -

        Inherited by TQGroupBox, TQScrollView, TQDockWindow, TQGrid, TQHBox, TQLabel, TQLCDNumber, TQLineEdit, TQMenuBar, TQPopupMenu, TQProgressBar, TQSplitter, TQToolBox, and TQWidgetStack. +

        Inherited by TQGroupBox, TQScrollView, TQDockWindow, TQGrid, TQHBox, TQLabel, TQLCDNumber, TQLineEdit, TQMenuBar, TQPopupMenu, TQProgressBar, TQSplitter, TQToolBox, and TQWidgetStack.

        List of all member functions.

        Public Members

          @@ -88,10 +88,10 @@ fill in the frame. This function is reimplemented by subclasses. There are also two other less useful functions: drawFrame() and frameChanged().

          TQPopupMenu uses this to "raise" the menu above the surrounding -screen. TQProgressBar has a "sunken" look. TQLabel has a flat look. +screen. TQProgressBar has a "sunken" look. TQLabel has a flat look. The frames of widgets like these can be changed.

          -    TQLabel label(...);
          +    TQLabel label(...);
               label.setFrameStyle( TQFrame::Panel | TQFrame::Raised );
               label.setLineWidth( 2 );
           
          @@ -197,7 +197,7 @@ inside the frame. It should only draw inside contentsRec
           default function does nothing.
           

          See also contentsRect and TQPainter::setClipRect(). -

          Reimplemented in TQLabel, TQLCDNumber, TQMenuBar, and TQPopupMenu. +

          Reimplemented in TQLabel, TQLCDNumber, TQMenuBar, and TQPopupMenu.

          void TQFrame::drawFrame ( TQPainter * p ) [virtual protected]

          Draws the frame using the painter p and the current frame diff --git a/doc/html/ntqguardedptr.html b/doc/html/ntqguardedptr.html index 45012a587..f5a687711 100644 --- a/doc/html/ntqguardedptr.html +++ b/doc/html/ntqguardedptr.html @@ -67,7 +67,7 @@ destroyed while you still hold a reference to it. You can safely test the pointer for validity.

          Example:

          -        TQGuardedPtr<TQLabel> label = new TQLabel( 0, "label" );
          +        TQGuardedPtr<TQLabel> label = new TQLabel( 0, "label" );
                   label->setText( "I like guarded pointers" );
           
                   delete (TQLabel*) label; // simulate somebody destroying the label
          diff --git a/doc/html/ntqlabel.html b/doc/html/ntqlabel.html
          deleted file mode 100644
          index 72312e980..000000000
          --- a/doc/html/ntqlabel.html
          +++ /dev/null
          @@ -1,420 +0,0 @@
          -
          -
          -
          -
          -
          -TQLabel Class
          -
          -
          -
          -
          -
          -
          -
          -
          - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

          TQLabel Class Reference

          - -

          The TQLabel widget provides a text or image display. -More... -

          #include <ntqlabel.h> -

          Inherits TQFrame. -

          List of all member functions. -

          Public Members

          -
            -
          • TQLabel ( TQWidget * parent, const char * name = 0, WFlags f = 0 )
          • -
          • TQLabel ( const TQString & text, TQWidget * parent, const char * name = 0, WFlags f = 0 )
          • -
          • TQLabel ( TQWidget * buddy, const TQString & text, TQWidget * parent, const char * name = 0, WFlags f = 0 )
          • -
          • ~TQLabel ()
          • -
          • TQString text () const
          • -
          • TQPixmap * pixmap () const
          • -
          • TQPicture * picture () const
          • -
          • TQMovie * movie () const
          • -
          • TextFormat textFormat () const
          • -
          • void setTextFormat ( TextFormat )
          • -
          • int alignment () const
          • -
          • virtual void setAlignment ( int )
          • -
          • int indent () const
          • -
          • void setIndent ( int )
          • -
          • bool autoResize () const  (obsolete)
          • -
          • virtual void setAutoResize ( bool enable )  (obsolete)
          • -
          • bool hasScaledContents () const
          • -
          • void setScaledContents ( bool )
          • -
          • virtual void setBuddy ( TQWidget * buddy )
          • -
          • TQWidget * buddy () const
          • -
          • virtual void setFont ( const TQFont & f )
          • -
          -

          Public Slots

          -
            -
          • virtual void setText ( const TQString & )
          • -
          • virtual void setPixmap ( const TQPixmap & )
          • -
          • virtual void setPicture ( const TQPicture & picture )
          • -
          • virtual void setMovie ( const TQMovie & movie )
          • -
          • virtual void setNum ( int num )
          • -
          • virtual void setNum ( double num )
          • -
          • void clear ()
          • -
          -

          Properties

          -
            -
          • Alignment alignment - the alignment of the label's contents
          • -
          • BackgroundMode backgroundMode - the label's background mode  (read only)
          • -
          • int indent - the label's text indent in pixels
          • -
          • TQPixmap pixmap - the label's pixmap
          • -
          • bool scaledContents - whether the label will scale its contents to fill all available space
          • -
          • TQString text - the label's text
          • -
          • TextFormat textFormat - the label's text format
          • -
          -

          Protected Members

          - -

          Detailed Description

          - - -The TQLabel widget provides a text or image display. -

          - - -

          TQLabel is used for displaying text or an image. No user -interaction functionality is provided. The visual appearance of -the label can be configured in various ways, and it can be used -for specifying a focus accelerator key for another widget. -

          A TQLabel can contain any of the following content types: -

          -
          Content Setting -
          Plain text -Pass a TQString to setText(). -
          Rich text -Pass a TQString that contains rich text to setText(). -
          A pixmap -Pass a TQPixmap to setPixmap(). -
          A movie -Pass a TQMovie to setMovie(). -
          A number -Pass an int or a double to setNum(), which converts -the number to plain text. -
          Nothing -The same as an empty plain text. This is the default. Set -by clear(). -
          -

          When the content is changed using any of these functions, any -previous content is cleared. -

          The look of a TQLabel can be tuned in several ways. All the -settings of TQFrame are available for specifying a widget frame. -The positioning of the content within the TQLabel widget area can -be tuned with setAlignment() and setIndent(). For example, this -code sets up a sunken panel with a two-line text in the bottom -right corner (both lines being flush with the right side of the -label): -

          -    TQLabel *label = new TQLabel( this );
          -    label->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
          -    label->setText( "first line\nsecond line" );
          -    label->setAlignment( AlignBottom | AlignRight );
          -    
          - -

          A TQLabel is often used as a label for an interactive widget. For -this use TQLabel provides a useful mechanism for adding an -accelerator key (see TQAccel) that will set the keyboard focus to -the other widget (called the TQLabel's "buddy"). For example: -

          -    TQLineEdit* phoneEdit = new TQLineEdit( this, "phoneEdit" );
          -    TQLabel* phoneLabel = new TQLabel( phoneEdit, "&Phone:", this, "phoneLabel" );
          -    
          - -

          In this example, keyboard focus is transferred to the label's -buddy (the TQLineEdit) when the user presses Alt+P. You can -also use the setBuddy() function to accomplish the same thing. -

          -

          See also TQLineEdit, TQTextEdit, TQPixmap, TQMovie, GUI Design Handbook: Label, Basic Widgets, and Text Related Classes. - -


          Member Function Documentation

          -

          TQLabel::TQLabel ( TQWidget * parent, const char * name = 0, WFlags f = 0 ) -

          -Constructs an empty label. -

          The parent, name and widget flag f, arguments are passed -to the TQFrame constructor. -

          See also alignment, setFrameStyle(), and indent. - -

          TQLabel::TQLabel ( const TQString & text, TQWidget * parent, const char * name = 0, WFlags f = 0 ) -

          -Constructs a label that displays the text, text. -

          The parent, name and widget flag f, arguments are passed -to the TQFrame constructor. -

          See also text, alignment, setFrameStyle(), and indent. - -

          TQLabel::TQLabel ( TQWidget * buddy, const TQString & text, TQWidget * parent, const char * name = 0, WFlags f = 0 ) -

          -Constructs a label that displays the text text. The label has a -buddy widget, buddy. -

          If the text contains an underlined letter (a letter preceded by -an ampersand, &), and the text is in plain text format, when the -user presses Alt+ the underlined letter, focus is passed to the -buddy widget. -

          The parent, name and widget flag, f, arguments are passed -to the TQFrame constructor. -

          See also text, setBuddy(), alignment, setFrameStyle(), and indent. - -

          TQLabel::~TQLabel () -

          -Destroys the label. - -

          int TQLabel::alignment () const -

          Returns the alignment of the label's contents. -See the "alignment" property for details. -

          bool TQLabel::autoResize () const -

          - -

          This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. -

          Returns TRUE if auto-resizing is enabled, or FALSE if auto-resizing -is disabled. -

          Auto-resizing is disabled by default. -

          See also setAutoResize(). - -

          TQWidget * TQLabel::buddy () const -

          -Returns this label's buddy, or 0 if no buddy is currently set. -

          See also setBuddy(). - -

          void TQLabel::clear () [slot] -

          -Clears any label contents. Equivalent to setText( "" ). - -

          void TQLabel::drawContents ( TQPainter * p ) [virtual protected] -

          -Draws the label contents using the painter p. - -

          Reimplemented from TQFrame. -

          bool TQLabel::hasScaledContents () const -

          Returns TRUE if the label will scale its contents to fill all available space; otherwise returns FALSE. -See the "scaledContents" property for details. -

          int TQLabel::indent () const -

          Returns the label's text indent in pixels. -See the "indent" property for details. -

          TQMovie * TQLabel::movie () const -

          -Returns a pointer to the label's movie, or 0 if no movie has been -set. -

          See also setMovie(). - -

          TQPicture * TQLabel::picture () const -

          - -

          Returns the label's picture or 0 if the label doesn't have a -picture. - -

          TQPixmap * TQLabel::pixmap () const -

          Returns the label's pixmap. -See the "pixmap" property for details. -

          void TQLabel::setAlignment ( int ) [virtual] -

          Sets the alignment of the label's contents. -See the "alignment" property for details. -

          void TQLabel::setAutoResize ( bool enable ) [virtual] -

          This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. -

          Enables auto-resizing if enable is TRUE, or disables it if enable is FALSE. -

          When auto-resizing is enabled the label will resize itself to fit -the contents whenever the contents change. The top-left corner is -not moved. This is useful for TQLabel widgets that are not managed by -a TQLayout (e.g., top-level widgets). -

          Auto-resizing is disabled by default. -

          See also autoResize(), adjustSize(), and sizeHint. - -

          void TQLabel::setBuddy ( TQWidget * buddy ) [virtual] -

          -Sets this label's buddy to buddy. -

          When the user presses the accelerator key indicated by this label, -the keyboard focus is transferred to the label's buddy widget. -

          The buddy mechanism is only available for TQLabels that contain -plain text in which one letter is prefixed with an ampersand, &. -This letter is set as the accelerator key. The letter is displayed -underlined, and the '&' is not displayed (i.e. the ShowPrefix -alignment flag is turned on; see setAlignment()). -

          In a dialog, you might create two data entry widgets and a label -for each, and set up the geometry layout so each label is just to -the left of its data entry widget (its "buddy"), for example: -

          -    TQLineEdit *nameEd  = new TQLineEdit( this );
          -    TQLabel    *nameLb  = new TQLabel( "&Name:", this );
          -    nameLb->setBuddy( nameEd );
          -    TQLineEdit *phoneEd = new TQLineEdit( this );
          -    TQLabel    *phoneLb = new TQLabel( "&Phone:", this );
          -    phoneLb->setBuddy( phoneEd );
          -    // ( layout setup not shown )
          -    
          - -

          With the code above, the focus jumps to the Name field when the -user presses Alt+N, and to the Phone field when the user presses -Alt+P. -

          To unset a previously set buddy, call this function with buddy -set to 0. -

          See also buddy(), text, TQAccel, and alignment. - -

          Examples: addressbook/centralwidget.cpp, chart/optionsform.cpp, and regexptester/regexptester.cpp. -

          void TQLabel::setFont ( const TQFont & f ) [virtual] -

          -Sets the font used on the TQLabel to font f. - -

          Example: menu/menu.cpp. -

          Reimplemented from TQWidget. -

          void TQLabel::setIndent ( int ) -

          Sets the label's text indent in pixels. -See the "indent" property for details. -

          void TQLabel::setMovie ( const TQMovie & movie ) [virtual slot] -

          -Sets the label contents to movie. Any previous content is -cleared. -

          The buddy accelerator, if any, is disabled. -

          The label resizes itself if auto-resizing is enabled. -

          See also movie() and setBuddy(). - -

          void TQLabel::setNum ( int num ) [virtual slot] -

          -Sets the label contents to plain text containing the textual -representation of integer num. Any previous content is cleared. -Does nothing if the integer's string representation is the same as -the current contents of the label. -

          The buddy accelerator, if any, is disabled. -

          The label resizes itself if auto-resizing is enabled. -

          See also text, TQString::setNum(), and setBuddy(). - -

          void TQLabel::setNum ( double num ) [virtual slot] -

          -This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

          Sets the label contents to plain text containing the textual -representation of double num. Any previous content is cleared. -Does nothing if the double's string representation is the same as -the current contents of the label. -

          The buddy accelerator, if any, is disabled. -

          The label resizes itself if auto-resizing is enabled. -

          See also text, TQString::setNum(), and setBuddy(). - -

          void TQLabel::setPicture ( const TQPicture & picture ) [virtual slot] -

          -Sets the label contents to picture. Any previous content is -cleared. -

          The buddy accelerator, if any, is disabled. -

          See also picture() and setBuddy(). - -

          void TQLabel::setPixmap ( const TQPixmap & ) [virtual slot] -

          Sets the label's pixmap. -See the "pixmap" property for details. -

          void TQLabel::setScaledContents ( bool ) -

          Sets whether the label will scale its contents to fill all available space. -See the "scaledContents" property for details. -

          void TQLabel::setText ( const TQString & ) [virtual slot] -

          Sets the label's text. -See the "text" property for details. -

          void TQLabel::setTextFormat ( TextFormat ) -

          Sets the label's text format. -See the "textFormat" property for details. -

          TQString TQLabel::text () const -

          Returns the label's text. -See the "text" property for details. -

          TextFormat TQLabel::textFormat () const -

          Returns the label's text format. -See the "textFormat" property for details. -


          Property Documentation

          -

          Alignment alignment

          -

          This property holds the alignment of the label's contents. -

          The alignment is a bitwise OR of TQt::AlignmentFlags and TQt::TextFlags values. The ExpandTabs, SingleLine and ShowPrefix flags apply only if the label contains plain text; -otherwise they are ignored. The DontClip flag is always -ignored. WordBreak applies to both rich text and plain text -labels. The BreakAnywhere flag is not supported in TQLabel. -

          If the label has a buddy, the ShowPrefix flag is forced to -TRUE. -

          The default alignment is AlignAuto | AlignVCenter | ExpandTabs -if the label doesn't have a buddy and AlignAuto | AlignVCenter | ExpandTabs | ShowPrefix if the label has a buddy. If the label -contains rich text, additionally WordBreak is turned on. -

          See also TQt::AlignmentFlags, setBuddy(), and text. - -

          Set this property's value with setAlignment() and get this property's value with alignment(). -

          BackgroundMode backgroundMode

          -

          This property holds the label's background mode. -

          Get this property with backgroundMode(). -

          See also TQWidget::backgroundMode. - -

          int indent

          -

          This property holds the label's text indent in pixels. -

          If a label displays text, the indent applies to the left edge if -alignment() is AlignLeft, to the right edge if alignment() is -AlignRight, to the top edge if alignment() is AlignTop, and -to to the bottom edge if alignment() is AlignBottom. -

          If indent is negative, or if no indent has been set, the label -computes the effective indent as follows: If frameWidth() is 0, -the effective indent becomes 0. If frameWidth() is greater than 0, -the effective indent becomes half the width of the "x" character -of the widget's current font(). -

          See also alignment, frameWidth, and font. - -

          Set this property's value with setIndent() and get this property's value with indent(). -

          TQPixmap pixmap

          -

          This property holds the label's pixmap. -

          If no pixmap has been set this will return an invalid pixmap. -

          Setting the pixmap clears any previous content, and resizes the -label if TQLabel::autoResize() is TRUE. The buddy accelerator, -if any, is disabled. - -

          Set this property's value with setPixmap() and get this property's value with pixmap(). -

          bool scaledContents

          -

          This property holds whether the label will scale its contents to fill all available space. -

          When enabled and the label shows a pixmap, it will scale the -pixmap to fill the available space. -

          This property's default is FALSE. -

          See also scaledContents. - -

          Set this property's value with setScaledContents() and get this property's value with hasScaledContents(). -

          TQString text

          -

          This property holds the label's text. -

          If no text has been set this will return an empty string. Setting -the text clears any previous content, unless they are the same. -

          The text will be interpreted either as a plain text or as a rich -text, depending on the text format setting; see setTextFormat(). -The default setting is AutoText, i.e. TQLabel will try to -auto-detect the format of the text set. -

          If the text is interpreted as a plain text and a buddy has been -set, the buddy accelerator key is updated from the new text. -

          The label resizes itself if auto-resizing is enabled. -

          Note that Qlabel is well-suited to display small rich text -documents, i.e. those small documents that get their document -specific settings (font, text color, link color) from the label's -palette and font properties. For large documents, use TQTextEdit -in read-only mode instead. TQTextEdit will flicker less on resize -and can also provide a scrollbar when necessary. -

          See also textFormat, setBuddy(), and alignment. - -

          Set this property's value with setText() and get this property's value with text(). -

          TextFormat textFormat

          -

          This property holds the label's text format. -

          See the TQt::TextFormat enum for an explanation of the possible -options. -

          The default format is AutoText. -

          See also text. - -

          Set this property's value with setTextFormat() and get this property's value with textFormat(). - -


          -This file is part of the TQt toolkit. -Copyright © 1995-2007 -Trolltech. All Rights Reserved.


          - -
          Copyright © 2007 -TrolltechTrademarks -
          TQt 3.3.8
          -
          - diff --git a/doc/html/ntqlcdnumber.html b/doc/html/ntqlcdnumber.html index c95c02887..c613303ff 100644 --- a/doc/html/ntqlcdnumber.html +++ b/doc/html/ntqlcdnumber.html @@ -113,7 +113,7 @@ store the value there.

          Incidentally, TQLCDNumber is the very oldest part of TQt, tracing back to a BASIC program on the Sinclair Spectrum.

          -

          See also TQLabel, TQFrame, and Basic Widgets. +

          See also TQLabel, TQFrame, and Basic Widgets.


          Member Type Documentation

          TQLCDNumber::Mode

          diff --git a/doc/html/ntqlineedit.html b/doc/html/ntqlineedit.html index 652cea296..8036cce59 100644 --- a/doc/html/ntqlineedit.html +++ b/doc/html/ntqlineedit.html @@ -199,7 +199,7 @@ that presents some of these editing options.

          Any other key sequence that represents a valid character, will cause the character to be inserted into the line edit.

          -

          See also TQTextEdit, TQLabel, TQComboBox, GUI Design Handbook: Field, Entry, and Basic Widgets. +

          See also TQTextEdit, TQLabel, TQComboBox, GUI Design Handbook: Field, Entry, and Basic Widgets.


          Member Type Documentation

          TQLineEdit::EchoMode

          @@ -258,7 +258,7 @@ text is selected, the cursor is moved to the beginning of the selected text and the selected text is deleted.

          See also del(). -

          int TQLineEdit::characterAt ( int xpos, TQChar * chr ) const +

          int TQLineEdit::characterAt ( int xpos, TQChar * chr ) const

          This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code.

          void TQLineEdit::clear () [virtual slot] diff --git a/doc/html/ntqlocale.html b/doc/html/ntqlocale.html deleted file mode 100644 index 7906c11e1..000000000 --- a/doc/html/ntqlocale.html +++ /dev/null @@ -1,852 +0,0 @@ - - - - - -TQLocale Class - - - - - - - -
          - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

          TQLocale Class Reference

          - -

          The TQLocale class converts between numbers and their -string representations in various languages. -More... -

          Almost all the functions in this class are reentrant when TQt is built with thread support. The exception is setDefault(). -

          #include <ntqlocale.h> -

          List of all member functions. -

          Public Members

          -
            -
          • enum Language { C = 1, Abkhazian = 2, Afan = 3, Afar = 4, Afrikaans = 5, Albanian = 6, Amharic = 7, Arabic = 8, Armenian = 9, Assamese = 10, Aymara = 11, Azerbaijani = 12, Bashkir = 13, Basque = 14, Bengali = 15, Bhutani = 16, Bihari = 17, Bislama = 18, Breton = 19, Bulgarian = 20, Burmese = 21, Byelorussian = 22, Cambodian = 23, Catalan = 24, Chinese = 25, Corsican = 26, Croatian = 27, Czech = 28, Danish = 29, Dutch = 30, English = 31, Esperanto = 32, Estonian = 33, Faroese = 34, FijiLanguage = 35, Finnish = 36, French = 37, Frisian = 38, Gaelic = 39, Galician = 40, Georgian = 41, German = 42, Greek = 43, Greenlandic = 44, Guarani = 45, Gujarati = 46, Hausa = 47, Hebrew = 48, Hindi = 49, Hungarian = 50, Icelandic = 51, Indonesian = 52, Interlingua = 53, Interlingue = 54, Inuktitut = 55, Inupiak = 56, Irish = 57, Italian = 58, Japanese = 59, Javanese = 60, Kannada = 61, Kashmiri = 62, Kazakh = 63, Kinyarwanda = 64, Kirghiz = 65, Korean = 66, Kurdish = 67, Kurundi = 68, Laothian = 69, Latin = 70, Latvian = 71, Lingala = 72, Lithuanian = 73, Macedonian = 74, Malagasy = 75, Malay = 76, Malayalam = 77, Maltese = 78, Maori = 79, Marathi = 80, Moldavian = 81, Mongolian = 82, NauruLanguage = 83, Nepali = 84, Norwegian = 85, Occitan = 86, Oriya = 87, Pashto = 88, Persian = 89, Polish = 90, Portuguese = 91, Punjabi = 92, Quechua = 93, RhaetoRomance = 94, Romanian = 95, Russian = 96, Samoan = 97, Sangho = 98, Sanskrit = 99, Serbian = 100, SerboCroatian = 101, Sesotho = 102, Setswana = 103, Shona = 104, Sindhi = 105, Singhalese = 106, Siswati = 107, Slovak = 108, Slovenian = 109, Somali = 110, Spanish = 111, Sundanese = 112, Swahili = 113, Swedish = 114, Tagalog = 115, Tajik = 116, Tamil = 117, Tatar = 118, Telugu = 119, Thai = 120, Tibetan = 121, Tigrinya = 122, TongaLanguage = 123, Tsonga = 124, Turkish = 125, Turkmen = 126, Twi = 127, Uigur = 128, Ukrainian = 129, Urdu = 130, Uzbek = 131, Vietnamese = 132, Volapuk = 133, Welsh = 134, Wolof = 135, Xhosa = 136, Yiddish = 137, Yoruba = 138, Zhuang = 139, Zulu = 140, LastLanguage = Zulu }
          • -
          • enum Country { AnyCountry = 0, Afghanistan = 1, Albania = 2, Algeria = 3, AmericanSamoa = 4, Andorra = 5, Angola = 6, Anguilla = 7, Antarctica = 8, AntiguaAndBarbuda = 9, Argentina = 10, Armenia = 11, Aruba = 12, Australia = 13, Austria = 14, Azerbaijan = 15, Bahamas = 16, Bahrain = 17, Bangladesh = 18, Barbados = 19, Belarus = 20, Belgium = 21, Belize = 22, Benin = 23, Bermuda = 24, Bhutan = 25, Bolivia = 26, BosniaAndHerzegowina = 27, Botswana = 28, BouvetIsland = 29, Brazil = 30, BritishIndianOceanTerritory = 31, BruneiDarussalam = 32, Bulgaria = 33, BurkinaFaso = 34, Burundi = 35, Cambodia = 36, Cameroon = 37, Canada = 38, CapeVerde = 39, CaymanIslands = 40, CentralAfricanRepublic = 41, Chad = 42, Chile = 43, China = 44, ChristmasIsland = 45, CocosIslands = 46, Colombia = 47, Comoros = 48, DemocraticRepublicOfCongo = 49, PeoplesRepublicOfCongo = 50, CookIslands = 51, CostaRica = 52, IvoryCoast = 53, Croatia = 54, Cuba = 55, Cyprus = 56, CzechRepublic = 57, Denmark = 58, Djibouti = 59, Dominica = 60, DominicanRepublic = 61, EastTimor = 62, Ecuador = 63, Egypt = 64, ElSalvador = 65, EquatorialGuinea = 66, Eritrea = 67, Estonia = 68, Ethiopia = 69, FalklandIslands = 70, FaroeIslands = 71, FijiCountry = 72, Finland = 73, France = 74, MetropolitanFrance = 75, FrenchGuiana = 76, FrenchPolynesia = 77, FrenchSouthernTerritories = 78, Gabon = 79, Gambia = 80, Georgia = 81, Germany = 82, Ghana = 83, Gibraltar = 84, Greece = 85, Greenland = 86, Grenada = 87, Guadeloupe = 88, Guam = 89, Guatemala = 90, Guinea = 91, GuineaBissau = 92, Guyana = 93, Haiti = 94, HeardAndMcDonaldIslands = 95, Honduras = 96, HongKong = 97, Hungary = 98, Iceland = 99, India = 100, Indonesia = 101, Iran = 102, Iraq = 103, Ireland = 104, Israel = 105, Italy = 106, Jamaica = 107, Japan = 108, Jordan = 109, Kazakhstan = 110, Kenya = 111, Kiribati = 112, DemocraticRepublicOfKorea = 113, RepublicOfKorea = 114, Kuwait = 115, Kyrgyzstan = 116, Lao = 117, Latvia = 118, Lebanon = 119, Lesotho = 120, Liberia = 121, LibyanArabJamahiriya = 122, Liechtenstein = 123, Lithuania = 124, Luxembourg = 125, Macau = 126, Macedonia = 127, Madagascar = 128, Malawi = 129, Malaysia = 130, Maldives = 131, Mali = 132, Malta = 133, MarshallIslands = 134, Martinique = 135, Mauritania = 136, Mauritius = 137, Mayotte = 138, Mexico = 139, Micronesia = 140, Moldova = 141, Monaco = 142, Mongolia = 143, Montserrat = 144, Morocco = 145, Mozambique = 146, Myanmar = 147, Namibia = 148, NauruCountry = 149, Nepal = 150, Netherlands = 151, NetherlandsAntilles = 152, NewCaledonia = 153, NewZealand = 154, Nicaragua = 155, Niger = 156, Nigeria = 157, Niue = 158, NorfolkIsland = 159, NorthernMarianaIslands = 160, Norway = 161, Oman = 162, Pakistan = 163, Palau = 164, PalestinianTerritory = 165, Panama = 166, PapuaNewGuinea = 167, Paraguay = 168, Peru = 169, Philippines = 170, Pitcairn = 171, Poland = 172, Portugal = 173, PuertoRico = 174, Qatar = 175, Reunion = 176, Romania = 177, RussianFederation = 178, Rwanda = 179, SaintKittsAndNevis = 180, StLucia = 181, StVincentAndTheGrenadines = 182, Samoa = 183, SanMarino = 184, SaoTomeAndPrincipe = 185, SaudiArabia = 186, Senegal = 187, Seychelles = 188, SierraLeone = 189, Singapore = 190, Slovakia = 191, Slovenia = 192, SolomonIslands = 193, Somalia = 194, SouthAfrica = 195, SouthGeorgiaAndTheSouthSandwichIslands = 196, Spain = 197, SriLanka = 198, StHelena = 199, StPierreAndMiquelon = 200, Sudan = 201, Suriname = 202, SvalbardAndJanMayenIslands = 203, Swaziland = 204, Sweden = 205, Switzerland = 206, SyrianArabRepublic = 207, Taiwan = 208, Tajikistan = 209, Tanzania = 210, Thailand = 211, Togo = 212, Tokelau = 213, TongaCountry = 214, TrinidadAndTobago = 215, Tunisia = 216, Turkey = 217, Turkmenistan = 218, TurksAndCaicosIslands = 219, Tuvalu = 220, Uganda = 221, Ukraine = 222, UnitedArabEmirates = 223, UnitedKingdom = 224, UnitedStates = 225, UnitedStatesMinorOutlyingIslands = 226, Uruguay = 227, Uzbekistan = 228, Vanuatu = 229, VaticanCityState = 230, Venezuela = 231, VietNam = 232, BritishVirginIslands = 233, USVirginIslands = 234, WallisAndFutunaIslands = 235, WesternSahara = 236, Yemen = 237, Yugoslavia = 238, Zambia = 239, Zimbabwe = 240, LastCountry = Zimbabwe }
          • -
          • TQLocale ()
          • -
          • TQLocale ( const TQString & name )
          • -
          • TQLocale ( Language language, Country country = AnyCountry )
          • -
          • TQLocale ( const TQLocale & other )
          • -
          • TQLocale & operator= ( const TQLocale & other )
          • -
          • Language language () const
          • -
          • Country country () const
          • -
          • TQString name () const
          • -
          • short toShort ( const TQString & s, bool * ok = 0 ) const
          • -
          • ushort toUShort ( const TQString & s, bool * ok = 0 ) const
          • -
          • int toInt ( const TQString & s, bool * ok = 0 ) const
          • -
          • uint toUInt ( const TQString & s, bool * ok = 0 ) const
          • -
          • TQ_LONG toLong ( const TQString & s, bool * ok = 0 ) const
          • -
          • TQ_ULONG toULong ( const TQString & s, bool * ok = 0 ) const
          • -
          • TQ_LLONG toLongLong ( const TQString & s, bool * ok = 0 ) const
          • -
          • TQ_ULLONG toULongLong ( const TQString & s, bool * ok = 0 ) const
          • -
          • float toFloat ( const TQString & s, bool * ok = 0 ) const
          • -
          • double toDouble ( const TQString & s, bool * ok = 0 ) const
          • -
          • TQString toString ( short i ) const
          • -
          • TQString toString ( ushort i ) const
          • -
          • TQString toString ( int i ) const
          • -
          • TQString toString ( uint i ) const
          • -
          • TQString toString ( TQ_LONG i ) const
          • -
          • TQString toString ( TQ_ULONG i ) const
          • -
          • TQString toString ( TQ_LLONG i ) const
          • -
          • TQString toString ( TQ_ULLONG i ) const
          • -
          • TQString toString ( float i, char f = 'g', int prec = 6 ) const
          • -
          • TQString toString ( double i, char f = 'g', int prec = 6 ) const
          • -
          -

          Static Public Members

          - -

          Detailed Description

          - - -The TQLocale class converts between numbers and their -string representations in various languages. -

          - -

          It is initialized with a country/language pair in its constructor -and offers number-to-string and string-to-number conversion -functions simmilar to those in TQString. -

          -    TQLocale egyptian(TQLocale::Arabic, TQLocale::Egypt);
          -    TQString s1 = egyptian.toString(1.571429E+07, 'e');
          -    TQString s2 = egyptian.toString(10);
          -
          -    double d = egyptian.toDouble(s1);
          -    int s2 = egyptian.toInt(s2);
          -    
          - -

          TQLocale supports the concept of a default locale, which is -determined from the system's locale settings at application -startup. The default locale can be changed by calling the -static member setDefault(). The default locale has the -following effects: -

            -
          • If a TQLocale object is constructed with the default constructor, -it will use the default locale's settings. -
          • TQString::toDouble() interprets the string according to the default -locale. If this fails, it falls back on the "C" locale. -
          • TQString::arg() uses the default locale to format a number when -its position specifier in the format string contains an 'L', -e.g. "%L1". -
          -

          -    TQLocale::setDefault(TQLocale(TQLocale::Hebrew, TQLocale::Israel));
          -    TQLocale hebrew; // Constructs a default TQLocale
          -    TQString s1 = hebrew.toString(15714.3, 'e');
          -
          -    bool ok;
          -    double d;
          -
          -    TQLocale::setDefault(TQLocale::C);
          -    d = TQString( "1234,56" ).toDouble(&ok); // ok == false
          -    d = TQString( "1234.56" ).toDouble(&ok); // ok == true, d == 1234.56
          -
          -    TQLocale::setDefault(TQLocale::German);
          -    d = TQString( "1234,56" ).toDouble(&ok); // ok == true, d == 1234.56
          -    d = TQString( "1234.56" ).toDouble(&ok); // ok == true, d == 1234.56
          -
          -    TQLocale::setDefault(TQLocale(TQLocale::English, TQLocale::UnitedStates));
          -    str = TQString( "%1 %L2 %L3" )
          -            .arg( 12345 )
          -            .arg( 12345 )
          -            .arg( 12345, 0, 16 );
          -    // str == "12345 12,345 3039"
          -    
          - -

          When a language/country pair is specified in the constructor, one -of three things can happen: -

            -
          • If the language/country pair is found in the database, it is used. -
          • If the language is found but the country is not, or if the country -is AnyCountry, the language is used with the most -appropriate available country (for example, Germany for German), -
          • If neither the language nor the country are found, TQLocale -defaults to the default locale (see setDefault()). -
          -

          The "C" locale is identical to English/UnitedStates. -

          Use language() and country() to determine the actual language and -country values used. -

          An alternative method for constructing a TQLocale object is by -specifying the locale name. -

          -    TQLocale korean("ko");
          -    TQLocale swiss("de_CH");
          -    
          - -

          This constructor converts the locale name to a language/country -pair; it does not use the system locale database. -

          All the methods in TQLocale, with the exception of setDefault(), -are reentrant. -

          See also TQString::toDouble(), TQString::arg(), and Text Related Classes. - -

          The double-to-string and string-to-double conversion functions are -covered by the following licenses: -

          -

          Copyright (c) 1991 by AT&T. -

          Permission to use, copy, modify, and distribute this software for any -purpose without fee is hereby granted, provided that this entire notice -is included in all copies of any software which is or includes a copy -or modification of this software and in all copies of the supporting -documentation for such software. -

          THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED -WARRANTY. IN PARTICULAR, NEITHER THE AUTHOR NOR AT&T MAKES ANY -REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY -OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. -

          This product includes software developed by the University of -California, Berkeley and its contributors. - -


          Member Type Documentation

          -

          TQLocale::Country

          - -

          This enumerated type is used to specify a country. -

            -
          • TQLocale::AnyCountry -
          • TQLocale::Afghanistan -
          • TQLocale::Albania -
          • TQLocale::Algeria -
          • TQLocale::AmericanSamoa -
          • TQLocale::Andorra -
          • TQLocale::Angola -
          • TQLocale::Anguilla -
          • TQLocale::Antarctica -
          • TQLocale::AntiguaAndBarbuda -
          • TQLocale::Argentina -
          • TQLocale::Armenia -
          • TQLocale::Aruba -
          • TQLocale::Australia -
          • TQLocale::Austria -
          • TQLocale::Azerbaijan -
          • TQLocale::Bahamas -
          • TQLocale::Bahrain -
          • TQLocale::Bangladesh -
          • TQLocale::Barbados -
          • TQLocale::Belarus -
          • TQLocale::Belgium -
          • TQLocale::Belize -
          • TQLocale::Benin -
          • TQLocale::Bermuda -
          • TQLocale::Bhutan -
          • TQLocale::Bolivia -
          • TQLocale::BosniaAndHerzegowina -
          • TQLocale::Botswana -
          • TQLocale::BouvetIsland -
          • TQLocale::Brazil -
          • TQLocale::BritishIndianOceanTerritory -
          • TQLocale::BruneiDarussalam -
          • TQLocale::Bulgaria -
          • TQLocale::BurkinaFaso -
          • TQLocale::Burundi -
          • TQLocale::Cambodia -
          • TQLocale::Cameroon -
          • TQLocale::Canada -
          • TQLocale::CapeVerde -
          • TQLocale::CaymanIslands -
          • TQLocale::CentralAfricanRepublic -
          • TQLocale::Chad -
          • TQLocale::Chile -
          • TQLocale::China -
          • TQLocale::ChristmasIsland -
          • TQLocale::CocosIslands -
          • TQLocale::Colombia -
          • TQLocale::Comoros -
          • TQLocale::DemocraticRepublicOfCongo -
          • TQLocale::PeoplesRepublicOfCongo -
          • TQLocale::CookIslands -
          • TQLocale::CostaRica -
          • TQLocale::IvoryCoast -
          • TQLocale::Croatia -
          • TQLocale::Cuba -
          • TQLocale::Cyprus -
          • TQLocale::CzechRepublic -
          • TQLocale::Denmark -
          • TQLocale::Djibouti -
          • TQLocale::Dominica -
          • TQLocale::DominicanRepublic -
          • TQLocale::EastTimor -
          • TQLocale::Ecuador -
          • TQLocale::Egypt -
          • TQLocale::ElSalvador -
          • TQLocale::EquatorialGuinea -
          • TQLocale::Eritrea -
          • TQLocale::Estonia -
          • TQLocale::Ethiopia -
          • TQLocale::FalklandIslands -
          • TQLocale::FaroeIslands -
          • TQLocale::FijiCountry -
          • TQLocale::Finland -
          • TQLocale::France -
          • TQLocale::MetropolitanFrance -
          • TQLocale::FrenchGuiana -
          • TQLocale::FrenchPolynesia -
          • TQLocale::FrenchSouthernTerritories -
          • TQLocale::Gabon -
          • TQLocale::Gambia -
          • TQLocale::Georgia -
          • TQLocale::Germany -
          • TQLocale::Ghana -
          • TQLocale::Gibraltar -
          • TQLocale::Greece -
          • TQLocale::Greenland -
          • TQLocale::Grenada -
          • TQLocale::Guadeloupe -
          • TQLocale::Guam -
          • TQLocale::Guatemala -
          • TQLocale::Guinea -
          • TQLocale::GuineaBissau -
          • TQLocale::Guyana -
          • TQLocale::Haiti -
          • TQLocale::HeardAndMcDonaldIslands -
          • TQLocale::Honduras -
          • TQLocale::HongKong -
          • TQLocale::Hungary -
          • TQLocale::Iceland -
          • TQLocale::India -
          • TQLocale::Indonesia -
          • TQLocale::Iran -
          • TQLocale::Iraq -
          • TQLocale::Ireland -
          • TQLocale::Israel -
          • TQLocale::Italy -
          • TQLocale::Jamaica -
          • TQLocale::Japan -
          • TQLocale::Jordan -
          • TQLocale::Kazakhstan -
          • TQLocale::Kenya -
          • TQLocale::Kiribati -
          • TQLocale::DemocraticRepublicOfKorea -
          • TQLocale::RepublicOfKorea -
          • TQLocale::Kuwait -
          • TQLocale::Kyrgyzstan -
          • TQLocale::Lao -
          • TQLocale::Latvia -
          • TQLocale::Lebanon -
          • TQLocale::Lesotho -
          • TQLocale::Liberia -
          • TQLocale::LibyanArabJamahiriya -
          • TQLocale::Liechtenstein -
          • TQLocale::Lithuania -
          • TQLocale::Luxembourg -
          • TQLocale::Macau -
          • TQLocale::Macedonia -
          • TQLocale::Madagascar -
          • TQLocale::Malawi -
          • TQLocale::Malaysia -
          • TQLocale::Maldives -
          • TQLocale::Mali -
          • TQLocale::Malta -
          • TQLocale::MarshallIslands -
          • TQLocale::Martinique -
          • TQLocale::Mauritania -
          • TQLocale::Mauritius -
          • TQLocale::Mayotte -
          • TQLocale::Mexico -
          • TQLocale::Micronesia -
          • TQLocale::Moldova -
          • TQLocale::Monaco -
          • TQLocale::Mongolia -
          • TQLocale::Montserrat -
          • TQLocale::Morocco -
          • TQLocale::Mozambique -
          • TQLocale::Myanmar -
          • TQLocale::Namibia -
          • TQLocale::NauruCountry -
          • TQLocale::Nepal -
          • TQLocale::Netherlands -
          • TQLocale::NetherlandsAntilles -
          • TQLocale::NewCaledonia -
          • TQLocale::NewZealand -
          • TQLocale::Nicaragua -
          • TQLocale::Niger -
          • TQLocale::Nigeria -
          • TQLocale::Niue -
          • TQLocale::NorfolkIsland -
          • TQLocale::NorthernMarianaIslands -
          • TQLocale::Norway -
          • TQLocale::Oman -
          • TQLocale::Pakistan -
          • TQLocale::Palau -
          • TQLocale::PalestinianTerritory -
          • TQLocale::Panama -
          • TQLocale::PapuaNewGuinea -
          • TQLocale::Paraguay -
          • TQLocale::Peru -
          • TQLocale::Philippines -
          • TQLocale::Pitcairn -
          • TQLocale::Poland -
          • TQLocale::Portugal -
          • TQLocale::PuertoRico -
          • TQLocale::Qatar -
          • TQLocale::Reunion -
          • TQLocale::Romania -
          • TQLocale::RussianFederation -
          • TQLocale::Rwanda -
          • TQLocale::SaintKittsAndNevis -
          • TQLocale::StLucia -
          • TQLocale::StVincentAndTheGrenadines -
          • TQLocale::Samoa -
          • TQLocale::SanMarino -
          • TQLocale::SaoTomeAndPrincipe -
          • TQLocale::SaudiArabia -
          • TQLocale::Senegal -
          • TQLocale::Seychelles -
          • TQLocale::SierraLeone -
          • TQLocale::Singapore -
          • TQLocale::Slovakia -
          • TQLocale::Slovenia -
          • TQLocale::SolomonIslands -
          • TQLocale::Somalia -
          • TQLocale::SouthAfrica -
          • TQLocale::SouthGeorgiaAndTheSouthSandwichIslands -
          • TQLocale::Spain -
          • TQLocale::SriLanka -
          • TQLocale::StHelena -
          • TQLocale::StPierreAndMiquelon -
          • TQLocale::Sudan -
          • TQLocale::Suriname -
          • TQLocale::SvalbardAndJanMayenIslands -
          • TQLocale::Swaziland -
          • TQLocale::Sweden -
          • TQLocale::Switzerland -
          • TQLocale::SyrianArabRepublic -
          • TQLocale::Taiwan -
          • TQLocale::Tajikistan -
          • TQLocale::Tanzania -
          • TQLocale::Thailand -
          • TQLocale::Togo -
          • TQLocale::Tokelau -
          • TQLocale::TongaCountry -
          • TQLocale::TrinidadAndTobago -
          • TQLocale::Tunisia -
          • TQLocale::Turkey -
          • TQLocale::Turkmenistan -
          • TQLocale::TurksAndCaicosIslands -
          • TQLocale::Tuvalu -
          • TQLocale::Uganda -
          • TQLocale::Ukraine -
          • TQLocale::UnitedArabEmirates -
          • TQLocale::UnitedKingdom -
          • TQLocale::UnitedStates -
          • TQLocale::UnitedStatesMinorOutlyingIslands -
          • TQLocale::Uruguay -
          • TQLocale::Uzbekistan -
          • TQLocale::Vanuatu -
          • TQLocale::VaticanCityState -
          • TQLocale::Venezuela -
          • TQLocale::VietNam -
          • TQLocale::BritishVirginIslands -
          • TQLocale::USVirginIslands -
          • TQLocale::WallisAndFutunaIslands -
          • TQLocale::WesternSahara -
          • TQLocale::Yemen -
          • TQLocale::Yugoslavia -
          • TQLocale::Zambia -
          • TQLocale::Zimbabwe -
          -

          TQLocale::Language

          - -

          This enumerated type is used to specify a language. -

            -
          • TQLocale::C - Identical to English/UnitedStates -
          • TQLocale::Abkhazian -
          • TQLocale::Afan -
          • TQLocale::Afar -
          • TQLocale::Afrikaans -
          • TQLocale::Albanian -
          • TQLocale::Amharic -
          • TQLocale::Arabic -
          • TQLocale::Armenian -
          • TQLocale::Assamese -
          • TQLocale::Aymara -
          • TQLocale::Azerbaijani -
          • TQLocale::Bashkir -
          • TQLocale::Basque -
          • TQLocale::Bengali -
          • TQLocale::Bhutani -
          • TQLocale::Bihari -
          • TQLocale::Bislama -
          • TQLocale::Breton -
          • TQLocale::Bulgarian -
          • TQLocale::Burmese -
          • TQLocale::Byelorussian -
          • TQLocale::Cambodian -
          • TQLocale::Catalan -
          • TQLocale::Chinese -
          • TQLocale::Corsican -
          • TQLocale::Croatian -
          • TQLocale::Czech -
          • TQLocale::Danish -
          • TQLocale::Dutch -
          • TQLocale::English -
          • TQLocale::Esperanto -
          • TQLocale::Estonian -
          • TQLocale::Faroese -
          • TQLocale::FijiLanguage -
          • TQLocale::Finnish -
          • TQLocale::French -
          • TQLocale::Frisian -
          • TQLocale::Gaelic -
          • TQLocale::Galician -
          • TQLocale::Georgian -
          • TQLocale::German -
          • TQLocale::Greek -
          • TQLocale::Greenlandic -
          • TQLocale::Guarani -
          • TQLocale::Gujarati -
          • TQLocale::Hausa -
          • TQLocale::Hebrew -
          • TQLocale::Hindi -
          • TQLocale::Hungarian -
          • TQLocale::Icelandic -
          • TQLocale::Indonesian -
          • TQLocale::Interlingua -
          • TQLocale::Interlingue -
          • TQLocale::Inuktitut -
          • TQLocale::Inupiak -
          • TQLocale::Irish -
          • TQLocale::Italian -
          • TQLocale::Japanese -
          • TQLocale::Javanese -
          • TQLocale::Kannada -
          • TQLocale::Kashmiri -
          • TQLocale::Kazakh -
          • TQLocale::Kinyarwanda -
          • TQLocale::Kirghiz -
          • TQLocale::Korean -
          • TQLocale::Kurdish -
          • TQLocale::Kurundi -
          • TQLocale::Laothian -
          • TQLocale::Latin -
          • TQLocale::Latvian -
          • TQLocale::Lingala -
          • TQLocale::Lithuanian -
          • TQLocale::Macedonian -
          • TQLocale::Malagasy -
          • TQLocale::Malay -
          • TQLocale::Malayalam -
          • TQLocale::Maltese -
          • TQLocale::Maori -
          • TQLocale::Marathi -
          • TQLocale::Moldavian -
          • TQLocale::Mongolian -
          • TQLocale::NauruLanguage -
          • TQLocale::Nepali -
          • TQLocale::Norwegian -
          • TQLocale::Occitan -
          • TQLocale::Oriya -
          • TQLocale::Pashto -
          • TQLocale::Persian -
          • TQLocale::Polish -
          • TQLocale::Portuguese -
          • TQLocale::Punjabi -
          • TQLocale::Quechua -
          • TQLocale::RhaetoRomance -
          • TQLocale::Romanian -
          • TQLocale::Russian -
          • TQLocale::Samoan -
          • TQLocale::Sangho -
          • TQLocale::Sanskrit -
          • TQLocale::Serbian -
          • TQLocale::SerboCroatian -
          • TQLocale::Sesotho -
          • TQLocale::Setswana -
          • TQLocale::Shona -
          • TQLocale::Sindhi -
          • TQLocale::Singhalese -
          • TQLocale::Siswati -
          • TQLocale::Slovak -
          • TQLocale::Slovenian -
          • TQLocale::Somali -
          • TQLocale::Spanish -
          • TQLocale::Sundanese -
          • TQLocale::Swahili -
          • TQLocale::Swedish -
          • TQLocale::Tagalog -
          • TQLocale::Tajik -
          • TQLocale::Tamil -
          • TQLocale::Tatar -
          • TQLocale::Telugu -
          • TQLocale::Thai -
          • TQLocale::Tibetan -
          • TQLocale::Tigrinya -
          • TQLocale::TongaLanguage -
          • TQLocale::Tsonga -
          • TQLocale::Turkish -
          • TQLocale::Turkmen -
          • TQLocale::Twi -
          • TQLocale::Uigur -
          • TQLocale::Ukrainian -
          • TQLocale::Urdu -
          • TQLocale::Uzbek -
          • TQLocale::Vietnamese -
          • TQLocale::Volapuk -
          • TQLocale::Welsh -
          • TQLocale::Wolof -
          • TQLocale::Xhosa -
          • TQLocale::Yiddish -
          • TQLocale::Yoruba -
          • TQLocale::Zhuang -
          • TQLocale::Zulu -
          -

          Member Function Documentation

          -

          TQLocale::TQLocale () -

          -Constructs a TQLocale object initialized with the default locale. -

          See also setDefault(). - -

          TQLocale::TQLocale ( const TQString & name ) -

          -Constructs a TQLocale object with the specified name, -which has the format -"language[_country][.codeset][@modifier]" or "C", where: -

            -
          • language is a lowercase, two-letter, ISO 639 language code, -
          • territory is an uppercase, two-letter, ISO 3166 country code, -
          • and codeset and modifier are ignored. -
          -

          If the string violates the locale format, or language is not -a valid ISO 369 code, the "C" locale is used instead. If country -is not present, or is not a valid ISO 3166 code, the most -appropriate country is chosen for the specified language. -

          The language and country codes are converted to their respective -Language and Country enums. After this conversion is -performed the constructor behaves exactly like TQLocale(Country, -Language). -

          This constructor is much slower than TQLocale(Country, Language). -

          See also name(). - -

          TQLocale::TQLocale ( Language language, Country country = AnyCountry ) -

          -Constructs a TQLocale object with the specified language and country. -

            -
          • If the language/country pair is found in the database, it is used. -
          • If the language is found but the country is not, or if the country -is AnyCountry, the language is used with the most -appropriate available country (for example, Germany for German), -
          • If neither the language nor the country are found, TQLocale -defaults to the default locale (see setDefault()). -
          -

          The language and country that are actually used can be queried -using language() and country(). -

          See also setDefault(), language(), and country(). - -

          TQLocale::TQLocale ( const TQLocale & other ) -

          -Constructs a TQLocale object as a copy of other. - -

          TQLocale TQLocale::c () [static] -

          - -

          Returns a TQLocale object initialized to the "C" locale. -

          See also system(). - -

          Country TQLocale::country () const -

          -Returns the country of this locale. -

          See also TQLocale(). - -

          TQString TQLocale::countryToString ( Country country ) [static] -

          -Returns a TQString containing the name of country. - -

          Language TQLocale::language () const -

          -Returns the language of this locale. -

          See also TQLocale(). - -

          TQString TQLocale::languageToString ( Language language ) [static] -

          -Returns a TQString containing the name of language. - -

          TQString TQLocale::name () const -

          -Returns the language and country of this locale as a -string of the form "language_country", where -language is a lowercase, two-letter ISO 639 language code, -and country is an uppercase, two-letter ISO 3166 country code. -

          See also TQLocale(). - -

          TQLocale & TQLocale::operator= ( const TQLocale & other ) -

          -Assigns other to this TQLocale object and returns a reference -to this TQLocale object. - -

          void TQLocale::setDefault ( const TQLocale & locale ) [static] -

          Warning: This function is not reentrant.

          - - -

          Sets the global default locale to locale. These -values are used when a TQLocale object is constructed with -no arguments. If this function is not called, the system's -locale is used. -

          Warning: In a multithreaded application, the default locale -should be set at application startup, before any non-GUI threads -are created. -

          See also system() and c(). - -

          TQLocale TQLocale::system () [static] -

          -Returns a TQLocale object initialized to the system locale. - -

          double TQLocale::toDouble ( const TQString & s, bool * ok = 0 ) const -

          -Returns the double represented by the localized string s, or -0.0 if the conversion failed. -

          If ok is not 0, reports failure by setting -*ok to false and success by setting *ok to true. -

          Unlike TQString::toDouble(), this function does not fall back to -the "C" locale if the string cannot be interpreted in this -locale. -

          -        bool ok;
          -        double d;
          -
          -        TQLocale c(TQLocale::C);
          -        d = c.toDouble( "1234.56", &ok );  // ok == true, d == 1234.56
          -        d = c.toDouble( "1,234.56", &ok ); // ok == true, d == 1234.56
          -        d = c.toDouble( "1234,56", &ok );  // ok == false
          -
          -        TQLocale german(TQLocale::German);
          -        d = german.toDouble( "1234,56", &ok );  // ok == true, d == 1234.56
          -        d = german.toDouble( "1.234,56", &ok ); // ok == true, d == 1234.56
          -        d = german.toDouble( "1234.56", &ok );  // ok == false
          -
          -        d = german.toDouble( "1.234", &ok );    // ok == true, d == 1234.0
          -    
          - -

          Notice that the last conversion returns 1234.0, because '.' is the -thousands group separator in the German locale. -

          This function ignores leading and trailing whitespace. -

          See also toString() and TQString::toDouble(). - -

          float TQLocale::toFloat ( const TQString & s, bool * ok = 0 ) const -

          -Returns the float represented by the localized string s, or 0.0 -if the conversion failed. -

          If ok is not 0, reports failure by setting -*ok to false and success by setting *ok to true. -

          This function ignores leading and trailing whitespace. -

          See also toString(). - -

          int TQLocale::toInt ( const TQString & s, bool * ok = 0 ) const -

          -Returns the int represented by the localized string s, or 0 if -the conversion failed. -

          If ok is not 0, reports failure by setting *ok to false and -success by setting *ok to true. -

          This function ignores leading and trailing whitespace. -

          See also toString(). - -

          TQ_LONG TQLocale::toLong ( const TQString & s, bool * ok = 0 ) const -

          -Returns the long int represented by the localized string s, or -0 if the conversion failed. -

          If ok is not 0, reports failure by setting -*ok to false and success by setting *ok to true. -

          This function ignores leading and trailing whitespace. -

          See also toString(). - -

          TQ_LLONG TQLocale::toLongLong ( const TQString & s, bool * ok = 0 ) const -

          -Returns the long long int represented by the localized string s, or 0 if the conversion failed. -

          If ok is not 0, reports failure by setting -*ok to false and success by setting *ok to true. -

          This function ignores leading and trailing whitespace. -

          See also toString(). - -

          short TQLocale::toShort ( const TQString & s, bool * ok = 0 ) const -

          -Returns the short int represented by the localized string s, or -0 if the conversion failed. -

          If ok is not 0, reports failure by setting -*ok to false and success by setting *ok to true. -

          This function ignores leading and trailing whitespace. -

          See also toString(). - -

          TQString TQLocale::toString ( TQ_LLONG i ) const -

          -Returns a localized string representation of i. -

          See also toLongLong(). - -

          TQString TQLocale::toString ( short i ) const -

          - -

          This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

          See also toShort(). - -

          TQString TQLocale::toString ( ushort i ) const -

          - -

          This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

          See also toUShort(). - -

          TQString TQLocale::toString ( int i ) const -

          - -

          This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

          See also toInt(). - -

          TQString TQLocale::toString ( uint i ) const -

          - -

          This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

          See also toUInt(). - -

          TQString TQLocale::toString ( TQ_LONG i ) const -

          - -

          This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

          See also toLong(). - -

          TQString TQLocale::toString ( TQ_ULONG i ) const -

          - -

          This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

          See also toULong(). - -

          TQString TQLocale::toString ( TQ_ULLONG i ) const -

          -This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

          See also toULongLong(). - -

          TQString TQLocale::toString ( float i, char f = 'g', int prec = 6 ) const -

          - -

          This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

          f and prec have the same meaning as in TQString::number(double, char, int). -

          See also toDouble(). - -

          TQString TQLocale::toString ( double i, char f = 'g', int prec = 6 ) const -

          -This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

          f and prec have the same meaning as in TQString::number(double, char, int). -

          See also toDouble(). - -

          uint TQLocale::toUInt ( const TQString & s, bool * ok = 0 ) const -

          -Returns the unsigned int represented by the localized string s, -or 0 if the conversion failed. -

          If ok is not 0, reports failure by setting -*ok to false and success by setting *ok to true. -

          This function ignores leading and trailing whitespace. -

          See also toString(). - -

          TQ_ULONG TQLocale::toULong ( const TQString & s, bool * ok = 0 ) const -

          -Returns the unsigned long int represented by the localized string -s, or 0 if the conversion failed. -

          If ok is not 0, reports failure by setting -*ok to false and success by setting *ok to true. -

          This function ignores leading and trailing whitespace. -

          See also toString(). - -

          TQ_ULLONG TQLocale::toULongLong ( const TQString & s, bool * ok = 0 ) const -

          -Returns the unsigned long long int represented by the localized -string s, or 0 if the conversion failed. -

          If ok is not 0, reports failure by setting -*ok to false and success by setting *ok to true. -

          This function ignores leading and trailing whitespace. -

          See also toString(). - -

          ushort TQLocale::toUShort ( const TQString & s, bool * ok = 0 ) const -

          -Returns the unsigned short int represented by the localized string -s, or 0 if the conversion failed. -

          If ok is not 0, reports failure by setting -*ok to false and success by setting *ok to true. -

          This function ignores leading and trailing whitespace. -

          See also toString(). - - -


          -This file is part of the TQt toolkit. -Copyright © 1995-2007 -Trolltech. All Rights Reserved.


          - -
          Copyright © 2007 -TrolltechTrademarks -
          TQt 3.3.8
          -
          - diff --git a/doc/html/ntqprogressdialog.html b/doc/html/ntqprogressdialog.html index 4eba6f579..d8ee3b536 100644 --- a/doc/html/ntqprogressdialog.html +++ b/doc/html/ntqprogressdialog.html @@ -294,7 +294,7 @@ the stack, i.e. use new() to create the button. Sets the cancel button's text to cancelButtonText.

          See also setCancelButton(). -

          void TQProgressDialog::setLabel ( TQLabel * label ) +

          void TQProgressDialog::setLabel ( TQLabel * label )

          Sets the label to label. The progress dialog resizes to fit. The label becomes owned by the progress dialog and will be deleted when diff --git a/doc/html/ntqscrollview.html b/doc/html/ntqscrollview.html index 6d7dd3d5b..c04ffc228 100644 --- a/doc/html/ntqscrollview.html +++ b/doc/html/ntqscrollview.html @@ -184,16 +184,16 @@ large child in the TQScrollView. The child should be a child of the You can go on to add arbitrary child widgets to the single child in the scrollview as you would with any widget:
          -        TQLabel* child1 = new TQLabel("CHILD", big_box);
          -        TQLabel* child2 = new TQLabel("CHILD", big_box);
          -        TQLabel* child3 = new TQLabel("CHILD", big_box);
          +        TQLabel* child1 = new TQLabel("CHILD", big_box);
          +        TQLabel* child2 = new TQLabel("CHILD", big_box);
          +        TQLabel* child3 = new TQLabel("CHILD", big_box);
                   ...
               

          Here the TQScrollView has four children: the viewport(), the verticalScrollBar(), the horizontalScrollBar() and a small cornerWidget(). The viewport() has one child: the big TQVBox. The -TQVBox has the three TQLabel objects as child widgets. When the view +TQVBox has the three TQLabel objects as child widgets. When the view is scrolled, the TQVBox is moved; its children move with it as child widgets normally do.

          Using a Very Big View with Some Widgets @@ -209,17 +209,17 @@ adding them with addChild() (this is the same as the pro the single large widget in the previous example):
                   TQScrollView* sv = new TQScrollView(...);
          -        TQLabel* child1 = new TQLabel("CHILD", sv->viewport());
          +        TQLabel* child1 = new TQLabel("CHILD", sv->viewport());
                   sv->addChild(child1);
          -        TQLabel* child2 = new TQLabel("CHILD", sv->viewport());
          +        TQLabel* child2 = new TQLabel("CHILD", sv->viewport());
                   sv->addChild(child2);
          -        TQLabel* child3 = new TQLabel("CHILD", sv->viewport());
          +        TQLabel* child3 = new TQLabel("CHILD", sv->viewport());
                   sv->addChild(child3);
               
          Here, the TQScrollView has the same four children: the viewport(), the verticalScrollBar(), the horizontalScrollBar() and a small -cornerWidget(). The viewport() has the three TQLabel objects as +cornerWidget(). The viewport() has the three TQLabel objects as child widgets. When the view is scrolled, the scrollview moves the child widgets individually.

          Using a Very Big View with Many Widgets @@ -236,11 +236,11 @@ of the viewport(), and adding them with enableClipper(TRUE); - TQLabel* child1 = new TQLabel("CHILD", sv->viewport()); + TQLabel* child1 = new TQLabel("CHILD", sv->viewport()); sv->addChild(child1); - TQLabel* child2 = new TQLabel("CHILD", sv->viewport()); + TQLabel* child2 = new TQLabel("CHILD", sv->viewport()); sv->addChild(child2); - TQLabel* child3 = new TQLabel("CHILD", sv->viewport()); + TQLabel* child3 = new TQLabel("CHILD", sv->viewport()); sv->addChild(child3);

          diff --git a/doc/html/ntqsimplerichtext.html b/doc/html/ntqsimplerichtext.html deleted file mode 100644 index 6fe86061d..000000000 --- a/doc/html/ntqsimplerichtext.html +++ /dev/null @@ -1,223 +0,0 @@ - - - - - -TQSimpleRichText Class - - - - - - - -
          - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

          TQSimpleRichText Class Reference

          - -

          The TQSimpleRichText class provides a small displayable piece of rich text. -More... -

          #include <ntqsimplerichtext.h> -

          List of all member functions. -

          Public Members

          -
            -
          • TQSimpleRichText ( const TQString & text, const TQFont & fnt, const TQString & context = TQString::null, const TQStyleSheet * sheet = 0 )
          • -
          • TQSimpleRichText ( const TQString & text, const TQFont & fnt, const TQString & context, const TQStyleSheet * sheet, const TQMimeSourceFactory * factory, int pageBreak = -1, const TQColor & linkColor = TQt::blue, bool linkUnderline = TRUE )
          • -
          • ~TQSimpleRichText ()
          • -
          • void setWidth ( int w )
          • -
          • void setWidth ( TQPainter * p, int w )
          • -
          • void setDefaultFont ( const TQFont & f )
          • -
          • int width () const
          • -
          • int widthUsed () const
          • -
          • int height () const
          • -
          • void adjustSize ()
          • -
          • void draw ( TQPainter * p, int x, int y, const TQRect & clipRect, const TQColorGroup & cg, const TQBrush * paper = 0 ) const
          • -
          • void draw ( TQPainter * p, int x, int y, const TQRegion & clipRegion, const TQColorGroup & cg, const TQBrush * paper = 0 ) const  (obsolete)
          • -
          • TQString context () const
          • -
          • TQString anchorAt ( const TQPoint & pos ) const
          • -
          • bool inText ( const TQPoint & pos ) const
          • -
          -

          Detailed Description

          - - -The TQSimpleRichText class provides a small displayable piece of rich text. -

          - -

          This class encapsulates simple rich text usage in which a string -is interpreted as rich text and can be drawn. This is particularly -useful if you want to display some rich text in a custom widget. A -TQStyleSheet is needed to interpret the tags and format the rich -text. TQt provides a default HTML-like style sheet, but you may -define custom style sheets. -

          Once created, the rich text object can be queried for its width(), -height(), and the actual width used (see widthUsed()). Most -importantly, it can be drawn on any given TQPainter with draw(). -TQSimpleRichText can also be used to implement hypertext or active -text facilities by using anchorAt(). A hit test through inText() -makes it possible to use simple rich text for text objects in -editable drawing canvases. -

          Once constructed from a string the contents cannot be changed, -only resized. If the contents change, just throw the rich text -object away and make a new one with the new contents. -

          For large documents use TQTextEdit or TQTextBrowser. For very small -items of rich text you can use a TQLabel. -

          If you are using TQSimpleRichText to print in high resolution you -should call setWidth(TQPainter, int) so that the content will be -laid out properly on the page. -

          See also Text Related Classes. - -


          Member Function Documentation

          -

          TQSimpleRichText::TQSimpleRichText ( const TQString & text, const TQFont & fnt, const TQString & context = TQString::null, const TQStyleSheet * sheet = 0 ) -

          -Constructs a TQSimpleRichText from the rich text string text and -the font fnt. -

          The font is used as a basis for the text rendering. When using -rich text rendering on a widget w, you would normally specify -the widget's font, for example: -

          -    TQSimpleRichText myrichtext( contents, mywidget->font() );
          -    
          - -

          context is the optional context of the rich text object. This -becomes important if text contains relative references, for -example within image tags. TQSimpleRichText always uses the default -mime source factory (see TQMimeSourceFactory::defaultFactory()) -to resolve those references. The context will then be used to -calculate the absolute path. See -TQMimeSourceFactory::makeAbsolute() for details. -

          The sheet is an optional style sheet. If it is 0, the default -style sheet will be used (see TQStyleSheet::defaultSheet()). - -

          TQSimpleRichText::TQSimpleRichText ( const TQString & text, const TQFont & fnt, const TQString & context, const TQStyleSheet * sheet, const TQMimeSourceFactory * factory, int pageBreak = -1, const TQColor & linkColor = TQt::blue, bool linkUnderline = TRUE ) -

          -Constructs a TQSimpleRichText from the rich text string text and -the font fnt. -

          This is a slightly more complex constructor for TQSimpleRichText -that takes an additional mime source factory factory, a page -break parameter pageBreak and a bool linkUnderline. linkColor is only provided for compatibility, but has no effect, -as TQColorGroup's TQColorGroup::link() color is used now. -

          context is the optional context of the rich text object. This -becomes important if text contains relative references, for -example within image tags. TQSimpleRichText always uses the default -mime source factory (see TQMimeSourceFactory::defaultFactory()) -to resolve those references. The context will then be used to -calculate the absolute path. See -TQMimeSourceFactory::makeAbsolute() for details. -

          The sheet is an optional style sheet. If it is 0, the default -style sheet will be used (see TQStyleSheet::defaultSheet()). -

          This constructor is useful for creating a TQSimpleRichText object -suitable for printing. Set pageBreak to be the height of the -contents area of the pages. - -

          TQSimpleRichText::~TQSimpleRichText () -

          -Destroys the rich text object, freeing memory. - -

          void TQSimpleRichText::adjustSize () -

          -Adjusts the richt text object to a reasonable size. -

          See also setWidth(). - -

          TQString TQSimpleRichText::anchorAt ( const TQPoint & pos ) const -

          -Returns the anchor at the requested position, pos. An empty -string is returned if no anchor is specified for this position. - -

          TQString TQSimpleRichText::context () const -

          -Returns the context of the rich text object. If no context has -been specified in the constructor, a null string is returned. The -context is the path to use to look up relative links, such as -image tags and anchor references. - -

          void TQSimpleRichText::draw ( TQPainter * p, int x, int y, const TQRect & clipRect, const TQColorGroup & cg, const TQBrush * paper = 0 ) const -

          -Draws the formatted text with painter p, at position (x, y), clipped to clipRect. The clipping rectangle is given in the -rich text object's coordinates translated by (x, y). Passing -an null rectangle results in no clipping. Colors from the color -group cg are used as needed, and if not 0, *paper is used as -the background brush. -

          Note that the display code is highly optimized to reduce flicker, -so passing a brush for paper is preferable to simply clearing -the area to be painted and then calling this without a brush. - -

          Examples: action/application.cpp, application/application.cpp, helpviewer/helpwindow.cpp, and mdi/application.cpp. -

          void TQSimpleRichText::draw ( TQPainter * p, int x, int y, const TQRegion & clipRegion, const TQColorGroup & cg, const TQBrush * paper = 0 ) const -

          -

          This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. -

          Use the version with clipRect instead. The region version has -problems with larger documents on some platforms (on X11 regions -internally are represented with 16bit coordinates). - -

          int TQSimpleRichText::height () const -

          -Returns the height of the rich text object in pixels. -

          See also setWidth(). - -

          Examples: action/application.cpp, application/application.cpp, helpviewer/helpwindow.cpp, and mdi/application.cpp. -

          bool TQSimpleRichText::inText ( const TQPoint & pos ) const -

          -Returns TRUE if pos is within a text line of the rich text -object; otherwise returns FALSE. - -

          void TQSimpleRichText::setDefaultFont ( const TQFont & f ) -

          -Sets the default font for the rich text object to f - -

          void TQSimpleRichText::setWidth ( TQPainter * p, int w ) -

          -Sets the width of the rich text object to w pixels, -recalculating the layout as if it were to be drawn with painter p. -

          Passing a painter is useful when you intend drawing on devices -other than the screen, for example a TQPrinter. -

          See also height() and adjustSize(). - -

          Examples: action/application.cpp, application/application.cpp, helpviewer/helpwindow.cpp, and mdi/application.cpp. -

          void TQSimpleRichText::setWidth ( int w ) -

          -This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

          Sets the width of the rich text object to w pixels. -

          See also height() and adjustSize(). - -

          int TQSimpleRichText::width () const -

          -Returns the set width of the rich text object in pixels. -

          See also widthUsed(). - -

          int TQSimpleRichText::widthUsed () const -

          -Returns the width in pixels that is actually used by the rich text -object. This can be smaller or wider than the set width. -

          It may be wider, for example, if the text contains images or -non-breakable words that are already wider than the available -space. It's smaller when the object only consists of lines that do -not fill the width completely. -

          See also width(). - - -


          -This file is part of the TQt toolkit. -Copyright © 1995-2007 -Trolltech. All Rights Reserved.


          - -
          Copyright © 2007 -TrolltechTrademarks -
          TQt 3.3.8
          -
          - diff --git a/doc/html/ntqsyntaxhighlighter.html b/doc/html/ntqsyntaxhighlighter.html deleted file mode 100644 index 0f6e64f8e..000000000 --- a/doc/html/ntqsyntaxhighlighter.html +++ /dev/null @@ -1,158 +0,0 @@ - - - - - -TQSyntaxHighlighter Class - - - - - - - -
          - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

          TQSyntaxHighlighter Class Reference

          - -

          The TQSyntaxHighlighter class is a base class for -implementing TQTextEdit syntax highlighters. -More... -

          #include <ntqsyntaxhighlighter.h> -

          Inherits TQt. -

          List of all member functions. -

          Public Members

          - -

          Detailed Description

          - - -The TQSyntaxHighlighter class is a base class for -implementing TQTextEdit syntax highlighters. -

          - -

          A syntax highligher automatically highlights parts of the text in -a TQTextEdit. Syntax highlighters are often used when the user is -entering text in a specific format (for example, source code) and -help the user to read the text and identify syntax errors. -

          To provide your own syntax highlighting for TQTextEdit, you must -subclass TQSyntaxHighlighter and reimplement highlightParagraph(). -

          When you create an instance of your TQSyntaxHighlighter subclass, -pass it the TQTextEdit that you want the syntax highlighting to be -applied to. After this your highlightParagraph() function will be -called automatically whenever necessary. Use your -highlightParagraph() function to apply formatting (e.g. setting -the font and color) to the text that is passed to it. -

          See also Basic Widgets and Text Related Classes. - -


          Member Function Documentation

          -

          TQSyntaxHighlighter::TQSyntaxHighlighter ( TQTextEdit * textEdit ) -

          -Constructs the TQSyntaxHighlighter and installs it on textEdit. -

          It is the caller's responsibility to delete the -TQSyntaxHighlighter when it is no longer needed. - -

          TQSyntaxHighlighter::~TQSyntaxHighlighter () [virtual] -

          -Destructor. Uninstalls this syntax highlighter from the textEdit() - -

          int TQSyntaxHighlighter::currentParagraph () const -

          -Returns the id of the paragraph which is highlighted, or -1 of no -paragraph is currently highlighted. -

          Usually this function is called from within highlightParagraph(). - -

          int TQSyntaxHighlighter::highlightParagraph ( const TQString & text, int endStateOfLastPara ) [pure virtual] -

          - -

          This function is called when necessary by the rich text engine, -i.e. on paragraphs which have changed. -

          In your reimplementation you should parse the paragraph's text -and call setFormat() as often as necessary to apply any font and -color changes that you require. Your function must return a value -which indicates the paragraph's end state: see below. -

          Some syntaxes can have constructs that span paragraphs. For -example, a C++ syntax highlighter should be able to cope with -/*...*/ comments that span paragraphs. To deal -with these cases it is necessary to know the end state of the -previous paragraph (e.g. "in comment"). -

          If your syntax does not have paragraph spanning constructs, simply -ignore the endStateOfLastPara parameter and always return 0. -

          Whenever highlightParagraph() is called it is passed a value for -endStateOfLastPara. For the very first paragraph this value is -always -2. For any other paragraph the value is the value returned -by the most recent highlightParagraph() call that applied to the -preceding paragraph. -

          The value you return is up to you. We recommend only returning 0 -(to signify that this paragraph's syntax highlighting does not -affect the following paragraph), or a positive integer (to signify -that this paragraph has ended in the middle of a paragraph -spanning construct). -

          To find out which paragraph is highlighted, call -currentParagraph(). -

          For example, if you're writing a simple C++ syntax highlighter, -you might designate 1 to signify "in comment". For a paragraph -that ended in the middle of a comment you'd return 1, and for -other paragraphs you'd return 0. In your parsing code if endStateOfLastPara was 1, you would highlight the text as a C++ -comment until you reached the closing */. - -

          void TQSyntaxHighlighter::rehighlight () -

          Redoes the highlighting of the whole document. - -

          void TQSyntaxHighlighter::setFormat ( int start, int count, const TQFont & font, const TQColor & color ) -

          -This function is applied to the syntax highlighter's current -paragraph (the text of which is passed to the highlightParagraph() -function). -

          The specified font and color are applied to the text from -position start for count characters. (If count is 0, -nothing is done.) - -

          void TQSyntaxHighlighter::setFormat ( int start, int count, const TQColor & color ) -

          This is an overloaded member function, provided for convenience. It behaves essentially like the above function. - -

          void TQSyntaxHighlighter::setFormat ( int start, int count, const TQFont & font ) -

          This is an overloaded member function, provided for convenience. It behaves essentially like the above function. - -

          TQTextEdit * TQSyntaxHighlighter::textEdit () const -

          - -

          Returns the TQTextEdit on which this syntax highlighter is -installed - - -


          -This file is part of the TQt toolkit. -Copyright © 1995-2007 -Trolltech. All Rights Reserved.


          - -
          Copyright © 2007 -TrolltechTrademarks -
          TQt 3.3.8
          -
          - diff --git a/doc/html/ntqt.html b/doc/html/ntqt.html index b82616cc4..410f355e9 100644 --- a/doc/html/ntqt.html +++ b/doc/html/ntqt.html @@ -35,7 +35,7 @@ body { background: #ffffff; color: black; } that need to be global-like. More...

          #include <ntqnamespace.h> -

          Inherited by TQObject, TQPixmap, TQBrush, TQCanvasItem, TQCursor, TQPainter, TQEvent, TQIconViewItem, TQKeySequence, TQListViewItem, TQCustomMenuItem, TQPen, TQStyleSheetItem, TQSyntaxHighlighter, TQTab, TQTableItem, TQThread, TQToolTip, and TQWhatsThis. +

          Inherited by TQObject, TQPixmap, TQBrush, TQCanvasItem, TQCursor, TQPainter, TQEvent, TQIconViewItem, TQKeySequence, TQListViewItem, TQCustomMenuItem, TQPen, TQStyleSheetItem, TQSyntaxHighlighter, TQTab, TQTableItem, TQThread, TQToolTip, and TQWhatsThis.

          List of all member functions.

          Public Members

            @@ -794,7 +794,7 @@ boundaries.

            TQt::TextFormat

            This enum is used in widgets that can display both plain text and -rich text, e.g. TQLabel. It is used for deciding whether a text +rich text, e.g. TQLabel. It is used for deciding whether a text string should be interpreted as one or the other. This is normally done by passing one of the enum values to a setTextFormat() function. diff --git a/doc/html/ntqwhatsthis.html b/doc/html/ntqwhatsthis.html deleted file mode 100644 index a6282b313..000000000 --- a/doc/html/ntqwhatsthis.html +++ /dev/null @@ -1,239 +0,0 @@ - - - - - -TQWhatsThis Class - - - - - - - -
            - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

            TQWhatsThis Class Reference

            - -

            The TQWhatsThis class provides a simple description of any -widget, i.e. answering the question "What's this?". -More... -

            #include <ntqwhatsthis.h> -

            Inherits TQt. -

            List of all member functions. -

            Public Members

            - -

            Static Public Members

            -
              -
            • void setFont ( const TQFont & font )
            • -
            • void add ( TQWidget * widget, const TQString & text )
            • -
            • void remove ( TQWidget * widget )
            • -
            • TQString textFor ( TQWidget * w, const TQPoint & pos = TQPoint ( ), bool includeParents = FALSE )
            • -
            • TQToolButton * whatsThisButton ( TQWidget * parent )
            • -
            • void enterWhatsThisMode ()
            • -
            • bool inWhatsThisMode ()
            • -
            • void leaveWhatsThisMode ( const TQString & text = TQString::null, const TQPoint & pos = TQCursor::pos ( ), TQWidget * w = 0 )
            • -
            • void display ( const TQString & text, const TQPoint & pos = TQCursor::pos ( ), TQWidget * w = 0 )
            • -
            -

            Detailed Description

            - - -The TQWhatsThis class provides a simple description of any -widget, i.e. answering the question "What's this?". -

            - -

            "What's this?" help is part of an application's online help system -that provides users with information about functionality, usage, -background etc., in various levels of detail from short tool tips -to full text browsing help windows. -

            TQWhatsThis provides a single window with an explanatory text that -pops up when the user asks "What's this?". The default way to do -this is to focus the relevant widget and press Shift+F1. The help -text appears immediately; it goes away as soon as the user does -something else. -

            (Note that if there is an accelerator for Shift+F1, this mechanism -will not work.) -

            To add "What's this?" text to a widget you simply call -TQWhatsThis::add() for the widget. For example, to assign text to a -menu item, call TQMenuData::setWhatsThis(); for a global -accelerator key, call TQAccel::setWhatsThis() and If you're using -actions, use TQAction::setWhatsThis(). -

            The text can be either rich text or plain text. If you specify a -rich text formatted string, it will be rendered using the default -stylesheet. This makes it possible to embed images. See -TQStyleSheet::defaultSheet() for details. -

            - -

                    const char * fileOpenText = "<p><img source=\"fileopen\"> "
            -                         "Click this button to open a <em>new file</em>. <br>"
            -                         "You can also select the <b>Open</b> command "
            -                         "from the <b>File</b> menu.</p>";
            -        TQMimeSourceFactory::defaultFactory()->setPixmap( "document-open",
            -                              fileOpenAction->iconSet().pixmap() );
            -        fileOpenAction->setWhatsThis( fileOpenText );
            -
            -

            An alternative way to enter "What's this?" mode is to use the -ready-made tool bar tool button from -TQWhatsThis::whatsThisButton(). By invoking this context help -button (in the picture below the first one from the right) the -user switches into "What's this?" mode. If they now click on a -widget the appropriate help text is shown. The mode is left when -help is given or when the user presses Esc. -

            -

            If you are using TQMainWindow you can also use the -TQMainWindow::whatsThis() slot to invoke the mode from a menu item. -

            For more control you can create a dedicated TQWhatsThis object for -a special widget. By subclassing and reimplementing -TQWhatsThis::text() it is possible to have different help texts, -depending on the position of the mouse click. By reimplementing -TQWhatsThis::clicked() it is possible to have hyperlinks inside the -help texts. -

            If you wish to control the "What's this?" behavior of a widget -manually see TQWidget::customWhatsThis(). -

            The What's This object can be removed using TQWhatsThis::remove(), -although this is rarely necessary because it is automatically -removed when the widget is destroyed. -

            See also TQToolTip and Help System. - -


            Member Function Documentation

            -

            TQWhatsThis::TQWhatsThis ( TQWidget * widget ) -

            -Constructs a dynamic "What's this?" object for widget. The -object is deleted when the widget is destroyed. -

            When the widget is queried by the user the text() function of this -TQWhatsThis will be called to provide the appropriate text, rather -than using the text assigned by add(). - -

            TQWhatsThis::~TQWhatsThis () [virtual] -

            -Destroys the object and frees any allocated resources. - -

            void TQWhatsThis::add ( TQWidget * widget, const TQString & text ) [static] -

            -Adds text as "What's this" help for widget. If the text is -rich text formatted (i.e. it contains markup) it will be rendered -with the default stylesheet TQStyleSheet::defaultSheet(). -

            The text is destroyed if the widget is later destroyed, so it need -not be explicitly removed. -

            See also remove(). - -

            Examples: application/application.cpp, helpsystem/mainwindow.cpp, and mdi/application.cpp. -

            bool TQWhatsThis::clicked ( const TQString & href ) [virtual] -

            - -

            This virtual function is called when the user clicks inside the -"What's this?" window. href is the link the user clicked on, or -TQString::null if there was no link. -

            If the function returns TRUE (the default), the "What's this?" -window is closed, otherwise it remains visible. -

            The default implementation ignores href and returns TRUE. - -

            void TQWhatsThis::display ( const TQString & text, const TQPoint & pos = TQCursor::pos ( ), TQWidget * w = 0 ) [static] -

            -Display text in a help window at the global screen position pos. -

            If widget w is not 0 and has its own dedicated TQWhatsThis -object, this object will receive clicked() messages when the user -clicks on hyperlinks inside the help text. -

            See also TQWhatsThis::clicked(). - -

            void TQWhatsThis::enterWhatsThisMode () [static] -

            -Enters "What's this?" mode and returns immediately. -

            TQt will install a special cursor and take over mouse input until -the user clicks somewhere. It then shows any help available and -ends "What's this?" mode. Finally, TQt removes the special cursor -and help window and then restores ordinary event processing, at -which point the left mouse button is no longer pressed. -

            The user can also use the Esc key to leave "What's this?" mode. -

            See also inWhatsThisMode() and leaveWhatsThisMode(). - -

            bool TQWhatsThis::inWhatsThisMode () [static] -

            -Returns TRUE if the application is in "What's this?" mode; -otherwise returns FALSE. -

            See also enterWhatsThisMode() and leaveWhatsThisMode(). - -

            void TQWhatsThis::leaveWhatsThisMode ( const TQString & text = TQString::null, const TQPoint & pos = TQCursor::pos ( ), TQWidget * w = 0 ) [static] -

            -Leaves "What's this?" question mode. -

            This function is used internally by widgets that support -TQWidget::customWhatsThis(); applications do not usually call it. -An example of such a widget is TQPopupMenu: menus still work -normally in "What's this?" mode but also provide help texts for -individual menu items. -

            If text is not TQString::null, a "What's this?" help window is -displayed at the global screen position pos. If widget w is -not 0 and has its own dedicated TQWhatsThis object, this object -will receive clicked() messages when the user clicks on hyperlinks -inside the help text. -

            See also inWhatsThisMode(), enterWhatsThisMode(), and TQWhatsThis::clicked(). - -

            void TQWhatsThis::remove ( TQWidget * widget ) [static] -

            -Removes the "What's this?" help associated with the widget. -This happens automatically if the widget is destroyed. -

            See also add(). - -

            void TQWhatsThis::setFont ( const TQFont & font ) [static] -

            -Sets the font for all "What's this?" helps to font. - -

            TQString TQWhatsThis::text ( const TQPoint & ) [virtual] -

            -This virtual function returns the text for position p in the -widget that this "What's this?" object documents. If there is no -"What's this?" text for the position, TQString::null is returned. -

            The default implementation returns TQString::null. - -

            TQString TQWhatsThis::textFor ( TQWidget * w, const TQPoint & pos = TQPoint ( ), bool includeParents = FALSE ) [static] -

            -Returns the what's this text for widget w or TQString::null if -there is no "What's this?" help for the widget. pos contains -the mouse position; this is useful, for example, if you've -subclassed to make the text that is displayed position dependent. -

            If includeParents is TRUE, parent widgets are taken into -consideration as well when looking for what's this help text. -

            See also add(). - -

            TQToolButton * TQWhatsThis::whatsThisButton ( TQWidget * parent ) [static] -

            -Creates a TQToolButton preconfigured to enter "What's this?" mode -when clicked. You will often use this with a tool bar as parent: -
            -        (void) TQWhatsThis::whatsThisButton( my_help_tool_bar );
            -    
            - - -

            Example: helpsystem/mainwindow.cpp. - -


            -This file is part of the TQt toolkit. -Copyright © 1995-2007 -Trolltech. All Rights Reserved.


            - -
            Copyright © 2007 -TrolltechTrademarks -
            TQt 3.3.8
            -
            - diff --git a/doc/html/pictures.html b/doc/html/pictures.html index 0623452f8..7232c7879 100644 --- a/doc/html/pictures.html +++ b/doc/html/pictures.html @@ -79,7 +79,7 @@ also be used as a separate widget.

            The screenshot below shows a TQTabDialog. The tabs (TQTabBar) or the more convenient class TQTabWidget, which combines a tab bar with -the pages, can be used separately. In the visible page you see a TQLabel, the range controls TQSlider and TQSpinBox and below a TQLCDNumber. In the bottom row there are some TQPushButtons. +the pages, can be used separately. In the visible page you see a TQLabel, the range controls TQSlider and TQSpinBox and below a TQLCDNumber. In the bottom row there are some TQPushButtons.

            In the screenshot below there's a TQTextBrowser displaying a HTML page. See also TQTextEdit. diff --git a/doc/html/popup-example.html b/doc/html/popup-example.html index 949f29a33..7d7c14d32 100644 --- a/doc/html/popup-example.html +++ b/doc/html/popup-example.html @@ -53,11 +53,11 @@ pop up. #ifndef POPUP_H #define POPUP_H -#include <ntqlabel.h> +#include <tqlabel.h> #include <ntqpushbutton.h> #include <ntqlineedit.h> -class FancyPopup : public TQLabel +class FancyPopup : public TQLabel { TQ_OBJECT public: @@ -115,9 +115,9 @@ private: #include <ntqlayout.h> FancyPopup::FancyPopup( TQWidget* parent, const char* name ): - TQLabel( parent, name, WType_Popup ){ + TQLabel( parent, name, WType_Popup ){ setFrameStyle( WinPanel|Raised ); - setAlignment( AlignCenter ); + setAlignment( AlignCenter ); resize(150,100); moves = 0; setMouseTracking( TRUE ); @@ -129,7 +129,7 @@ private: s.sprintf("%d/%d", e->pos().x(), e->pos().y()); if (e->state() & TQMouseEvent::LeftButton) s += " (down)"; - setText(s); + setText(s); } void FancyPopup::mouseReleaseEvent( TQMouseEvent * e){ diff --git a/doc/html/porting.html b/doc/html/porting.html index 431834937..6bd143cc3 100644 --- a/doc/html/porting.html +++ b/doc/html/porting.html @@ -333,8 +333,8 @@ new code.

          • TQFontDatabase::smoothSizes( const TQString & family, const TQString & style, const TQString & )
          • TQFontDatabase::styles( const TQString & family, const TQString & ) const
          • TQFontDatabase::weight( const TQString & family, const TQString & style, const TQString & ) const -
          • TQLabel::autoResize() const -
          • TQLabel::setAutoResize( bool enable ) +
          • TQLabel::autoResize() const +
          • TQLabel::setAutoResize( bool enable )
          • TQListBox::cellHeight( int i ) const
          • TQListBox::cellHeight() const
          • TQListBox::cellWidth() const @@ -364,10 +364,10 @@ new code.
          • TQRegExp::match( const TQString & str, int index = 0, int *len = 0, bool indexIsStart = TRUE ) const
          • TQScrollView::childIsVisible( TQWidget *child )
          • TQScrollView::showChild( TQWidget *child, bool show = TRUE ) -
          • TQSimpleRichText::draw( TQPainter *p, int x, int y, const TQRegion & clipRegion, const TQColorGroup & cg, const TQBrush *paper = 0 ) const +
          • TQSimpleRichText::draw( TQPainter *p, int x, int y, const TQRegion & clipRegion, const TQColorGroup & cg, const TQBrush *paper = 0 ) const
          • TQString::ascii() const
          • TQString::data() const -
          • TQString::setExpand( uint index, TQChar c ) +
          • TQString::setExpand( uint index, TQChar c )
          • TQStyle::defaultFrameWidth() const
          • TQStyle::scrollBarExtent() const
          • TQStyle::tabbarMetrics( const TQWidget *t, int & hf, int & vf, int & ov ) const diff --git a/doc/html/progress-example.html b/doc/html/progress-example.html index e4a239128..a06b39114 100644 --- a/doc/html/progress-example.html +++ b/doc/html/progress-example.html @@ -55,10 +55,10 @@ demonstrates simple use of menus. #include <tqpainter.h> #include <stdlib.h> -class AnimatedThingy : public TQLabel { +class AnimatedThingy : public TQLabel { public: AnimatedThingy( TQWidget* parent, const TQString& s ) : - TQLabel(parent), + TQLabel(parent), label(s), step(0) { diff --git a/doc/html/propertydocs b/doc/html/propertydocs index 880ccbf5f..cc448070f 100644 --- a/doc/html/propertydocs +++ b/doc/html/propertydocs @@ -143,7 +143,7 @@ appear at all. action. The text may contain rich text (HTML-like tags -- see <a href="tqstylesheet.html">TQStyleSheet</a> for the list of supported tags). There is no default "What's This" text. -<p> <p>See also <a href="ntqwhatsthis.html">QWhatsThis</a>. +<p> <p>See also <a href="tqwhatsthis.html">TQWhatsThis</a>. <p>Set this property's value with <a href="tqaction.html#setWhatsThis">setWhatsThis</a>() and get this property's value with <a href="tqaction.html#whatsThis">whatsThis</a>(). @@ -1834,29 +1834,29 @@ of 0. - QLabel::alignment - + TQLabel::alignment + <p>This property holds the alignment of the label's contents. <p>The alignment is a bitwise OR of <a href="ntqt.html#AlignmentFlags-enum">TQt::AlignmentFlags</a> and <a href="ntqt.html#TextFlags-enum">TQt::TextFlags</a> values. The <a href="ntqt.html#TextFlags-enum">ExpandTabs</a>, <a href="ntqt.html#TextFlags-enum">SingleLine</a> and <a href="ntqt.html#TextFlags-enum">ShowPrefix</a> flags apply only if the label contains plain text; otherwise they are ignored. The <a href="ntqt.html#TextFlags-enum">DontClip</a> flag is always ignored. <a href="ntqt.html#TextFlags-enum">WordBreak</a> applies to both rich text and plain text -labels. The <a href="ntqt.html#TextFlags-enum">BreakAnywhere</a> flag is not supported in QLabel. +labels. The <a href="ntqt.html#TextFlags-enum">BreakAnywhere</a> flag is not supported in TQLabel. <p> If the label has a buddy, the <a href="ntqt.html#TextFlags-enum">ShowPrefix</a> flag is forced to TRUE. <p> The default alignment is <tt>AlignAuto | AlignVCenter | ExpandTabs</tt> if the label doesn't have a buddy and <tt>AlignAuto | AlignVCenter | ExpandTabs | ShowPrefix</tt> if the label has a buddy. If the label contains rich text, additionally <a href="ntqt.html#TextFlags-enum">WordBreak</a> is turned on. -<p> <p>See also <a href="ntqt.html#AlignmentFlags-enum">TQt::AlignmentFlags</a>, <a href="ntqlabel.html#setBuddy">setBuddy</a>(), and <a href="ntqlabel.html#text-prop">text</a>. +<p> <p>See also <a href="ntqt.html#AlignmentFlags-enum">TQt::AlignmentFlags</a>, <a href="tqlabel.html#setBuddy">setBuddy</a>(), and <a href="tqlabel.html#text-prop">text</a>. -<p>Set this property's value with <a href="ntqlabel.html#setAlignment">setAlignment</a>() and get this property's value with <a href="ntqlabel.html#alignment">alignment</a>(). +<p>Set this property's value with <a href="tqlabel.html#setAlignment">setAlignment</a>() and get this property's value with <a href="tqlabel.html#alignment">alignment</a>(). - QLabel::indent - + TQLabel::indent + <p>This property holds the label's text indent in pixels. <p>If a label displays text, the indent applies to the left edge if -<a href="ntqlabel.html#alignment">alignment</a>() is <a href="ntqt.html#AlignmentFlags-enum">AlignLeft</a>, to the right edge if alignment() is +<a href="tqlabel.html#alignment">alignment</a>() is <a href="ntqt.html#AlignmentFlags-enum">AlignLeft</a>, to the right edge if alignment() is <a href="ntqt.html#AlignmentFlags-enum">AlignRight</a>, to the top edge if alignment() is <a href="ntqt.html#AlignmentFlags-enum">AlignTop</a>, and to to the bottom edge if alignment() is <a href="ntqt.html#AlignmentFlags-enum">AlignBottom</a>. <p> If indent is negative, or if no indent has been set, the label @@ -1864,69 +1864,69 @@ computes the effective indent as follows: If <a href="ntqframe.html#frameWidt the effective indent becomes 0. If frameWidth() is greater than 0, the effective indent becomes half the width of the "x" character of the widget's current <a href="tqwidget.html#font">font</a>(). -<p> <p>See also <a href="ntqlabel.html#alignment-prop">alignment</a>, <a href="ntqframe.html#frameWidth-prop">frameWidth</a>, and <a href="tqwidget.html#font-prop">font</a>. +<p> <p>See also <a href="tqlabel.html#alignment-prop">alignment</a>, <a href="ntqframe.html#frameWidth-prop">frameWidth</a>, and <a href="tqwidget.html#font-prop">font</a>. -<p>Set this property's value with <a href="ntqlabel.html#setIndent">setIndent</a>() and get this property's value with <a href="ntqlabel.html#indent">indent</a>(). +<p>Set this property's value with <a href="tqlabel.html#setIndent">setIndent</a>() and get this property's value with <a href="tqlabel.html#indent">indent</a>(). - QLabel::pixmap - + TQLabel::pixmap + <p>This property holds the label's pixmap. <p>If no pixmap has been set this will return an invalid pixmap. <p> Setting the pixmap clears any previous content, and resizes the -label if <a href="ntqlabel.html#autoResize">QLabel::autoResize</a>() is TRUE. The buddy accelerator, +label if <a href="tqlabel.html#autoResize">TQLabel::autoResize</a>() is TRUE. The buddy accelerator, if any, is disabled. -<p>Set this property's value with <a href="ntqlabel.html#setPixmap">setPixmap</a>() and get this property's value with <a href="ntqlabel.html#pixmap">pixmap</a>(). +<p>Set this property's value with <a href="tqlabel.html#setPixmap">setPixmap</a>() and get this property's value with <a href="tqlabel.html#pixmap">pixmap</a>(). - QLabel::scaledContents - + TQLabel::scaledContents + <p>This property holds whether the label will scale its contents to fill all available space. <p>When enabled and the label shows a pixmap, it will scale the pixmap to fill the available space. <p> This property's default is FALSE. -<p> <p>See also <a href="ntqlabel.html#scaledContents-prop">scaledContents</a>. +<p> <p>See also <a href="tqlabel.html#scaledContents-prop">scaledContents</a>. -<p>Set this property's value with <a href="ntqlabel.html#setScaledContents">setScaledContents</a>() and get this property's value with <a href="ntqlabel.html#hasScaledContents">hasScaledContents</a>(). +<p>Set this property's value with <a href="tqlabel.html#setScaledContents">setScaledContents</a>() and get this property's value with <a href="tqlabel.html#hasScaledContents">hasScaledContents</a>(). - QLabel::text - + TQLabel::text + <p>This property holds the label's text. <p>If no text has been set this will return an empty string. Setting the text clears any previous content, unless they are the same. <p> The text will be interpreted either as a plain text or as a rich -text, depending on the text format setting; see <a href="ntqlabel.html#setTextFormat">setTextFormat</a>(). -The default setting is <a href="ntqt.html#TextFormat-enum">AutoText</a>, i.e. QLabel will try to +text, depending on the text format setting; see <a href="tqlabel.html#setTextFormat">setTextFormat</a>(). +The default setting is <a href="ntqt.html#TextFormat-enum">AutoText</a>, i.e. TQLabel will try to auto-detect the format of the text set. <p> If the text is interpreted as a plain text and a buddy has been set, the buddy accelerator key is updated from the new text. <p> The label resizes itself if auto-resizing is enabled. -<p> Note that Qlabel is well-suited to display small rich text +<p> Note that TQLabel is well-suited to display small rich text documents, i.e. those small documents that get their document specific settings (font, text color, link color) from the label's palette and font properties. For large documents, use <a href="tqtextedit.html">TQTextEdit</a> in read-only mode instead. TQTextEdit will flicker less on resize and can also provide a scrollbar when necessary. -<p> <p>See also <a href="ntqlabel.html#textFormat-prop">textFormat</a>, <a href="ntqlabel.html#setBuddy">setBuddy</a>(), and <a href="ntqlabel.html#alignment-prop">alignment</a>. +<p> <p>See also <a href="tqlabel.html#textFormat-prop">textFormat</a>, <a href="tqlabel.html#setBuddy">setBuddy</a>(), and <a href="tqlabel.html#alignment-prop">alignment</a>. -<p>Set this property's value with <a href="ntqlabel.html#setText">setText</a>() and get this property's value with <a href="ntqlabel.html#text">text</a>(). +<p>Set this property's value with <a href="tqlabel.html#setText">setText</a>() and get this property's value with <a href="tqlabel.html#text">text</a>(). - QLabel::textFormat - + TQLabel::textFormat + <p>This property holds the label's text format. <p>See the <a href="ntqt.html#TextFormat-enum">TQt::TextFormat</a> enum for an explanation of the possible options. <p> The default format is <a href="ntqt.html#TextFormat-enum">AutoText</a>. -<p> <p>See also <a href="ntqlabel.html#text-prop">text</a>. +<p> <p>See also <a href="tqlabel.html#text-prop">text</a>. -<p>Set this property's value with <a href="ntqlabel.html#setTextFormat">setTextFormat</a>() and get this property's value with <a href="ntqlabel.html#textFormat">textFormat</a>(). +<p>Set this property's value with <a href="tqlabel.html#setTextFormat">setTextFormat</a>() and get this property's value with <a href="tqlabel.html#textFormat">textFormat</a>(). @@ -4414,12 +4414,12 @@ on top-level widgets. which means the widget will not receive any events in Whats This mode. <p> The widget may leave What's This mode by calling -<a href="ntqwhatsthis.html#leaveWhatsThisMode">QWhatsThis::leaveWhatsThisMode</a>(), with or without actually +<a href="tqwhatsthis.html#leaveWhatsThisMode">TQWhatsThis::leaveWhatsThisMode</a>(), with or without actually displaying any help text. <p> You can also reimplement customWhatsThis() if your widget is a "passive interactor" supposed to work under all circumstances. -Simply don't call QWhatsThis::leaveWhatsThisMode() in that case. -<p> <p>See also <a href="ntqwhatsthis.html#inWhatsThisMode">QWhatsThis::inWhatsThisMode</a>() and <a href="ntqwhatsthis.html#leaveWhatsThisMode">QWhatsThis::leaveWhatsThisMode</a>(). +Simply don't call TQWhatsThis::leaveWhatsThisMode() in that case. +<p> <p>See also <a href="tqwhatsthis.html#inWhatsThisMode">TQWhatsThis::inWhatsThisMode</a>() and <a href="tqwhatsthis.html#leaveWhatsThisMode">TQWhatsThis::leaveWhatsThisMode</a>(). <p>Get this property's value with <a href="tqwidget.html#customWhatsThis">customWhatsThis</a>(). diff --git a/doc/html/propertyindex b/doc/html/propertyindex index 34881cc56..0dd3819c9 100644 --- a/doc/html/propertyindex +++ b/doc/html/propertyindex @@ -156,12 +156,12 @@ "QLCDNumber/segmentStyle" ntqlcdnumber.html#segmentStyle-prop "QLCDNumber/smallDecimalPoint" ntqlcdnumber.html#smallDecimalPoint-prop "QLCDNumber/value" ntqlcdnumber.html#value-prop -"QLabel/alignment" ntqlabel.html#alignment-prop -"QLabel/indent" ntqlabel.html#indent-prop -"QLabel/pixmap" ntqlabel.html#pixmap-prop -"QLabel/scaledContents" ntqlabel.html#scaledContents-prop -"QLabel/text" ntqlabel.html#text-prop -"QLabel/textFormat" ntqlabel.html#textFormat-prop +"TQLabel/alignment" tqlabel.html#alignment-prop +"TQLabel/indent" tqlabel.html#indent-prop +"TQLabel/pixmap" tqlabel.html#pixmap-prop +"TQLabel/scaledContents" tqlabel.html#scaledContents-prop +"TQLabel/text" tqlabel.html#text-prop +"TQLabel/textFormat" tqlabel.html#textFormat-prop "QLayout/margin" ntqlayout.html#margin-prop "QLayout/resizeMode" ntqlayout.html#resizeMode-prop "QLayout/spacing" ntqlayout.html#spacing-prop diff --git a/doc/html/qchar-members.html b/doc/html/qchar-members.html deleted file mode 100644 index ba6eff19a..000000000 --- a/doc/html/qchar-members.html +++ /dev/null @@ -1,74 +0,0 @@ - - - - - -TQChar Member List - - - - - - - -
            - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

            Complete Member List for TQChar

            - -

            This is the complete list of member functions for -TQChar, including inherited members. - -

            - -


            - -
            Copyright © 2007 -TrolltechTrademarks -
            TQt 3.3.8
            -
            - diff --git a/doc/html/qchar.html b/doc/html/qchar.html deleted file mode 100644 index 91f85b924..000000000 --- a/doc/html/qchar.html +++ /dev/null @@ -1,599 +0,0 @@ - - - - - -TQChar Class - - - - - - - -
            - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

            TQChar Class Reference

            - -

            The TQChar class provides a lightweight Unicode character. -More... -

            Almost all the functions in this class are reentrant when TQt is built with thread support. The exception is decomposition(). -

            #include <tqstring.h> -

            List of all member functions. -

            Public Members

            -
              -
            • TQChar ()
            • -
            • TQChar ( char c )
            • -
            • TQChar ( uchar c )
            • -
            • TQChar ( uchar c, uchar r )
            • -
            • TQChar ( const TQChar & c )
            • -
            • TQChar ( ushort rc )
            • -
            • TQChar ( short rc )
            • -
            • TQChar ( uint rc )
            • -
            • TQChar ( int rc )
            • -
            • enum Category { NoCategory, Mark_NonSpacing, Mark_SpacingCombining, Mark_Enclosing, Number_DecimalDigit, Number_Letter, Number_Other, Separator_Space, Separator_Line, Separator_Paragraph, Other_Control, Other_Format, Other_Surrogate, Other_PrivateUse, Other_NotAssigned, Letter_Uppercase, Letter_Lowercase, Letter_Titlecase, Letter_Modifier, Letter_Other, Punctuation_Connector, Punctuation_Dash, Punctuation_Dask = Punctuation_Dash, Punctuation_Open, Punctuation_Close, Punctuation_InitialQuote, Punctuation_FinalQuote, Punctuation_Other, Symbol_Math, Symbol_Currency, Symbol_Modifier, Symbol_Other }
            • -
            • enum Direction { DirL, DirR, DirEN, DirES, DirET, DirAN, DirCS, DirB, DirS, DirWS, DirON, DirLRE, DirLRO, DirAL, DirRLE, DirRLO, DirPDF, DirNSM, DirBN }
            • -
            • enum Decomposition { Single, Canonical, Font, NoBreak, Initial, Medial, Final, Isolated, Circle, Super, Sub, Vertical, Wide, Narrow, Small, Square, Compat, Fraction }
            • -
            • enum Joining { OtherJoining, Dual, Right, Center }
            • -
            • enum CombiningClass { Combining_BelowLeftAttached = 200, Combining_BelowAttached = 202, Combining_BelowRightAttached = 204, Combining_LeftAttached = 208, Combining_RightAttached = 210, Combining_AboveLeftAttached = 212, Combining_AboveAttached = 214, Combining_AboveRightAttached = 216, Combining_BelowLeft = 218, Combining_Below = 220, Combining_BelowRight = 222, Combining_Left = 224, Combining_Right = 226, Combining_AboveLeft = 228, Combining_Above = 230, Combining_AboveRight = 232, Combining_DoubleBelow = 233, Combining_DoubleAbove = 234, Combining_IotaSubscript = 240 }
            • -
            • int digitValue () const
            • -
            • TQChar lower () const
            • -
            • TQChar upper () const
            • -
            • Category category () const
            • -
            • Direction direction () const
            • -
            • Joining joining () const
            • -
            • bool mirrored () const
            • -
            • TQChar mirroredChar () const
            • -
            • const TQString & decomposition () const
            • -
            • Decomposition decompositionTag () const
            • -
            • unsigned char combiningClass () const
            • -
            • char latin1 () const
            • -
            • ushort unicode () const
            • -
            • ushort & unicode ()
            • -
            • operator char () const
            • -
            • bool isNull () const
            • -
            • bool isPrint () const
            • -
            • bool isPunct () const
            • -
            • bool isSpace () const
            • -
            • bool isMark () const
            • -
            • bool isLetter () const
            • -
            • bool isNumber () const
            • -
            • bool isLetterOrNumber () const
            • -
            • bool isDigit () const
            • -
            • bool isSymbol () const
            • -
            • uchar cell () const
            • -
            • uchar row () const
            • -
            -

            Static Public Members

            -
              -
            • bool networkOrdered ()  (obsolete)
            • -
            -

            Related Functions

            - -

            Detailed Description

            - - - -The TQChar class provides a lightweight Unicode character. -

            -

            Unicode characters are (so far) 16-bit entities without any markup -or structure. This class represents such an entity. It is -lightweight, so it can be used everywhere. Most compilers treat it -like a "short int". (In a few years it may be necessary to make -TQChar 32-bit when more than 65536 Unicode code points have been -defined and come into use.) -

            TQChar provides a full complement of testing/classification -functions, converting to and from other formats, converting from -composed to decomposed Unicode, and trying to compare and -case-convert if you ask it to. -

            The classification functions include functions like those in -ctype.h, but operating on the full range of Unicode characters. -They all return TRUE if the character is a certain type of -character; otherwise they return FALSE. These classification -functions are isNull() (returns TRUE if the character is U+0000), -isPrint() (TRUE if the character is any sort of printable -character, including whitespace), isPunct() (any sort of -punctation), isMark() (Unicode Mark), isLetter (a letter), -isNumber() (any sort of numeric character), isLetterOrNumber(), -and isDigit() (decimal digits). All of these are wrappers around -category() which return the Unicode-defined category of each -character. -

            TQChar further provides direction(), which indicates the "natural" -writing direction of this character. The joining() function -indicates how the character joins with its neighbors (needed -mostly for Arabic) and finally mirrored(), which indicates whether -the character needs to be mirrored when it is printed in its -"unnatural" writing direction. -

            Composed Unicode characters (like å) can be converted to -decomposed Unicode ("a" followed by "ring above") by using -decomposition(). -

            In Unicode, comparison is not necessarily possible and case -conversion is very difficult at best. Unicode, covering the -"entire" world, also includes most of the world's case and sorting -problems. TQt tries, but not very hard: operator==() and friends -will do comparison based purely on the numeric Unicode value (code -point) of the characters, and upper() and lower() will do case -changes when the character has a well-defined upper/lower-case -equivalent. There is no provision for locale-dependent case -folding rules or comparison; these functions are meant to be fast -so they can be used unambiguously in data structures. (See -TQString::localeAwareCompare() though.) -

            The conversion functions include unicode() (to a scalar), latin1() -(to scalar, but converts all non-Latin-1 characters to 0), row() -(gives the Unicode row), cell() (gives the Unicode cell), -digitValue() (gives the integer value of any of the numerous digit -characters), and a host of constructors. -

            More information can be found in the document About Unicode. -

            See also TQString, TQCharRef, and Text Related Classes. - -


            Member Type Documentation

            -

            TQChar::Category

            - -

            This enum maps the Unicode character categories. -

            The following characters are normative in Unicode: -

              -
            • TQChar::Mark_NonSpacing - Unicode class name Mn -
            • TQChar::Mark_SpacingCombining - Unicode class name Mc -
            • TQChar::Mark_Enclosing - Unicode class name Me -
            • TQChar::Number_DecimalDigit - Unicode class name Nd -
            • TQChar::Number_Letter - Unicode class name Nl -
            • TQChar::Number_Other - Unicode class name No -
            • TQChar::Separator_Space - Unicode class name Zs -
            • TQChar::Separator_Line - Unicode class name Zl -
            • TQChar::Separator_Paragraph - Unicode class name Zp -
            • TQChar::Other_Control - Unicode class name Cc -
            • TQChar::Other_Format - Unicode class name Cf -
            • TQChar::Other_Surrogate - Unicode class name Cs -
            • TQChar::Other_PrivateUse - Unicode class name Co -
            • TQChar::Other_NotAssigned - Unicode class name Cn -

            The following categories are informative in Unicode: -

              -
            • TQChar::Letter_Uppercase - Unicode class name Lu -
            • TQChar::Letter_Lowercase - Unicode class name Ll -
            • TQChar::Letter_Titlecase - Unicode class name Lt -
            • TQChar::Letter_Modifier - Unicode class name Lm -
            • TQChar::Letter_Other - Unicode class name Lo -
            • TQChar::Punctuation_Connector - Unicode class name Pc -
            • TQChar::Punctuation_Dash - Unicode class name Pd -
            • TQChar::Punctuation_Open - Unicode class name Ps -
            • TQChar::Punctuation_Close - Unicode class name Pe -
            • TQChar::Punctuation_InitialQuote - Unicode class name Pi -
            • TQChar::Punctuation_FinalQuote - Unicode class name Pf -
            • TQChar::Punctuation_Other - Unicode class name Po -
            • TQChar::Symbol_Math - Unicode class name Sm -
            • TQChar::Symbol_Currency - Unicode class name Sc -
            • TQChar::Symbol_Modifier - Unicode class name Sk -
            • TQChar::Symbol_Other - Unicode class name So -

            There are two categories that are specific to TQt: -

              -
            • TQChar::NoCategory - used when TQt is dazed and confused and cannot -make sense of anything. -
            • TQChar::Punctuation_Dask - old typo alias for Punctuation_Dash -

            -

            TQChar::CombiningClass

            - -

            This enum type defines names for some of the Unicode combining -classes. See the Unicode - Standard for a description of the values. - -

            TQChar::Decomposition

            - -

            This enum type defines the Unicode decomposition attributes. See -the Unicode Standard for a -description of the values. - -

            TQChar::Direction

            - -

            This enum type defines the Unicode direction attributes. See the Unicode Standard for a -description of the values. -

            In order to conform to C/C++ naming conventions "Dir" is prepended -to the codes used in the Unicode Standard. - -

            TQChar::Joining

            - -

            This enum type defines the Unicode joining attributes. See the Unicode Standard for a -description of the values. - -


            Member Function Documentation

            -

            TQChar::TQChar () -

            - -

            Constructs a null TQChar (one that isNull()). - -

            TQChar::TQChar ( char c ) -

            - -

            Constructs a TQChar corresponding to ASCII/Latin-1 character c. - -

            TQChar::TQChar ( uchar c ) -

            - -

            Constructs a TQChar corresponding to ASCII/Latin-1 character c. - -

            TQChar::TQChar ( uchar c, uchar r ) -

            - -

            Constructs a TQChar for Unicode cell c in row r. - -

            TQChar::TQChar ( const TQChar & c ) -

            - -

            Constructs a copy of c. This is a deep copy, if such a -lightweight object can be said to have deep copies. - -

            TQChar::TQChar ( ushort rc ) -

            - -

            Constructs a TQChar for the character with Unicode code point rc. - -

            TQChar::TQChar ( short rc ) -

            - -

            Constructs a TQChar for the character with Unicode code point rc. - -

            TQChar::TQChar ( uint rc ) -

            - -

            Constructs a TQChar for the character with Unicode code point rc. - -

            TQChar::TQChar ( int rc ) -

            - -

            Constructs a TQChar for the character with Unicode code point rc. - -

            Category TQChar::category () const -

            -Returns the character category. -

            See also Category. - -

            uchar TQChar::cell () const -

            - -

            Returns the cell (least significant byte) of the Unicode -character. - -

            unsigned char TQChar::combiningClass () const -

            -Returns the combining class for the character as defined in the -Unicode standard. This is mainly useful as a positioning hint for -marks attached to a base character. -

            The TQt text rendering engine uses this information to correctly -position non spacing marks around a base character. - -

            const TQString & TQChar::decomposition () const -

            Warning: This function is not reentrant.

            - - -

            Decomposes a character into its parts. Returns TQString::null if no -decomposition exists. - -

            Decomposition TQChar::decompositionTag () const -

            -Returns the tag defining the composition of the character. Returns -TQChar::Single if no decomposition exists. - -

            int TQChar::digitValue () const -

            -Returns the numeric value of the digit, or -1 if the character is -not a digit. - -

            Direction TQChar::direction () const -

            -Returns the character's direction. -

            See also Direction. - -

            bool TQChar::isDigit () const -

            -Returns TRUE if the character is a decimal digit -(Number_DecimalDigit); otherwise returns FALSE. - -

            bool TQChar::isLetter () const -

            -Returns TRUE if the character is a letter (Letter_* categories); -otherwise returns FALSE. - -

            bool TQChar::isLetterOrNumber () const -

            -Returns TRUE if the character is a letter or number (Letter_* or -Number_* categories); otherwise returns FALSE. - -

            bool TQChar::isMark () const -

            -Returns TRUE if the character is a mark (Mark_* categories); -otherwise returns FALSE. - -

            bool TQChar::isNull () const -

            - -

            Returns TRUE if the character is the Unicode character 0x0000 -(ASCII NUL); otherwise returns FALSE. - -

            bool TQChar::isNumber () const -

            -Returns TRUE if the character is a number (of any sort - Number_* -categories); otherwise returns FALSE. -

            See also isDigit(). - -

            bool TQChar::isPrint () const -

            -Returns TRUE if the character is a printable character; otherwise -returns FALSE. This is any character not of category Cc or Cn. -

            Note that this gives no indication of whether the character is -available in a particular font. - -

            bool TQChar::isPunct () const -

            -Returns TRUE if the character is a punctuation mark (Punctuation_* -categories); otherwise returns FALSE. - -

            bool TQChar::isSpace () const -

            -Returns TRUE if the character is a separator character -(Separator_* categories); otherwise returns FALSE. - -

            bool TQChar::isSymbol () const -

            -Returns TRUE if the character is a symbol (Symbol_* categories); -otherwise returns FALSE. - -

            Joining TQChar::joining () const -

            -Warning: This function is not supported (it may change to use -Unicode character classes). -

            Returns information about the joining properties of the character -(needed for example, for Arabic). - -

            char TQChar::latin1 () const -

            - -

            Returns the Latin-1 value of this character, or 0 if it -cannot be represented in Latin-1. - -

            TQChar TQChar::lower () const -

            -Returns the lowercase equivalent if the character is uppercase; -otherwise returns the character itself. - -

            bool TQChar::mirrored () const -

            -Returns TRUE if the character is a mirrored character (one that -should be reversed if the text direction is reversed); otherwise -returns FALSE. - -

            TQChar TQChar::mirroredChar () const -

            -Returns the mirrored character if this character is a mirrored -character, otherwise returns the character itself. - -

            bool TQChar::networkOrdered () [static] -

            - -

            This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. -

            Returns TRUE if this character is in network byte order (MSB -first); otherwise returns FALSE. This is platform dependent. - -

            TQChar::operator char () const -

            - -

            Returns the Latin-1 character equivalent to the TQChar, or 0. This -is mainly useful for non-internationalized software. -

            See also unicode(). - -

            uchar TQChar::row () const -

            - -

            Returns the row (most significant byte) of the Unicode character. - -

            ushort TQChar::unicode () const -

            - -

            Returns the numeric Unicode value equal to the TQChar. Normally, -you should use TQChar objects as they are equivalent, but for some -low-level tasks (e.g. indexing into an array of Unicode -information), this function is useful. - -

            ushort & TQChar::unicode () -

            - -

            This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

            Returns a reference to the numeric Unicode value equal to the -TQChar. - -

            TQChar TQChar::upper () const -

            -Returns the uppercase equivalent if the character is lowercase; -otherwise returns the character itself. - -

            Related Functions

            -

            int operator!= ( TQChar c1, TQChar c2 ) -

            - -

            -

            Returns TRUE if c1 and c2 are not the same Unicode -character; otherwise returns FALSE. - -

            int operator!= ( char ch, TQChar c ) -

            - -

            This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

            -

            Returns TRUE if c is not the ASCII/Latin-1 character ch; -otherwise returns FALSE. - -

            int operator!= ( TQChar c, char ch ) -

            - -

            This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

            -

            Returns TRUE if c is not the ASCII/Latin-1 character ch; -otherwise returns FALSE. - -

            int operator< ( TQChar c1, TQChar c2 ) -

            - -

            -

            Returns TRUE if the numeric Unicode value of c1 is less than -that of c2; otherwise returns FALSE. - -

            int operator< ( TQChar c, char ch ) -

            - -

            This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

            -

            Returns TRUE if the numeric Unicode value of c is less than that -of the ASCII/Latin-1 character ch; otherwise returns FALSE. - -

            int operator< ( char ch, TQChar c ) -

            - -

            This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

            -

            Returns TRUE if the numeric Unicode value of the ASCII/Latin-1 -character ch is less than that of c; otherwise returns -FALSE. - -

            int operator<= ( TQChar c1, TQChar c2 ) -

            - -

            -

            Returns TRUE if the numeric Unicode value of c1 is less than -that of c2, or they are the same Unicode character; otherwise -returns FALSE. - -

            int operator<= ( TQChar c, char ch ) -

            - -

            This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

            -

            Returns TRUE if the numeric Unicode value of c is less than or -equal to that of the ASCII/Latin-1 character ch; otherwise -returns FALSE. - -

            int operator<= ( char ch, TQChar c ) -

            - -

            This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

            -

            Returns TRUE if the numeric Unicode value of the ASCII/Latin-1 -character ch is less than or equal to that of c; otherwise -returns FALSE. - -

            bool operator== ( TQChar c1, TQChar c2 ) -

            - -

            -

            Returns TRUE if c1 and c2 are the same Unicode character; -otherwise returns FALSE. - -

            bool operator== ( char ch, TQChar c ) -

            - -

            This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

            -

            Returns TRUE if c is the ASCII/Latin-1 character ch; -otherwise returns FALSE. - -

            bool operator== ( TQChar c, char ch ) -

            - -

            This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

            -

            Returns TRUE if c is the ASCII/Latin-1 character ch; -otherwise returns FALSE. - -

            int operator> ( TQChar c1, TQChar c2 ) -

            - -

            -

            Returns TRUE if the numeric Unicode value of c1 is greater than -that of c2; otherwise returns FALSE. - -

            int operator> ( TQChar c, char ch ) -

            - -

            This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

            -

            Returns TRUE if the numeric Unicode value of c is greater than -that of the ASCII/Latin-1 character ch; otherwise returns FALSE. - -

            int operator> ( char ch, TQChar c ) -

            - -

            This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

            -

            Returns TRUE if the numeric Unicode value of the ASCII/Latin-1 -character ch is greater than that of c; otherwise returns -FALSE. - -

            int operator>= ( TQChar c1, TQChar c2 ) -

            - -

            -

            Returns TRUE if the numeric Unicode value of c1 is greater than -that of c2, or they are the same Unicode character; otherwise -returns FALSE. - -

            int operator>= ( TQChar c, char ch ) -

            - -

            This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

            -

            Returns TRUE if the numeric Unicode value of c is greater than -or equal to that of the ASCII/Latin-1 character ch; otherwise -returns FALSE. - -

            int operator>= ( char ch, TQChar c ) -

            - -

            This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

            -

            Returns TRUE if the numeric Unicode value of the ASCII/Latin-1 -character ch is greater than or equal to that of c; -otherwise returns FALSE. - - -


            -This file is part of the TQt toolkit. -Copyright © 1995-2007 -Trolltech. All Rights Reserved.


            - -
            Copyright © 2007 -TrolltechTrademarks -
            TQt 3.3.8
            -
            - diff --git a/doc/html/qcharref-members.html b/doc/html/qcharref-members.html deleted file mode 100644 index 8dc1a07ad..000000000 --- a/doc/html/qcharref-members.html +++ /dev/null @@ -1,46 +0,0 @@ - - - - - -TQCharRef Member List - - - - - - - -
            - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

            Complete Member List for TQCharRef

            - -

            This is the complete list of member functions for -TQCharRef, including inherited members. - -

              -
            - -


            - -
            Copyright © 2007 -TrolltechTrademarks -
            TQt 3.3.8
            -
            - diff --git a/doc/html/qcharref.html b/doc/html/qcharref.html deleted file mode 100644 index d83b1c959..000000000 --- a/doc/html/qcharref.html +++ /dev/null @@ -1,64 +0,0 @@ - - - - - -TQCharRef Class - - - - - - - -
            - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

            TQCharRef Class Reference

            - -

            The TQCharRef class is a helper class for TQString. -More... -

            All the functions in this class are reentrant when TQt is built with thread support.

            -

            #include <tqstring.h> -

            List of all member functions. -


            Detailed Description

            - - - -The TQCharRef class is a helper class for TQString. -

            -

            When you get an object of type TQCharRef, if you can assign to it, -the assignment will apply to the character in the string from -which you got the reference. That is its whole purpose in life. -The TQCharRef becomes invalid once modifications are made to the -string: if you want to keep the character, copy it into a TQChar. -

            Most of the TQChar member functions also exist in TQCharRef. -However, they are not explicitly documented here. -

            See also TQString::operator[](), TQString::at(), TQChar, and Text Related Classes. - - -


            -This file is part of the TQt toolkit. -Copyright © 1995-2007 -Trolltech. All Rights Reserved.


            - -
            Copyright © 2007 -TrolltechTrademarks -
            TQt 3.3.8
            -
            - diff --git a/doc/html/qconststring-members.html b/doc/html/qconststring-members.html deleted file mode 100644 index 6b3d678d7..000000000 --- a/doc/html/qconststring-members.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - - -TQConstString Member List - - - - - - - -
            - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

            Complete Member List for TQConstString

            - -

            This is the complete list of member functions for -TQConstString, including inherited members. - -

            - -


            - -
            Copyright © 2007 -TrolltechTrademarks -
            TQt 3.3.8
            -
            - diff --git a/doc/html/qconststring.html b/doc/html/qconststring.html deleted file mode 100644 index 9872a566c..000000000 --- a/doc/html/qconststring.html +++ /dev/null @@ -1,91 +0,0 @@ - - - - - -TQConstString Class - - - - - - - -
            - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

            TQConstString Class Reference

            - -

            The TQConstString class provides string objects using constant Unicode data. -More... -

            All the functions in this class are reentrant when TQt is built with thread support.

            -

            #include <tqstring.h> -

            List of all member functions. -

            Public Members

            - -

            Detailed Description

            - - - - -The TQConstString class provides string objects using constant Unicode data. -

            In order to minimize copying, highly optimized applications can -use TQConstString to provide a TQString-compatible object from -existing Unicode data. It is then the programmer's responsibility -to ensure that the Unicode data exists for the entire lifetime of -the TQConstString object. -

            A TQConstString is created with the TQConstString constructor. The -string held by the object can be obtained by calling string(). -

            See also Text Related Classes. - -


            Member Function Documentation

            -

            TQConstString::TQConstString ( const TQChar * unicode, uint length ) -

            -Constructs a TQConstString that uses the first length Unicode -characters in the array unicode. Any attempt to modify copies -of the string will cause it to create a copy of the data, thus it -remains forever unmodified. -

            The data in unicode is not copied. The caller must be able to -guarantee that unicode will not be deleted or modified. - -

            TQConstString::~TQConstString () -

            -Destroys the TQConstString, creating a copy of the data if other -strings are still using it. - -

            const TQString & TQConstString::string () const -

            - -

            Returns a constant string referencing the data passed during -construction. - - -


            -This file is part of the TQt toolkit. -Copyright © 1995-2007 -Trolltech. All Rights Reserved.


            - -
            Copyright © 2007 -TrolltechTrademarks -
            TQt 3.3.8
            -
            - diff --git a/doc/html/qfd-example.html b/doc/html/qfd-example.html index 45598e7a5..9690f9480 100644 --- a/doc/html/qfd-example.html +++ b/doc/html/qfd-example.html @@ -105,7 +105,7 @@ public: #include <tqpainter.h> #include <tqtoolbar.h> #include <tqstatusbar.h> -#include <ntqlabel.h> +#include <tqlabel.h> #include <ntqpushbutton.h> #include <tqfontdialog.h> #include <stdlib.h> @@ -165,7 +165,7 @@ TQSize FontRowTable::cellSize() const int x = i*cell.width(); int y = j*cell.height(); - TQChar ch = TQChar(j*16+i,row); + TQChar ch = TQChar(j*16+i,row); if ( fm.inFont(ch) ) { int w = fm.width(ch); @@ -232,7 +232,7 @@ void FontRowTable::chooseFont() { FontRowTable* table = new FontRowTable(this); TQToolBar* controls = new TQToolBar(this); - (void) new TQLabel(tr("Row:"), controls); + (void) new TQLabel(tr("Row:"), controls); TQSpinBox *row = new TQSpinBox(0,255,1,controls); controls->addSeparator(); TQPushButton *fontbutton = new TQPushButton(tr("Font..."), controls); diff --git a/doc/html/qgridlayout.html b/doc/html/qgridlayout.html index fbc85c46d..7e6fd4035 100644 --- a/doc/html/qgridlayout.html +++ b/doc/html/qgridlayout.html @@ -110,7 +110,7 @@ from the layout until TQWidget::show() is calle three-row grid (the grid is shown overlaid in magenta):

            Columns 0, 2 and 4 in this dialog fragment are made up of a -TQLabel, a TQLineEdit, and a TQListBox. Columns 1 and 3 are +TQLabel, a TQLineEdit, and a TQListBox. Columns 1 and 3 are placeholders made with addColSpacing(). Row 0 consists of three TQLabel objects, row 1 of three TQLineEdit objects and row 2 of three TQListBox objects. We used placeholder columns (1 and 3) to diff --git a/doc/html/qlabel-h.html b/doc/html/qlabel-h.html deleted file mode 100644 index e5ef73951..000000000 --- a/doc/html/qlabel-h.html +++ /dev/null @@ -1,219 +0,0 @@ - - - - - -ntqlabel.h Include File - - - - - - - -
            - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

            ntqlabel.h

            - -

            This is the verbatim text of the ntqlabel.h include file. It is provided only for illustration; the copyright remains with Trolltech. -


            -
            -/**********************************************************************
            -** $Id: qt/ntqlabel.h   3.3.8   edited Jan 11 14:38 $
            -**
            -** Definition of TQLabel widget class
            -**
            -** Created : 941215
            -**
            -** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
            -**
            -** This file is part of the widgets module of the TQt GUI Toolkit.
            -**
            -** This file may be used under the terms of the GNU General Public
            -** License versions 2.0 or 3.0 as published by the Free Software
            -** Foundation and appearing in the file LICENSE.GPL included in the
            -** packaging of this file. Alternatively you may (at your option) use any
            -** later version of the GNU General Public License if such license has
            -** been publicly approved by Trolltech ASA (or its successors, if any)
            -** and the KDE Free TQt Foundation.
            -**
            -** Please review the following information to ensure GNU General
            -** Public Licensing requirements will be met:
            -** http://trolltech.com/products/qt/licenses/licensing/opensource/.
            -** If you are unsure which license is appropriate for your use, please
            -** review the following information:
            -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
            -** or contact the sales department at sales@trolltech.com.
            -**
            -** This file may be used under the terms of the Q Public License as
            -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
            -** included in the packaging of this file.  Licensees holding valid TQt
            -** Commercial licenses may use this file in accordance with the TQt
            -** Commercial License Agreement provided with the Software.
            -**
            -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
            -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
            -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
            -** herein.
            -**
            -**********************************************************************/
            -
            -#ifndef TQLABEL_H
            -#define TQLABEL_H
            -
            -#ifndef QT_H
            -#include "ntqframe.h"
            -#endif // QT_H
            -
            -#ifndef TQT_NO_LABEL
            -
            -class TQSimpleRichText;
            -class TQLabelPrivate;
            -
            -class TQ_EXPORT TQLabel : public TQFrame
            -{
            -    TQ_OBJECT
            -    TQ_PROPERTY( TQString text READ text WRITE setText )
            -    TQ_PROPERTY( TextFormat textFormat READ textFormat WRITE setTextFormat )
            -    TQ_PROPERTY( TQPixmap pixmap READ pixmap WRITE setPixmap )
            -    TQ_PROPERTY( bool scaledContents READ hasScaledContents WRITE setScaledContents )
            -    TQ_PROPERTY( Alignment alignment READ alignment WRITE setAlignment )
            -    TQ_PROPERTY( int indent READ indent WRITE setIndent )
            -    TQ_OVERRIDE( BackgroundMode backgroundMode DESIGNABLE true)
            -
            -public:
            -    TQLabel( TQWidget *parent, const char* name=0, WFlags f=0 );
            -    TQLabel( const TQString &text, TQWidget *parent, const char* name=0,
            -	    WFlags f=0 );
            -    TQLabel( TQWidget *buddy, const TQString &,
            -	    TQWidget *parent, const char* name=0, WFlags f=0 );
            -    ~TQLabel();
            -
            -    TQString	 text()		const	{ return ltext; }
            -    TQPixmap     *pixmap()	const	{ return lpixmap; }
            -#ifndef TQT_NO_PICTURE
            -    TQPicture    *picture()	const	{ return lpicture; }
            -#endif
            -#ifndef TQT_NO_MOVIE
            -    TQMovie      *movie()		const;
            -#endif
            -
            -    TextFormat textFormat() const;
            -    void 	 setTextFormat( TextFormat );
            -
            -    int		 alignment() const	{ return align; }
            -    virtual void setAlignment( int );
            -    int		 indent() const		{ return extraMargin; }
            -    void 	 setIndent( int );
            -
            -    bool 	 autoResize() const	{ return autoresize; }
            -    virtual void setAutoResize( bool );
            -#ifndef TQT_NO_IMAGE_SMOOTHSCALE
            -    bool 	hasScaledContents() const;
            -    void 	setScaledContents( bool );
            -#endif
            -    TQSize	 sizeHint() const;
            -    TQSize	 minimumSizeHint() const;
            -#ifndef TQT_NO_ACCEL
            -    virtual void setBuddy( TQWidget * );
            -    TQWidget     *buddy() const;
            -#endif
            -    int		 heightForWidth(int) const;
            -
            -    void setFont( const TQFont &f );
            -
            -public slots:
            -    virtual void setText( const TQString &);
            -    virtual void setPixmap( const TQPixmap & );
            -#ifndef TQT_NO_PICTURE
            -    virtual void setPicture( const TQPicture & );
            -#endif
            -#ifndef TQT_NO_MOVIE
            -    virtual void setMovie( const TQMovie & );
            -#endif
            -    virtual void setNum( int );
            -    virtual void setNum( double );
            -    void	 clear();
            -
            -protected:
            -    void	 drawContents( TQPainter * );
            -    void	 fontChange( const TQFont & );
            -    void	 resizeEvent( TQResizeEvent* );
            -
            -private slots:
            -#ifndef TQT_NO_ACCEL
            -    void	 acceleratorSlot();
            -    void	 buddyDied();
            -#endif
            -#ifndef TQT_NO_MOVIE
            -    void	 movieUpdated(const TQRect&);
            -    void	 movieResized(const TQSize&);
            -#endif
            -
            -private:
            -    void	init();
            -    void	clearContents();
            -    void	updateLabel( TQSize oldSizeHint );
            -    TQSize	sizeForWidth( int w ) const;
            -    TQString	ltext;
            -    TQPixmap    *lpixmap;
            -#ifndef TQT_NO_PICTURE
            -    TQPicture   *lpicture;
            -#endif
            -#ifndef TQT_NO_MOVIE
            -    TQMovie *	lmovie;
            -#endif
            -#ifndef TQT_NO_ACCEL
            -    TQWidget *	lbuddy;
            -#endif
            -    ushort	align;
            -    short	extraMargin;
            -    uint	autoresize:1;
            -    uint	scaledcontents :1;
            -    TextFormat textformat;
            -#ifndef TQT_NO_RICHTEXT
            -    TQSimpleRichText* doc;
            -#endif
            -#ifndef TQT_NO_ACCEL
            -    TQAccel *	accel;
            -#endif
            -    TQLabelPrivate* d;
            -
            -    friend class TQTipLabel;
            -
            -private:	// Disabled copy constructor and operator=
            -#if defined(TQ_DISABLE_COPY)
            -    TQLabel( const TQLabel & );
            -    TQLabel &operator=( const TQLabel & );
            -#endif
            -};
            -
            -
            -#endif // TQT_NO_LABEL
            -
            -#endif // TQLABEL_H
            -
            - -


            - -
            Copyright © 2007 -TrolltechTrademarks -
            TQt 3.3.8
            -
            - diff --git a/doc/html/qlabel-m.png b/doc/html/qlabel-m.png deleted file mode 100644 index 9747821a1..000000000 Binary files a/doc/html/qlabel-m.png and /dev/null differ diff --git a/doc/html/qlabel-members.html b/doc/html/qlabel-members.html deleted file mode 100644 index c10877e25..000000000 --- a/doc/html/qlabel-members.html +++ /dev/null @@ -1,378 +0,0 @@ - - - - - -TQLabel Member List - - - - - - - -
            - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

            Complete Member List for TQLabel

            - -

            This is the complete list of member functions for -TQLabel, including inherited members. - -

            - -


            - -
            Copyright © 2007 -TrolltechTrademarks -
            TQt 3.3.8
            -
            - diff --git a/doc/html/qlabel-w.png b/doc/html/qlabel-w.png deleted file mode 100644 index 9747821a1..000000000 Binary files a/doc/html/qlabel-w.png and /dev/null differ diff --git a/doc/html/qlocale-h.html b/doc/html/qlocale-h.html deleted file mode 100644 index 7fa22ebf6..000000000 --- a/doc/html/qlocale-h.html +++ /dev/null @@ -1,539 +0,0 @@ - - - - - -ntqlocale.h Include File - - - - - - - -
            - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

            ntqlocale.h

            - -

            This is the verbatim text of the ntqlocale.h include file. It is provided only for illustration; the copyright remains with Trolltech. -


            -
            -/****************************************************************************
            -** $Id: qt/ntqlocale.h   3.3.8   edited Jan 11 14:38 $
            -**
            -** Declaration of the TQLocale class
            -**
            -** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
            -**
            -** This file is part of the tools module of the TQt GUI Toolkit.
            -**
            -** This file may be used under the terms of the GNU General Public
            -** License versions 2.0 or 3.0 as published by the Free Software
            -** Foundation and appearing in the file LICENSE.GPL included in the
            -** packaging of this file. Alternatively you may (at your option) use any
            -** later version of the GNU General Public License if such license has
            -** been publicly approved by Trolltech ASA (or its successors, if any)
            -** and the KDE Free TQt Foundation.
            -**
            -** Please review the following information to ensure GNU General
            -** Public Licensing requirements will be met:
            -** http://trolltech.com/products/qt/licenses/licensing/opensource/.
            -** If you are unsure which license is appropriate for your use, please
            -** review the following information:
            -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
            -** or contact the sales department at sales@trolltech.com.
            -**
            -** This file may be used under the terms of the Q Public License as
            -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
            -** included in the packaging of this file.  Licensees holding valid TQt
            -** Commercial licenses may use this file in accordance with the TQt
            -** Commercial License Agreement provided with the Software.
            -**
            -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
            -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
            -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
            -** herein.
            -**
            -**********************************************************************/
            -
            -#ifndef TQLOCALE_H
            -#define TQLOCALE_H
            -
            -#include "tqstring.h"
            -
            -struct TQLocalePrivate;
            -
            -class TQ_EXPORT TQLocale
            -{
            -    friend class TQString;
            -
            -public:
            -    enum Language {
            -        C = 1,
            -        Abkhazian = 2,
            -        Afan = 3,
            -        Afar = 4,
            -        Afrikaans = 5,
            -        Albanian = 6,
            -        Amharic = 7,
            -        Arabic = 8,
            -        Armenian = 9,
            -        Assamese = 10,
            -        Aymara = 11,
            -        Azerbaijani = 12,
            -        Bashkir = 13,
            -        Basque = 14,
            -        Bengali = 15,
            -        Bhutani = 16,
            -        Bihari = 17,
            -        Bislama = 18,
            -        Breton = 19,
            -        Bulgarian = 20,
            -        Burmese = 21,
            -        Byelorussian = 22,
            -        Cambodian = 23,
            -        Catalan = 24,
            -        Chinese = 25,
            -        Corsican = 26,
            -        Croatian = 27,
            -        Czech = 28,
            -        Danish = 29,
            -        Dutch = 30,
            -        English = 31,
            -        Esperanto = 32,
            -        Estonian = 33,
            -        Faroese = 34,
            -        FijiLanguage = 35,
            -        Finnish = 36,
            -        French = 37,
            -        Frisian = 38,
            -        Gaelic = 39,
            -        Galician = 40,
            -        Georgian = 41,
            -        German = 42,
            -        Greek = 43,
            -        Greenlandic = 44,
            -        Guarani = 45,
            -        Gujarati = 46,
            -        Hausa = 47,
            -        Hebrew = 48,
            -        Hindi = 49,
            -        Hungarian = 50,
            -        Icelandic = 51,
            -        Indonesian = 52,
            -        Interlingua = 53,
            -        Interlingue = 54,
            -        Inuktitut = 55,
            -        Inupiak = 56,
            -        Irish = 57,
            -        Italian = 58,
            -        Japanese = 59,
            -        Javanese = 60,
            -        Kannada = 61,
            -        Kashmiri = 62,
            -        Kazakh = 63,
            -        Kinyarwanda = 64,
            -        Kirghiz = 65,
            -        Korean = 66,
            -        Kurdish = 67,
            -        Kurundi = 68,
            -        Laothian = 69,
            -        Latin = 70,
            -        Latvian = 71,
            -        Lingala = 72,
            -        Lithuanian = 73,
            -        Macedonian = 74,
            -        Malagasy = 75,
            -        Malay = 76,
            -        Malayalam = 77,
            -        Maltese = 78,
            -        Maori = 79,
            -        Marathi = 80,
            -        Moldavian = 81,
            -        Mongolian = 82,
            -        NauruLanguage = 83,
            -        Nepali = 84,
            -        Norwegian = 85,
            -        Occitan = 86,
            -        Oriya = 87,
            -        Pashto = 88,
            -        Persian = 89,
            -        Polish = 90,
            -        Portuguese = 91,
            -        Punjabi = 92,
            -        Quechua = 93,
            -        RhaetoRomance = 94,
            -        Romanian = 95,
            -        Russian = 96,
            -        Samoan = 97,
            -        Sangho = 98,
            -        Sanskrit = 99,
            -        Serbian = 100,
            -        SerboCroatian = 101,
            -        Sesotho = 102,
            -        Setswana = 103,
            -        Shona = 104,
            -        Sindhi = 105,
            -        Singhalese = 106,
            -        Siswati = 107,
            -        Slovak = 108,
            -        Slovenian = 109,
            -        Somali = 110,
            -        Spanish = 111,
            -        Sundanese = 112,
            -        Swahili = 113,
            -        Swedish = 114,
            -        Tagalog = 115,
            -        Tajik = 116,
            -        Tamil = 117,
            -        Tatar = 118,
            -        Telugu = 119,
            -        Thai = 120,
            -        Tibetan = 121,
            -        Tigrinya = 122,
            -        TongaLanguage = 123,
            -        Tsonga = 124,
            -        Turkish = 125,
            -        Turkmen = 126,
            -        Twi = 127,
            -        Uigur = 128,
            -        Ukrainian = 129,
            -        Urdu = 130,
            -        Uzbek = 131,
            -        Vietnamese = 132,
            -        Volapuk = 133,
            -        Welsh = 134,
            -        Wolof = 135,
            -        Xhosa = 136,
            -        Yiddish = 137,
            -        Yoruba = 138,
            -        Zhuang = 139,
            -        Zulu = 140,
            -        LastLanguage = Zulu
            -    };
            -
            -    enum Country {
            -        AnyCountry = 0,
            -        Afghanistan = 1,
            -        Albania = 2,
            -        Algeria = 3,
            -        AmericanSamoa = 4,
            -        Andorra = 5,
            -        Angola = 6,
            -        Anguilla = 7,
            -        Antarctica = 8,
            -        AntiguaAndBarbuda = 9,
            -        Argentina = 10,
            -        Armenia = 11,
            -        Aruba = 12,
            -        Australia = 13,
            -        Austria = 14,
            -        Azerbaijan = 15,
            -        Bahamas = 16,
            -        Bahrain = 17,
            -        Bangladesh = 18,
            -        Barbados = 19,
            -        Belarus = 20,
            -        Belgium = 21,
            -        Belize = 22,
            -        Benin = 23,
            -        Bermuda = 24,
            -        Bhutan = 25,
            -        Bolivia = 26,
            -        BosniaAndHerzegowina = 27,
            -        Botswana = 28,
            -        BouvetIsland = 29,
            -        Brazil = 30,
            -        BritishIndianOceanTerritory = 31,
            -        BruneiDarussalam = 32,
            -        Bulgaria = 33,
            -        BurkinaFaso = 34,
            -        Burundi = 35,
            -        Cambodia = 36,
            -        Cameroon = 37,
            -        Canada = 38,
            -        CapeVerde = 39,
            -        CaymanIslands = 40,
            -        CentralAfricanRepublic = 41,
            -        Chad = 42,
            -        Chile = 43,
            -        China = 44,
            -        ChristmasIsland = 45,
            -        CocosIslands = 46,
            -        Colombia = 47,
            -        Comoros = 48,
            -        DemocraticRepublicOfCongo = 49,
            -        PeoplesRepublicOfCongo = 50,
            -        CookIslands = 51,
            -        CostaRica = 52,
            -        IvoryCoast = 53,
            -        Croatia = 54,
            -        Cuba = 55,
            -        Cyprus = 56,
            -        CzechRepublic = 57,
            -        Denmark = 58,
            -        Djibouti = 59,
            -        Dominica = 60,
            -        DominicanRepublic = 61,
            -        EastTimor = 62,
            -        Ecuador = 63,
            -        Egypt = 64,
            -        ElSalvador = 65,
            -        EquatorialGuinea = 66,
            -        Eritrea = 67,
            -        Estonia = 68,
            -        Ethiopia = 69,
            -        FalklandIslands = 70,
            -        FaroeIslands = 71,
            -        FijiCountry = 72,
            -        Finland = 73,
            -        France = 74,
            -        MetropolitanFrance = 75,
            -        FrenchGuiana = 76,
            -        FrenchPolynesia = 77,
            -        FrenchSouthernTerritories = 78,
            -        Gabon = 79,
            -        Gambia = 80,
            -        Georgia = 81,
            -        Germany = 82,
            -        Ghana = 83,
            -        Gibraltar = 84,
            -        Greece = 85,
            -        Greenland = 86,
            -        Grenada = 87,
            -        Guadeloupe = 88,
            -        Guam = 89,
            -        Guatemala = 90,
            -        Guinea = 91,
            -        GuineaBissau = 92,
            -        Guyana = 93,
            -        Haiti = 94,
            -        HeardAndMcDonaldIslands = 95,
            -        Honduras = 96,
            -        HongKong = 97,
            -        Hungary = 98,
            -        Iceland = 99,
            -        India = 100,
            -        Indonesia = 101,
            -        Iran = 102,
            -        Iraq = 103,
            -        Ireland = 104,
            -        Israel = 105,
            -        Italy = 106,
            -        Jamaica = 107,
            -        Japan = 108,
            -        Jordan = 109,
            -        Kazakhstan = 110,
            -        Kenya = 111,
            -        Kiribati = 112,
            -        DemocraticRepublicOfKorea = 113,
            -        RepublicOfKorea = 114,
            -        Kuwait = 115,
            -        Kyrgyzstan = 116,
            -        Lao = 117,
            -        Latvia = 118,
            -        Lebanon = 119,
            -        Lesotho = 120,
            -        Liberia = 121,
            -        LibyanArabJamahiriya = 122,
            -        Liechtenstein = 123,
            -        Lithuania = 124,
            -        Luxembourg = 125,
            -        Macau = 126,
            -        Macedonia = 127,
            -        Madagascar = 128,
            -        Malawi = 129,
            -        Malaysia = 130,
            -        Maldives = 131,
            -        Mali = 132,
            -        Malta = 133,
            -        MarshallIslands = 134,
            -        Martinique = 135,
            -        Mauritania = 136,
            -        Mauritius = 137,
            -        Mayotte = 138,
            -        Mexico = 139,
            -        Micronesia = 140,
            -        Moldova = 141,
            -        Monaco = 142,
            -        Mongolia = 143,
            -        Montserrat = 144,
            -        Morocco = 145,
            -        Mozambique = 146,
            -        Myanmar = 147,
            -        Namibia = 148,
            -        NauruCountry = 149,
            -        Nepal = 150,
            -        Netherlands = 151,
            -        NetherlandsAntilles = 152,
            -        NewCaledonia = 153,
            -        NewZealand = 154,
            -        Nicaragua = 155,
            -        Niger = 156,
            -        Nigeria = 157,
            -        Niue = 158,
            -        NorfolkIsland = 159,
            -        NorthernMarianaIslands = 160,
            -        Norway = 161,
            -        Oman = 162,
            -        Pakistan = 163,
            -        Palau = 164,
            -        PalestinianTerritory = 165,
            -        Panama = 166,
            -        PapuaNewGuinea = 167,
            -        Paraguay = 168,
            -        Peru = 169,
            -        Philippines = 170,
            -        Pitcairn = 171,
            -        Poland = 172,
            -        Portugal = 173,
            -        PuertoRico = 174,
            -        Qatar = 175,
            -        Reunion = 176,
            -        Romania = 177,
            -        RussianFederation = 178,
            -        Rwanda = 179,
            -        SaintKittsAndNevis = 180,
            -        StLucia = 181,
            -        StVincentAndTheGrenadines = 182,
            -        Samoa = 183,
            -        SanMarino = 184,
            -        SaoTomeAndPrincipe = 185,
            -        SaudiArabia = 186,
            -        Senegal = 187,
            -        Seychelles = 188,
            -        SierraLeone = 189,
            -        Singapore = 190,
            -        Slovakia = 191,
            -        Slovenia = 192,
            -        SolomonIslands = 193,
            -        Somalia = 194,
            -        SouthAfrica = 195,
            -        SouthGeorgiaAndTheSouthSandwichIslands = 196,
            -        Spain = 197,
            -        SriLanka = 198,
            -        StHelena = 199,
            -        StPierreAndMiquelon = 200,
            -        Sudan = 201,
            -        Suriname = 202,
            -        SvalbardAndJanMayenIslands = 203,
            -        Swaziland = 204,
            -        Sweden = 205,
            -        Switzerland = 206,
            -        SyrianArabRepublic = 207,
            -        Taiwan = 208,
            -        Tajikistan = 209,
            -        Tanzania = 210,
            -        Thailand = 211,
            -        Togo = 212,
            -        Tokelau = 213,
            -        TongaCountry = 214,
            -        TrinidadAndTobago = 215,
            -        Tunisia = 216,
            -        Turkey = 217,
            -        Turkmenistan = 218,
            -        TurksAndCaicosIslands = 219,
            -        Tuvalu = 220,
            -        Uganda = 221,
            -        Ukraine = 222,
            -        UnitedArabEmirates = 223,
            -        UnitedKingdom = 224,
            -        UnitedStates = 225,
            -        UnitedStatesMinorOutlyingIslands = 226,
            -        Uruguay = 227,
            -        Uzbekistan = 228,
            -        Vanuatu = 229,
            -        VaticanCityState = 230,
            -        Venezuela = 231,
            -        VietNam = 232,
            -        BritishVirginIslands = 233,
            -        USVirginIslands = 234,
            -        WallisAndFutunaIslands = 235,
            -        WesternSahara = 236,
            -        Yemen = 237,
            -        Yugoslavia = 238,
            -        Zambia = 239,
            -        Zimbabwe = 240,
            -        LastCountry = Zimbabwe
            -    };
            -
            -    TQLocale();
            -    TQLocale(const TQString &name);
            -    TQLocale(Language language, Country country = AnyCountry);
            -    TQLocale(const TQLocale &other);
            -
            -    TQLocale &operator=(const TQLocale &other);
            -
            -    Language language() const;
            -    Country country() const;
            -    TQString name() const;
            -
            -    short toShort(const TQString &s, bool *ok = 0) const;
            -    ushort toUShort(const TQString &s, bool *ok = 0) const;
            -    int toInt(const TQString &s, bool *ok = 0) const;
            -    uint toUInt(const TQString &s, bool *ok = 0) const;
            -    TQ_LONG toLong(const TQString &s, bool *ok = 0) const;
            -    TQ_ULONG toULong(const TQString &s, bool *ok = 0) const;
            -    TQ_LLONG toLongLong(const TQString &s, bool *ok = 0) const;
            -    TQ_ULLONG toULongLong(const TQString &s, bool *ok = 0) const;
            -    float toFloat(const TQString &s, bool *ok = 0) const;
            -    double toDouble(const TQString &s, bool *ok = 0) const;
            -
            -    TQString toString(short i) const
            -    { return toString((TQ_LLONG)i); }
            -    TQString toString(ushort i) const
            -    { return toString((TQ_ULLONG)i); }
            -    TQString toString(int i) const
            -    { return toString((TQ_LLONG)i); }
            -    TQString toString(uint i) const
            -    { return toString((TQ_ULLONG)i); }
            -#if !defined(Q_OS_WIN64)
            -    TQString toString(TQ_LONG i) const
            -    { return toString((TQ_LLONG)i); }
            -    TQString toString(TQ_ULONG i) const
            -    { return toString((TQ_ULLONG)i); }
            -#endif
            -    TQString toString(TQ_LLONG i) const;
            -    TQString toString(TQ_ULLONG i) const;
            -    TQString toString(float i, char f = 'g', int prec = 6) const
            -    { return toString((double) i, f, prec); }
            -    TQString toString(double i, char f = 'g', int prec = 6) const;
            -
            -    static TQString languageToString(Language language);
            -    static TQString countryToString(Country country);
            -    static void setDefault(const TQLocale &locale);
            -
            -    static TQLocale c() { return TQLocale(C); }
            -    static TQLocale system();
            -
            -private:
            -    const TQLocalePrivate *d;
            -    static const TQLocalePrivate *default_d;
            -};
            -
            -#endif
            -
            - -


            - -
            Copyright © 2007 -TrolltechTrademarks -
            TQt 3.3.8
            -
            - diff --git a/doc/html/qlocale-members.html b/doc/html/qlocale-members.html deleted file mode 100644 index 2b3cdb43c..000000000 --- a/doc/html/qlocale-members.html +++ /dev/null @@ -1,67 +0,0 @@ - - - - - -TQLocale Member List - - - - - - - -
            - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

            Complete Member List for TQLocale

            - -

            This is the complete list of member functions for -TQLocale, including inherited members. - -

            - -


            - -
            Copyright © 2007 -TrolltechTrademarks -
            TQt 3.3.8
            -
            - diff --git a/doc/html/qmag-example.html b/doc/html/qmag-example.html index 5debea21f..3e8f4f0ba 100644 --- a/doc/html/qmag-example.html +++ b/doc/html/qmag-example.html @@ -56,7 +56,7 @@ magnified area as a .bmp file. #include <ntqpushbutton.h> #include <tqpixmap.h> #include <tqimage.h> -#include <ntqlabel.h> +#include <tqlabel.h> #include <tqfiledialog.h> #include <tqregexp.h> @@ -98,7 +98,7 @@ private: TQPixmap pm; // pixmap, magnified TQPixmap p; // pixmap TQImage image; // image of pixmap (for RGB) - TQLabel *rgb; + TQLabel *rgb; int yoffset; // pixels in addition to the actual picture int z; // magnification factor int r; // autorefresh rate (index into refreshrates) @@ -185,10 +185,10 @@ static const int timer[] = { setRefresh(1); setZoom(5); - rgb = new TQLabel( this ); + rgb = new TQLabel( this ); TQ_CHECK_PTR( rgb ); - rgb->setText( "" ); - rgb->setAlignment( AlignVCenter ); + rgb->setText( "" ); + rgb->setAlignment( AlignVCenter ); rgb->resize( width(), rgb->fontMetrics().height() + 4 ); #ifdef COMPLEX_GUI @@ -369,7 +369,7 @@ void MagWidget::grabAround(TQPoint pos) if ( grabbing || pm.isNull() || e->pos().y() > height() - (zoom ? zoom->fontMetrics().height() - 4 : 0) || e->pos().y() < (zoom ? zoom->height()+4 : 4) ) { - rgb->setText( "" ); + rgb->setText( "" ); } else { int x,y; x = e->pos().x() / z; @@ -385,14 +385,14 @@ void MagWidget::grabAround(TQPoint pos) TQString label; label.sprintf( "x=%d, y=%d %s", x+grabx, y+graby, (const char*)pixelinfo ); - rgb->setText( label ); + rgb->setText( label ); } } void MagWidget::focusOutEvent( TQFocusEvent * ) { - rgb->setText( "" ); + rgb->setText( "" ); } diff --git a/doc/html/qmake-manual-7.html b/doc/html/qmake-manual-7.html index a25b5a234..969637d39 100644 --- a/doc/html/qmake-manual-7.html +++ b/doc/html/qmake-manual-7.html @@ -58,7 +58,7 @@ body { background: #ffffff; color: black; } #include <vector> #include <ntqapplication.h> // TQt includes #include <ntqpushbutton.h> - #include <ntqlabel.h> + #include <tqlabel.h> #include "thirdparty/include/libmain.h" #include "my_stable_class.h" ... @@ -120,7 +120,7 @@ body { background: #ffffff; color: black; } # include <iostream> # include <ntqapplication.h> # include <ntqpushbutton.h> - # include <ntqlabel.h> + # include <tqlabel.h> #endif

          myobject.h

          @@ -155,7 +155,7 @@ body { background: #ffffff; color: black; }

          main.cpp

              #include <ntqapplication.h>
               #include <ntqpushbutton.h>
          -    #include <ntqlabel.h>
          +    #include <tqlabel.h>
               #include "myobject.h"
               #include "mydialog.h"
           
          diff --git a/doc/html/qprogressdialog-h.html b/doc/html/qprogressdialog-h.html
          index 6c849f0eb..eadc20ffc 100644
          --- a/doc/html/qprogressdialog-h.html
          +++ b/doc/html/qprogressdialog-h.html
          @@ -78,7 +78,7 @@ body { background: #ffffff; color: black; }
           #define TQPROGRESSDIALOG_H
           
           #ifndef QT_H
          -#include "ntqlabel.h"       // ### remove or keep for users' convenience?
          +#include "tqlabel.h"       // ### remove or keep for users' convenience?
           #include "ntqprogressbar.h" // ### remove or keep for users' convenience?
           #endif // QT_H
           
          diff --git a/doc/html/qsimplerichtext-h.html b/doc/html/qsimplerichtext-h.html
          deleted file mode 100644
          index e4a72ee68..000000000
          --- a/doc/html/qsimplerichtext-h.html
          +++ /dev/null
          @@ -1,149 +0,0 @@
          -
          -
          -
          -
          -
          -ntqsimplerichtext.h Include File
          -
          -
          -
          -
          -
          -
          -
          -
          - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

          ntqsimplerichtext.h

          - -

          This is the verbatim text of the ntqsimplerichtext.h include file. It is provided only for illustration; the copyright remains with Trolltech. -


          -
          -/****************************************************************************
          -** $Id: qt/ntqsimplerichtext.h   3.3.8   edited Jan 11 14:38 $
          -**
          -** Definition of the TQSimpleRichText class
          -**
          -** Created : 990101
          -**
          -** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
          -**
          -** This file is part of the kernel module of the TQt GUI Toolkit.
          -**
          -** This file may be used under the terms of the GNU General Public
          -** License versions 2.0 or 3.0 as published by the Free Software
          -** Foundation and appearing in the file LICENSE.GPL included in the
          -** packaging of this file. Alternatively you may (at your option) use any
          -** later version of the GNU General Public License if such license has
          -** been publicly approved by Trolltech ASA (or its successors, if any)
          -** and the KDE Free TQt Foundation.
          -**
          -** Please review the following information to ensure GNU General
          -** Public Licensing requirements will be met:
          -** http://trolltech.com/products/qt/licenses/licensing/opensource/.
          -** If you are unsure which license is appropriate for your use, please
          -** review the following information:
          -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
          -** or contact the sales department at sales@trolltech.com.
          -**
          -** This file may be used under the terms of the Q Public License as
          -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
          -** included in the packaging of this file.  Licensees holding valid TQt
          -** Commercial licenses may use this file in accordance with the TQt
          -** Commercial License Agreement provided with the Software.
          -**
          -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
          -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
          -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
          -** herein.
          -**
          -**********************************************************************/
          -
          -#ifndef TQSIMPLERICHTEXT_H
          -#define TQSIMPLERICHTEXT_H
          -
          -#ifndef QT_H
          -#include "ntqnamespace.h"
          -#include "tqstring.h"
          -#include "tqregion.h"
          -#endif // QT_H
          -
          -#ifndef TQT_NO_RICHTEXT
          -
          -class TQPainter;
          -class TQWidget;
          -class TQStyleSheet;
          -class TQBrush;
          -class TQMimeSourceFactory;
          -class TQSimpleRichTextData;
          -
          -class TQ_EXPORT TQSimpleRichText
          -{
          -public:
          -    TQSimpleRichText( const TQString& text, const TQFont& fnt,
          -		     const TQString& context = TQString::null, const TQStyleSheet* sheet = 0);
          -    TQSimpleRichText( const TQString& text, const TQFont& fnt,
          -		     const TQString& context,  const TQStyleSheet* sheet,
          -		     const TQMimeSourceFactory* factory, int pageBreak = -1,
          -		     const TQColor& linkColor = TQt::blue, bool linkUnderline = TRUE );
          -    ~TQSimpleRichText();
          -
          -    void setWidth( int );
          -    void setWidth( TQPainter*, int );
          -    void setDefaultFont( const TQFont &f );
          -    int width() const;
          -    int widthUsed() const;
          -    int height() const;
          -    void adjustSize();
          -
          -    void draw( TQPainter* p,  int x, int y, const TQRect& clipRect,
          -	       const TQColorGroup& cg, const TQBrush* paper = 0) const;
          -
          -    // obsolete
          -    void draw( TQPainter* p,  int x, int y, const TQRegion& clipRegion,
          -	       const TQColorGroup& cg, const TQBrush* paper = 0) const {
          -	draw( p, x, y, clipRegion.boundingRect(), cg, paper );
          -    }
          -
          -    TQString context() const;
          -    TQString anchorAt( const TQPoint& pos ) const;
          -
          -    bool inText( const TQPoint& pos ) const;
          -
          -private:
          -    TQSimpleRichTextData* d;
          -
          -private:	// Disabled copy constructor and operator=
          -#if defined(TQ_DISABLE_COPY)
          -    TQSimpleRichText( const TQSimpleRichText & );
          -    TQSimpleRichText &operator=( const TQSimpleRichText & );
          -#endif
          -};
          -
          -#endif // TQT_NO_RICHTEXT
          -
          -#endif // TQSIMPLERICHTEXT_H
          -
          - -


          - -
          Copyright © 2007 -TrolltechTrademarks -
          TQt 3.3.8
          -
          - diff --git a/doc/html/qsimplerichtext-members.html b/doc/html/qsimplerichtext-members.html deleted file mode 100644 index 8ca5ab9a8..000000000 --- a/doc/html/qsimplerichtext-members.html +++ /dev/null @@ -1,58 +0,0 @@ - - - - - -TQSimpleRichText Member List - - - - - - - -
          - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

          Complete Member List for TQSimpleRichText

          - -

          This is the complete list of member functions for -TQSimpleRichText, including inherited members. - -

          - -


          - -
          Copyright © 2007 -TrolltechTrademarks -
          TQt 3.3.8
          -
          - diff --git a/doc/html/qsyntaxhighlighter-h.html b/doc/html/qsyntaxhighlighter-h.html deleted file mode 100644 index 281607f41..000000000 --- a/doc/html/qsyntaxhighlighter-h.html +++ /dev/null @@ -1,126 +0,0 @@ - - - - - -ntqsyntaxhighlighter.h Include File - - - - - - - -
          - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

          ntqsyntaxhighlighter.h

          - -

          This is the verbatim text of the ntqsyntaxhighlighter.h include file. It is provided only for illustration; the copyright remains with Trolltech. -


          -
          -/****************************************************************************
          -** $Id: qt/ntqsyntaxhighlighter.h   3.3.8   edited Jan 11 14:39 $
          -**
          -** Definition of the TQSyntaxHighlighter class
          -**
          -** Created : 022407
          -**
          -** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
          -**
          -** This file is part of the widgets module of the TQt GUI Toolkit.
          -**
          -** This file may be used under the terms of the GNU General Public
          -** License versions 2.0 or 3.0 as published by the Free Software
          -** Foundation and appearing in the file LICENSE.GPL included in the
          -** packaging of this file. Alternatively you may (at your option) use any
          -** later version of the GNU General Public License if such license has
          -** been publicly approved by Trolltech ASA (or its successors, if any)
          -** and the KDE Free TQt Foundation.
          -**
          -** Please review the following information to ensure GNU General
          -** Public Licensing requirements will be met:
          -** http://trolltech.com/products/qt/licenses/licensing/opensource/.
          -** If you are unsure which license is appropriate for your use, please
          -** review the following information:
          -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
          -** or contact the sales department at sales@trolltech.com.
          -**
          -** This file may be used under the terms of the Q Public License as
          -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
          -** included in the packaging of this file.  Licensees holding valid TQt
          -** Commercial licenses may use this file in accordance with the TQt
          -** Commercial License Agreement provided with the Software.
          -**
          -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
          -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
          -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
          -** herein.
          -**
          -**********************************************************************/
          -
          -#ifndef TQSYNTAXHIGHLIGHTER_H
          -#define TQSYNTAXHIGHLIGHTER_H
          -
          -#ifndef QT_H
          -#include "tqfont.h"
          -#include "tqcolor.h"
          -#include "tqstring.h"
          -#endif // QT_H
          -
          -class TQTextEdit;
          -class TQSyntaxHighlighterInternal;
          -class TQSyntaxHighlighterPrivate;
          -class TQTextParagraph;
          -
          -class TQ_EXPORT TQSyntaxHighlighter : public TQt
          -{
          -    friend class TQSyntaxHighlighterInternal;
          -
          -public:
          -    TQSyntaxHighlighter( TQTextEdit *textEdit );
          -    virtual ~TQSyntaxHighlighter();
          -
          -    virtual int highlightParagraph( const TQString &text, int endStateOfLastPara ) = 0;
          -
          -    void setFormat( int start, int count, const TQFont &font, const TQColor &color );
          -    void setFormat( int start, int count, const TQColor &color );
          -    void setFormat( int start, int count, const TQFont &font );
          -    TQTextEdit *textEdit() const { return edit; }
          -
          -    void rehighlight();
          -
          -    int currentParagraph() const;
          -
          -private:
          -    TQTextParagraph *para;
          -    TQTextEdit *edit;
          -    TQSyntaxHighlighterPrivate *d;
          -
          -};
          -
          -#endif
          -
          - -


          - -
          Copyright © 2007 -TrolltechTrademarks -
          TQt 3.3.8
          -
          - diff --git a/doc/html/qsyntaxhighlighter-members.html b/doc/html/qsyntaxhighlighter-members.html deleted file mode 100644 index 06dcdccb7..000000000 --- a/doc/html/qsyntaxhighlighter-members.html +++ /dev/null @@ -1,53 +0,0 @@ - - - - - -TQSyntaxHighlighter Member List - - - - - - - -
          - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

          Complete Member List for TQSyntaxHighlighter

          - -

          This is the complete list of member functions for -TQSyntaxHighlighter, including inherited members. - -

          - -


          - -
          Copyright © 2007 -TrolltechTrademarks -
          TQt 3.3.8
          -
          - diff --git a/doc/html/qt.dcf b/doc/html/qt.dcf index ebb8a1fef..1b7a2df7c 100644 --- a/doc/html/qt.dcf +++ b/doc/html/qt.dcf @@ -825,51 +825,51 @@
          -
          - TQChar - Category - CombiningClass - Decomposition - Direction - Joining - category - cell - combiningClass - decomposition - decompositionTag - digitValue - direction - isDigit - isLetter - isLetterOrNumber - isMark - isNull - isNumber - isPrint - isPunct - isSpace - isSymbol - joining - latin1 - lower - mirrored - mirroredChar - operator char - row - unicode - upper - operator!= - operator< - operator<= - operator== - operator> - operator>= -
          +
          + TQChar + Category + CombiningClass + Decomposition + Direction + Joining + category + cell + combiningClass + decomposition + decompositionTag + digitValue + direction + isDigit + isLetter + isLetterOrNumber + isMark + isNull + isNumber + isPrint + isPunct + isSpace + isSymbol + joining + latin1 + lower + mirrored + mirroredChar + operator char + row + unicode + upper + operator!= + operator< + operator<= + operator== + operator> + operator>= +
          -
          - QCharRef -
          +
          + TQCharRef +
          @@ -1129,11 +1129,11 @@
          -
          - QConstString - string - ~QConstString -
          +
          + TQConstString + string + ~TQConstString +
          @@ -3743,42 +3743,42 @@
          -
          - QLabel - alignment - alignment - backgroundMode - buddy - clear - drawContents - hasScaledContents - indent - indent - movie - picture - pixmap - pixmap - scaledContents - setAlignment - setBuddy - setFont - setIndent - setMovie - setNum - setPicture - setPixmap - setScaledContents - setText - setTextFormat - sizeForWidth - text - text - textFormat - textFormat - updateLabel - ~QLabel -
          -
          +
          + TQLabel + alignment + alignment + backgroundMode + buddy + clear + drawContents + hasScaledContents + indent + indent + movie + picture + pixmap + pixmap + scaledContents + setAlignment + setBuddy + setFont + setIndent + setMovie + setNum + setPicture + setPixmap + setScaledContents + setText + setTextFormat + sizeForWidth + text + text + textFormat + textFormat + updateLabel + ~TQLabel +
          +
          QLayout @@ -4312,32 +4312,32 @@
          -
          - QLocale - Country - Language - c - country - countryToString - language - languageToString - name - operator= - setDefault - system - toDouble - toFloat - toInt - toLong - toLongLong - toShort - toString - toUInt - toULong - toULongLong - toUShort -
          -
          +
          + TQLocale + Country + Language + c + country + countryToString + language + languageToString + name + operator= + setDefault + system + toDouble + toFloat + toInt + toLong + toLongLong + toShort + toString + toUInt + toULong + toULongLong + toUShort +
          +
          TQLocalFs @@ -6205,21 +6205,21 @@
          -
          - QSimpleRichText - adjustSize - anchorAt - context - draw - height - inText - setDefaultFont - setWidth - width - widthUsed - ~QSimpleRichText -
          -
          +
          + TQSimpleRichText + adjustSize + anchorAt + context + draw + height + inText + setDefaultFont + setWidth + width + widthUsed + ~TQSimpleRichText +
          +
          TQSize @@ -7207,16 +7207,16 @@
          -
          - QSyntaxHighlighter - currentParagraph - highlightParagraph - rehighlight - setFormat - textEdit - ~QSyntaxHighlighter -
          -
          +
          + TQSyntaxHighlighter + currentParagraph + highlightParagraph + rehighlight + setFormat + textEdit + ~TQSyntaxHighlighter +
          +
          Qt @@ -8587,22 +8587,22 @@
          -
          - QWhatsThis - add - clicked - display - enterWhatsThisMode - inWhatsThisMode - leaveWhatsThisMode - remove - setFont - text - textFor - whatsThisButton - ~QWhatsThis -
          -
          +
          + TQWhatsThis + add + clicked + display + enterWhatsThisMode + inWhatsThisMode + leaveWhatsThisMode + remove + setFont + text + textFor + whatsThisButton + ~TQWhatsThis +
          +
          QWheelEvent diff --git a/doc/html/qwhatsthis-h.html b/doc/html/qwhatsthis-h.html deleted file mode 100644 index 1e7ba92ab..000000000 --- a/doc/html/qwhatsthis-h.html +++ /dev/null @@ -1,126 +0,0 @@ - - - - - -ntqwhatsthis.h Include File - - - - - - - -
          - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

          ntqwhatsthis.h

          - -

          This is the verbatim text of the ntqwhatsthis.h include file. It is provided only for illustration; the copyright remains with Trolltech. -


          -
          -/****************************************************************************
          -** $Id: qt/ntqwhatsthis.h   3.3.8   edited Jan 11 14:39 $
          -**
          -** Definition of TQWhatsThis class
          -**
          -** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
          -**
          -** This file is part of the widgets module of the TQt GUI Toolkit.
          -**
          -** This file may be used under the terms of the GNU General Public
          -** License versions 2.0 or 3.0 as published by the Free Software
          -** Foundation and appearing in the file LICENSE.GPL included in the
          -** packaging of this file. Alternatively you may (at your option) use any
          -** later version of the GNU General Public License if such license has
          -** been publicly approved by Trolltech ASA (or its successors, if any)
          -** and the KDE Free TQt Foundation.
          -**
          -** Please review the following information to ensure GNU General
          -** Public Licensing requirements will be met:
          -** http://trolltech.com/products/qt/licenses/licensing/opensource/.
          -** If you are unsure which license is appropriate for your use, please
          -** review the following information:
          -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
          -** or contact the sales department at sales@trolltech.com.
          -**
          -** This file may be used under the terms of the Q Public License as
          -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
          -** included in the packaging of this file.  Licensees holding valid TQt
          -** Commercial licenses may use this file in accordance with the TQt
          -** Commercial License Agreement provided with the Software.
          -**
          -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
          -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
          -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
          -** herein.
          -**
          -**********************************************************************/
          -
          -#ifndef TQWHATSTHIS_H
          -#define TQWHATSTHIS_H
          -
          -#ifndef QT_H
          -#include "tqobject.h"
          -#endif // QT_H
          -
          -#ifndef TQT_NO_WHATSTHIS
          -
          -#include "ntqcursor.h"
          -
          -class TQToolButton;
          -class TQPopupMenu;
          -class TQStyleSheet;
          -
          -class TQ_EXPORT TQWhatsThis: public TQt
          -{
          -public:
          -    TQWhatsThis( TQWidget *);
          -    virtual ~TQWhatsThis();
          -
          -    virtual TQString text( const TQPoint & );
          -    virtual bool clicked( const TQString& href );
          -
          -    // the common static functions
          -    static void setFont( const TQFont &font );    
          -    
          -    static void add( TQWidget *, const TQString &);
          -    static void remove( TQWidget * );
          -    static TQString textFor( TQWidget *, const TQPoint & pos = TQPoint(), bool includeParents = FALSE );
          -
          -    static TQToolButton * whatsThisButton( TQWidget * parent );
          -
          -    static void enterWhatsThisMode();
          -    static bool inWhatsThisMode();
          -    static void leaveWhatsThisMode( const TQString& = TQString::null, const TQPoint& pos = TQCursor::pos(), TQWidget* w = 0 );
          -
          -    static void display( const TQString& text, const TQPoint& pos = TQCursor::pos(), TQWidget* w = 0 );
          -};
          -
          -#endif // TQT_NO_WHATSTHIS
          -
          -#endif // TQWHATSTHIS_H
          -
          - -


          - -
          Copyright © 2007 -TrolltechTrademarks -
          TQt 3.3.8
          -
          - diff --git a/doc/html/qwhatsthis-members.html b/doc/html/qwhatsthis-members.html deleted file mode 100644 index 8a75bd697..000000000 --- a/doc/html/qwhatsthis-members.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - - -TQWhatsThis Member List - - - - - - - -
          - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

          Complete Member List for TQWhatsThis

          - -

          This is the complete list of member functions for -TQWhatsThis, including inherited members. - -

          - -


          - -
          Copyright © 2007 -TrolltechTrademarks -
          TQt 3.3.8
          -
          - diff --git a/doc/html/rangecontrols-example.html b/doc/html/rangecontrols-example.html index aeb32b2d2..5c2d2bd3c 100644 --- a/doc/html/rangecontrols-example.html +++ b/doc/html/rangecontrols-example.html @@ -85,7 +85,7 @@ private: #include <ntqhbox.h> #include <ntqlcdnumber.h> #include <ntqspinbox.h> -#include <ntqlabel.h> +#include <tqlabel.h> #include <tqstring.h> #include <ntqslider.h> #include <ntqcheckbox.h> @@ -103,18 +103,18 @@ private: (void)new TQWidget( cell2 ); - TQLabel *label1 = new TQLabel( TQString( "Enter a value between\n%1 and %2:" ).arg( -INT_MAX ).arg( INT_MAX ), cell2 ); + TQLabel *label1 = new TQLabel( TQString( "Enter a value between\n%1 and %2:" ).arg( -INT_MAX ).arg( INT_MAX ), cell2 ); label1->setMaximumHeight( label1->sizeHint().height() ); TQSpinBox *sb1 = new TQSpinBox( -INT_MAX, INT_MAX, 1, cell2 ); sb1->setValue( 0 ); - TQLabel *label2 = new TQLabel( "Enter a zoom value:", cell2 ); + TQLabel *label2 = new TQLabel( "Enter a zoom value:", cell2 ); label2->setMaximumHeight( label2->sizeHint().height() ); TQSpinBox *sb2 = new TQSpinBox( 0, 1000, 10, cell2 ); sb2->setSuffix( " %" ); sb2->setSpecialValueText( "Automatic" ); - TQLabel *label3 = new TQLabel( "Enter a price:", cell2 ); + TQLabel *label3 = new TQLabel( "Enter a price:", cell2 ); label3->setMaximumHeight( label3->sizeHint().height() ); TQSpinBox *sb3 = new TQSpinBox( 0, INT_MAX, 1, cell2 ); sb3->setPrefix( "$" ); diff --git a/doc/html/regexptester-example.html b/doc/html/regexptester-example.html index 794c8857b..0666ff806 100644 --- a/doc/html/regexptester-example.html +++ b/doc/html/regexptester-example.html @@ -65,9 +65,9 @@ public: RegexpTester(TQWidget* parent=0, const char* name=0, bool modal=false, WFlags f=0); - TQLabel *regexLabel; + TQLabel *regexLabel; TQComboBox *regexComboBox; - TQLabel *textLabel; + TQLabel *textLabel; TQComboBox *textComboBox; TQCheckBox *caseSensitiveCheckBox; TQCheckBox *minimalCheckBox; @@ -95,7 +95,7 @@ private: #include <ntqcheckbox.h> #include <tqclipboard.h> #include <ntqcombobox.h> -#include <ntqlabel.h> +#include <tqlabel.h> #include <ntqlayout.h> #include <ntqpushbutton.h> #include <tqregexp.h> @@ -109,16 +109,16 @@ private: WFlags f) : TQDialog(parent, name, modal, f) { - regexLabel = new TQLabel(this); + regexLabel = new TQLabel(this); regexComboBox = new TQComboBox(this); regexComboBox->setEditable(true); regexComboBox->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Preferred); - regexLabel->setBuddy(regexComboBox); - textLabel = new TQLabel(this); + regexLabel->setBuddy(regexComboBox); + textLabel = new TQLabel(this); textComboBox = new TQComboBox(this); textComboBox->setEditable(true); textComboBox->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Preferred); - textLabel->setBuddy(textComboBox); + textLabel->setBuddy(textComboBox); caseSensitiveCheckBox = new TQCheckBox(this); caseSensitiveCheckBox->setChecked(true); minimalCheckBox = new TQCheckBox(this); @@ -258,9 +258,9 @@ void RegexpTester::copy() void RegexpTester::languageChange() { setCaption(tr("Regex Tester")); - regexLabel->setText(tr("&Regex:")); + regexLabel->setText(tr("&Regex:")); regexComboBox->insertItem(tr("[A-Z]+=(\\d+):(\\d*)")); - textLabel->setText(tr("&Text:")); + textLabel->setText(tr("&Text:")); textComboBox->insertItem(tr("ABC=12:3456")); caseSensitiveCheckBox->setText(tr("Case &Sensitive")); minimalCheckBox->setText(tr("&Minimal")); diff --git a/doc/html/scrollview-example.html b/doc/html/scrollview-example.html index d44a665b2..9437e1d1e 100644 --- a/doc/html/scrollview-example.html +++ b/doc/html/scrollview-example.html @@ -56,7 +56,7 @@ optimized for very large contents. #include <tqpixmap.h> #include <ntqmessagebox.h> #include <ntqlayout.h> -#include <ntqlabel.h> +#include <tqlabel.h> #include <ntqmultilineedit.h> #include <tqsizegrip.h> #include <stdlib.h> diff --git a/doc/html/showimg-example.html b/doc/html/showimg-example.html index 167907a36..ef2124b97 100644 --- a/doc/html/showimg-example.html +++ b/doc/html/showimg-example.html @@ -92,7 +92,7 @@ private: TQPopupMenu *options; TQWidget *helpmsg; - TQLabel *status; + TQLabel *status; int si, sp, ac, co, mo, fd, bd, // Menu item ids td, ta, ba, fa, au, ad, dd, ss, cc, t1, t8, t32; @@ -151,7 +151,7 @@ private slots: #include <tqfiledialog.h> #include <ntqmessagebox.h> #include <tqpopupmenu.h> -#include <ntqlabel.h> +#include <tqlabel.h> #include <tqpainter.h> #include <ntqapplication.h> #include <tqclipboard.h> @@ -244,7 +244,7 @@ private slots: connect( options, TQ_SIGNAL(activated(int)), this, TQ_SLOT(doOption(int)) ); - status = new TQLabel(this); + status = new TQLabel(this); status->setFrameStyle( TQFrame::WinPanel | TQFrame::Sunken ); status->setFixedHeight( fontMetrics().height() + 4 ); @@ -364,9 +364,9 @@ void ImageViewer::updateStatus() { if ( pm.size() == TQSize( 0, 0 ) ) { if ( !filename.isEmpty() ) - status->setText("Could not load image"); + status->setText("Could not load image"); else - status->setText("No image - select Open from File menu."); + status->setText("No image - select Open from File menu."); } else { TQString message, moremsg; message.sprintf("%dx%d", image.width(), image.height()); @@ -416,7 +416,7 @@ void ImageViewer::updateStatus() } message += moremsg; } - status->setText(message); + status->setText(message); } } diff --git a/doc/html/simple-application-example.html b/doc/html/simple-application-example.html index e8c2e5978..271a62364 100644 --- a/doc/html/simple-application-example.html +++ b/doc/html/simple-application-example.html @@ -120,8 +120,8 @@ private: #include <tqtextstream.h> #include <tqpainter.h> #include <tqpaintdevicemetrics.h> -#include <ntqwhatsthis.h> -#include <ntqsimplerichtext.h> +#include <tqwhatsthis.h> +#include <tqsimplerichtext.h> #include "filesave.xpm" #include "fileopen.xpm" @@ -159,7 +159,7 @@ private: "You can also select the <b>Open</b> command " "from the <b>File</b> menu.</p>"; - TQWhatsThis::add( fileOpen, fileOpenText ); + TQWhatsThis::add( fileOpen, fileOpenText ); TQMimeSourceFactory::defaultFactory()->setPixmap( "document-open", openIcon ); @@ -168,14 +168,14 @@ private: "You can also select the <b>Save</b> command " "from the <b>File</b> menu.</p>"; - TQWhatsThis::add( fileSave, fileSaveText ); + TQWhatsThis::add( fileSave, fileSaveText ); const char * filePrintText = "Click this button to print the file you " "are editing.\n" "You can also select the Print command " "from the File menu."; - TQWhatsThis::add( filePrint, filePrintText ); + TQWhatsThis::add( filePrint, filePrintText ); TQPopupMenu * file = new TQPopupMenu( this ); @@ -321,21 +321,21 @@ void ApplicationWindow::print() int dpiy = metrics.logicalDpiY(); int margin = (int) ( (2/2.54)*dpiy ); // 2 cm margins TQRect view( margin, margin, metrics.width() - 2*margin, metrics.height() - 2*margin ); - TQSimpleRichText richText( TQStyleSheet::convertFromPlainText(e->text()), + TQSimpleRichText richText( TQStyleSheet::convertFromPlainText(e->text()), TQFont(), e->context(), e->styleSheet(), e->mimeSourceFactory(), view.height() ); - richText.setWidth( &p, view.width() ); + richText.setWidth( &p, view.width() ); int page = 1; do { - richText.draw( &p, margin, margin, view, colorGroup() ); + richText.draw( &p, margin, margin, view, colorGroup() ); view.moveBy( 0, view.height() ); p.translate( 0 , -view.height() ); p.drawText( view.right() - p.fontMetrics().width( TQString::number( page ) ), view.bottom() + p.fontMetrics().ascent() + 5, TQString::number( page ) ); - if ( view.top() - margin >= richText.height() ) + if ( view.top() - margin >= richText.height() ) break; printer->newPage(); page++; diff --git a/doc/html/simple-application.html b/doc/html/simple-application.html index efe781b30..eb9fd6968 100644 --- a/doc/html/simple-application.html +++ b/doc/html/simple-application.html @@ -36,7 +36,7 @@ body { background: #ffffff; color: black; }

          This walkthrough shows simple use of TQMainWindow, TQMenuBar, TQPopupMenu, TQToolBar and TQStatusBar - classes that every modern application window tends to use. (See also Tutorial #2.) -

          It also illustrates some aspects of TQWhatsThis (for simple help) and a +

          It also illustrates some aspects of TQWhatsThis (for simple help) and a typical main() using TQApplication.

          Finally, it shows a typical print function based on TQPrinter.

          The declaration of ApplicationWindow @@ -228,7 +228,7 @@ function, as its mouse interface is unusual. "You can also select the <b>Open</b> command " "from the <b>File</b> menu.</p>"; - TQWhatsThis::add( fileOpen, fileOpenText ); + TQWhatsThis::add( fileOpen, fileOpenText );

          With the above line we add the "What's This?" help-text to the fileOpen button... @@ -241,13 +241,13 @@ saved in fileOpenText) requests an image named "document-open", the add( fileSave, fileSaveText ); + TQWhatsThis::add( fileSave, fileSaveText ); const char * filePrintText = "Click this button to print the file you " "are editing.\n" "You can also select the Print command " "from the File menu."; - TQWhatsThis::add( filePrint, filePrintText ); + TQWhatsThis::add( filePrint, filePrintText );

          The "What's This?" help of the remaining two buttons doesn't make use of pixmaps, therefore all we need to do is to add the help-text to the @@ -463,21 +463,21 @@ and implicitly changes the window system caption to the new name. int dpiy = metrics.logicalDpiY(); int margin = (int) ( (2/2.54)*dpiy ); // 2 cm margins TQRect view( margin, margin, metrics.width() - 2*margin, metrics.height() - 2*margin ); - TQSimpleRichText richText( TQStyleSheet::convertFromPlainText(e->text()), + TQSimpleRichText richText( TQStyleSheet::convertFromPlainText(e->text()), TQFont(), e->context(), e->styleSheet(), e->mimeSourceFactory(), view.height() ); - richText.setWidth( &p, view.width() ); + richText.setWidth( &p, view.width() ); int page = 1; do { - richText.draw( &p, margin, margin, view, colorGroup() ); + richText.draw( &p, margin, margin, view, colorGroup() ); view.moveBy( 0, view.height() ); p.translate( 0 , -view.height() ); p.drawText( view.right() - p.fontMetrics().width( TQString::number( page ) ), view.bottom() + p.fontMetrics().ascent() + 5, TQString::number( page ) ); - if ( view.top() - margin >= richText.height() ) + if ( view.top() - margin >= richText.height() ) break; printer->newPage(); page++; @@ -493,7 +493,7 @@ and implicitly changes the window system caption to the new name. tool button.

          We present the user with the print setup dialog, and abandon printing if they cancel. -

          We create a TQSimpleRichText object and give it the text. This object +

          We create a TQSimpleRichText object and give it the text. This object is able to format the text nicely as one long page. We achieve pagination by printing one paper page's worth of text from the TQSimpleRichText page at a time. diff --git a/doc/html/splitter-example.html b/doc/html/splitter-example.html index b7dfccef9..f9a26f399 100644 --- a/doc/html/splitter-example.html +++ b/doc/html/splitter-example.html @@ -48,7 +48,7 @@ decide for themselves how much space each child item should get. *****************************************************************************/ #include <ntqapplication.h> -#include <ntqlabel.h> +#include <tqlabel.h> #include <ntqsplitter.h> #include <ntqmultilineedit.h> diff --git a/doc/html/sql-overview-custom1-main-cpp.html b/doc/html/sql-overview-custom1-main-cpp.html index 030691db7..13961bb5f 100644 --- a/doc/html/sql-overview-custom1-main-cpp.html +++ b/doc/html/sql-overview-custom1-main-cpp.html @@ -74,11 +74,11 @@ TQString CustomEdit::upperLine() const FormDialog::FormDialog() { - TQLabel *forenameLabel = new TQLabel( "Forename:", this ); + TQLabel *forenameLabel = new TQLabel( "Forename:", this ); CustomEdit *forenameEdit = new CustomEdit( this ); - TQLabel *surnameLabel = new TQLabel( "Surname:", this ); + TQLabel *surnameLabel = new TQLabel( "Surname:", this ); CustomEdit *surnameEdit = new CustomEdit( this ); - TQLabel *salaryLabel = new TQLabel( "Salary:", this ); + TQLabel *salaryLabel = new TQLabel( "Salary:", this ); TQLineEdit *salaryEdit = new TQLineEdit( this ); salaryEdit->setAlignment( TQt::AlignRight ); TQPushButton *saveButton = new TQPushButton( "&Save", this ); diff --git a/doc/html/sql-overview-custom1-main-h.html b/doc/html/sql-overview-custom1-main-h.html index b63c30bfa..9087e3fd3 100644 --- a/doc/html/sql-overview-custom1-main-h.html +++ b/doc/html/sql-overview-custom1-main-h.html @@ -44,7 +44,7 @@ body { background: #ffffff; color: black; } #include <ntqapplication.h> #include <ntqdialog.h> -#include <ntqlabel.h> +#include <tqlabel.h> #include <ntqlayout.h> #include <ntqlineedit.h> #include <ntqpushbutton.h> diff --git a/doc/html/sql-overview-form1-main-cpp.html b/doc/html/sql-overview-form1-main-cpp.html index 891f07b52..8f8dd8c91 100644 --- a/doc/html/sql-overview-form1-main-cpp.html +++ b/doc/html/sql-overview-form1-main-cpp.html @@ -44,7 +44,7 @@ body { background: #ffffff; color: black; } #include <ntqapplication.h> #include <ntqdialog.h> -#include <ntqlabel.h> +#include <tqlabel.h> #include <ntqlayout.h> #include <ntqlineedit.h> #include <tqsqldatabase.h> @@ -61,11 +61,11 @@ class FormDialog : public TQDialog FormDialog::FormDialog() { - TQLabel *forenameLabel = new TQLabel( "Forename:", this ); - TQLabel *forenameDisplay = new TQLabel( this ); - TQLabel *surnameLabel = new TQLabel( "Surname:", this ); - TQLabel *surnameDisplay = new TQLabel( this ); - TQLabel *salaryLabel = new TQLabel( "Salary:", this ); + TQLabel *forenameLabel = new TQLabel( "Forename:", this ); + TQLabel *forenameDisplay = new TQLabel( this ); + TQLabel *surnameLabel = new TQLabel( "Surname:", this ); + TQLabel *surnameDisplay = new TQLabel( this ); + TQLabel *salaryLabel = new TQLabel( "Salary:", this ); TQLineEdit *salaryEdit = new TQLineEdit( this ); TQGridLayout *grid = new TQGridLayout( this ); diff --git a/doc/html/sql-overview-form2-main-h.html b/doc/html/sql-overview-form2-main-h.html index 15dcdfb64..7c235e3ae 100644 --- a/doc/html/sql-overview-form2-main-h.html +++ b/doc/html/sql-overview-form2-main-h.html @@ -44,7 +44,7 @@ body { background: #ffffff; color: black; } #include <ntqapplication.h> #include <ntqdialog.h> -#include <ntqlabel.h> +#include <tqlabel.h> #include <ntqlayout.h> #include <ntqlineedit.h> #include <ntqpushbutton.h> diff --git a/doc/html/sql.html b/doc/html/sql.html index 34748eb3c..4b170081f 100644 --- a/doc/html/sql.html +++ b/doc/html/sql.html @@ -1025,7 +1025,7 @@ the code below can be automatically generated by

              #include <ntqapplication.h>
               #include <ntqdialog.h>
          -    #include <ntqlabel.h>
          +    #include <tqlabel.h>
               #include <ntqlayout.h>
               #include <ntqlineedit.h>
               #include <tqsqldatabase.h>
          @@ -1041,11 +1041,11 @@ the code below can be automatically generated by 
           
               FormDialog::FormDialog()
               {
          -        TQLabel *forenameLabel   = new TQLabel( "Forename:", this );
          -        TQLabel *forenameDisplay = new TQLabel( this );
          -        TQLabel *surnameLabel    = new TQLabel( "Surname:", this );
          -        TQLabel *surnameDisplay  = new TQLabel( this );
          -        TQLabel *salaryLabel     = new TQLabel( "Salary:", this );
          +        TQLabel *forenameLabel   = new TQLabel( "Forename:", this );
          +        TQLabel *forenameDisplay = new TQLabel( this );
          +        TQLabel *surnameLabel    = new TQLabel( "Surname:", this );
          +        TQLabel *surnameDisplay  = new TQLabel( this );
          +        TQLabel *salaryLabel     = new TQLabel( "Salary:", this );
                   TQLineEdit *salaryEdit   = new TQLineEdit( this );
           
                   TQGridLayout *grid = new TQGridLayout( this );
          diff --git a/doc/html/t12-lcdrange-cpp.html b/doc/html/t12-lcdrange-cpp.html
          index 0e4d432e7..288d23ec2 100644
          --- a/doc/html/t12-lcdrange-cpp.html
          +++ b/doc/html/t12-lcdrange-cpp.html
          @@ -42,7 +42,7 @@ body { background: #ffffff; color: black; }
           
           #include <ntqslider.h>
           #include <ntqlcdnumber.h>
          -#include <ntqlabel.h>
          +#include <tqlabel.h>
           
           
           LCDRange::LCDRange( TQWidget *parent, const char *name )
          @@ -68,8 +68,8 @@ void LCDRange::init()
               slider->setRange( 0, 99 );
               slider->setValue( 0 );
           
          -    label = new TQLabel( " ", this, "label"  );
          -    label->setAlignment( AlignCenter );
          +    label = new TQLabel( " ", this, "label"  );
          +    label->setAlignment( AlignCenter );
           
               connect( slider, TQ_SIGNAL(valueChanged(int)),
                        lcd, TQ_SLOT(display(int)) );
          @@ -88,7 +88,7 @@ int LCDRange::value() const
           
           const char *LCDRange::text() const
           {
          -    return label->text();
          +    return label->text();
           }
           
           
          @@ -113,7 +113,7 @@ void LCDRange::setRange( int minVal, int maxVal )
           
           void LCDRange::setText( const char *s )
           {
          -    label->setText( s );
          +    label->setText( s );
           }
           


          diff --git a/doc/html/t12-lcdrange-h.html b/doc/html/t12-lcdrange-h.html index 84bbfa176..62f57870d 100644 --- a/doc/html/t12-lcdrange-h.html +++ b/doc/html/t12-lcdrange-h.html @@ -70,7 +70,7 @@ private: void init(); TQSlider *slider; - TQLabel *label; + TQLabel *label; }; diff --git a/doc/html/t13-gamebrd-cpp.html b/doc/html/t13-gamebrd-cpp.html index 56238458e..d1140eb88 100644 --- a/doc/html/t13-gamebrd-cpp.html +++ b/doc/html/t13-gamebrd-cpp.html @@ -42,7 +42,7 @@ body { background: #ffffff; color: black; } #include <tqfont.h> #include <ntqapplication.h> -#include <ntqlabel.h> +#include <tqlabel.h> #include <ntqpushbutton.h> #include <ntqlcdnumber.h> #include <ntqlayout.h> @@ -96,9 +96,9 @@ body { background: #ffffff; color: black; } hits = new TQLCDNumber( 2, this, "hits" ); shotsLeft = new TQLCDNumber( 2, this, "shotsleft" ); - TQLabel *hitsL = new TQLabel( "HITS", this, "hitsLabel" ); + TQLabel *hitsL = new TQLabel( "HITS", this, "hitsLabel" ); TQLabel *shotsLeftL - = new TQLabel( "SHOTS LEFT", this, "shotsleftLabel" ); + = new TQLabel( "SHOTS LEFT", this, "shotsleftLabel" ); TQGridLayout *grid = new TQGridLayout( this, 2, 2, 10 ); grid->addWidget( quit, 0, 0 ); diff --git a/doc/html/t13-lcdrange-cpp.html b/doc/html/t13-lcdrange-cpp.html index ce934cf47..40abeb305 100644 --- a/doc/html/t13-lcdrange-cpp.html +++ b/doc/html/t13-lcdrange-cpp.html @@ -42,7 +42,7 @@ body { background: #ffffff; color: black; } #include <ntqslider.h> #include <ntqlcdnumber.h> -#include <ntqlabel.h> +#include <tqlabel.h> #include <ntqlayout.h> @@ -68,8 +68,8 @@ void LCDRange::init() slider->setRange( 0, 99 ); slider->setValue( 0 ); - label = new TQLabel( " ", this, "label" ); - label->setAlignment( AlignCenter ); + label = new TQLabel( " ", this, "label" ); + label->setAlignment( AlignCenter ); connect( slider, TQ_SIGNAL(valueChanged(int)), lcd, TQ_SLOT(display(int)) ); @@ -93,7 +93,7 @@ int LCDRange::value() const const char *LCDRange::text() const { - return label->text(); + return label->text(); } @@ -118,7 +118,7 @@ void LCDRange::setRange( int minVal, int maxVal ) void LCDRange::setText( const char *s ) { - label->setText( s ); + label->setText( s ); }


          diff --git a/doc/html/t13-lcdrange-h.html b/doc/html/t13-lcdrange-h.html index 360246843..c47150867 100644 --- a/doc/html/t13-lcdrange-h.html +++ b/doc/html/t13-lcdrange-h.html @@ -69,7 +69,7 @@ private: void init(); TQSlider *slider; - TQLabel *label; + TQLabel *label; }; diff --git a/doc/html/t14-gamebrd-cpp.html b/doc/html/t14-gamebrd-cpp.html index 9934c0ac8..9ebd6d3ae 100644 --- a/doc/html/t14-gamebrd-cpp.html +++ b/doc/html/t14-gamebrd-cpp.html @@ -42,7 +42,7 @@ body { background: #ffffff; color: black; } #include <tqfont.h> #include <ntqapplication.h> -#include <ntqlabel.h> +#include <tqlabel.h> #include <ntqaccel.h> #include <ntqpushbutton.h> #include <ntqlcdnumber.h> @@ -102,9 +102,9 @@ body { background: #ffffff; color: black; } hits = new TQLCDNumber( 2, this, "hits" ); shotsLeft = new TQLCDNumber( 2, this, "shotsleft" ); - TQLabel *hitsL = new TQLabel( "HITS", this, "hitsLabel" ); + TQLabel *hitsL = new TQLabel( "HITS", this, "hitsLabel" ); TQLabel *shotsLeftL - = new TQLabel( "SHOTS LEFT", this, "shotsleftLabel" ); + = new TQLabel( "SHOTS LEFT", this, "shotsleftLabel" ); TQAccel *accel = new TQAccel( this ); accel->connectItem( accel->insertItem( Key_Enter ), diff --git a/doc/html/t14-lcdrange-cpp.html b/doc/html/t14-lcdrange-cpp.html index 0f5f77aad..90935592d 100644 --- a/doc/html/t14-lcdrange-cpp.html +++ b/doc/html/t14-lcdrange-cpp.html @@ -42,7 +42,7 @@ body { background: #ffffff; color: black; } #include <ntqslider.h> #include <ntqlcdnumber.h> -#include <ntqlabel.h> +#include <tqlabel.h> #include <ntqlayout.h> @@ -68,8 +68,8 @@ void LCDRange::init() slider->setRange( 0, 99 ); slider->setValue( 0 ); - label = new TQLabel( " ", this, "label" ); - label->setAlignment( AlignCenter ); + label = new TQLabel( " ", this, "label" ); + label->setAlignment( AlignCenter ); connect( slider, TQ_SIGNAL(valueChanged(int)), lcd, TQ_SLOT(display(int)) ); @@ -93,7 +93,7 @@ int LCDRange::value() const const char *LCDRange::text() const { - return label->text(); + return label->text(); } @@ -118,7 +118,7 @@ void LCDRange::setRange( int minVal, int maxVal ) void LCDRange::setText( const char *s ) { - label->setText( s ); + label->setText( s ); }


          diff --git a/doc/html/t14-lcdrange-h.html b/doc/html/t14-lcdrange-h.html index 1f2a41b6c..245c1318c 100644 --- a/doc/html/t14-lcdrange-h.html +++ b/doc/html/t14-lcdrange-h.html @@ -69,7 +69,7 @@ private: void init(); TQSlider *slider; - TQLabel *label; + TQLabel *label; }; diff --git a/doc/html/tabdialog-example.html b/doc/html/tabdialog-example.html index 4ad99bfd3..fa33e954d 100644 --- a/doc/html/tabdialog-example.html +++ b/doc/html/tabdialog-example.html @@ -91,7 +91,7 @@ protected: #include "tabdialog.h" #include <ntqvbox.h> -#include <ntqlabel.h> +#include <tqlabel.h> #include <ntqlineedit.h> #include <tqdatetime.h> #include <ntqbuttongroup.h> @@ -114,25 +114,25 @@ void TabDialog::setupTab1() TQVBox *tab1 = new TQVBox( this ); tab1->setMargin( 5 ); - (void)new TQLabel( "Filename:", tab1 ); + (void)new TQLabel( "Filename:", tab1 ); TQLineEdit *fname = new TQLineEdit( filename, tab1 ); fname->setFocus(); - (void)new TQLabel( "Path:", tab1 ); - TQLabel *path = new TQLabel( fileinfo.dirPath( TRUE ), tab1 ); + (void)new TQLabel( "Path:", tab1 ); + TQLabel *path = new TQLabel( fileinfo.dirPath( TRUE ), tab1 ); path->setFrameStyle( TQFrame::Panel | TQFrame::Sunken ); - (void)new TQLabel( "Size:", tab1 ); + (void)new TQLabel( "Size:", tab1 ); ulong kb = (ulong)(fileinfo.size()/1024); - TQLabel *size = new TQLabel( TQString( "%1 KB" ).arg( kb ), tab1 ); + TQLabel *size = new TQLabel( TQString( "%1 KB" ).arg( kb ), tab1 ); size->setFrameStyle( TQFrame::Panel | TQFrame::Sunken ); - (void)new TQLabel( "Last Read:", tab1 ); - TQLabel *lread = new TQLabel( fileinfo.lastRead().toString(), tab1 ); + (void)new TQLabel( "Last Read:", tab1 ); + TQLabel *lread = new TQLabel( fileinfo.lastRead().toString(), tab1 ); lread->setFrameStyle( TQFrame::Panel | TQFrame::Sunken ); - (void)new TQLabel( "Last Modified:", tab1 ); - TQLabel *lmodif = new TQLabel( fileinfo.lastModified().toString(), tab1 ); + (void)new TQLabel( "Last Modified:", tab1 ); + TQLabel *lmodif = new TQLabel( fileinfo.lastModified().toString(), tab1 ); lmodif->setFrameStyle( TQFrame::Panel | TQFrame::Sunken ); addTab( tab1, "General" ); @@ -159,12 +159,12 @@ void TabDialog::setupTab2() TQButtonGroup *bg2 = new TQButtonGroup( 2, TQGroupBox::Horizontal, "Owner", tab2 ); - (void)new TQLabel( "Owner", bg2 ); - TQLabel *owner = new TQLabel( fileinfo.owner(), bg2 ); + (void)new TQLabel( "Owner", bg2 ); + TQLabel *owner = new TQLabel( fileinfo.owner(), bg2 ); owner->setFrameStyle( TQFrame::Panel | TQFrame::Sunken ); - (void)new TQLabel( "Group", bg2 ); - TQLabel *group = new TQLabel( fileinfo.group(), bg2 ); + (void)new TQLabel( "Group", bg2 ); + TQLabel *group = new TQLabel( fileinfo.group(), bg2 ); group->setFrameStyle( TQFrame::Panel | TQFrame::Sunken ); addTab( tab2, "Permissions" ); @@ -176,7 +176,7 @@ void TabDialog::setupTab3() tab3->setMargin( 5 ); tab3->setSpacing( 5 ); - (void)new TQLabel( TQString( "Open %1 with:" ).arg( filename ), tab3 ); + (void)new TQLabel( TQString( "Open %1 with:" ).arg( filename ), tab3 ); TQListBox *prgs = new TQListBox( tab3 ); for ( unsigned int i = 0; i < 30; i++ ) { diff --git a/doc/html/tagreader-with-features-example.html b/doc/html/tagreader-with-features-example.html index 79b39aaa4..90921c91b 100644 --- a/doc/html/tagreader-with-features-example.html +++ b/doc/html/tagreader-with-features-example.html @@ -157,7 +157,7 @@ void StructureParser::setListView( ntqlistview.h> #include <ntqgrid.h> #include <tqmainwindow.h> -#include <ntqlabel.h> +#include <tqlabel.h> int main( int argc, char **argv ) { @@ -190,21 +190,21 @@ int main( int argc, char **argv ) reader.parse( source ); // namespace label - (void) new TQLabel( + (void) new TQLabel( "Default:\n" "http://xml.org/sax/features/namespaces: TRUE\n" "http://xml.org/sax/features/namespace-prefixes: FALSE\n", container ); // namespace prefix label - (void) new TQLabel( + (void) new TQLabel( "\n" "http://xml.org/sax/features/namespaces: TRUE\n" "http://xml.org/sax/features/namespace-prefixes: TRUE\n", container ); // prefix label - (void) new TQLabel( + (void) new TQLabel( "\n" "http://xml.org/sax/features/namespaces: FALSE\n" "http://xml.org/sax/features/namespace-prefixes: TRUE\n", diff --git a/doc/html/text.html b/doc/html/text.html index 3b19dfaf8..c0d9b6e6a 100644 --- a/doc/html/text.html +++ b/doc/html/text.html @@ -36,19 +36,19 @@ body { background: #ffffff; color: black; } XML classes.

          -
          TQCharLightweight Unicode character -
          TQCharRefHelper class for TQString -
          TQConstStringString objects using constant Unicode data +
          TQCharLightweight Unicode character +
          TQCharRefHelper class for TQString +
          TQConstStringString objects using constant Unicode data
          TQCStringAbstraction of the classic C zero-terminated char array (char *) -
          TQLabelText or image display -
          TQLocaleConverts between numbers and their string representations in various languages -
          TQSimpleRichTextSmall displayable piece of rich text +
          TQLabelText or image display +
          TQLocaleConverts between numbers and their string representations in various languages +
          TQSimpleRichTextSmall displayable piece of rich text
          TQStringAbstraction of Unicode text and the classic C '\0'-terminated char array
          TQStringListList of strings
          TQStrListDoubly-linked list of char*
          TQStyleSheetCollection of styles for rich text rendering and a generator of tags
          TQStyleSheetItemEncapsulation of a set of text styles -
          TQSyntaxHighlighterBase class for implementing TQTextEdit syntax highlighters +
          TQSyntaxHighlighterBase class for implementing TQTextEdit syntax highlighters
          TQTextBrowserRich text browser with hypertext navigation
          TQTextEditPowerful single-page rich text editor
          TQTextIStreamConvenience class for input streams diff --git a/doc/html/themes-example.html b/doc/html/themes-example.html index f9e4cf526..d598910fc 100644 --- a/doc/html/themes-example.html +++ b/doc/html/themes-example.html @@ -155,7 +155,7 @@ private: #include "tqpixmap.h" // for now #include "tqpalette.h" // for now #include "tqwidget.h" -#include "ntqlabel.h" +#include "tqlabel.h" #include "tqimage.h" #include "ntqpushbutton.h" #include "tqwidget.h" @@ -1651,7 +1651,7 @@ private: #include "tqpixmap.h" // for now #include "tqpalette.h" // for now #include "tqwidget.h" -#include "ntqlabel.h" +#include "tqlabel.h" #include "tqimage.h" #include "ntqpushbutton.h" #include "tqwidget.h" diff --git a/doc/html/tictac-example.html b/doc/html/tictac-example.html index 136d099bd..efd2b2f59 100644 --- a/doc/html/tictac-example.html +++ b/doc/html/tictac-example.html @@ -142,7 +142,7 @@ private: TQComboBox *whoStarts; TQPushButton *newGame; TQPushButton *quit; - TQLabel *message; + TQLabel *message; TicTacGameBoard *board; }; @@ -168,7 +168,7 @@ private: #include <ntqdrawutil.h> #include <ntqcombobox.h> #include <ntqcheckbox.h> -#include <ntqlabel.h> +#include <tqlabel.h> #include <ntqlayout.h> #include <stdlib.h> // rand() function #include <tqdatetime.h> // seed for rand() @@ -447,9 +447,9 @@ void TicTacGameBoard::computerMove() // Create a message label - message = new TQLabel( this ); + message = new TQLabel( this ); message->setFrameStyle( TQFrame::WinPanel | TQFrame::Sunken ); - message->setAlignment( AlignCenter ); + message->setAlignment( AlignCenter ); l->addWidget( message ); // Create the game board and connect the signal finished() to this @@ -525,7 +525,7 @@ void TicTacToe::newState() static const char *msg[] = { // TicTacGameBoard::State texts "Click Play to start", "Make your move", "You won!", "Computer won!", "It's a draw" }; - message->setText( msg[board->state()] ); + message->setText( msg[board->state()] ); return; } diff --git a/doc/html/titleindex b/doc/html/titleindex index 2b395fee3..77af3b5af 100644 --- a/doc/html/titleindex +++ b/doc/html/titleindex @@ -218,10 +218,10 @@ TQCanvasText Class | tqcanvastext.html TQCanvasText Member List | tqcanvastext-members.html TQCanvasView Class | tqcanvasview.html TQCanvasView Member List | tqcanvasview-members.html -TQChar Class | qchar.html -TQChar Member List | qchar-members.html -QCharRef Class | qcharref.html -QCharRef Member List | qcharref-members.html +TQChar Class | tqchar.html +TQChar Member List | tqchar-members.html +TQCharRef Class | tqcharref.html +TQCharRef Member List | tqcharref-members.html QCheckBox Class | ntqcheckbox.html QCheckBox Member List | qcheckbox-members.html QCheckListItem Class | qchecklistitem.html @@ -248,8 +248,8 @@ QComboTableItem Class | qcombotableitem.html QComboTableItem Member List | qcombotableitem-members.html QCommonStyle Class | ntqcommonstyle.html QCommonStyle Member List | qcommonstyle-members.html -QConstString Class | qconststring.html -QConstString Member List | qconststring-members.html +TQConstString Class | tqconststring.html +TQConstString Member List | tqconststring-members.html QContextMenuEvent Class | qcontextmenuevent.html QContextMenuEvent Member List | qcontextmenuevent-members.html QCursor Class | ntqcursor.html @@ -501,8 +501,8 @@ QKeySequence Class | ntqkeysequence.html QKeySequence Member List | qkeysequence-members.html QLCDNumber Class | ntqlcdnumber.html QLCDNumber Member List | qlcdnumber-members.html -QLabel Class | ntqlabel.html -QLabel Member List | qlabel-members.html +TQLabel Class | tqlabel.html +TQLabel Member List | tqlabel-members.html QLayout Class | ntqlayout.html QLayout Member List | qlayout-members.html QLayoutItem Class | qlayoutitem.html @@ -529,8 +529,8 @@ QListViewItemIterator Class | qlistviewitemiterator.html QListViewItemIterator Member List | qlistviewitemiterator-members.html TQLocalFs Class | tqlocalfs.html TQLocalFs Member List | tqlocalfs-members.html -QLocale Class | ntqlocale.html -QLocale Member List | qlocale-members.html +TQLocale Class | tqlocale.html +TQLocale Member List | tqlocale-members.html TQMacMime Class | tqmacmime.html TQMacMime Member List | tqmacmime-members.html QMacStyle Class | qmacstyle.html @@ -694,8 +694,8 @@ TQSignal Class | tqsignal.html TQSignal Member List | tqsignal-members.html TQSignalMapper Class | tqsignalmapper.html TQSignalMapper Member List | tqsignalmapper-members.html -QSimpleRichText Class | ntqsimplerichtext.html -QSimpleRichText Member List | qsimplerichtext-members.html +TQSimpleRichText Class | tqsimplerichtext.html +TQSimpleRichText Member List | tqsimplerichtext-members.html TQSize Class | tqsize.html TQSize Member List | tqsize-members.html TQSizeGrip Class | tqsizegrip.html @@ -782,8 +782,8 @@ TQStyleSheet Class | tqstylesheet.html TQStyleSheet Member List | tqstylesheet-members.html TQStyleSheetItem Class | tqstylesheetitem.html TQStyleSheetItem Member List | tqstylesheetitem-members.html -QSyntaxHighlighter Class | ntqsyntaxhighlighter.html -QSyntaxHighlighter Member List | qsyntaxhighlighter-members.html +TQSyntaxHighlighter Class | tqsyntaxhighlighter.html +TQSyntaxHighlighter Member List | tqsyntaxhighlighter-members.html QTab Class | qtab.html QTab Member List | qtab-members.html QTabBar Class | ntqtabbar.html @@ -886,8 +886,8 @@ TQWMatrix Class | tqwmatrix.html TQWMatrix Member List | tqwmatrix-members.html TQWaitCondition Class | tqwaitcondition.html TQWaitCondition Member List | tqwaitcondition-members.html -QWhatsThis Class | ntqwhatsthis.html -QWhatsThis Member List | qwhatsthis-members.html +TQWhatsThis Class | tqwhatsthis.html +TQWhatsThis Member List | tqwhatsthis-members.html QWheelEvent Class | qwheelevent.html QWheelEvent Member List | qwheelevent-members.html TQWidget Class | tqwidget.html @@ -1157,14 +1157,14 @@ tqintcache.h Include File | tqintcache-h.html tqintdict.h Include File | tqintdict-h.html tqiodevice.h Include File | tqiodevice-h.html tqjiscodec.h Include File | tqjiscodec-h.html -ntqlabel.h Include File | qlabel-h.html +tqlabel.h Include File | tqlabel-h.html ntqlayout.h Include File | qlayout-h.html ntqlcdnumber.h Include File | qlcdnumber-h.html ntqlibrary.h Include File | qlibrary-h.html ntqlineedit.h Include File | qlineedit-h.html ntqlistbox.h Include File | qlistbox-h.html ntqlistview.h Include File | qlistview-h.html -ntqlocale.h Include File | qlocale-h.html +tqlocale.h Include File | tqlocale-h.html tqlocalfs.h Include File | tqlocalfs-h.html qmacstyle_mac.h Include File | qmacstyle_mac-h.html tqmainwindow.h Include File | tqmainwindow-h.html @@ -1230,7 +1230,7 @@ tqsettings.h Include File | tqsettings-h.html ntqsgistyle.h Include File | qsgistyle-h.html tqsignal.h Include File | tqsignal-h.html tqsignalmapper.h Include File | tqsignalmapper-h.html -ntqsimplerichtext.h Include File | qsimplerichtext-h.html +tqsimplerichtext.h Include File | tqsimplerichtext-h.html tqsize.h Include File | tqsize-h.html tqsizegrip.h Include File | tqsizegrip-h.html tqsizepolicy.h Include File | tqsizepolicy-h.html @@ -1266,7 +1266,7 @@ tqstyle.h Include File | tqstyle-h.html tqstylefactory.h Include File | tqstylefactory-h.html tqstyleplugin.h Include File | tqstyleplugin-h.html tqstylesheet.h Include File | tqstylesheet-h.html -ntqsyntaxhighlighter.h Include File | qsyntaxhighlighter-h.html +tqsyntaxhighlighter.h Include File | tqsyntaxhighlighter-h.html ntqtabbar.h Include File | qtabbar-h.html ntqtabdialog.h Include File | qtabdialog-h.html ntqtable.h Include File | qtable-h.html @@ -1299,7 +1299,7 @@ ntqvbox.h Include File | qvbox-h.html ntqvbuttongroup.h Include File | qvbuttongroup-h.html ntqvgroupbox.h Include File | qvgroupbox-h.html tqwaitcondition.h Include File | tqwaitcondition-h.html -ntqwhatsthis.h Include File | qwhatsthis-h.html +tqwhatsthis.h Include File | tqwhatsthis-h.html tqwidget.h Include File | tqwidget-h.html tqwidgetfactory.h Include File | tqwidgetfactory-h.html tqwidgetplugin.h Include File | tqwidgetplugin-h.html diff --git a/doc/html/toplevel-example.html b/doc/html/toplevel-example.html index e53d3519c..376ee1563 100644 --- a/doc/html/toplevel-example.html +++ b/doc/html/toplevel-example.html @@ -184,9 +184,9 @@ modeless dialogs.

                  if ( !widget ) {
                       widget = new TQVBox( parent, 0, f );
                       widget->setMargin( 20 );
          -            TQLabel *label = new TQLabel(flagList.join("&nbsp;| "), widget);
          -            label->setTextFormat(RichText);
          -            label->setAlignment(WordBreak);
          +            TQLabel *label = new TQLabel(flagList.join("&nbsp;| "), widget);
          +            label->setTextFormat(RichText);
          +            label->setAlignment(WordBreak);
                       TQPushButton *okButton = new TQPushButton( "Close", widget );
                       connect( okButton, TQ_SIGNAL(clicked()), widget, TQ_SLOT(close()) );
                       widget->move( pos() );
          diff --git a/doc/html/tqaction-application-example.html b/doc/html/tqaction-application-example.html
          index 3e8d44773..baab0a2f6 100644
          --- a/doc/html/tqaction-application-example.html
          +++ b/doc/html/tqaction-application-example.html
          @@ -121,9 +121,9 @@ private:
           #include <tqtextstream.h>
           #include <tqpainter.h>
           #include <tqpaintdevicemetrics.h>
          -#include <ntqwhatsthis.h>
          +#include <tqwhatsthis.h>
           #include <tqaction.h>
          -#include <ntqsimplerichtext.h>
          +#include <tqsimplerichtext.h>
           
           #include "filesave.xpm"
           #include "fileopen.xpm"
          @@ -334,21 +334,21 @@ void ApplicationWindow::print()
                   int dpiy = metrics.logicalDpiY();
                   int margin = (int) ( (2/2.54)*dpiy ); // 2 cm margins
                   TQRect view( margin, margin, metrics.width() - 2*margin, metrics.height() - 2*margin );
          -        TQSimpleRichText richText( TQStyleSheet::convertFromPlainText(e->text()),
          +        TQSimpleRichText richText( TQStyleSheet::convertFromPlainText(e->text()),
                                             TQFont(),
                                             e->context(),
                                             e->styleSheet(),
                                             e->mimeSourceFactory(),
                                             view.height() );
          -        richText.setWidth( &p, view.width() );
          +        richText.setWidth( &p, view.width() );
                   int page = 1;
                   do {
          -            richText.draw( &p, margin, margin, view, colorGroup() );
          +            richText.draw( &p, margin, margin, view, colorGroup() );
                       view.moveBy( 0, view.height() );
                       p.translate( 0 , -view.height() );
                       p.drawText( view.right() - p.fontMetrics().width( TQString::number( page ) ),
                                   view.bottom() + p.fontMetrics().ascent() + 5, TQString::number( page ) );
          -            if ( view.top() - margin >= richText.height() )
          +            if ( view.top() - margin >= richText.height() )
                           break;
                       printer->newPage();
                       page++;
          diff --git a/doc/html/tqaction.html b/doc/html/tqaction.html
          index ebbbc3122..36fb6b776 100644
          --- a/doc/html/tqaction.html
          +++ b/doc/html/tqaction.html
          @@ -504,7 +504,7 @@ appear at all.
           action. The text may contain rich text (HTML-like tags -- see
           TQStyleSheet for the list of supported tags). There is no default
           "What's This" text.
          -

          See also TQWhatsThis. +

          See also TQWhatsThis.

          Set this property's value with setWhatsThis() and get this property's value with whatsThis(). diff --git a/doc/html/tqchar-members.html b/doc/html/tqchar-members.html new file mode 100644 index 000000000..eea550453 --- /dev/null +++ b/doc/html/tqchar-members.html @@ -0,0 +1,74 @@ + + + + + +TQChar Member List + + + + + + + +
          + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

          Complete Member List for TQChar

          + +

          This is the complete list of member functions for +TQChar, including inherited members. + +

          + +


          + +
          Copyright © 2007 +TrolltechTrademarks +
          TQt 3.3.8
          +
          + diff --git a/doc/html/tqchar.html b/doc/html/tqchar.html new file mode 100644 index 000000000..a27f379e8 --- /dev/null +++ b/doc/html/tqchar.html @@ -0,0 +1,599 @@ + + + + + +TQChar Class + + + + + + + +
          + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

          TQChar Class Reference

          + +

          The TQChar class provides a lightweight Unicode character. +More... +

          Almost all the functions in this class are reentrant when TQt is built with thread support. The exception is decomposition(). +

          #include <tqstring.h> +

          List of all member functions. +

          Public Members

          +
            +
          • TQChar ()
          • +
          • TQChar ( char c )
          • +
          • TQChar ( uchar c )
          • +
          • TQChar ( uchar c, uchar r )
          • +
          • TQChar ( const TQChar & c )
          • +
          • TQChar ( ushort rc )
          • +
          • TQChar ( short rc )
          • +
          • TQChar ( uint rc )
          • +
          • TQChar ( int rc )
          • +
          • enum Category { NoCategory, Mark_NonSpacing, Mark_SpacingCombining, Mark_Enclosing, Number_DecimalDigit, Number_Letter, Number_Other, Separator_Space, Separator_Line, Separator_Paragraph, Other_Control, Other_Format, Other_Surrogate, Other_PrivateUse, Other_NotAssigned, Letter_Uppercase, Letter_Lowercase, Letter_Titlecase, Letter_Modifier, Letter_Other, Punctuation_Connector, Punctuation_Dash, Punctuation_Dask = Punctuation_Dash, Punctuation_Open, Punctuation_Close, Punctuation_InitialQuote, Punctuation_FinalQuote, Punctuation_Other, Symbol_Math, Symbol_Currency, Symbol_Modifier, Symbol_Other }
          • +
          • enum Direction { DirL, DirR, DirEN, DirES, DirET, DirAN, DirCS, DirB, DirS, DirWS, DirON, DirLRE, DirLRO, DirAL, DirRLE, DirRLO, DirPDF, DirNSM, DirBN }
          • +
          • enum Decomposition { Single, Canonical, Font, NoBreak, Initial, Medial, Final, Isolated, Circle, Super, Sub, Vertical, Wide, Narrow, Small, Square, Compat, Fraction }
          • +
          • enum Joining { OtherJoining, Dual, Right, Center }
          • +
          • enum CombiningClass { Combining_BelowLeftAttached = 200, Combining_BelowAttached = 202, Combining_BelowRightAttached = 204, Combining_LeftAttached = 208, Combining_RightAttached = 210, Combining_AboveLeftAttached = 212, Combining_AboveAttached = 214, Combining_AboveRightAttached = 216, Combining_BelowLeft = 218, Combining_Below = 220, Combining_BelowRight = 222, Combining_Left = 224, Combining_Right = 226, Combining_AboveLeft = 228, Combining_Above = 230, Combining_AboveRight = 232, Combining_DoubleBelow = 233, Combining_DoubleAbove = 234, Combining_IotaSubscript = 240 }
          • +
          • int digitValue () const
          • +
          • TQChar lower () const
          • +
          • TQChar upper () const
          • +
          • Category category () const
          • +
          • Direction direction () const
          • +
          • Joining joining () const
          • +
          • bool mirrored () const
          • +
          • TQChar mirroredChar () const
          • +
          • const TQString & decomposition () const
          • +
          • Decomposition decompositionTag () const
          • +
          • unsigned char combiningClass () const
          • +
          • char latin1 () const
          • +
          • ushort unicode () const
          • +
          • ushort & unicode ()
          • +
          • operator char () const
          • +
          • bool isNull () const
          • +
          • bool isPrint () const
          • +
          • bool isPunct () const
          • +
          • bool isSpace () const
          • +
          • bool isMark () const
          • +
          • bool isLetter () const
          • +
          • bool isNumber () const
          • +
          • bool isLetterOrNumber () const
          • +
          • bool isDigit () const
          • +
          • bool isSymbol () const
          • +
          • uchar cell () const
          • +
          • uchar row () const
          • +
          +

          Static Public Members

          +
            +
          • bool networkOrdered ()  (obsolete)
          • +
          +

          Related Functions

          + +

          Detailed Description

          + + + +The TQChar class provides a lightweight Unicode character. +

          +

          Unicode characters are (so far) 16-bit entities without any markup +or structure. This class represents such an entity. It is +lightweight, so it can be used everywhere. Most compilers treat it +like a "short int". (In a few years it may be necessary to make +TQChar 32-bit when more than 65536 Unicode code points have been +defined and come into use.) +

          TQChar provides a full complement of testing/classification +functions, converting to and from other formats, converting from +composed to decomposed Unicode, and trying to compare and +case-convert if you ask it to. +

          The classification functions include functions like those in +ctype.h, but operating on the full range of Unicode characters. +They all return TRUE if the character is a certain type of +character; otherwise they return FALSE. These classification +functions are isNull() (returns TRUE if the character is U+0000), +isPrint() (TRUE if the character is any sort of printable +character, including whitespace), isPunct() (any sort of +punctation), isMark() (Unicode Mark), isLetter (a letter), +isNumber() (any sort of numeric character), isLetterOrNumber(), +and isDigit() (decimal digits). All of these are wrappers around +category() which return the Unicode-defined category of each +character. +

          TQChar further provides direction(), which indicates the "natural" +writing direction of this character. The joining() function +indicates how the character joins with its neighbors (needed +mostly for Arabic) and finally mirrored(), which indicates whether +the character needs to be mirrored when it is printed in its +"unnatural" writing direction. +

          Composed Unicode characters (like å) can be converted to +decomposed Unicode ("a" followed by "ring above") by using +decomposition(). +

          In Unicode, comparison is not necessarily possible and case +conversion is very difficult at best. Unicode, covering the +"entire" world, also includes most of the world's case and sorting +problems. TQt tries, but not very hard: operator==() and friends +will do comparison based purely on the numeric Unicode value (code +point) of the characters, and upper() and lower() will do case +changes when the character has a well-defined upper/lower-case +equivalent. There is no provision for locale-dependent case +folding rules or comparison; these functions are meant to be fast +so they can be used unambiguously in data structures. (See +TQString::localeAwareCompare() though.) +

          The conversion functions include unicode() (to a scalar), latin1() +(to scalar, but converts all non-Latin-1 characters to 0), row() +(gives the Unicode row), cell() (gives the Unicode cell), +digitValue() (gives the integer value of any of the numerous digit +characters), and a host of constructors. +

          More information can be found in the document About Unicode. +

          See also TQString, TQCharRef, and Text Related Classes. + +


          Member Type Documentation

          +

          TQChar::Category

          + +

          This enum maps the Unicode character categories. +

          The following characters are normative in Unicode: +

            +
          • TQChar::Mark_NonSpacing - Unicode class name Mn +
          • TQChar::Mark_SpacingCombining - Unicode class name Mc +
          • TQChar::Mark_Enclosing - Unicode class name Me +
          • TQChar::Number_DecimalDigit - Unicode class name Nd +
          • TQChar::Number_Letter - Unicode class name Nl +
          • TQChar::Number_Other - Unicode class name No +
          • TQChar::Separator_Space - Unicode class name Zs +
          • TQChar::Separator_Line - Unicode class name Zl +
          • TQChar::Separator_Paragraph - Unicode class name Zp +
          • TQChar::Other_Control - Unicode class name Cc +
          • TQChar::Other_Format - Unicode class name Cf +
          • TQChar::Other_Surrogate - Unicode class name Cs +
          • TQChar::Other_PrivateUse - Unicode class name Co +
          • TQChar::Other_NotAssigned - Unicode class name Cn +

          The following categories are informative in Unicode: +

            +
          • TQChar::Letter_Uppercase - Unicode class name Lu +
          • TQChar::Letter_Lowercase - Unicode class name Ll +
          • TQChar::Letter_Titlecase - Unicode class name Lt +
          • TQChar::Letter_Modifier - Unicode class name Lm +
          • TQChar::Letter_Other - Unicode class name Lo +
          • TQChar::Punctuation_Connector - Unicode class name Pc +
          • TQChar::Punctuation_Dash - Unicode class name Pd +
          • TQChar::Punctuation_Open - Unicode class name Ps +
          • TQChar::Punctuation_Close - Unicode class name Pe +
          • TQChar::Punctuation_InitialQuote - Unicode class name Pi +
          • TQChar::Punctuation_FinalQuote - Unicode class name Pf +
          • TQChar::Punctuation_Other - Unicode class name Po +
          • TQChar::Symbol_Math - Unicode class name Sm +
          • TQChar::Symbol_Currency - Unicode class name Sc +
          • TQChar::Symbol_Modifier - Unicode class name Sk +
          • TQChar::Symbol_Other - Unicode class name So +

          There are two categories that are specific to TQt: +

            +
          • TQChar::NoCategory - used when TQt is dazed and confused and cannot +make sense of anything. +
          • TQChar::Punctuation_Dask - old typo alias for Punctuation_Dash +

          +

          TQChar::CombiningClass

          + +

          This enum type defines names for some of the Unicode combining +classes. See the Unicode + Standard for a description of the values. + +

          TQChar::Decomposition

          + +

          This enum type defines the Unicode decomposition attributes. See +the Unicode Standard for a +description of the values. + +

          TQChar::Direction

          + +

          This enum type defines the Unicode direction attributes. See the Unicode Standard for a +description of the values. +

          In order to conform to C/C++ naming conventions "Dir" is prepended +to the codes used in the Unicode Standard. + +

          TQChar::Joining

          + +

          This enum type defines the Unicode joining attributes. See the Unicode Standard for a +description of the values. + +


          Member Function Documentation

          +

          TQChar::TQChar () +

          + +

          Constructs a null TQChar (one that isNull()). + +

          TQChar::TQChar ( char c ) +

          + +

          Constructs a TQChar corresponding to ASCII/Latin-1 character c. + +

          TQChar::TQChar ( uchar c ) +

          + +

          Constructs a TQChar corresponding to ASCII/Latin-1 character c. + +

          TQChar::TQChar ( uchar c, uchar r ) +

          + +

          Constructs a TQChar for Unicode cell c in row r. + +

          TQChar::TQChar ( const TQChar & c ) +

          + +

          Constructs a copy of c. This is a deep copy, if such a +lightweight object can be said to have deep copies. + +

          TQChar::TQChar ( ushort rc ) +

          + +

          Constructs a TQChar for the character with Unicode code point rc. + +

          TQChar::TQChar ( short rc ) +

          + +

          Constructs a TQChar for the character with Unicode code point rc. + +

          TQChar::TQChar ( uint rc ) +

          + +

          Constructs a TQChar for the character with Unicode code point rc. + +

          TQChar::TQChar ( int rc ) +

          + +

          Constructs a TQChar for the character with Unicode code point rc. + +

          Category TQChar::category () const +

          +Returns the character category. +

          See also Category. + +

          uchar TQChar::cell () const +

          + +

          Returns the cell (least significant byte) of the Unicode +character. + +

          unsigned char TQChar::combiningClass () const +

          +Returns the combining class for the character as defined in the +Unicode standard. This is mainly useful as a positioning hint for +marks attached to a base character. +

          The TQt text rendering engine uses this information to correctly +position non spacing marks around a base character. + +

          const TQString & TQChar::decomposition () const +

          Warning: This function is not reentrant.

          + + +

          Decomposes a character into its parts. Returns TQString::null if no +decomposition exists. + +

          Decomposition TQChar::decompositionTag () const +

          +Returns the tag defining the composition of the character. Returns +TQChar::Single if no decomposition exists. + +

          int TQChar::digitValue () const +

          +Returns the numeric value of the digit, or -1 if the character is +not a digit. + +

          Direction TQChar::direction () const +

          +Returns the character's direction. +

          See also Direction. + +

          bool TQChar::isDigit () const +

          +Returns TRUE if the character is a decimal digit +(Number_DecimalDigit); otherwise returns FALSE. + +

          bool TQChar::isLetter () const +

          +Returns TRUE if the character is a letter (Letter_* categories); +otherwise returns FALSE. + +

          bool TQChar::isLetterOrNumber () const +

          +Returns TRUE if the character is a letter or number (Letter_* or +Number_* categories); otherwise returns FALSE. + +

          bool TQChar::isMark () const +

          +Returns TRUE if the character is a mark (Mark_* categories); +otherwise returns FALSE. + +

          bool TQChar::isNull () const +

          + +

          Returns TRUE if the character is the Unicode character 0x0000 +(ASCII NUL); otherwise returns FALSE. + +

          bool TQChar::isNumber () const +

          +Returns TRUE if the character is a number (of any sort - Number_* +categories); otherwise returns FALSE. +

          See also isDigit(). + +

          bool TQChar::isPrint () const +

          +Returns TRUE if the character is a printable character; otherwise +returns FALSE. This is any character not of category Cc or Cn. +

          Note that this gives no indication of whether the character is +available in a particular font. + +

          bool TQChar::isPunct () const +

          +Returns TRUE if the character is a punctuation mark (Punctuation_* +categories); otherwise returns FALSE. + +

          bool TQChar::isSpace () const +

          +Returns TRUE if the character is a separator character +(Separator_* categories); otherwise returns FALSE. + +

          bool TQChar::isSymbol () const +

          +Returns TRUE if the character is a symbol (Symbol_* categories); +otherwise returns FALSE. + +

          Joining TQChar::joining () const +

          +Warning: This function is not supported (it may change to use +Unicode character classes). +

          Returns information about the joining properties of the character +(needed for example, for Arabic). + +

          char TQChar::latin1 () const +

          + +

          Returns the Latin-1 value of this character, or 0 if it +cannot be represented in Latin-1. + +

          TQChar TQChar::lower () const +

          +Returns the lowercase equivalent if the character is uppercase; +otherwise returns the character itself. + +

          bool TQChar::mirrored () const +

          +Returns TRUE if the character is a mirrored character (one that +should be reversed if the text direction is reversed); otherwise +returns FALSE. + +

          TQChar TQChar::mirroredChar () const +

          +Returns the mirrored character if this character is a mirrored +character, otherwise returns the character itself. + +

          bool TQChar::networkOrdered () [static] +

          + +

          This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

          Returns TRUE if this character is in network byte order (MSB +first); otherwise returns FALSE. This is platform dependent. + +

          TQChar::operator char () const +

          + +

          Returns the Latin-1 character equivalent to the TQChar, or 0. This +is mainly useful for non-internationalized software. +

          See also unicode(). + +

          uchar TQChar::row () const +

          + +

          Returns the row (most significant byte) of the Unicode character. + +

          ushort TQChar::unicode () const +

          + +

          Returns the numeric Unicode value equal to the TQChar. Normally, +you should use TQChar objects as they are equivalent, but for some +low-level tasks (e.g. indexing into an array of Unicode +information), this function is useful. + +

          ushort & TQChar::unicode () +

          + +

          This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

          Returns a reference to the numeric Unicode value equal to the +TQChar. + +

          TQChar TQChar::upper () const +

          +Returns the uppercase equivalent if the character is lowercase; +otherwise returns the character itself. + +

          Related Functions

          +

          int operator!= ( TQChar c1, TQChar c2 ) +

          + +

          +

          Returns TRUE if c1 and c2 are not the same Unicode +character; otherwise returns FALSE. + +

          int operator!= ( char ch, TQChar c ) +

          + +

          This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

          +

          Returns TRUE if c is not the ASCII/Latin-1 character ch; +otherwise returns FALSE. + +

          int operator!= ( TQChar c, char ch ) +

          + +

          This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

          +

          Returns TRUE if c is not the ASCII/Latin-1 character ch; +otherwise returns FALSE. + +

          int operator< ( TQChar c1, TQChar c2 ) +

          + +

          +

          Returns TRUE if the numeric Unicode value of c1 is less than +that of c2; otherwise returns FALSE. + +

          int operator< ( TQChar c, char ch ) +

          + +

          This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

          +

          Returns TRUE if the numeric Unicode value of c is less than that +of the ASCII/Latin-1 character ch; otherwise returns FALSE. + +

          int operator< ( char ch, TQChar c ) +

          + +

          This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

          +

          Returns TRUE if the numeric Unicode value of the ASCII/Latin-1 +character ch is less than that of c; otherwise returns +FALSE. + +

          int operator<= ( TQChar c1, TQChar c2 ) +

          + +

          +

          Returns TRUE if the numeric Unicode value of c1 is less than +that of c2, or they are the same Unicode character; otherwise +returns FALSE. + +

          int operator<= ( TQChar c, char ch ) +

          + +

          This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

          +

          Returns TRUE if the numeric Unicode value of c is less than or +equal to that of the ASCII/Latin-1 character ch; otherwise +returns FALSE. + +

          int operator<= ( char ch, TQChar c ) +

          + +

          This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

          +

          Returns TRUE if the numeric Unicode value of the ASCII/Latin-1 +character ch is less than or equal to that of c; otherwise +returns FALSE. + +

          bool operator== ( TQChar c1, TQChar c2 ) +

          + +

          +

          Returns TRUE if c1 and c2 are the same Unicode character; +otherwise returns FALSE. + +

          bool operator== ( char ch, TQChar c ) +

          + +

          This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

          +

          Returns TRUE if c is the ASCII/Latin-1 character ch; +otherwise returns FALSE. + +

          bool operator== ( TQChar c, char ch ) +

          + +

          This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

          +

          Returns TRUE if c is the ASCII/Latin-1 character ch; +otherwise returns FALSE. + +

          int operator> ( TQChar c1, TQChar c2 ) +

          + +

          +

          Returns TRUE if the numeric Unicode value of c1 is greater than +that of c2; otherwise returns FALSE. + +

          int operator> ( TQChar c, char ch ) +

          + +

          This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

          +

          Returns TRUE if the numeric Unicode value of c is greater than +that of the ASCII/Latin-1 character ch; otherwise returns FALSE. + +

          int operator> ( char ch, TQChar c ) +

          + +

          This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

          +

          Returns TRUE if the numeric Unicode value of the ASCII/Latin-1 +character ch is greater than that of c; otherwise returns +FALSE. + +

          int operator>= ( TQChar c1, TQChar c2 ) +

          + +

          +

          Returns TRUE if the numeric Unicode value of c1 is greater than +that of c2, or they are the same Unicode character; otherwise +returns FALSE. + +

          int operator>= ( TQChar c, char ch ) +

          + +

          This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

          +

          Returns TRUE if the numeric Unicode value of c is greater than +or equal to that of the ASCII/Latin-1 character ch; otherwise +returns FALSE. + +

          int operator>= ( char ch, TQChar c ) +

          + +

          This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

          +

          Returns TRUE if the numeric Unicode value of the ASCII/Latin-1 +character ch is greater than or equal to that of c; +otherwise returns FALSE. + + +


          +This file is part of the TQt toolkit. +Copyright © 1995-2007 +Trolltech. All Rights Reserved.


          + +
          Copyright © 2007 +TrolltechTrademarks +
          TQt 3.3.8
          +
          + diff --git a/doc/html/tqcharref-members.html b/doc/html/tqcharref-members.html new file mode 100644 index 000000000..afc8d3b7e --- /dev/null +++ b/doc/html/tqcharref-members.html @@ -0,0 +1,46 @@ + + + + + +TQCharRef Member List + + + + + + + +
          + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

          Complete Member List for TQCharRef

          + +

          This is the complete list of member functions for +TQCharRef, including inherited members. + +

            +
          + +


          + +
          Copyright © 2007 +TrolltechTrademarks +
          TQt 3.3.8
          +
          + diff --git a/doc/html/tqcharref.html b/doc/html/tqcharref.html new file mode 100644 index 000000000..dfa9a8a3a --- /dev/null +++ b/doc/html/tqcharref.html @@ -0,0 +1,64 @@ + + + + + +TQCharRef Class + + + + + + + +
          + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

          TQCharRef Class Reference

          + +

          The TQCharRef class is a helper class for TQString. +More... +

          All the functions in this class are reentrant when TQt is built with thread support.

          +

          #include <tqstring.h> +

          List of all member functions. +


          Detailed Description

          + + + +The TQCharRef class is a helper class for TQString. +

          +

          When you get an object of type TQCharRef, if you can assign to it, +the assignment will apply to the character in the string from +which you got the reference. That is its whole purpose in life. +The TQCharRef becomes invalid once modifications are made to the +string: if you want to keep the character, copy it into a TQChar. +

          Most of the TQChar member functions also exist in TQCharRef. +However, they are not explicitly documented here. +

          See also TQString::operator[](), TQString::at(), TQChar, and Text Related Classes. + + +


          +This file is part of the TQt toolkit. +Copyright © 1995-2007 +Trolltech. All Rights Reserved.


          + +
          Copyright © 2007 +TrolltechTrademarks +
          TQt 3.3.8
          +
          + diff --git a/doc/html/tqconststring-members.html b/doc/html/tqconststring-members.html new file mode 100644 index 000000000..196c68d25 --- /dev/null +++ b/doc/html/tqconststring-members.html @@ -0,0 +1,49 @@ + + + + + +TQConstString Member List + + + + + + + +
          + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

          Complete Member List for TQConstString

          + +

          This is the complete list of member functions for +TQConstString, including inherited members. + +

          + +


          + +
          Copyright © 2007 +TrolltechTrademarks +
          TQt 3.3.8
          +
          + diff --git a/doc/html/tqconststring.html b/doc/html/tqconststring.html new file mode 100644 index 000000000..dcfa9b256 --- /dev/null +++ b/doc/html/tqconststring.html @@ -0,0 +1,91 @@ + + + + + +TQConstString Class + + + + + + + +
          + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

          TQConstString Class Reference

          + +

          The TQConstString class provides string objects using constant Unicode data. +More... +

          All the functions in this class are reentrant when TQt is built with thread support.

          +

          #include <tqstring.h> +

          List of all member functions. +

          Public Members

          + +

          Detailed Description

          + + + + +The TQConstString class provides string objects using constant Unicode data. +

          In order to minimize copying, highly optimized applications can +use TQConstString to provide a TQString-compatible object from +existing Unicode data. It is then the programmer's responsibility +to ensure that the Unicode data exists for the entire lifetime of +the TQConstString object. +

          A TQConstString is created with the TQConstString constructor. The +string held by the object can be obtained by calling string(). +

          See also Text Related Classes. + +


          Member Function Documentation

          +

          TQConstString::TQConstString ( const TQChar * unicode, uint length ) +

          +Constructs a TQConstString that uses the first length Unicode +characters in the array unicode. Any attempt to modify copies +of the string will cause it to create a copy of the data, thus it +remains forever unmodified. +

          The data in unicode is not copied. The caller must be able to +guarantee that unicode will not be deleted or modified. + +

          TQConstString::~TQConstString () +

          +Destroys the TQConstString, creating a copy of the data if other +strings are still using it. + +

          const TQString & TQConstString::string () const +

          + +

          Returns a constant string referencing the data passed during +construction. + + +


          +This file is part of the TQt toolkit. +Copyright © 1995-2007 +Trolltech. All Rights Reserved.


          + +
          Copyright © 2007 +TrolltechTrademarks +
          TQt 3.3.8
          +
          + diff --git a/doc/html/tqdir-example.html b/doc/html/tqdir-example.html index c85843346..558f107fa 100644 --- a/doc/html/tqdir-example.html +++ b/doc/html/tqdir-example.html @@ -55,7 +55,7 @@ body { background: #ffffff; color: black; } #include <tqtextstream.h> #include <ntqhbox.h> #include <ntqspinbox.h> -#include <ntqlabel.h> +#include <tqlabel.h> #include <ntqmultilineedit.h> #include <ntqheader.h> #include <ntqevent.h> @@ -205,7 +205,7 @@ void Preview::showPreview( const TQUrlTQHBox *row = new TQHBox( this ); row->setSpacing( 5 ); - (void)new TQLabel( tr( "Only show files smaller than: " ), row ); + (void)new TQLabel( tr( "Only show files smaller than: " ), row ); sizeSpinBox = new TQSpinBox( 1, 10000, 1, row ); sizeSpinBox->setSuffix( " KB" ); sizeSpinBox->setValue( 64 ); diff --git a/doc/html/tqfiledialog.html b/doc/html/tqfiledialog.html index 76de27ae9..2a575c942 100644 --- a/doc/html/tqfiledialog.html +++ b/doc/html/tqfiledialog.html @@ -212,10 +212,10 @@ function names differ, e.g. setContentsPreview that the user can see either the contents of the file, or information about the file.

          -    class Preview : public TQLabel, public TQFilePreview
          +    class Preview : public TQLabel, public TQFilePreview
               {
               public:
          -        Preview( TQWidget *parent=0 ) : TQLabel( parent ) {}
          +        Preview( TQWidget *parent=0 ) : TQLabel( parent ) {}
           
                   void previewUrl( const TQUrl &u )
                   {
          @@ -230,7 +230,7 @@ about the file.
             

          In the above snippet, we create a preview widget which inherits from -TQLabel and TQFilePreview. File preview widgets must inherit from +TQLabel and TQFilePreview. File preview widgets must inherit from TQFilePreview.

          Inside the class we reimplement TQFilePreview::previewUrl(), this is where we determine what happens when a file is selected. In the @@ -351,7 +351,7 @@ this row. If separator is TRUE, a small space is inserted between the last button of the row and the new button b.

          See also addWidgets(), addLeftWidget(), and addRightWidget(). -

          void TQFileDialog::addWidgets ( TQLabel * l, TQWidget * w, TQPushButton * b ) [protected] +

          void TQFileDialog::addWidgets ( TQLabel * l, TQWidget * w, TQPushButton * b ) [protected]

          Adds the specified widgets to the bottom of the file dialog. The label l is placed underneath the "file name" and the "file types" @@ -361,7 +361,7 @@ The button b is placed underneath the Cancel pushbutton. MyFileDialog::MyFileDialog( TQWidget* parent, const char* name ) : TQFileDialog( parent, name ) { - TQLabel* label = new TQLabel( "Added widgets", this ); + TQLabel* label = new TQLabel( "Added widgets", this ); TQLineEdit* lineedit = new TQLineEdit( this ); TQPushButton* pushbutton = new TQPushButton( this ); @@ -626,10 +626,10 @@ TQFilePreview, so you should pass the same widget twice. If you don't, you must remember to delete the preview object in order to avoid memory leaks.

          -    class Preview : public TQLabel, public TQFilePreview
          +    class Preview : public TQLabel, public TQFilePreview
               {
               public:
          -        Preview( TQWidget *parent=0 ) : TQLabel( parent ) {}
          +        Preview( TQWidget *parent=0 ) : TQLabel( parent ) {}
           
                   void previewUrl( const TQUrl &u )
                   {
          @@ -729,10 +729,10 @@ TQFilePreview, so you should pass the same widget twice. If you
           don't, you must remember to delete the preview object in order to
           avoid memory leaks.
           

          -    class Preview : public TQLabel, public TQFilePreview
          +    class Preview : public TQLabel, public TQFilePreview
               {
               public:
          -        Preview( TQWidget *parent=0 ) : TQLabel( parent ) {}
          +        Preview( TQWidget *parent=0 ) : TQLabel( parent ) {}
           
                   void previewUrl( const TQUrl &u )
                   {
          diff --git a/doc/html/tqfontmetrics.html b/doc/html/tqfontmetrics.html
          index 0a36b04c7..8d65e14a2 100644
          --- a/doc/html/tqfontmetrics.html
          +++ b/doc/html/tqfontmetrics.html
          @@ -161,7 +161,7 @@ value will be too small.
           

          See also descent().

          Examples: drawdemo/drawdemo.cpp and scrollview/scrollview.cpp. -

          TQRect TQFontMetrics::boundingRect ( TQChar ch ) const +

          TQRect TQFontMetrics::boundingRect ( TQChar ch ) const

          Returns the rectangle that is covered by ink if the character specified by ch were to be drawn at the origin of the coordinate @@ -261,7 +261,7 @@ base line).

          See also leading() and lineSpacing().

          Examples: grapher/grapher.cpp, hello/hello.cpp, and qfd/fontdisplayer.cpp. -

          bool TQFontMetrics::inFont ( TQChar ch ) const +

          bool TQFontMetrics::inFont ( TQChar ch ) const

          Returns TRUE if character ch is a valid character in the font; otherwise returns FALSE. @@ -273,14 +273,14 @@ Returns the leading of the font.

          This is the natural inter-line spacing.

          See also height() and lineSpacing(). -

          int TQFontMetrics::leftBearing ( TQChar ch ) const +

          int TQFontMetrics::leftBearing ( TQChar ch ) const

          Returns the left bearing of character ch in the font.

          The left bearing is the right-ward distance of the left-most pixel of the character from the logical origin of the character. This value is negative if the pixels of the character extend to the left of the logical origin. -

          See width(TQChar) for a graphical description of this metric. +

          See width(TQChar) for a graphical description of this metric.

          See also rightBearing(), minLeftBearing(), and width().

          Example: qfd/fontdisplayer.cpp. @@ -330,7 +330,7 @@ Returns the distance from the base line to where an overline should be drawn.

          See also underlinePos(), strikeOutPos(), and lineWidth(). -

          int TQFontMetrics::rightBearing ( TQChar ch ) const +

          int TQFontMetrics::rightBearing ( TQChar ch ) const

          Returns the right bearing of character ch in the font.

          The right bearing is the left-ward distance of the right-most @@ -375,7 +375,7 @@ Returns the distance from the base line to where an underscore should be drawn.

          See also overlinePos(), strikeOutPos(), and lineWidth(). -

          int TQFontMetrics::width ( TQChar ch ) const +

          int TQFontMetrics::width ( TQChar ch ) const

          Returns the logical width of character ch in pixels. This is a diff --git a/doc/html/tqimageconsumer.html b/doc/html/tqimageconsumer.html index 1a92b5531..8bc981f42 100644 --- a/doc/html/tqimageconsumer.html +++ b/doc/html/tqimageconsumer.html @@ -52,7 +52,7 @@ The TQImageConsumer class is an abstraction used by TQMovie class, or TQLabel::setMovie(), are easy to use and for +

          The TQMovie class, or TQLabel::setMovie(), are easy to use and for most situations do what you want with regards animated images.

          A TQImageConsumer consumes information about changes to the TQImage maintained by a TQImageDecoder. Think of the TQImage as the model or diff --git a/doc/html/tqlabel-h.html b/doc/html/tqlabel-h.html new file mode 100644 index 000000000..637ea6fea --- /dev/null +++ b/doc/html/tqlabel-h.html @@ -0,0 +1,219 @@ + + + + + +tqlabel.h Include File + + + + + + + +
          + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

          tqlabel.h

          + +

          This is the verbatim text of the tqlabel.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


          +
          +/**********************************************************************
          +** $Id: qt/tqlabel.h   3.3.8   edited Jan 11 14:38 $
          +**
          +** Definition of TQLabel widget class
          +**
          +** Created : 941215
          +**
          +** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
          +**
          +** This file is part of the widgets module of the TQt GUI Toolkit.
          +**
          +** This file may be used under the terms of the GNU General Public
          +** License versions 2.0 or 3.0 as published by the Free Software
          +** Foundation and appearing in the file LICENSE.GPL included in the
          +** packaging of this file. Alternatively you may (at your option) use any
          +** later version of the GNU General Public License if such license has
          +** been publicly approved by Trolltech ASA (or its successors, if any)
          +** and the KDE Free TQt Foundation.
          +**
          +** Please review the following information to ensure GNU General
          +** Public Licensing requirements will be met:
          +** http://trolltech.com/products/qt/licenses/licensing/opensource/.
          +** If you are unsure which license is appropriate for your use, please
          +** review the following information:
          +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
          +** or contact the sales department at sales@trolltech.com.
          +**
          +** This file may be used under the terms of the Q Public License as
          +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
          +** included in the packaging of this file.  Licensees holding valid TQt
          +** Commercial licenses may use this file in accordance with the TQt
          +** Commercial License Agreement provided with the Software.
          +**
          +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
          +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
          +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
          +** herein.
          +**
          +**********************************************************************/
          +
          +#ifndef TQLABEL_H
          +#define TQLABEL_H
          +
          +#ifndef QT_H
          +#include "ntqframe.h"
          +#endif // QT_H
          +
          +#ifndef TQT_NO_LABEL
          +
          +class TQSimpleRichText;
          +class TQLabelPrivate;
          +
          +class TQ_EXPORT TQLabel : public TQFrame
          +{
          +    TQ_OBJECT
          +    TQ_PROPERTY( TQString text READ text WRITE setText )
          +    TQ_PROPERTY( TextFormat textFormat READ textFormat WRITE setTextFormat )
          +    TQ_PROPERTY( TQPixmap pixmap READ pixmap WRITE setPixmap )
          +    TQ_PROPERTY( bool scaledContents READ hasScaledContents WRITE setScaledContents )
          +    TQ_PROPERTY( Alignment alignment READ alignment WRITE setAlignment )
          +    TQ_PROPERTY( int indent READ indent WRITE setIndent )
          +    TQ_OVERRIDE( BackgroundMode backgroundMode DESIGNABLE true)
          +
          +public:
          +    TQLabel( TQWidget *parent, const char* name=0, WFlags f=0 );
          +    TQLabel( const TQString &text, TQWidget *parent, const char* name=0,
          +	    WFlags f=0 );
          +    TQLabel( TQWidget *buddy, const TQString &,
          +	    TQWidget *parent, const char* name=0, WFlags f=0 );
          +    ~TQLabel();
          +
          +    TQString	 text()		const	{ return ltext; }
          +    TQPixmap     *pixmap()	const	{ return lpixmap; }
          +#ifndef TQT_NO_PICTURE
          +    TQPicture    *picture()	const	{ return lpicture; }
          +#endif
          +#ifndef TQT_NO_MOVIE
          +    TQMovie      *movie()		const;
          +#endif
          +
          +    TextFormat textFormat() const;
          +    void 	 setTextFormat( TextFormat );
          +
          +    int		 alignment() const	{ return align; }
          +    virtual void setAlignment( int );
          +    int		 indent() const		{ return extraMargin; }
          +    void 	 setIndent( int );
          +
          +    bool 	 autoResize() const	{ return autoresize; }
          +    virtual void setAutoResize( bool );
          +#ifndef TQT_NO_IMAGE_SMOOTHSCALE
          +    bool 	hasScaledContents() const;
          +    void 	setScaledContents( bool );
          +#endif
          +    TQSize	 sizeHint() const;
          +    TQSize	 minimumSizeHint() const;
          +#ifndef TQT_NO_ACCEL
          +    virtual void setBuddy( TQWidget * );
          +    TQWidget     *buddy() const;
          +#endif
          +    int		 heightForWidth(int) const;
          +
          +    void setFont( const TQFont &f );
          +
          +public slots:
          +    virtual void setText( const TQString &);
          +    virtual void setPixmap( const TQPixmap & );
          +#ifndef TQT_NO_PICTURE
          +    virtual void setPicture( const TQPicture & );
          +#endif
          +#ifndef TQT_NO_MOVIE
          +    virtual void setMovie( const TQMovie & );
          +#endif
          +    virtual void setNum( int );
          +    virtual void setNum( double );
          +    void	 clear();
          +
          +protected:
          +    void	 drawContents( TQPainter * );
          +    void	 fontChange( const TQFont & );
          +    void	 resizeEvent( TQResizeEvent* );
          +
          +private slots:
          +#ifndef TQT_NO_ACCEL
          +    void	 acceleratorSlot();
          +    void	 buddyDied();
          +#endif
          +#ifndef TQT_NO_MOVIE
          +    void	 movieUpdated(const TQRect&);
          +    void	 movieResized(const TQSize&);
          +#endif
          +
          +private:
          +    void	init();
          +    void	clearContents();
          +    void	updateLabel( TQSize oldSizeHint );
          +    TQSize	sizeForWidth( int w ) const;
          +    TQString	ltext;
          +    TQPixmap    *lpixmap;
          +#ifndef TQT_NO_PICTURE
          +    TQPicture   *lpicture;
          +#endif
          +#ifndef TQT_NO_MOVIE
          +    TQMovie *	lmovie;
          +#endif
          +#ifndef TQT_NO_ACCEL
          +    TQWidget *	lbuddy;
          +#endif
          +    ushort	align;
          +    short	extraMargin;
          +    uint	autoresize:1;
          +    uint	scaledcontents :1;
          +    TextFormat textformat;
          +#ifndef TQT_NO_RICHTEXT
          +    TQSimpleRichText* doc;
          +#endif
          +#ifndef TQT_NO_ACCEL
          +    TQAccel *	accel;
          +#endif
          +    TQLabelPrivate* d;
          +
          +    friend class TQTipLabel;
          +
          +private:	// Disabled copy constructor and operator=
          +#if defined(TQ_DISABLE_COPY)
          +    TQLabel( const TQLabel & );
          +    TQLabel &operator=( const TQLabel & );
          +#endif
          +};
          +
          +
          +#endif // TQT_NO_LABEL
          +
          +#endif // TQLABEL_H
          +
          + +


          + +
          Copyright © 2007 +TrolltechTrademarks +
          TQt 3.3.8
          +
          + diff --git a/doc/html/tqlabel-m.png b/doc/html/tqlabel-m.png new file mode 100644 index 000000000..9747821a1 Binary files /dev/null and b/doc/html/tqlabel-m.png differ diff --git a/doc/html/tqlabel-members.html b/doc/html/tqlabel-members.html new file mode 100644 index 000000000..6a3df6807 --- /dev/null +++ b/doc/html/tqlabel-members.html @@ -0,0 +1,378 @@ + + + + + +TQLabel Member List + + + + + + + +
          + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

          Complete Member List for TQLabel

          + +

          This is the complete list of member functions for +TQLabel, including inherited members. + +

          + +


          + +
          Copyright © 2007 +TrolltechTrademarks +
          TQt 3.3.8
          +
          + diff --git a/doc/html/tqlabel-w.png b/doc/html/tqlabel-w.png new file mode 100644 index 000000000..9747821a1 Binary files /dev/null and b/doc/html/tqlabel-w.png differ diff --git a/doc/html/tqlabel.html b/doc/html/tqlabel.html new file mode 100644 index 000000000..4284b03f4 --- /dev/null +++ b/doc/html/tqlabel.html @@ -0,0 +1,420 @@ + + + + + +TQLabel Class + + + + + + + +
          + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

          TQLabel Class Reference

          + +

          The TQLabel widget provides a text or image display. +More... +

          #include <tqlabel.h> +

          Inherits TQFrame. +

          List of all member functions. +

          Public Members

          +
            +
          • TQLabel ( TQWidget * parent, const char * name = 0, WFlags f = 0 )
          • +
          • TQLabel ( const TQString & text, TQWidget * parent, const char * name = 0, WFlags f = 0 )
          • +
          • TQLabel ( TQWidget * buddy, const TQString & text, TQWidget * parent, const char * name = 0, WFlags f = 0 )
          • +
          • ~TQLabel ()
          • +
          • TQString text () const
          • +
          • TQPixmap * pixmap () const
          • +
          • TQPicture * picture () const
          • +
          • TQMovie * movie () const
          • +
          • TextFormat textFormat () const
          • +
          • void setTextFormat ( TextFormat )
          • +
          • int alignment () const
          • +
          • virtual void setAlignment ( int )
          • +
          • int indent () const
          • +
          • void setIndent ( int )
          • +
          • bool autoResize () const  (obsolete)
          • +
          • virtual void setAutoResize ( bool enable )  (obsolete)
          • +
          • bool hasScaledContents () const
          • +
          • void setScaledContents ( bool )
          • +
          • virtual void setBuddy ( TQWidget * buddy )
          • +
          • TQWidget * buddy () const
          • +
          • virtual void setFont ( const TQFont & f )
          • +
          +

          Public Slots

          +
            +
          • virtual void setText ( const TQString & )
          • +
          • virtual void setPixmap ( const TQPixmap & )
          • +
          • virtual void setPicture ( const TQPicture & picture )
          • +
          • virtual void setMovie ( const TQMovie & movie )
          • +
          • virtual void setNum ( int num )
          • +
          • virtual void setNum ( double num )
          • +
          • void clear ()
          • +
          +

          Properties

          +
            +
          • Alignment alignment - the alignment of the label's contents
          • +
          • BackgroundMode backgroundMode - the label's background mode  (read only)
          • +
          • int indent - the label's text indent in pixels
          • +
          • TQPixmap pixmap - the label's pixmap
          • +
          • bool scaledContents - whether the label will scale its contents to fill all available space
          • +
          • TQString text - the label's text
          • +
          • TextFormat textFormat - the label's text format
          • +
          +

          Protected Members

          + +

          Detailed Description

          + + +The TQLabel widget provides a text or image display. +

          + + +

          TQLabel is used for displaying text or an image. No user +interaction functionality is provided. The visual appearance of +the label can be configured in various ways, and it can be used +for specifying a focus accelerator key for another widget. +

          A TQLabel can contain any of the following content types: +

          +
          Content Setting +
          Plain text +Pass a TQString to setText(). +
          Rich text +Pass a TQString that contains rich text to setText(). +
          A pixmap +Pass a TQPixmap to setPixmap(). +
          A movie +Pass a TQMovie to setMovie(). +
          A number +Pass an int or a double to setNum(), which converts +the number to plain text. +
          Nothing +The same as an empty plain text. This is the default. Set +by clear(). +
          +

          When the content is changed using any of these functions, any +previous content is cleared. +

          The look of a TQLabel can be tuned in several ways. All the +settings of TQFrame are available for specifying a widget frame. +The positioning of the content within the TQLabel widget area can +be tuned with setAlignment() and setIndent(). For example, this +code sets up a sunken panel with a two-line text in the bottom +right corner (both lines being flush with the right side of the +label): +

          +    TQLabel *label = new TQLabel( this );
          +    label->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
          +    label->setText( "first line\nsecond line" );
          +    label->setAlignment( AlignBottom | AlignRight );
          +    
          + +

          A TQLabel is often used as a label for an interactive widget. For +this use TQLabel provides a useful mechanism for adding an +accelerator key (see TQAccel) that will set the keyboard focus to +the other widget (called the TQLabel's "buddy"). For example: +

          +    TQLineEdit* phoneEdit = new TQLineEdit( this, "phoneEdit" );
          +    TQLabel* phoneLabel = new TQLabel( phoneEdit, "&Phone:", this, "phoneLabel" );
          +    
          + +

          In this example, keyboard focus is transferred to the label's +buddy (the TQLineEdit) when the user presses Alt+P. You can +also use the setBuddy() function to accomplish the same thing. +

          +

          See also TQLineEdit, TQTextEdit, TQPixmap, TQMovie, GUI Design Handbook: Label, Basic Widgets, and Text Related Classes. + +


          Member Function Documentation

          +

          TQLabel::TQLabel ( TQWidget * parent, const char * name = 0, WFlags f = 0 ) +

          +Constructs an empty label. +

          The parent, name and widget flag f, arguments are passed +to the TQFrame constructor. +

          See also alignment, setFrameStyle(), and indent. + +

          TQLabel::TQLabel ( const TQString & text, TQWidget * parent, const char * name = 0, WFlags f = 0 ) +

          +Constructs a label that displays the text, text. +

          The parent, name and widget flag f, arguments are passed +to the TQFrame constructor. +

          See also text, alignment, setFrameStyle(), and indent. + +

          TQLabel::TQLabel ( TQWidget * buddy, const TQString & text, TQWidget * parent, const char * name = 0, WFlags f = 0 ) +

          +Constructs a label that displays the text text. The label has a +buddy widget, buddy. +

          If the text contains an underlined letter (a letter preceded by +an ampersand, &), and the text is in plain text format, when the +user presses Alt+ the underlined letter, focus is passed to the +buddy widget. +

          The parent, name and widget flag, f, arguments are passed +to the TQFrame constructor. +

          See also text, setBuddy(), alignment, setFrameStyle(), and indent. + +

          TQLabel::~TQLabel () +

          +Destroys the label. + +

          int TQLabel::alignment () const +

          Returns the alignment of the label's contents. +See the "alignment" property for details. +

          bool TQLabel::autoResize () const +

          + +

          This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

          Returns TRUE if auto-resizing is enabled, or FALSE if auto-resizing +is disabled. +

          Auto-resizing is disabled by default. +

          See also setAutoResize(). + +

          TQWidget * TQLabel::buddy () const +

          +Returns this label's buddy, or 0 if no buddy is currently set. +

          See also setBuddy(). + +

          void TQLabel::clear () [slot] +

          +Clears any label contents. Equivalent to setText( "" ). + +

          void TQLabel::drawContents ( TQPainter * p ) [virtual protected] +

          +Draws the label contents using the painter p. + +

          Reimplemented from TQFrame. +

          bool TQLabel::hasScaledContents () const +

          Returns TRUE if the label will scale its contents to fill all available space; otherwise returns FALSE. +See the "scaledContents" property for details. +

          int TQLabel::indent () const +

          Returns the label's text indent in pixels. +See the "indent" property for details. +

          TQMovie * TQLabel::movie () const +

          +Returns a pointer to the label's movie, or 0 if no movie has been +set. +

          See also setMovie(). + +

          TQPicture * TQLabel::picture () const +

          + +

          Returns the label's picture or 0 if the label doesn't have a +picture. + +

          TQPixmap * TQLabel::pixmap () const +

          Returns the label's pixmap. +See the "pixmap" property for details. +

          void TQLabel::setAlignment ( int ) [virtual] +

          Sets the alignment of the label's contents. +See the "alignment" property for details. +

          void TQLabel::setAutoResize ( bool enable ) [virtual] +

          This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

          Enables auto-resizing if enable is TRUE, or disables it if enable is FALSE. +

          When auto-resizing is enabled the label will resize itself to fit +the contents whenever the contents change. The top-left corner is +not moved. This is useful for TQLabel widgets that are not managed by +a TQLayout (e.g., top-level widgets). +

          Auto-resizing is disabled by default. +

          See also autoResize(), adjustSize(), and sizeHint. + +

          void TQLabel::setBuddy ( TQWidget * buddy ) [virtual] +

          +Sets this label's buddy to buddy. +

          When the user presses the accelerator key indicated by this label, +the keyboard focus is transferred to the label's buddy widget. +

          The buddy mechanism is only available for TQLabels that contain +plain text in which one letter is prefixed with an ampersand, &. +This letter is set as the accelerator key. The letter is displayed +underlined, and the '&' is not displayed (i.e. the ShowPrefix +alignment flag is turned on; see setAlignment()). +

          In a dialog, you might create two data entry widgets and a label +for each, and set up the geometry layout so each label is just to +the left of its data entry widget (its "buddy"), for example: +

          +    TQLineEdit *nameEd  = new TQLineEdit( this );
          +    TQLabel    *nameLb  = new TQLabel( "&Name:", this );
          +    nameLb->setBuddy( nameEd );
          +    TQLineEdit *phoneEd = new TQLineEdit( this );
          +    TQLabel    *phoneLb = new TQLabel( "&Phone:", this );
          +    phoneLb->setBuddy( phoneEd );
          +    // ( layout setup not shown )
          +    
          + +

          With the code above, the focus jumps to the Name field when the +user presses Alt+N, and to the Phone field when the user presses +Alt+P. +

          To unset a previously set buddy, call this function with buddy +set to 0. +

          See also buddy(), text, TQAccel, and alignment. + +

          Examples: addressbook/centralwidget.cpp, chart/optionsform.cpp, and regexptester/regexptester.cpp. +

          void TQLabel::setFont ( const TQFont & f ) [virtual] +

          +Sets the font used on the TQLabel to font f. + +

          Example: menu/menu.cpp. +

          Reimplemented from TQWidget. +

          void TQLabel::setIndent ( int ) +

          Sets the label's text indent in pixels. +See the "indent" property for details. +

          void TQLabel::setMovie ( const TQMovie & movie ) [virtual slot] +

          +Sets the label contents to movie. Any previous content is +cleared. +

          The buddy accelerator, if any, is disabled. +

          The label resizes itself if auto-resizing is enabled. +

          See also movie() and setBuddy(). + +

          void TQLabel::setNum ( int num ) [virtual slot] +

          +Sets the label contents to plain text containing the textual +representation of integer num. Any previous content is cleared. +Does nothing if the integer's string representation is the same as +the current contents of the label. +

          The buddy accelerator, if any, is disabled. +

          The label resizes itself if auto-resizing is enabled. +

          See also text, TQString::setNum(), and setBuddy(). + +

          void TQLabel::setNum ( double num ) [virtual slot] +

          +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

          Sets the label contents to plain text containing the textual +representation of double num. Any previous content is cleared. +Does nothing if the double's string representation is the same as +the current contents of the label. +

          The buddy accelerator, if any, is disabled. +

          The label resizes itself if auto-resizing is enabled. +

          See also text, TQString::setNum(), and setBuddy(). + +

          void TQLabel::setPicture ( const TQPicture & picture ) [virtual slot] +

          +Sets the label contents to picture. Any previous content is +cleared. +

          The buddy accelerator, if any, is disabled. +

          See also picture() and setBuddy(). + +

          void TQLabel::setPixmap ( const TQPixmap & ) [virtual slot] +

          Sets the label's pixmap. +See the "pixmap" property for details. +

          void TQLabel::setScaledContents ( bool ) +

          Sets whether the label will scale its contents to fill all available space. +See the "scaledContents" property for details. +

          void TQLabel::setText ( const TQString & ) [virtual slot] +

          Sets the label's text. +See the "text" property for details. +

          void TQLabel::setTextFormat ( TextFormat ) +

          Sets the label's text format. +See the "textFormat" property for details. +

          TQString TQLabel::text () const +

          Returns the label's text. +See the "text" property for details. +

          TextFormat TQLabel::textFormat () const +

          Returns the label's text format. +See the "textFormat" property for details. +


          Property Documentation

          +

          Alignment alignment

          +

          This property holds the alignment of the label's contents. +

          The alignment is a bitwise OR of TQt::AlignmentFlags and TQt::TextFlags values. The ExpandTabs, SingleLine and ShowPrefix flags apply only if the label contains plain text; +otherwise they are ignored. The DontClip flag is always +ignored. WordBreak applies to both rich text and plain text +labels. The BreakAnywhere flag is not supported in TQLabel. +

          If the label has a buddy, the ShowPrefix flag is forced to +TRUE. +

          The default alignment is AlignAuto | AlignVCenter | ExpandTabs +if the label doesn't have a buddy and AlignAuto | AlignVCenter | ExpandTabs | ShowPrefix if the label has a buddy. If the label +contains rich text, additionally WordBreak is turned on. +

          See also TQt::AlignmentFlags, setBuddy(), and text. + +

          Set this property's value with setAlignment() and get this property's value with alignment(). +

          BackgroundMode backgroundMode

          +

          This property holds the label's background mode. +

          Get this property with backgroundMode(). +

          See also TQWidget::backgroundMode. + +

          int indent

          +

          This property holds the label's text indent in pixels. +

          If a label displays text, the indent applies to the left edge if +alignment() is AlignLeft, to the right edge if alignment() is +AlignRight, to the top edge if alignment() is AlignTop, and +to to the bottom edge if alignment() is AlignBottom. +

          If indent is negative, or if no indent has been set, the label +computes the effective indent as follows: If frameWidth() is 0, +the effective indent becomes 0. If frameWidth() is greater than 0, +the effective indent becomes half the width of the "x" character +of the widget's current font(). +

          See also alignment, frameWidth, and font. + +

          Set this property's value with setIndent() and get this property's value with indent(). +

          TQPixmap pixmap

          +

          This property holds the label's pixmap. +

          If no pixmap has been set this will return an invalid pixmap. +

          Setting the pixmap clears any previous content, and resizes the +label if TQLabel::autoResize() is TRUE. The buddy accelerator, +if any, is disabled. + +

          Set this property's value with setPixmap() and get this property's value with pixmap(). +

          bool scaledContents

          +

          This property holds whether the label will scale its contents to fill all available space. +

          When enabled and the label shows a pixmap, it will scale the +pixmap to fill the available space. +

          This property's default is FALSE. +

          See also scaledContents. + +

          Set this property's value with setScaledContents() and get this property's value with hasScaledContents(). +

          TQString text

          +

          This property holds the label's text. +

          If no text has been set this will return an empty string. Setting +the text clears any previous content, unless they are the same. +

          The text will be interpreted either as a plain text or as a rich +text, depending on the text format setting; see setTextFormat(). +The default setting is AutoText, i.e. TQLabel will try to +auto-detect the format of the text set. +

          If the text is interpreted as a plain text and a buddy has been +set, the buddy accelerator key is updated from the new text. +

          The label resizes itself if auto-resizing is enabled. +

          Note that TQLabel is well-suited to display small rich text +documents, i.e. those small documents that get their document +specific settings (font, text color, link color) from the label's +palette and font properties. For large documents, use TQTextEdit +in read-only mode instead. TQTextEdit will flicker less on resize +and can also provide a scrollbar when necessary. +

          See also textFormat, setBuddy(), and alignment. + +

          Set this property's value with setText() and get this property's value with text(). +

          TextFormat textFormat

          +

          This property holds the label's text format. +

          See the TQt::TextFormat enum for an explanation of the possible +options. +

          The default format is AutoText. +

          See also text. + +

          Set this property's value with setTextFormat() and get this property's value with textFormat(). + +


          +This file is part of the TQt toolkit. +Copyright © 1995-2007 +Trolltech. All Rights Reserved.


          + +
          Copyright © 2007 +TrolltechTrademarks +
          TQt 3.3.8
          +
          + diff --git a/doc/html/tqlocale-h.html b/doc/html/tqlocale-h.html new file mode 100644 index 000000000..163a3ba1b --- /dev/null +++ b/doc/html/tqlocale-h.html @@ -0,0 +1,539 @@ + + + + + +tqlocale.h Include File + + + + + + + +
          + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

          tqlocale.h

          + +

          This is the verbatim text of the tqlocale.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


          +
          +/****************************************************************************
          +** $Id: qt/tqlocale.h   3.3.8   edited Jan 11 14:38 $
          +**
          +** Declaration of the TQLocale class
          +**
          +** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
          +**
          +** This file is part of the tools module of the TQt GUI Toolkit.
          +**
          +** This file may be used under the terms of the GNU General Public
          +** License versions 2.0 or 3.0 as published by the Free Software
          +** Foundation and appearing in the file LICENSE.GPL included in the
          +** packaging of this file. Alternatively you may (at your option) use any
          +** later version of the GNU General Public License if such license has
          +** been publicly approved by Trolltech ASA (or its successors, if any)
          +** and the KDE Free TQt Foundation.
          +**
          +** Please review the following information to ensure GNU General
          +** Public Licensing requirements will be met:
          +** http://trolltech.com/products/qt/licenses/licensing/opensource/.
          +** If you are unsure which license is appropriate for your use, please
          +** review the following information:
          +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
          +** or contact the sales department at sales@trolltech.com.
          +**
          +** This file may be used under the terms of the Q Public License as
          +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
          +** included in the packaging of this file.  Licensees holding valid TQt
          +** Commercial licenses may use this file in accordance with the TQt
          +** Commercial License Agreement provided with the Software.
          +**
          +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
          +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
          +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
          +** herein.
          +**
          +**********************************************************************/
          +
          +#ifndef TQLOCALE_H
          +#define TQLOCALE_H
          +
          +#include "tqstring.h"
          +
          +struct TQLocalePrivate;
          +
          +class TQ_EXPORT TQLocale
          +{
          +    friend class TQString;
          +
          +public:
          +    enum Language {
          +        C = 1,
          +        Abkhazian = 2,
          +        Afan = 3,
          +        Afar = 4,
          +        Afrikaans = 5,
          +        Albanian = 6,
          +        Amharic = 7,
          +        Arabic = 8,
          +        Armenian = 9,
          +        Assamese = 10,
          +        Aymara = 11,
          +        Azerbaijani = 12,
          +        Bashkir = 13,
          +        Basque = 14,
          +        Bengali = 15,
          +        Bhutani = 16,
          +        Bihari = 17,
          +        Bislama = 18,
          +        Breton = 19,
          +        Bulgarian = 20,
          +        Burmese = 21,
          +        Byelorussian = 22,
          +        Cambodian = 23,
          +        Catalan = 24,
          +        Chinese = 25,
          +        Corsican = 26,
          +        Croatian = 27,
          +        Czech = 28,
          +        Danish = 29,
          +        Dutch = 30,
          +        English = 31,
          +        Esperanto = 32,
          +        Estonian = 33,
          +        Faroese = 34,
          +        FijiLanguage = 35,
          +        Finnish = 36,
          +        French = 37,
          +        Frisian = 38,
          +        Gaelic = 39,
          +        Galician = 40,
          +        Georgian = 41,
          +        German = 42,
          +        Greek = 43,
          +        Greenlandic = 44,
          +        Guarani = 45,
          +        Gujarati = 46,
          +        Hausa = 47,
          +        Hebrew = 48,
          +        Hindi = 49,
          +        Hungarian = 50,
          +        Icelandic = 51,
          +        Indonesian = 52,
          +        Interlingua = 53,
          +        Interlingue = 54,
          +        Inuktitut = 55,
          +        Inupiak = 56,
          +        Irish = 57,
          +        Italian = 58,
          +        Japanese = 59,
          +        Javanese = 60,
          +        Kannada = 61,
          +        Kashmiri = 62,
          +        Kazakh = 63,
          +        Kinyarwanda = 64,
          +        Kirghiz = 65,
          +        Korean = 66,
          +        Kurdish = 67,
          +        Kurundi = 68,
          +        Laothian = 69,
          +        Latin = 70,
          +        Latvian = 71,
          +        Lingala = 72,
          +        Lithuanian = 73,
          +        Macedonian = 74,
          +        Malagasy = 75,
          +        Malay = 76,
          +        Malayalam = 77,
          +        Maltese = 78,
          +        Maori = 79,
          +        Marathi = 80,
          +        Moldavian = 81,
          +        Mongolian = 82,
          +        NauruLanguage = 83,
          +        Nepali = 84,
          +        Norwegian = 85,
          +        Occitan = 86,
          +        Oriya = 87,
          +        Pashto = 88,
          +        Persian = 89,
          +        Polish = 90,
          +        Portuguese = 91,
          +        Punjabi = 92,
          +        Quechua = 93,
          +        RhaetoRomance = 94,
          +        Romanian = 95,
          +        Russian = 96,
          +        Samoan = 97,
          +        Sangho = 98,
          +        Sanskrit = 99,
          +        Serbian = 100,
          +        SerboCroatian = 101,
          +        Sesotho = 102,
          +        Setswana = 103,
          +        Shona = 104,
          +        Sindhi = 105,
          +        Singhalese = 106,
          +        Siswati = 107,
          +        Slovak = 108,
          +        Slovenian = 109,
          +        Somali = 110,
          +        Spanish = 111,
          +        Sundanese = 112,
          +        Swahili = 113,
          +        Swedish = 114,
          +        Tagalog = 115,
          +        Tajik = 116,
          +        Tamil = 117,
          +        Tatar = 118,
          +        Telugu = 119,
          +        Thai = 120,
          +        Tibetan = 121,
          +        Tigrinya = 122,
          +        TongaLanguage = 123,
          +        Tsonga = 124,
          +        Turkish = 125,
          +        Turkmen = 126,
          +        Twi = 127,
          +        Uigur = 128,
          +        Ukrainian = 129,
          +        Urdu = 130,
          +        Uzbek = 131,
          +        Vietnamese = 132,
          +        Volapuk = 133,
          +        Welsh = 134,
          +        Wolof = 135,
          +        Xhosa = 136,
          +        Yiddish = 137,
          +        Yoruba = 138,
          +        Zhuang = 139,
          +        Zulu = 140,
          +        LastLanguage = Zulu
          +    };
          +
          +    enum Country {
          +        AnyCountry = 0,
          +        Afghanistan = 1,
          +        Albania = 2,
          +        Algeria = 3,
          +        AmericanSamoa = 4,
          +        Andorra = 5,
          +        Angola = 6,
          +        Anguilla = 7,
          +        Antarctica = 8,
          +        AntiguaAndBarbuda = 9,
          +        Argentina = 10,
          +        Armenia = 11,
          +        Aruba = 12,
          +        Australia = 13,
          +        Austria = 14,
          +        Azerbaijan = 15,
          +        Bahamas = 16,
          +        Bahrain = 17,
          +        Bangladesh = 18,
          +        Barbados = 19,
          +        Belarus = 20,
          +        Belgium = 21,
          +        Belize = 22,
          +        Benin = 23,
          +        Bermuda = 24,
          +        Bhutan = 25,
          +        Bolivia = 26,
          +        BosniaAndHerzegowina = 27,
          +        Botswana = 28,
          +        BouvetIsland = 29,
          +        Brazil = 30,
          +        BritishIndianOceanTerritory = 31,
          +        BruneiDarussalam = 32,
          +        Bulgaria = 33,
          +        BurkinaFaso = 34,
          +        Burundi = 35,
          +        Cambodia = 36,
          +        Cameroon = 37,
          +        Canada = 38,
          +        CapeVerde = 39,
          +        CaymanIslands = 40,
          +        CentralAfricanRepublic = 41,
          +        Chad = 42,
          +        Chile = 43,
          +        China = 44,
          +        ChristmasIsland = 45,
          +        CocosIslands = 46,
          +        Colombia = 47,
          +        Comoros = 48,
          +        DemocraticRepublicOfCongo = 49,
          +        PeoplesRepublicOfCongo = 50,
          +        CookIslands = 51,
          +        CostaRica = 52,
          +        IvoryCoast = 53,
          +        Croatia = 54,
          +        Cuba = 55,
          +        Cyprus = 56,
          +        CzechRepublic = 57,
          +        Denmark = 58,
          +        Djibouti = 59,
          +        Dominica = 60,
          +        DominicanRepublic = 61,
          +        EastTimor = 62,
          +        Ecuador = 63,
          +        Egypt = 64,
          +        ElSalvador = 65,
          +        EquatorialGuinea = 66,
          +        Eritrea = 67,
          +        Estonia = 68,
          +        Ethiopia = 69,
          +        FalklandIslands = 70,
          +        FaroeIslands = 71,
          +        FijiCountry = 72,
          +        Finland = 73,
          +        France = 74,
          +        MetropolitanFrance = 75,
          +        FrenchGuiana = 76,
          +        FrenchPolynesia = 77,
          +        FrenchSouthernTerritories = 78,
          +        Gabon = 79,
          +        Gambia = 80,
          +        Georgia = 81,
          +        Germany = 82,
          +        Ghana = 83,
          +        Gibraltar = 84,
          +        Greece = 85,
          +        Greenland = 86,
          +        Grenada = 87,
          +        Guadeloupe = 88,
          +        Guam = 89,
          +        Guatemala = 90,
          +        Guinea = 91,
          +        GuineaBissau = 92,
          +        Guyana = 93,
          +        Haiti = 94,
          +        HeardAndMcDonaldIslands = 95,
          +        Honduras = 96,
          +        HongKong = 97,
          +        Hungary = 98,
          +        Iceland = 99,
          +        India = 100,
          +        Indonesia = 101,
          +        Iran = 102,
          +        Iraq = 103,
          +        Ireland = 104,
          +        Israel = 105,
          +        Italy = 106,
          +        Jamaica = 107,
          +        Japan = 108,
          +        Jordan = 109,
          +        Kazakhstan = 110,
          +        Kenya = 111,
          +        Kiribati = 112,
          +        DemocraticRepublicOfKorea = 113,
          +        RepublicOfKorea = 114,
          +        Kuwait = 115,
          +        Kyrgyzstan = 116,
          +        Lao = 117,
          +        Latvia = 118,
          +        Lebanon = 119,
          +        Lesotho = 120,
          +        Liberia = 121,
          +        LibyanArabJamahiriya = 122,
          +        Liechtenstein = 123,
          +        Lithuania = 124,
          +        Luxembourg = 125,
          +        Macau = 126,
          +        Macedonia = 127,
          +        Madagascar = 128,
          +        Malawi = 129,
          +        Malaysia = 130,
          +        Maldives = 131,
          +        Mali = 132,
          +        Malta = 133,
          +        MarshallIslands = 134,
          +        Martinique = 135,
          +        Mauritania = 136,
          +        Mauritius = 137,
          +        Mayotte = 138,
          +        Mexico = 139,
          +        Micronesia = 140,
          +        Moldova = 141,
          +        Monaco = 142,
          +        Mongolia = 143,
          +        Montserrat = 144,
          +        Morocco = 145,
          +        Mozambique = 146,
          +        Myanmar = 147,
          +        Namibia = 148,
          +        NauruCountry = 149,
          +        Nepal = 150,
          +        Netherlands = 151,
          +        NetherlandsAntilles = 152,
          +        NewCaledonia = 153,
          +        NewZealand = 154,
          +        Nicaragua = 155,
          +        Niger = 156,
          +        Nigeria = 157,
          +        Niue = 158,
          +        NorfolkIsland = 159,
          +        NorthernMarianaIslands = 160,
          +        Norway = 161,
          +        Oman = 162,
          +        Pakistan = 163,
          +        Palau = 164,
          +        PalestinianTerritory = 165,
          +        Panama = 166,
          +        PapuaNewGuinea = 167,
          +        Paraguay = 168,
          +        Peru = 169,
          +        Philippines = 170,
          +        Pitcairn = 171,
          +        Poland = 172,
          +        Portugal = 173,
          +        PuertoRico = 174,
          +        Qatar = 175,
          +        Reunion = 176,
          +        Romania = 177,
          +        RussianFederation = 178,
          +        Rwanda = 179,
          +        SaintKittsAndNevis = 180,
          +        StLucia = 181,
          +        StVincentAndTheGrenadines = 182,
          +        Samoa = 183,
          +        SanMarino = 184,
          +        SaoTomeAndPrincipe = 185,
          +        SaudiArabia = 186,
          +        Senegal = 187,
          +        Seychelles = 188,
          +        SierraLeone = 189,
          +        Singapore = 190,
          +        Slovakia = 191,
          +        Slovenia = 192,
          +        SolomonIslands = 193,
          +        Somalia = 194,
          +        SouthAfrica = 195,
          +        SouthGeorgiaAndTheSouthSandwichIslands = 196,
          +        Spain = 197,
          +        SriLanka = 198,
          +        StHelena = 199,
          +        StPierreAndMiquelon = 200,
          +        Sudan = 201,
          +        Suriname = 202,
          +        SvalbardAndJanMayenIslands = 203,
          +        Swaziland = 204,
          +        Sweden = 205,
          +        Switzerland = 206,
          +        SyrianArabRepublic = 207,
          +        Taiwan = 208,
          +        Tajikistan = 209,
          +        Tanzania = 210,
          +        Thailand = 211,
          +        Togo = 212,
          +        Tokelau = 213,
          +        TongaCountry = 214,
          +        TrinidadAndTobago = 215,
          +        Tunisia = 216,
          +        Turkey = 217,
          +        Turkmenistan = 218,
          +        TurksAndCaicosIslands = 219,
          +        Tuvalu = 220,
          +        Uganda = 221,
          +        Ukraine = 222,
          +        UnitedArabEmirates = 223,
          +        UnitedKingdom = 224,
          +        UnitedStates = 225,
          +        UnitedStatesMinorOutlyingIslands = 226,
          +        Uruguay = 227,
          +        Uzbekistan = 228,
          +        Vanuatu = 229,
          +        VaticanCityState = 230,
          +        Venezuela = 231,
          +        VietNam = 232,
          +        BritishVirginIslands = 233,
          +        USVirginIslands = 234,
          +        WallisAndFutunaIslands = 235,
          +        WesternSahara = 236,
          +        Yemen = 237,
          +        Yugoslavia = 238,
          +        Zambia = 239,
          +        Zimbabwe = 240,
          +        LastCountry = Zimbabwe
          +    };
          +
          +    TQLocale();
          +    TQLocale(const TQString &name);
          +    TQLocale(Language language, Country country = AnyCountry);
          +    TQLocale(const TQLocale &other);
          +
          +    TQLocale &operator=(const TQLocale &other);
          +
          +    Language language() const;
          +    Country country() const;
          +    TQString name() const;
          +
          +    short toShort(const TQString &s, bool *ok = 0) const;
          +    ushort toUShort(const TQString &s, bool *ok = 0) const;
          +    int toInt(const TQString &s, bool *ok = 0) const;
          +    uint toUInt(const TQString &s, bool *ok = 0) const;
          +    TQ_LONG toLong(const TQString &s, bool *ok = 0) const;
          +    TQ_ULONG toULong(const TQString &s, bool *ok = 0) const;
          +    TQ_LLONG toLongLong(const TQString &s, bool *ok = 0) const;
          +    TQ_ULLONG toULongLong(const TQString &s, bool *ok = 0) const;
          +    float toFloat(const TQString &s, bool *ok = 0) const;
          +    double toDouble(const TQString &s, bool *ok = 0) const;
          +
          +    TQString toString(short i) const
          +    { return toString((TQ_LLONG)i); }
          +    TQString toString(ushort i) const
          +    { return toString((TQ_ULLONG)i); }
          +    TQString toString(int i) const
          +    { return toString((TQ_LLONG)i); }
          +    TQString toString(uint i) const
          +    { return toString((TQ_ULLONG)i); }
          +#if !defined(Q_OS_WIN64)
          +    TQString toString(TQ_LONG i) const
          +    { return toString((TQ_LLONG)i); }
          +    TQString toString(TQ_ULONG i) const
          +    { return toString((TQ_ULLONG)i); }
          +#endif
          +    TQString toString(TQ_LLONG i) const;
          +    TQString toString(TQ_ULLONG i) const;
          +    TQString toString(float i, char f = 'g', int prec = 6) const
          +    { return toString((double) i, f, prec); }
          +    TQString toString(double i, char f = 'g', int prec = 6) const;
          +
          +    static TQString languageToString(Language language);
          +    static TQString countryToString(Country country);
          +    static void setDefault(const TQLocale &locale);
          +
          +    static TQLocale c() { return TQLocale(C); }
          +    static TQLocale system();
          +
          +private:
          +    const TQLocalePrivate *d;
          +    static const TQLocalePrivate *default_d;
          +};
          +
          +#endif
          +
          + +


          + +
          Copyright © 2007 +TrolltechTrademarks +
          TQt 3.3.8
          +
          + diff --git a/doc/html/tqlocale-members.html b/doc/html/tqlocale-members.html new file mode 100644 index 000000000..6e7843a6b --- /dev/null +++ b/doc/html/tqlocale-members.html @@ -0,0 +1,67 @@ + + + + + +TQLocale Member List + + + + + + + +
          + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

          Complete Member List for TQLocale

          + +

          This is the complete list of member functions for +TQLocale, including inherited members. + +

          + +


          + +
          Copyright © 2007 +TrolltechTrademarks +
          TQt 3.3.8
          +
          + diff --git a/doc/html/tqlocale.html b/doc/html/tqlocale.html new file mode 100644 index 000000000..089aef5b5 --- /dev/null +++ b/doc/html/tqlocale.html @@ -0,0 +1,852 @@ + + + + + +TQLocale Class + + + + + + + +
          + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

          TQLocale Class Reference

          + +

          The TQLocale class converts between numbers and their +string representations in various languages. +More... +

          Almost all the functions in this class are reentrant when TQt is built with thread support. The exception is setDefault(). +

          #include <tqlocale.h> +

          List of all member functions. +

          Public Members

          +
            +
          • enum Language { C = 1, Abkhazian = 2, Afan = 3, Afar = 4, Afrikaans = 5, Albanian = 6, Amharic = 7, Arabic = 8, Armenian = 9, Assamese = 10, Aymara = 11, Azerbaijani = 12, Bashkir = 13, Basque = 14, Bengali = 15, Bhutani = 16, Bihari = 17, Bislama = 18, Breton = 19, Bulgarian = 20, Burmese = 21, Byelorussian = 22, Cambodian = 23, Catalan = 24, Chinese = 25, Corsican = 26, Croatian = 27, Czech = 28, Danish = 29, Dutch = 30, English = 31, Esperanto = 32, Estonian = 33, Faroese = 34, FijiLanguage = 35, Finnish = 36, French = 37, Frisian = 38, Gaelic = 39, Galician = 40, Georgian = 41, German = 42, Greek = 43, Greenlandic = 44, Guarani = 45, Gujarati = 46, Hausa = 47, Hebrew = 48, Hindi = 49, Hungarian = 50, Icelandic = 51, Indonesian = 52, Interlingua = 53, Interlingue = 54, Inuktitut = 55, Inupiak = 56, Irish = 57, Italian = 58, Japanese = 59, Javanese = 60, Kannada = 61, Kashmiri = 62, Kazakh = 63, Kinyarwanda = 64, Kirghiz = 65, Korean = 66, Kurdish = 67, Kurundi = 68, Laothian = 69, Latin = 70, Latvian = 71, Lingala = 72, Lithuanian = 73, Macedonian = 74, Malagasy = 75, Malay = 76, Malayalam = 77, Maltese = 78, Maori = 79, Marathi = 80, Moldavian = 81, Mongolian = 82, NauruLanguage = 83, Nepali = 84, Norwegian = 85, Occitan = 86, Oriya = 87, Pashto = 88, Persian = 89, Polish = 90, Portuguese = 91, Punjabi = 92, Quechua = 93, RhaetoRomance = 94, Romanian = 95, Russian = 96, Samoan = 97, Sangho = 98, Sanskrit = 99, Serbian = 100, SerboCroatian = 101, Sesotho = 102, Setswana = 103, Shona = 104, Sindhi = 105, Singhalese = 106, Siswati = 107, Slovak = 108, Slovenian = 109, Somali = 110, Spanish = 111, Sundanese = 112, Swahili = 113, Swedish = 114, Tagalog = 115, Tajik = 116, Tamil = 117, Tatar = 118, Telugu = 119, Thai = 120, Tibetan = 121, Tigrinya = 122, TongaLanguage = 123, Tsonga = 124, Turkish = 125, Turkmen = 126, Twi = 127, Uigur = 128, Ukrainian = 129, Urdu = 130, Uzbek = 131, Vietnamese = 132, Volapuk = 133, Welsh = 134, Wolof = 135, Xhosa = 136, Yiddish = 137, Yoruba = 138, Zhuang = 139, Zulu = 140, LastLanguage = Zulu }
          • +
          • enum Country { AnyCountry = 0, Afghanistan = 1, Albania = 2, Algeria = 3, AmericanSamoa = 4, Andorra = 5, Angola = 6, Anguilla = 7, Antarctica = 8, AntiguaAndBarbuda = 9, Argentina = 10, Armenia = 11, Aruba = 12, Australia = 13, Austria = 14, Azerbaijan = 15, Bahamas = 16, Bahrain = 17, Bangladesh = 18, Barbados = 19, Belarus = 20, Belgium = 21, Belize = 22, Benin = 23, Bermuda = 24, Bhutan = 25, Bolivia = 26, BosniaAndHerzegowina = 27, Botswana = 28, BouvetIsland = 29, Brazil = 30, BritishIndianOceanTerritory = 31, BruneiDarussalam = 32, Bulgaria = 33, BurkinaFaso = 34, Burundi = 35, Cambodia = 36, Cameroon = 37, Canada = 38, CapeVerde = 39, CaymanIslands = 40, CentralAfricanRepublic = 41, Chad = 42, Chile = 43, China = 44, ChristmasIsland = 45, CocosIslands = 46, Colombia = 47, Comoros = 48, DemocraticRepublicOfCongo = 49, PeoplesRepublicOfCongo = 50, CookIslands = 51, CostaRica = 52, IvoryCoast = 53, Croatia = 54, Cuba = 55, Cyprus = 56, CzechRepublic = 57, Denmark = 58, Djibouti = 59, Dominica = 60, DominicanRepublic = 61, EastTimor = 62, Ecuador = 63, Egypt = 64, ElSalvador = 65, EquatorialGuinea = 66, Eritrea = 67, Estonia = 68, Ethiopia = 69, FalklandIslands = 70, FaroeIslands = 71, FijiCountry = 72, Finland = 73, France = 74, MetropolitanFrance = 75, FrenchGuiana = 76, FrenchPolynesia = 77, FrenchSouthernTerritories = 78, Gabon = 79, Gambia = 80, Georgia = 81, Germany = 82, Ghana = 83, Gibraltar = 84, Greece = 85, Greenland = 86, Grenada = 87, Guadeloupe = 88, Guam = 89, Guatemala = 90, Guinea = 91, GuineaBissau = 92, Guyana = 93, Haiti = 94, HeardAndMcDonaldIslands = 95, Honduras = 96, HongKong = 97, Hungary = 98, Iceland = 99, India = 100, Indonesia = 101, Iran = 102, Iraq = 103, Ireland = 104, Israel = 105, Italy = 106, Jamaica = 107, Japan = 108, Jordan = 109, Kazakhstan = 110, Kenya = 111, Kiribati = 112, DemocraticRepublicOfKorea = 113, RepublicOfKorea = 114, Kuwait = 115, Kyrgyzstan = 116, Lao = 117, Latvia = 118, Lebanon = 119, Lesotho = 120, Liberia = 121, LibyanArabJamahiriya = 122, Liechtenstein = 123, Lithuania = 124, Luxembourg = 125, Macau = 126, Macedonia = 127, Madagascar = 128, Malawi = 129, Malaysia = 130, Maldives = 131, Mali = 132, Malta = 133, MarshallIslands = 134, Martinique = 135, Mauritania = 136, Mauritius = 137, Mayotte = 138, Mexico = 139, Micronesia = 140, Moldova = 141, Monaco = 142, Mongolia = 143, Montserrat = 144, Morocco = 145, Mozambique = 146, Myanmar = 147, Namibia = 148, NauruCountry = 149, Nepal = 150, Netherlands = 151, NetherlandsAntilles = 152, NewCaledonia = 153, NewZealand = 154, Nicaragua = 155, Niger = 156, Nigeria = 157, Niue = 158, NorfolkIsland = 159, NorthernMarianaIslands = 160, Norway = 161, Oman = 162, Pakistan = 163, Palau = 164, PalestinianTerritory = 165, Panama = 166, PapuaNewGuinea = 167, Paraguay = 168, Peru = 169, Philippines = 170, Pitcairn = 171, Poland = 172, Portugal = 173, PuertoRico = 174, Qatar = 175, Reunion = 176, Romania = 177, RussianFederation = 178, Rwanda = 179, SaintKittsAndNevis = 180, StLucia = 181, StVincentAndTheGrenadines = 182, Samoa = 183, SanMarino = 184, SaoTomeAndPrincipe = 185, SaudiArabia = 186, Senegal = 187, Seychelles = 188, SierraLeone = 189, Singapore = 190, Slovakia = 191, Slovenia = 192, SolomonIslands = 193, Somalia = 194, SouthAfrica = 195, SouthGeorgiaAndTheSouthSandwichIslands = 196, Spain = 197, SriLanka = 198, StHelena = 199, StPierreAndMiquelon = 200, Sudan = 201, Suriname = 202, SvalbardAndJanMayenIslands = 203, Swaziland = 204, Sweden = 205, Switzerland = 206, SyrianArabRepublic = 207, Taiwan = 208, Tajikistan = 209, Tanzania = 210, Thailand = 211, Togo = 212, Tokelau = 213, TongaCountry = 214, TrinidadAndTobago = 215, Tunisia = 216, Turkey = 217, Turkmenistan = 218, TurksAndCaicosIslands = 219, Tuvalu = 220, Uganda = 221, Ukraine = 222, UnitedArabEmirates = 223, UnitedKingdom = 224, UnitedStates = 225, UnitedStatesMinorOutlyingIslands = 226, Uruguay = 227, Uzbekistan = 228, Vanuatu = 229, VaticanCityState = 230, Venezuela = 231, VietNam = 232, BritishVirginIslands = 233, USVirginIslands = 234, WallisAndFutunaIslands = 235, WesternSahara = 236, Yemen = 237, Yugoslavia = 238, Zambia = 239, Zimbabwe = 240, LastCountry = Zimbabwe }
          • +
          • TQLocale ()
          • +
          • TQLocale ( const TQString & name )
          • +
          • TQLocale ( Language language, Country country = AnyCountry )
          • +
          • TQLocale ( const TQLocale & other )
          • +
          • TQLocale & operator= ( const TQLocale & other )
          • +
          • Language language () const
          • +
          • Country country () const
          • +
          • TQString name () const
          • +
          • short toShort ( const TQString & s, bool * ok = 0 ) const
          • +
          • ushort toUShort ( const TQString & s, bool * ok = 0 ) const
          • +
          • int toInt ( const TQString & s, bool * ok = 0 ) const
          • +
          • uint toUInt ( const TQString & s, bool * ok = 0 ) const
          • +
          • TQ_LONG toLong ( const TQString & s, bool * ok = 0 ) const
          • +
          • TQ_ULONG toULong ( const TQString & s, bool * ok = 0 ) const
          • +
          • TQ_LLONG toLongLong ( const TQString & s, bool * ok = 0 ) const
          • +
          • TQ_ULLONG toULongLong ( const TQString & s, bool * ok = 0 ) const
          • +
          • float toFloat ( const TQString & s, bool * ok = 0 ) const
          • +
          • double toDouble ( const TQString & s, bool * ok = 0 ) const
          • +
          • TQString toString ( short i ) const
          • +
          • TQString toString ( ushort i ) const
          • +
          • TQString toString ( int i ) const
          • +
          • TQString toString ( uint i ) const
          • +
          • TQString toString ( TQ_LONG i ) const
          • +
          • TQString toString ( TQ_ULONG i ) const
          • +
          • TQString toString ( TQ_LLONG i ) const
          • +
          • TQString toString ( TQ_ULLONG i ) const
          • +
          • TQString toString ( float i, char f = 'g', int prec = 6 ) const
          • +
          • TQString toString ( double i, char f = 'g', int prec = 6 ) const
          • +
          +

          Static Public Members

          + +

          Detailed Description

          + + +The TQLocale class converts between numbers and their +string representations in various languages. +

          + +

          It is initialized with a country/language pair in its constructor +and offers number-to-string and string-to-number conversion +functions simmilar to those in TQString. +

          +    TQLocale egyptian(TQLocale::Arabic, TQLocale::Egypt);
          +    TQString s1 = egyptian.toString(1.571429E+07, 'e');
          +    TQString s2 = egyptian.toString(10);
          +
          +    double d = egyptian.toDouble(s1);
          +    int s2 = egyptian.toInt(s2);
          +    
          + +

          TQLocale supports the concept of a default locale, which is +determined from the system's locale settings at application +startup. The default locale can be changed by calling the +static member setDefault(). The default locale has the +following effects: +

            +
          • If a TQLocale object is constructed with the default constructor, +it will use the default locale's settings. +
          • TQString::toDouble() interprets the string according to the default +locale. If this fails, it falls back on the "C" locale. +
          • TQString::arg() uses the default locale to format a number when +its position specifier in the format string contains an 'L', +e.g. "%L1". +
          +

          +    TQLocale::setDefault(TQLocale(TQLocale::Hebrew, TQLocale::Israel));
          +    TQLocale hebrew; // Constructs a default TQLocale
          +    TQString s1 = hebrew.toString(15714.3, 'e');
          +
          +    bool ok;
          +    double d;
          +
          +    TQLocale::setDefault(TQLocale::C);
          +    d = TQString( "1234,56" ).toDouble(&ok); // ok == false
          +    d = TQString( "1234.56" ).toDouble(&ok); // ok == true, d == 1234.56
          +
          +    TQLocale::setDefault(TQLocale::German);
          +    d = TQString( "1234,56" ).toDouble(&ok); // ok == true, d == 1234.56
          +    d = TQString( "1234.56" ).toDouble(&ok); // ok == true, d == 1234.56
          +
          +    TQLocale::setDefault(TQLocale(TQLocale::English, TQLocale::UnitedStates));
          +    str = TQString( "%1 %L2 %L3" )
          +            .arg( 12345 )
          +            .arg( 12345 )
          +            .arg( 12345, 0, 16 );
          +    // str == "12345 12,345 3039"
          +    
          + +

          When a language/country pair is specified in the constructor, one +of three things can happen: +

            +
          • If the language/country pair is found in the database, it is used. +
          • If the language is found but the country is not, or if the country +is AnyCountry, the language is used with the most +appropriate available country (for example, Germany for German), +
          • If neither the language nor the country are found, TQLocale +defaults to the default locale (see setDefault()). +
          +

          The "C" locale is identical to English/UnitedStates. +

          Use language() and country() to determine the actual language and +country values used. +

          An alternative method for constructing a TQLocale object is by +specifying the locale name. +

          +    TQLocale korean("ko");
          +    TQLocale swiss("de_CH");
          +    
          + +

          This constructor converts the locale name to a language/country +pair; it does not use the system locale database. +

          All the methods in TQLocale, with the exception of setDefault(), +are reentrant. +

          See also TQString::toDouble(), TQString::arg(), and Text Related Classes. + +

          The double-to-string and string-to-double conversion functions are +covered by the following licenses: +

          +

          Copyright (c) 1991 by AT&T. +

          Permission to use, copy, modify, and distribute this software for any +purpose without fee is hereby granted, provided that this entire notice +is included in all copies of any software which is or includes a copy +or modification of this software and in all copies of the supporting +documentation for such software. +

          THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED +WARRANTY. IN PARTICULAR, NEITHER THE AUTHOR NOR AT&T MAKES ANY +REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY +OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. +

          This product includes software developed by the University of +California, Berkeley and its contributors. + +


          Member Type Documentation

          +

          TQLocale::Country

          + +

          This enumerated type is used to specify a country. +

            +
          • TQLocale::AnyCountry +
          • TQLocale::Afghanistan +
          • TQLocale::Albania +
          • TQLocale::Algeria +
          • TQLocale::AmericanSamoa +
          • TQLocale::Andorra +
          • TQLocale::Angola +
          • TQLocale::Anguilla +
          • TQLocale::Antarctica +
          • TQLocale::AntiguaAndBarbuda +
          • TQLocale::Argentina +
          • TQLocale::Armenia +
          • TQLocale::Aruba +
          • TQLocale::Australia +
          • TQLocale::Austria +
          • TQLocale::Azerbaijan +
          • TQLocale::Bahamas +
          • TQLocale::Bahrain +
          • TQLocale::Bangladesh +
          • TQLocale::Barbados +
          • TQLocale::Belarus +
          • TQLocale::Belgium +
          • TQLocale::Belize +
          • TQLocale::Benin +
          • TQLocale::Bermuda +
          • TQLocale::Bhutan +
          • TQLocale::Bolivia +
          • TQLocale::BosniaAndHerzegowina +
          • TQLocale::Botswana +
          • TQLocale::BouvetIsland +
          • TQLocale::Brazil +
          • TQLocale::BritishIndianOceanTerritory +
          • TQLocale::BruneiDarussalam +
          • TQLocale::Bulgaria +
          • TQLocale::BurkinaFaso +
          • TQLocale::Burundi +
          • TQLocale::Cambodia +
          • TQLocale::Cameroon +
          • TQLocale::Canada +
          • TQLocale::CapeVerde +
          • TQLocale::CaymanIslands +
          • TQLocale::CentralAfricanRepublic +
          • TQLocale::Chad +
          • TQLocale::Chile +
          • TQLocale::China +
          • TQLocale::ChristmasIsland +
          • TQLocale::CocosIslands +
          • TQLocale::Colombia +
          • TQLocale::Comoros +
          • TQLocale::DemocraticRepublicOfCongo +
          • TQLocale::PeoplesRepublicOfCongo +
          • TQLocale::CookIslands +
          • TQLocale::CostaRica +
          • TQLocale::IvoryCoast +
          • TQLocale::Croatia +
          • TQLocale::Cuba +
          • TQLocale::Cyprus +
          • TQLocale::CzechRepublic +
          • TQLocale::Denmark +
          • TQLocale::Djibouti +
          • TQLocale::Dominica +
          • TQLocale::DominicanRepublic +
          • TQLocale::EastTimor +
          • TQLocale::Ecuador +
          • TQLocale::Egypt +
          • TQLocale::ElSalvador +
          • TQLocale::EquatorialGuinea +
          • TQLocale::Eritrea +
          • TQLocale::Estonia +
          • TQLocale::Ethiopia +
          • TQLocale::FalklandIslands +
          • TQLocale::FaroeIslands +
          • TQLocale::FijiCountry +
          • TQLocale::Finland +
          • TQLocale::France +
          • TQLocale::MetropolitanFrance +
          • TQLocale::FrenchGuiana +
          • TQLocale::FrenchPolynesia +
          • TQLocale::FrenchSouthernTerritories +
          • TQLocale::Gabon +
          • TQLocale::Gambia +
          • TQLocale::Georgia +
          • TQLocale::Germany +
          • TQLocale::Ghana +
          • TQLocale::Gibraltar +
          • TQLocale::Greece +
          • TQLocale::Greenland +
          • TQLocale::Grenada +
          • TQLocale::Guadeloupe +
          • TQLocale::Guam +
          • TQLocale::Guatemala +
          • TQLocale::Guinea +
          • TQLocale::GuineaBissau +
          • TQLocale::Guyana +
          • TQLocale::Haiti +
          • TQLocale::HeardAndMcDonaldIslands +
          • TQLocale::Honduras +
          • TQLocale::HongKong +
          • TQLocale::Hungary +
          • TQLocale::Iceland +
          • TQLocale::India +
          • TQLocale::Indonesia +
          • TQLocale::Iran +
          • TQLocale::Iraq +
          • TQLocale::Ireland +
          • TQLocale::Israel +
          • TQLocale::Italy +
          • TQLocale::Jamaica +
          • TQLocale::Japan +
          • TQLocale::Jordan +
          • TQLocale::Kazakhstan +
          • TQLocale::Kenya +
          • TQLocale::Kiribati +
          • TQLocale::DemocraticRepublicOfKorea +
          • TQLocale::RepublicOfKorea +
          • TQLocale::Kuwait +
          • TQLocale::Kyrgyzstan +
          • TQLocale::Lao +
          • TQLocale::Latvia +
          • TQLocale::Lebanon +
          • TQLocale::Lesotho +
          • TQLocale::Liberia +
          • TQLocale::LibyanArabJamahiriya +
          • TQLocale::Liechtenstein +
          • TQLocale::Lithuania +
          • TQLocale::Luxembourg +
          • TQLocale::Macau +
          • TQLocale::Macedonia +
          • TQLocale::Madagascar +
          • TQLocale::Malawi +
          • TQLocale::Malaysia +
          • TQLocale::Maldives +
          • TQLocale::Mali +
          • TQLocale::Malta +
          • TQLocale::MarshallIslands +
          • TQLocale::Martinique +
          • TQLocale::Mauritania +
          • TQLocale::Mauritius +
          • TQLocale::Mayotte +
          • TQLocale::Mexico +
          • TQLocale::Micronesia +
          • TQLocale::Moldova +
          • TQLocale::Monaco +
          • TQLocale::Mongolia +
          • TQLocale::Montserrat +
          • TQLocale::Morocco +
          • TQLocale::Mozambique +
          • TQLocale::Myanmar +
          • TQLocale::Namibia +
          • TQLocale::NauruCountry +
          • TQLocale::Nepal +
          • TQLocale::Netherlands +
          • TQLocale::NetherlandsAntilles +
          • TQLocale::NewCaledonia +
          • TQLocale::NewZealand +
          • TQLocale::Nicaragua +
          • TQLocale::Niger +
          • TQLocale::Nigeria +
          • TQLocale::Niue +
          • TQLocale::NorfolkIsland +
          • TQLocale::NorthernMarianaIslands +
          • TQLocale::Norway +
          • TQLocale::Oman +
          • TQLocale::Pakistan +
          • TQLocale::Palau +
          • TQLocale::PalestinianTerritory +
          • TQLocale::Panama +
          • TQLocale::PapuaNewGuinea +
          • TQLocale::Paraguay +
          • TQLocale::Peru +
          • TQLocale::Philippines +
          • TQLocale::Pitcairn +
          • TQLocale::Poland +
          • TQLocale::Portugal +
          • TQLocale::PuertoRico +
          • TQLocale::Qatar +
          • TQLocale::Reunion +
          • TQLocale::Romania +
          • TQLocale::RussianFederation +
          • TQLocale::Rwanda +
          • TQLocale::SaintKittsAndNevis +
          • TQLocale::StLucia +
          • TQLocale::StVincentAndTheGrenadines +
          • TQLocale::Samoa +
          • TQLocale::SanMarino +
          • TQLocale::SaoTomeAndPrincipe +
          • TQLocale::SaudiArabia +
          • TQLocale::Senegal +
          • TQLocale::Seychelles +
          • TQLocale::SierraLeone +
          • TQLocale::Singapore +
          • TQLocale::Slovakia +
          • TQLocale::Slovenia +
          • TQLocale::SolomonIslands +
          • TQLocale::Somalia +
          • TQLocale::SouthAfrica +
          • TQLocale::SouthGeorgiaAndTheSouthSandwichIslands +
          • TQLocale::Spain +
          • TQLocale::SriLanka +
          • TQLocale::StHelena +
          • TQLocale::StPierreAndMiquelon +
          • TQLocale::Sudan +
          • TQLocale::Suriname +
          • TQLocale::SvalbardAndJanMayenIslands +
          • TQLocale::Swaziland +
          • TQLocale::Sweden +
          • TQLocale::Switzerland +
          • TQLocale::SyrianArabRepublic +
          • TQLocale::Taiwan +
          • TQLocale::Tajikistan +
          • TQLocale::Tanzania +
          • TQLocale::Thailand +
          • TQLocale::Togo +
          • TQLocale::Tokelau +
          • TQLocale::TongaCountry +
          • TQLocale::TrinidadAndTobago +
          • TQLocale::Tunisia +
          • TQLocale::Turkey +
          • TQLocale::Turkmenistan +
          • TQLocale::TurksAndCaicosIslands +
          • TQLocale::Tuvalu +
          • TQLocale::Uganda +
          • TQLocale::Ukraine +
          • TQLocale::UnitedArabEmirates +
          • TQLocale::UnitedKingdom +
          • TQLocale::UnitedStates +
          • TQLocale::UnitedStatesMinorOutlyingIslands +
          • TQLocale::Uruguay +
          • TQLocale::Uzbekistan +
          • TQLocale::Vanuatu +
          • TQLocale::VaticanCityState +
          • TQLocale::Venezuela +
          • TQLocale::VietNam +
          • TQLocale::BritishVirginIslands +
          • TQLocale::USVirginIslands +
          • TQLocale::WallisAndFutunaIslands +
          • TQLocale::WesternSahara +
          • TQLocale::Yemen +
          • TQLocale::Yugoslavia +
          • TQLocale::Zambia +
          • TQLocale::Zimbabwe +
          +

          TQLocale::Language

          + +

          This enumerated type is used to specify a language. +

            +
          • TQLocale::C - Identical to English/UnitedStates +
          • TQLocale::Abkhazian +
          • TQLocale::Afan +
          • TQLocale::Afar +
          • TQLocale::Afrikaans +
          • TQLocale::Albanian +
          • TQLocale::Amharic +
          • TQLocale::Arabic +
          • TQLocale::Armenian +
          • TQLocale::Assamese +
          • TQLocale::Aymara +
          • TQLocale::Azerbaijani +
          • TQLocale::Bashkir +
          • TQLocale::Basque +
          • TQLocale::Bengali +
          • TQLocale::Bhutani +
          • TQLocale::Bihari +
          • TQLocale::Bislama +
          • TQLocale::Breton +
          • TQLocale::Bulgarian +
          • TQLocale::Burmese +
          • TQLocale::Byelorussian +
          • TQLocale::Cambodian +
          • TQLocale::Catalan +
          • TQLocale::Chinese +
          • TQLocale::Corsican +
          • TQLocale::Croatian +
          • TQLocale::Czech +
          • TQLocale::Danish +
          • TQLocale::Dutch +
          • TQLocale::English +
          • TQLocale::Esperanto +
          • TQLocale::Estonian +
          • TQLocale::Faroese +
          • TQLocale::FijiLanguage +
          • TQLocale::Finnish +
          • TQLocale::French +
          • TQLocale::Frisian +
          • TQLocale::Gaelic +
          • TQLocale::Galician +
          • TQLocale::Georgian +
          • TQLocale::German +
          • TQLocale::Greek +
          • TQLocale::Greenlandic +
          • TQLocale::Guarani +
          • TQLocale::Gujarati +
          • TQLocale::Hausa +
          • TQLocale::Hebrew +
          • TQLocale::Hindi +
          • TQLocale::Hungarian +
          • TQLocale::Icelandic +
          • TQLocale::Indonesian +
          • TQLocale::Interlingua +
          • TQLocale::Interlingue +
          • TQLocale::Inuktitut +
          • TQLocale::Inupiak +
          • TQLocale::Irish +
          • TQLocale::Italian +
          • TQLocale::Japanese +
          • TQLocale::Javanese +
          • TQLocale::Kannada +
          • TQLocale::Kashmiri +
          • TQLocale::Kazakh +
          • TQLocale::Kinyarwanda +
          • TQLocale::Kirghiz +
          • TQLocale::Korean +
          • TQLocale::Kurdish +
          • TQLocale::Kurundi +
          • TQLocale::Laothian +
          • TQLocale::Latin +
          • TQLocale::Latvian +
          • TQLocale::Lingala +
          • TQLocale::Lithuanian +
          • TQLocale::Macedonian +
          • TQLocale::Malagasy +
          • TQLocale::Malay +
          • TQLocale::Malayalam +
          • TQLocale::Maltese +
          • TQLocale::Maori +
          • TQLocale::Marathi +
          • TQLocale::Moldavian +
          • TQLocale::Mongolian +
          • TQLocale::NauruLanguage +
          • TQLocale::Nepali +
          • TQLocale::Norwegian +
          • TQLocale::Occitan +
          • TQLocale::Oriya +
          • TQLocale::Pashto +
          • TQLocale::Persian +
          • TQLocale::Polish +
          • TQLocale::Portuguese +
          • TQLocale::Punjabi +
          • TQLocale::Quechua +
          • TQLocale::RhaetoRomance +
          • TQLocale::Romanian +
          • TQLocale::Russian +
          • TQLocale::Samoan +
          • TQLocale::Sangho +
          • TQLocale::Sanskrit +
          • TQLocale::Serbian +
          • TQLocale::SerboCroatian +
          • TQLocale::Sesotho +
          • TQLocale::Setswana +
          • TQLocale::Shona +
          • TQLocale::Sindhi +
          • TQLocale::Singhalese +
          • TQLocale::Siswati +
          • TQLocale::Slovak +
          • TQLocale::Slovenian +
          • TQLocale::Somali +
          • TQLocale::Spanish +
          • TQLocale::Sundanese +
          • TQLocale::Swahili +
          • TQLocale::Swedish +
          • TQLocale::Tagalog +
          • TQLocale::Tajik +
          • TQLocale::Tamil +
          • TQLocale::Tatar +
          • TQLocale::Telugu +
          • TQLocale::Thai +
          • TQLocale::Tibetan +
          • TQLocale::Tigrinya +
          • TQLocale::TongaLanguage +
          • TQLocale::Tsonga +
          • TQLocale::Turkish +
          • TQLocale::Turkmen +
          • TQLocale::Twi +
          • TQLocale::Uigur +
          • TQLocale::Ukrainian +
          • TQLocale::Urdu +
          • TQLocale::Uzbek +
          • TQLocale::Vietnamese +
          • TQLocale::Volapuk +
          • TQLocale::Welsh +
          • TQLocale::Wolof +
          • TQLocale::Xhosa +
          • TQLocale::Yiddish +
          • TQLocale::Yoruba +
          • TQLocale::Zhuang +
          • TQLocale::Zulu +
          +

          Member Function Documentation

          +

          TQLocale::TQLocale () +

          +Constructs a TQLocale object initialized with the default locale. +

          See also setDefault(). + +

          TQLocale::TQLocale ( const TQString & name ) +

          +Constructs a TQLocale object with the specified name, +which has the format +"language[_country][.codeset][@modifier]" or "C", where: +

            +
          • language is a lowercase, two-letter, ISO 639 language code, +
          • territory is an uppercase, two-letter, ISO 3166 country code, +
          • and codeset and modifier are ignored. +
          +

          If the string violates the locale format, or language is not +a valid ISO 369 code, the "C" locale is used instead. If country +is not present, or is not a valid ISO 3166 code, the most +appropriate country is chosen for the specified language. +

          The language and country codes are converted to their respective +Language and Country enums. After this conversion is +performed the constructor behaves exactly like TQLocale(Country, +Language). +

          This constructor is much slower than TQLocale(Country, Language). +

          See also name(). + +

          TQLocale::TQLocale ( Language language, Country country = AnyCountry ) +

          +Constructs a TQLocale object with the specified language and country. +

            +
          • If the language/country pair is found in the database, it is used. +
          • If the language is found but the country is not, or if the country +is AnyCountry, the language is used with the most +appropriate available country (for example, Germany for German), +
          • If neither the language nor the country are found, TQLocale +defaults to the default locale (see setDefault()). +
          +

          The language and country that are actually used can be queried +using language() and country(). +

          See also setDefault(), language(), and country(). + +

          TQLocale::TQLocale ( const TQLocale & other ) +

          +Constructs a TQLocale object as a copy of other. + +

          TQLocale TQLocale::c () [static] +

          + +

          Returns a TQLocale object initialized to the "C" locale. +

          See also system(). + +

          Country TQLocale::country () const +

          +Returns the country of this locale. +

          See also TQLocale(). + +

          TQString TQLocale::countryToString ( Country country ) [static] +

          +Returns a TQString containing the name of country. + +

          Language TQLocale::language () const +

          +Returns the language of this locale. +

          See also TQLocale(). + +

          TQString TQLocale::languageToString ( Language language ) [static] +

          +Returns a TQString containing the name of language. + +

          TQString TQLocale::name () const +

          +Returns the language and country of this locale as a +string of the form "language_country", where +language is a lowercase, two-letter ISO 639 language code, +and country is an uppercase, two-letter ISO 3166 country code. +

          See also TQLocale(). + +

          TQLocale & TQLocale::operator= ( const TQLocale & other ) +

          +Assigns other to this TQLocale object and returns a reference +to this TQLocale object. + +

          void TQLocale::setDefault ( const TQLocale & locale ) [static] +

          Warning: This function is not reentrant.

          + + +

          Sets the global default locale to locale. These +values are used when a TQLocale object is constructed with +no arguments. If this function is not called, the system's +locale is used. +

          Warning: In a multithreaded application, the default locale +should be set at application startup, before any non-GUI threads +are created. +

          See also system() and c(). + +

          TQLocale TQLocale::system () [static] +

          +Returns a TQLocale object initialized to the system locale. + +

          double TQLocale::toDouble ( const TQString & s, bool * ok = 0 ) const +

          +Returns the double represented by the localized string s, or +0.0 if the conversion failed. +

          If ok is not 0, reports failure by setting +*ok to false and success by setting *ok to true. +

          Unlike TQString::toDouble(), this function does not fall back to +the "C" locale if the string cannot be interpreted in this +locale. +

          +        bool ok;
          +        double d;
          +
          +        TQLocale c(TQLocale::C);
          +        d = c.toDouble( "1234.56", &ok );  // ok == true, d == 1234.56
          +        d = c.toDouble( "1,234.56", &ok ); // ok == true, d == 1234.56
          +        d = c.toDouble( "1234,56", &ok );  // ok == false
          +
          +        TQLocale german(TQLocale::German);
          +        d = german.toDouble( "1234,56", &ok );  // ok == true, d == 1234.56
          +        d = german.toDouble( "1.234,56", &ok ); // ok == true, d == 1234.56
          +        d = german.toDouble( "1234.56", &ok );  // ok == false
          +
          +        d = german.toDouble( "1.234", &ok );    // ok == true, d == 1234.0
          +    
          + +

          Notice that the last conversion returns 1234.0, because '.' is the +thousands group separator in the German locale. +

          This function ignores leading and trailing whitespace. +

          See also toString() and TQString::toDouble(). + +

          float TQLocale::toFloat ( const TQString & s, bool * ok = 0 ) const +

          +Returns the float represented by the localized string s, or 0.0 +if the conversion failed. +

          If ok is not 0, reports failure by setting +*ok to false and success by setting *ok to true. +

          This function ignores leading and trailing whitespace. +

          See also toString(). + +

          int TQLocale::toInt ( const TQString & s, bool * ok = 0 ) const +

          +Returns the int represented by the localized string s, or 0 if +the conversion failed. +

          If ok is not 0, reports failure by setting *ok to false and +success by setting *ok to true. +

          This function ignores leading and trailing whitespace. +

          See also toString(). + +

          TQ_LONG TQLocale::toLong ( const TQString & s, bool * ok = 0 ) const +

          +Returns the long int represented by the localized string s, or +0 if the conversion failed. +

          If ok is not 0, reports failure by setting +*ok to false and success by setting *ok to true. +

          This function ignores leading and trailing whitespace. +

          See also toString(). + +

          TQ_LLONG TQLocale::toLongLong ( const TQString & s, bool * ok = 0 ) const +

          +Returns the long long int represented by the localized string s, or 0 if the conversion failed. +

          If ok is not 0, reports failure by setting +*ok to false and success by setting *ok to true. +

          This function ignores leading and trailing whitespace. +

          See also toString(). + +

          short TQLocale::toShort ( const TQString & s, bool * ok = 0 ) const +

          +Returns the short int represented by the localized string s, or +0 if the conversion failed. +

          If ok is not 0, reports failure by setting +*ok to false and success by setting *ok to true. +

          This function ignores leading and trailing whitespace. +

          See also toString(). + +

          TQString TQLocale::toString ( TQ_LLONG i ) const +

          +Returns a localized string representation of i. +

          See also toLongLong(). + +

          TQString TQLocale::toString ( short i ) const +

          + +

          This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

          See also toShort(). + +

          TQString TQLocale::toString ( ushort i ) const +

          + +

          This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

          See also toUShort(). + +

          TQString TQLocale::toString ( int i ) const +

          + +

          This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

          See also toInt(). + +

          TQString TQLocale::toString ( uint i ) const +

          + +

          This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

          See also toUInt(). + +

          TQString TQLocale::toString ( TQ_LONG i ) const +

          + +

          This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

          See also toLong(). + +

          TQString TQLocale::toString ( TQ_ULONG i ) const +

          + +

          This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

          See also toULong(). + +

          TQString TQLocale::toString ( TQ_ULLONG i ) const +

          +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

          See also toULongLong(). + +

          TQString TQLocale::toString ( float i, char f = 'g', int prec = 6 ) const +

          + +

          This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

          f and prec have the same meaning as in TQString::number(double, char, int). +

          See also toDouble(). + +

          TQString TQLocale::toString ( double i, char f = 'g', int prec = 6 ) const +

          +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

          f and prec have the same meaning as in TQString::number(double, char, int). +

          See also toDouble(). + +

          uint TQLocale::toUInt ( const TQString & s, bool * ok = 0 ) const +

          +Returns the unsigned int represented by the localized string s, +or 0 if the conversion failed. +

          If ok is not 0, reports failure by setting +*ok to false and success by setting *ok to true. +

          This function ignores leading and trailing whitespace. +

          See also toString(). + +

          TQ_ULONG TQLocale::toULong ( const TQString & s, bool * ok = 0 ) const +

          +Returns the unsigned long int represented by the localized string +s, or 0 if the conversion failed. +

          If ok is not 0, reports failure by setting +*ok to false and success by setting *ok to true. +

          This function ignores leading and trailing whitespace. +

          See also toString(). + +

          TQ_ULLONG TQLocale::toULongLong ( const TQString & s, bool * ok = 0 ) const +

          +Returns the unsigned long long int represented by the localized +string s, or 0 if the conversion failed. +

          If ok is not 0, reports failure by setting +*ok to false and success by setting *ok to true. +

          This function ignores leading and trailing whitespace. +

          See also toString(). + +

          ushort TQLocale::toUShort ( const TQString & s, bool * ok = 0 ) const +

          +Returns the unsigned short int represented by the localized string +s, or 0 if the conversion failed. +

          If ok is not 0, reports failure by setting +*ok to false and success by setting *ok to true. +

          This function ignores leading and trailing whitespace. +

          See also toString(). + + +


          +This file is part of the TQt toolkit. +Copyright © 1995-2007 +Trolltech. All Rights Reserved.


          + +
          Copyright © 2007 +TrolltechTrademarks +
          TQt 3.3.8
          +
          + diff --git a/doc/html/tqmainwindow.html b/doc/html/tqmainwindow.html index cdd64ba83..c6abc5d92 100644 --- a/doc/html/tqmainwindow.html +++ b/doc/html/tqmainwindow.html @@ -848,7 +848,7 @@ to this signal.

          void TQMainWindow::whatsThis () [virtual slot]

          Enters 'What's This?' mode and returns immediately. -

          This is the same as TQWhatsThis::enterWhatsThisMode(), but +

          This is the same as TQWhatsThis::enterWhatsThisMode(), but implemented as a main window object's slot. This way it can easily be used for popup menus, for example:

          @@ -856,7 +856,7 @@ be used for popup menus, for example:
               help->insertItem( "What's &This", this , TQ_SLOT(whatsThis()), SHIFT+Key_F1);
               
          -

          See also TQWhatsThis::enterWhatsThisMode(). +

          See also TQWhatsThis::enterWhatsThisMode().


          Property Documentation

          bool dockWindowsMovable

          diff --git a/doc/html/tqmenubar.html b/doc/html/tqmenubar.html index 1eb2448ba..763f41387 100644 --- a/doc/html/tqmenubar.html +++ b/doc/html/tqmenubar.html @@ -441,7 +441,7 @@ practice, this only makes sense with certain widgets.

          If a widget is not focus-enabled (see TQWidget::isFocusEnabled()), the menu treats it as a separator; this means that the item is not selectable and will never get -focus. In this way you can, for example, simply insert a TQLabel if +focus. In this way you can, for example, simply insert a TQLabel if you need a popup menu with a title.

          If the widget is focus-enabled it will get focus when the user traverses the popup menu with the arrow keys. If the widget does diff --git a/doc/html/tqmenudata.html b/doc/html/tqmenudata.html index c82cf318a..736734fc4 100644 --- a/doc/html/tqmenudata.html +++ b/doc/html/tqmenudata.html @@ -465,7 +465,7 @@ practice, this only makes sense with certain widgets.

          If a widget is not focus-enabled (see TQWidget::isFocusEnabled()), the menu treats it as a separator; this means that the item is not selectable and will never get -focus. In this way you can, for example, simply insert a TQLabel if +focus. In this way you can, for example, simply insert a TQLabel if you need a popup menu with a title.

          If the widget is focus-enabled it will get focus when the user traverses the popup menu with the arrow keys. If the widget does diff --git a/doc/html/tqmimesourcefactory.html b/doc/html/tqmimesourcefactory.html index e95845ee7..c1da24d8b 100644 --- a/doc/html/tqmimesourcefactory.html +++ b/doc/html/tqmimesourcefactory.html @@ -82,7 +82,7 @@ TQMimeSourceFactory to resolve references such as images or links within rich text documents. They either access the default factory (see defaultFactory()) or their own (see TQTextEdit::setMimeSourceFactory()). Other classes that are -capable of displaying rich text (such as TQLabel, TQWhatsThis or +capable of displaying rich text (such as TQLabel, TQWhatsThis or TQMessageBox) always use the default factory.

          A factory can also be used as a container to store data associated with a name. This technique is useful whenever rich text contains @@ -105,7 +105,7 @@ insert it into the factory with a unique name:

          Now you can create a rich text TQLabel with

          -    TQLabel* label = new TQLabel(
          +    TQLabel* label = new TQLabel(
                   "Rich text with embedded image:<img source=\"myimage\">"
                   "Isn't that <em>cute</em>?" );
               
          @@ -193,7 +193,7 @@ file name is given in abs_or_rel_name and the path is in context Returns the application-wide default mime source factory. This factory is used by rich text rendering classes such as -TQSimpleRichText, TQWhatsThis and TQMessageBox to resolve named +TQSimpleRichText, TQWhatsThis and TQMessageBox to resolve named references within rich text documents. It serves also as the initial factory for the more complex render widgets, TQTextEdit and TQTextBrowser. diff --git a/doc/html/tqmovie.html b/doc/html/tqmovie.html index 6d4734cc7..2568a7967 100644 --- a/doc/html/tqmovie.html +++ b/doc/html/tqmovie.html @@ -81,8 +81,8 @@ The TQMovie class provides incremental loading of animations or images, signalli -

          The simplest way to display a TQMovie is to use a TQLabel and -TQLabel::setMovie(). +

          The simplest way to display a TQMovie is to use a TQLabel and +TQLabel::setMovie().

          A TQMovie provides a TQPixmap as the framePixmap(); connections can be made via connectResize() and connectUpdate() to receive notification of size and pixmap changes. All decoding is driven @@ -112,7 +112,7 @@ the USA, France, Germany, Italy and the UK.

          GIF support may be removed completely in a future version of TQt. We recommend using the MNG or PNG format.

          TQMovie
          -

          See also TQLabel::setMovie(), Graphics Classes, Image Processing Classes, and Multimedia Classes. +

          See also TQLabel::setMovie(), Graphics Classes, Image Processing Classes, and Multimedia Classes.


          Member Type Documentation

          TQMovie::Status

          diff --git a/doc/html/tqobject.html b/doc/html/tqobject.html index d78f692f8..3b3262874 100644 --- a/doc/html/tqobject.html +++ b/doc/html/tqobject.html @@ -282,10 +282,10 @@ returns FALSE.

          You must use the TQ_SIGNAL() and TQ_SLOT() macros when specifying the signal and the member, for example:

          -    TQLabel     *label  = new TQLabel;
          +    TQLabel     *label  = new TQLabel;
               TQScrollBar *scroll = new TQScrollBar;
               TQObject::connect( scroll, TQ_SIGNAL(valueChanged(int)),
          -                      label,  TQ_SLOT(setNum(int)) );
          +                      label,  TQ_SLOT(setNum(int)) );
               

          This example ensures that the label always displays the current diff --git a/doc/html/tqpixmap.html b/doc/html/tqpixmap.html index 430d46f88..7930345c2 100644 --- a/doc/html/tqpixmap.html +++ b/doc/html/tqpixmap.html @@ -137,7 +137,7 @@ underlying window system. Pixels can be accessed only through TQPainter functions, through bitBlt(), and by converting the TQPixmap to a TQImage.

          You can easily display a TQPixmap on the screen using -TQLabel::setPixmap(). For example, all the TQButton subclasses +TQLabel::setPixmap(). For example, all the TQButton subclasses support pixmap use.

          The TQPixmap class uses copy-on-write, so it is practical to pass TQPixmap objects by value. diff --git a/doc/html/tqpopupmenu.html b/doc/html/tqpopupmenu.html index 3eecff805..b24d1be55 100644 --- a/doc/html/tqpopupmenu.html +++ b/doc/html/tqpopupmenu.html @@ -158,7 +158,7 @@ correct enabled/disabled states of all menu items before the user sees it. The corresponding aboutToHide() signal is emitted when the menu hides again.

          You can provide What's This? help for single menu items with -setWhatsThis(). See TQWhatsThis for general information about this +setWhatsThis(). See TQWhatsThis for general information about this kind of lightweight online help.

          For ultimate flexibility, you can also add entire widgets as items into a popup menu (for example, a color selector). @@ -567,7 +567,7 @@ practice, this only makes sense with certain widgets.

          If a widget is not focus-enabled (see TQWidget::isFocusEnabled()), the menu treats it as a separator; this means that the item is not selectable and will never get -focus. In this way you can, for example, simply insert a TQLabel if +focus. In this way you can, for example, simply insert a TQLabel if you need a popup menu with a title.

          If the widget is focus-enabled it will get focus when the user traverses the popup menu with the arrow keys. If the widget does diff --git a/doc/html/tqregexp.html b/doc/html/tqregexp.html index 03527728b..21f12a731 100644 --- a/doc/html/tqregexp.html +++ b/doc/html/tqregexp.html @@ -268,15 +268,15 @@ corresponding to the octal number ooo (between 0 and 0377).

          . (dot) This matches any character (including newline).
          \d -This matches a digit (TQChar::isDigit()). +This matches a digit (TQChar::isDigit()).
          \D This matches a non-digit.
          \s -This matches a whitespace (TQChar::isSpace()). +This matches a whitespace (TQChar::isSpace()).
          \S This matches a non-whitespace.
          \w -This matches a word character (TQChar::isLetterOrNumber() or '_'). +This matches a word character (TQChar::isLetterOrNumber() or '_').
          \W This matches a non-word character.
          \n @@ -863,7 +863,7 @@ null pointer. the string will match the start of string anchor, ^, in the regexp, if present. Otherwise, position 0 in str will match.

          Use search() and matchedLength() instead of this function. -

          See also TQString::mid() and TQConstString. +

          See also TQString::mid() and TQConstString.

          Example: qmag/qmag.cpp.

          int TQRegExp::matchedLength () const diff --git a/doc/html/tqsettings.html b/doc/html/tqsettings.html index ebf32dcad..6c363ef42 100644 --- a/doc/html/tqsettings.html +++ b/doc/html/tqsettings.html @@ -438,7 +438,7 @@ over a copy, e.g.

          See also readEntry(), readDoubleEntry(), readBoolEntry(), writeEntry(), removeEntry(), and TQStringList::split(). -

          TQStringList TQSettings::readListEntry ( const TQString & key, const TQChar & separator, bool * ok = 0 ) const +

          TQStringList TQSettings::readListEntry ( const TQString & key, const TQChar & separator, bool * ok = 0 ) const

          This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

          This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. @@ -592,7 +592,7 @@ by value. returned; otherwise returns TRUE.

          See also readListEntry(), readNumEntry(), readDoubleEntry(), readBoolEntry(), and removeEntry(). -

          bool TQSettings::writeEntry ( const TQString & key, const TQStringList & value, const TQChar & separator ) +

          bool TQSettings::writeEntry ( const TQString & key, const TQStringList & value, const TQChar & separator )

          This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

          This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. diff --git a/doc/html/tqsimplerichtext-h.html b/doc/html/tqsimplerichtext-h.html new file mode 100644 index 000000000..2061a3f53 --- /dev/null +++ b/doc/html/tqsimplerichtext-h.html @@ -0,0 +1,149 @@ + + + + + +tqsimplerichtext.h Include File + + + + + + + +
          + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

          tqsimplerichtext.h

          + +

          This is the verbatim text of the tqsimplerichtext.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


          +
          +/****************************************************************************
          +** $Id: qt/tqsimplerichtext.h   3.3.8   edited Jan 11 14:38 $
          +**
          +** Definition of the TQSimpleRichText class
          +**
          +** Created : 990101
          +**
          +** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
          +**
          +** This file is part of the kernel module of the TQt GUI Toolkit.
          +**
          +** This file may be used under the terms of the GNU General Public
          +** License versions 2.0 or 3.0 as published by the Free Software
          +** Foundation and appearing in the file LICENSE.GPL included in the
          +** packaging of this file. Alternatively you may (at your option) use any
          +** later version of the GNU General Public License if such license has
          +** been publicly approved by Trolltech ASA (or its successors, if any)
          +** and the KDE Free TQt Foundation.
          +**
          +** Please review the following information to ensure GNU General
          +** Public Licensing requirements will be met:
          +** http://trolltech.com/products/qt/licenses/licensing/opensource/.
          +** If you are unsure which license is appropriate for your use, please
          +** review the following information:
          +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
          +** or contact the sales department at sales@trolltech.com.
          +**
          +** This file may be used under the terms of the Q Public License as
          +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
          +** included in the packaging of this file.  Licensees holding valid TQt
          +** Commercial licenses may use this file in accordance with the TQt
          +** Commercial License Agreement provided with the Software.
          +**
          +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
          +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
          +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
          +** herein.
          +**
          +**********************************************************************/
          +
          +#ifndef TQSIMPLERICHTEXT_H
          +#define TQSIMPLERICHTEXT_H
          +
          +#ifndef QT_H
          +#include "ntqnamespace.h"
          +#include "tqstring.h"
          +#include "tqregion.h"
          +#endif // QT_H
          +
          +#ifndef TQT_NO_RICHTEXT
          +
          +class TQPainter;
          +class TQWidget;
          +class TQStyleSheet;
          +class TQBrush;
          +class TQMimeSourceFactory;
          +class TQSimpleRichTextData;
          +
          +class TQ_EXPORT TQSimpleRichText
          +{
          +public:
          +    TQSimpleRichText( const TQString& text, const TQFont& fnt,
          +		     const TQString& context = TQString::null, const TQStyleSheet* sheet = 0);
          +    TQSimpleRichText( const TQString& text, const TQFont& fnt,
          +		     const TQString& context,  const TQStyleSheet* sheet,
          +		     const TQMimeSourceFactory* factory, int pageBreak = -1,
          +		     const TQColor& linkColor = TQt::blue, bool linkUnderline = TRUE );
          +    ~TQSimpleRichText();
          +
          +    void setWidth( int );
          +    void setWidth( TQPainter*, int );
          +    void setDefaultFont( const TQFont &f );
          +    int width() const;
          +    int widthUsed() const;
          +    int height() const;
          +    void adjustSize();
          +
          +    void draw( TQPainter* p,  int x, int y, const TQRect& clipRect,
          +	       const TQColorGroup& cg, const TQBrush* paper = 0) const;
          +
          +    // obsolete
          +    void draw( TQPainter* p,  int x, int y, const TQRegion& clipRegion,
          +	       const TQColorGroup& cg, const TQBrush* paper = 0) const {
          +	draw( p, x, y, clipRegion.boundingRect(), cg, paper );
          +    }
          +
          +    TQString context() const;
          +    TQString anchorAt( const TQPoint& pos ) const;
          +
          +    bool inText( const TQPoint& pos ) const;
          +
          +private:
          +    TQSimpleRichTextData* d;
          +
          +private:	// Disabled copy constructor and operator=
          +#if defined(TQ_DISABLE_COPY)
          +    TQSimpleRichText( const TQSimpleRichText & );
          +    TQSimpleRichText &operator=( const TQSimpleRichText & );
          +#endif
          +};
          +
          +#endif // TQT_NO_RICHTEXT
          +
          +#endif // TQSIMPLERICHTEXT_H
          +
          + +


          + +
          Copyright © 2007 +TrolltechTrademarks +
          TQt 3.3.8
          +
          + diff --git a/doc/html/tqsimplerichtext-members.html b/doc/html/tqsimplerichtext-members.html new file mode 100644 index 000000000..e20c3f9f1 --- /dev/null +++ b/doc/html/tqsimplerichtext-members.html @@ -0,0 +1,58 @@ + + + + + +TQSimpleRichText Member List + + + + + + + +
          + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

          Complete Member List for TQSimpleRichText

          + +

          This is the complete list of member functions for +TQSimpleRichText, including inherited members. + +

          + +


          + +
          Copyright © 2007 +TrolltechTrademarks +
          TQt 3.3.8
          +
          + diff --git a/doc/html/tqsimplerichtext.html b/doc/html/tqsimplerichtext.html new file mode 100644 index 000000000..332b81c1e --- /dev/null +++ b/doc/html/tqsimplerichtext.html @@ -0,0 +1,223 @@ + + + + + +TQSimpleRichText Class + + + + + + + +
          + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

          TQSimpleRichText Class Reference

          + +

          The TQSimpleRichText class provides a small displayable piece of rich text. +More... +

          #include <tqsimplerichtext.h> +

          List of all member functions. +

          Public Members

          +
            +
          • TQSimpleRichText ( const TQString & text, const TQFont & fnt, const TQString & context = TQString::null, const TQStyleSheet * sheet = 0 )
          • +
          • TQSimpleRichText ( const TQString & text, const TQFont & fnt, const TQString & context, const TQStyleSheet * sheet, const TQMimeSourceFactory * factory, int pageBreak = -1, const TQColor & linkColor = TQt::blue, bool linkUnderline = TRUE )
          • +
          • ~TQSimpleRichText ()
          • +
          • void setWidth ( int w )
          • +
          • void setWidth ( TQPainter * p, int w )
          • +
          • void setDefaultFont ( const TQFont & f )
          • +
          • int width () const
          • +
          • int widthUsed () const
          • +
          • int height () const
          • +
          • void adjustSize ()
          • +
          • void draw ( TQPainter * p, int x, int y, const TQRect & clipRect, const TQColorGroup & cg, const TQBrush * paper = 0 ) const
          • +
          • void draw ( TQPainter * p, int x, int y, const TQRegion & clipRegion, const TQColorGroup & cg, const TQBrush * paper = 0 ) const  (obsolete)
          • +
          • TQString context () const
          • +
          • TQString anchorAt ( const TQPoint & pos ) const
          • +
          • bool inText ( const TQPoint & pos ) const
          • +
          +

          Detailed Description

          + + +The TQSimpleRichText class provides a small displayable piece of rich text. +

          + +

          This class encapsulates simple rich text usage in which a string +is interpreted as rich text and can be drawn. This is particularly +useful if you want to display some rich text in a custom widget. A +TQStyleSheet is needed to interpret the tags and format the rich +text. TQt provides a default HTML-like style sheet, but you may +define custom style sheets. +

          Once created, the rich text object can be queried for its width(), +height(), and the actual width used (see widthUsed()). Most +importantly, it can be drawn on any given TQPainter with draw(). +TQSimpleRichText can also be used to implement hypertext or active +text facilities by using anchorAt(). A hit test through inText() +makes it possible to use simple rich text for text objects in +editable drawing canvases. +

          Once constructed from a string the contents cannot be changed, +only resized. If the contents change, just throw the rich text +object away and make a new one with the new contents. +

          For large documents use TQTextEdit or TQTextBrowser. For very small +items of rich text you can use a TQLabel. +

          If you are using TQSimpleRichText to print in high resolution you +should call setWidth(TQPainter, int) so that the content will be +laid out properly on the page. +

          See also Text Related Classes. + +


          Member Function Documentation

          +

          TQSimpleRichText::TQSimpleRichText ( const TQString & text, const TQFont & fnt, const TQString & context = TQString::null, const TQStyleSheet * sheet = 0 ) +

          +Constructs a TQSimpleRichText from the rich text string text and +the font fnt. +

          The font is used as a basis for the text rendering. When using +rich text rendering on a widget w, you would normally specify +the widget's font, for example: +

          +    TQSimpleRichText myrichtext( contents, mywidget->font() );
          +    
          + +

          context is the optional context of the rich text object. This +becomes important if text contains relative references, for +example within image tags. TQSimpleRichText always uses the default +mime source factory (see TQMimeSourceFactory::defaultFactory()) +to resolve those references. The context will then be used to +calculate the absolute path. See +TQMimeSourceFactory::makeAbsolute() for details. +

          The sheet is an optional style sheet. If it is 0, the default +style sheet will be used (see TQStyleSheet::defaultSheet()). + +

          TQSimpleRichText::TQSimpleRichText ( const TQString & text, const TQFont & fnt, const TQString & context, const TQStyleSheet * sheet, const TQMimeSourceFactory * factory, int pageBreak = -1, const TQColor & linkColor = TQt::blue, bool linkUnderline = TRUE ) +

          +Constructs a TQSimpleRichText from the rich text string text and +the font fnt. +

          This is a slightly more complex constructor for TQSimpleRichText +that takes an additional mime source factory factory, a page +break parameter pageBreak and a bool linkUnderline. linkColor is only provided for compatibility, but has no effect, +as TQColorGroup's TQColorGroup::link() color is used now. +

          context is the optional context of the rich text object. This +becomes important if text contains relative references, for +example within image tags. TQSimpleRichText always uses the default +mime source factory (see TQMimeSourceFactory::defaultFactory()) +to resolve those references. The context will then be used to +calculate the absolute path. See +TQMimeSourceFactory::makeAbsolute() for details. +

          The sheet is an optional style sheet. If it is 0, the default +style sheet will be used (see TQStyleSheet::defaultSheet()). +

          This constructor is useful for creating a TQSimpleRichText object +suitable for printing. Set pageBreak to be the height of the +contents area of the pages. + +

          TQSimpleRichText::~TQSimpleRichText () +

          +Destroys the rich text object, freeing memory. + +

          void TQSimpleRichText::adjustSize () +

          +Adjusts the richt text object to a reasonable size. +

          See also setWidth(). + +

          TQString TQSimpleRichText::anchorAt ( const TQPoint & pos ) const +

          +Returns the anchor at the requested position, pos. An empty +string is returned if no anchor is specified for this position. + +

          TQString TQSimpleRichText::context () const +

          +Returns the context of the rich text object. If no context has +been specified in the constructor, a null string is returned. The +context is the path to use to look up relative links, such as +image tags and anchor references. + +

          void TQSimpleRichText::draw ( TQPainter * p, int x, int y, const TQRect & clipRect, const TQColorGroup & cg, const TQBrush * paper = 0 ) const +

          +Draws the formatted text with painter p, at position (x, y), clipped to clipRect. The clipping rectangle is given in the +rich text object's coordinates translated by (x, y). Passing +an null rectangle results in no clipping. Colors from the color +group cg are used as needed, and if not 0, *paper is used as +the background brush. +

          Note that the display code is highly optimized to reduce flicker, +so passing a brush for paper is preferable to simply clearing +the area to be painted and then calling this without a brush. + +

          Examples: action/application.cpp, application/application.cpp, helpviewer/helpwindow.cpp, and mdi/application.cpp. +

          void TQSimpleRichText::draw ( TQPainter * p, int x, int y, const TQRegion & clipRegion, const TQColorGroup & cg, const TQBrush * paper = 0 ) const +

          +

          This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. +

          Use the version with clipRect instead. The region version has +problems with larger documents on some platforms (on X11 regions +internally are represented with 16bit coordinates). + +

          int TQSimpleRichText::height () const +

          +Returns the height of the rich text object in pixels. +

          See also setWidth(). + +

          Examples: action/application.cpp, application/application.cpp, helpviewer/helpwindow.cpp, and mdi/application.cpp. +

          bool TQSimpleRichText::inText ( const TQPoint & pos ) const +

          +Returns TRUE if pos is within a text line of the rich text +object; otherwise returns FALSE. + +

          void TQSimpleRichText::setDefaultFont ( const TQFont & f ) +

          +Sets the default font for the rich text object to f + +

          void TQSimpleRichText::setWidth ( TQPainter * p, int w ) +

          +Sets the width of the rich text object to w pixels, +recalculating the layout as if it were to be drawn with painter p. +

          Passing a painter is useful when you intend drawing on devices +other than the screen, for example a TQPrinter. +

          See also height() and adjustSize(). + +

          Examples: action/application.cpp, application/application.cpp, helpviewer/helpwindow.cpp, and mdi/application.cpp. +

          void TQSimpleRichText::setWidth ( int w ) +

          +This is an overloaded member function, provided for convenience. It behaves essentially like the above function. +

          Sets the width of the rich text object to w pixels. +

          See also height() and adjustSize(). + +

          int TQSimpleRichText::width () const +

          +Returns the set width of the rich text object in pixels. +

          See also widthUsed(). + +

          int TQSimpleRichText::widthUsed () const +

          +Returns the width in pixels that is actually used by the rich text +object. This can be smaller or wider than the set width. +

          It may be wider, for example, if the text contains images or +non-breakable words that are already wider than the available +space. It's smaller when the object only consists of lines that do +not fill the width completely. +

          See also width(). + + +


          +This file is part of the TQt toolkit. +Copyright © 1995-2007 +Trolltech. All Rights Reserved.


          + +
          Copyright © 2007 +TrolltechTrademarks +
          TQt 3.3.8
          +
          + diff --git a/doc/html/tqsizepolicy.html b/doc/html/tqsizepolicy.html index 771bbdea0..7797980d7 100644 --- a/doc/html/tqsizepolicy.html +++ b/doc/html/tqsizepolicy.html @@ -147,7 +147,7 @@ subclass. vertical sizing types, hor and ver respectively. These sizing types affect how the widget is treated by the layout engine.

          If hfw is TRUE, the preferred height of the widget is dependent -on the width of the widget (for example, a TQLabel with line +on the width of the widget (for example, a TQLabel with line wrapping).

          See also horData(), verData(), and hasHeightForWidth(). diff --git a/doc/html/tqsqlpropertymap.html b/doc/html/tqsqlpropertymap.html index 892aad5f1..c131d2f68 100644 --- a/doc/html/tqsqlpropertymap.html +++ b/doc/html/tqsqlpropertymap.html @@ -134,7 +134,7 @@ new default map.)

          source
          TQButton, TQDial, -TQLabel, +TQLabel, TQLineEdit, TQMultiLineEdit, TQPushButton, diff --git a/doc/html/tqstatusbar.html b/doc/html/tqstatusbar.html index ce4247cdc..5767bb1c3 100644 --- a/doc/html/tqstatusbar.html +++ b/doc/html/tqstatusbar.html @@ -102,7 +102,7 @@ one that has a time limit:

          Normal and Permanent messages are displayed by creating a small widget and then adding it to the status bar with -addWidget(). Widgets like TQLabel, TQProgressBar or even TQToolButton +addWidget(). Widgets like TQLabel, TQProgressBar or even TQToolButton are useful for adding to status bars. removeWidget() is used to remove widgets.

          @@ -112,7 +112,7 @@ remove widgets.
           

          By default TQStatusBar provides a TQSizeGrip in the lower-right corner. You can disable it with setSizeGripEnabled(FALSE);

          -

          See also TQToolBar, TQMainWindow, TQLabel, GUI Design Handbook: Status Bar, Main Window and Related Classes, and Help System. +

          See also TQToolBar, TQMainWindow, TQLabel, GUI Design Handbook: Status Bar, Main Window and Related Classes, and Help System.


          Member Function Documentation

          TQStatusBar::TQStatusBar ( TQWidget * parent = 0, const char * name = 0 ) diff --git a/doc/html/tqstring.html b/doc/html/tqstring.html index 380b8825f..0fb529254 100644 --- a/doc/html/tqstring.html +++ b/doc/html/tqstring.html @@ -253,7 +253,7 @@ parameters, the const char * is interpreted as a classic C-style '\0'-terminated ASCII string. It is legal for the const char * parameter to be 0. If the const char * is not '\0'-terminated, the results are undefined. Functions that copy classic C strings into a TQString will not copy the terminating -'\0' character. The TQChar array of the TQString (as returned by +'\0' character. The TQChar array of the TQString (as returned by unicode()) is generally not terminated by a '\0'. If you need to pass a TQString to a function that requires a C '\0'-terminated string use latin1(). @@ -317,7 +317,7 @@ shared classes) operates on a copy-on-write basis, only copying if an instance is actually changed.

          If you wish to create a deep copy of a TQString without losing any Unicode information then you should use TQDeepCopy. -

          See also TQChar, TQCString, TQByteArray, TQConstString, Implicitly and Explicitly Shared Classes, Text Related Classes, and Non-GUI Classes. +

          See also TQChar, TQCString, TQByteArray, TQConstString, Implicitly and Explicitly Shared Classes, Text Related Classes, and Non-GUI Classes.


          Member Type Documentation

          TQString::SectionFlags

          @@ -346,7 +346,7 @@ case-insensitively. are 0.

          See also isNull(). -

          TQString::TQString ( TQChar ch ) +

          TQString::TQString ( TQChar ch )

          Constructs a string of length one, containing the character ch. @@ -360,10 +360,10 @@ since it only involves incrementing a reference count. Constructs a string that is a deep copy of ba interpreted as a classic C string. -

          TQString::TQString ( const TQChar * unicode, uint length ) +

          TQString::TQString ( const TQChar * unicode, uint length )

          Constructs a string that is a deep copy of the first length -characters in the TQChar array. +characters in the TQChar array.

          If unicode and length are 0, then a null string is created.

          If only unicode is 0, the string is empty but has length characters of space preallocated: TQString expands automatically @@ -419,7 +419,7 @@ result. the result.

          Equivalent to operator+=(). -

          TQString & TQString::append ( TQChar ch ) +

          TQString & TQString::append ( TQChar ch )

          This is an overloaded member function, provided for convenience. It behaves essentially like the above function. @@ -483,7 +483,7 @@ be between 2 and 36. replaced with a localized representation of a. The conversion uses the default locale. The default locale is determined from the system's locale settings at application startup. It can be changed -using TQLocale::setDefault(). The 'L' flag is ignored if base is +using TQLocale::setDefault(). The 'L' flag is ignored if base is not 10.

                   TQString str;
          @@ -491,7 +491,7 @@ not 10.
                           .arg( 63, 0, 16 );
                   // str == "Decimal 63 is 3f in hexadecimal"
           
          -        TQLocale::setDefault(TQLocale::English, TQLocale::UnitedStates);
          +        TQLocale::setDefault(TQLocale::English, TQLocale::UnitedStates);
                   str = TQString( "%1 %L2 %L3" )
                           .arg( 12345 )
                           .arg( 12345 )
          @@ -584,7 +584,7 @@ significant digits (trailing zeroes are omitted).
           This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
           

          a is assumed to be in the Latin-1 character set. -

          TQString TQString::arg ( TQChar a, int fieldWidth = 0 ) const +

          TQString TQString::arg ( TQChar a, int fieldWidth = 0 ) const

          This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

          @@ -629,14 +629,14 @@ does the same as latin1().

          See also fromAscii(), latin1(), utf8(), and local8Bit().

          Example: network/networkprotocol/nntp.cpp. -

          TQChar TQString::at ( uint i ) const +

          TQChar TQString::at ( uint i ) const

          Returns the character at index i, or 0 if i is beyond the length of the string.

                   const TQString string( "abcdefgh" );
          -        TQChar ch = string.at( 4 );
          +        TQChar ch = string.at( 4 );
                   // ch == 'e'
               
          @@ -644,7 +644,7 @@ length of the string. const TQString &), then the non-const overload of at() will be used instead. -

          TQCharRef TQString::at ( uint i ) +

          TQCharRef TQString::at ( uint i )

          This is an overloaded member function, provided for convenience. It behaves essentially like the above function. @@ -694,18 +694,18 @@ interest to those experimenting with Arabic and other composition-rich texts.

          Applies possible ligatures to a TQString. Useful when composition-rich text requires rendering with glyph-poor fonts, -but it also makes compositions such as TQChar(0x0041) ('A') and +but it also makes compositions such as TQChar(0x0041) ('A') and TQChar(0x0308) (Unicode accent diaresis), giving TQChar(0x00c4) (German A Umlaut). -

          TQChar TQString::constref ( uint i ) const +

          TQChar TQString::constref ( uint i ) const

          -

          Returns the TQChar at index i by value. +

          Returns the TQChar at index i by value.

          Equivalent to at(i).

          See also ref(). -

          int TQString::contains ( TQChar c, bool cs = TRUE ) const +

          int TQString::contains ( TQChar c, bool cs = TRUE ) const

          Returns the number of times the character c occurs in the string. @@ -793,7 +793,7 @@ otherwise the search is case insensitive.

          See also startsWith().

          Example: chart/main.cpp. -

          TQString & TQString::fill ( TQChar c, int len = -1 ) +

          TQString & TQString::fill ( TQChar c, int len = -1 )

          Fills the string with len characters of value c, and returns a reference to the string. @@ -821,7 +821,7 @@ was found.

          See also findRev(), replace(), and contains().

          Example: network/mail/smtp.cpp. -

          int TQString::find ( TQChar c, int index = 0, bool cs = TRUE ) const +

          int TQString::find ( TQChar c, int index = 0, bool cs = TRUE ) const

          This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

          Finds the first occurrence of the character c, starting at @@ -862,7 +862,7 @@ otherwise the search is case insensitive.

          Equivalent to findRev(TQString(str), index). -

          int TQString::findRev ( TQChar c, int index = -1, bool cs = TRUE ) const +

          int TQString::findRev ( TQChar c, int index = -1, bool cs = TRUE ) const

          This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

          Finds the first occurrence of the character c, starting at @@ -1008,13 +1008,13 @@ This is an overloaded member function, provided for convenience. It behaves esse

          Inserts s into the string at position index and returns a reference to the string. -

          TQString & TQString::insert ( uint index, const TQChar * s, uint len ) +

          TQString & TQString::insert ( uint index, const TQChar * s, uint len )

          This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

          Inserts the first len characters in s into the string at position index and returns a reference to the string. -

          TQString & TQString::insert ( uint index, TQChar c ) +

          TQString & TQString::insert ( uint index, TQChar c )

          This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

          Insert c into the string at position index and returns a @@ -1088,7 +1088,7 @@ string.

          See also right(), mid(), and isEmpty().

          Example: themes/themes.cpp. -

          TQString TQString::leftJustify ( uint width, TQChar fill = ' ', bool truncate = FALSE ) const +

          TQString TQString::leftJustify ( uint width, TQChar fill = ' ', bool truncate = FALSE ) const

          Returns a string of length width that contains this string padded by the fill character. @@ -1298,7 +1298,7 @@ This is an overloaded member function, provided for convenience. It behaves esse This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

          Appends str to the string and returns a reference to the string. -

          TQString & TQString::operator+= ( TQChar c ) +

          TQString & TQString::operator+= ( TQChar c )

          This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

          Appends c to the string and returns a reference to the string. @@ -1307,7 +1307,7 @@ This is an overloaded member function, provided for convenience. It behaves esse This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

          Appends c to the string and returns a reference to the string. -

          TQString & TQString::operator= ( TQChar c ) +

          TQString & TQString::operator= ( TQChar c )

          Sets the string to contain just the single character c. @@ -1346,7 +1346,7 @@ string, to this string. Returns a reference to this string.

          This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

          Sets the string to contain just the single character c. -

          TQChar TQString::operator[] ( int i ) const +

          TQChar TQString::operator[] ( int i ) const

          Returns the character at index i, or TQChar::null if i is @@ -1355,7 +1355,7 @@ beyond the length of the string. (i.e., const TQString&), then the non-const overload of operator[] will be used instead. -

          TQCharRef TQString::operator[] ( int i ) +

          TQCharRef TQString::operator[] ( int i )

          This is an overloaded member function, provided for convenience. It behaves essentially like the above function. @@ -1364,10 +1364,10 @@ The resulting reference can then be assigned to, or used immediately, but it will become invalid once further modifications are made to the original string.

          If i is beyond the length of the string then the string is -expanded with TQChar::nulls, so that the TQCharRef references a +expanded with TQChar::nulls, so that the TQCharRef references a valid (null) character in the string.

          The TQCharRef internal class can be used much like a constant -TQChar, but if you assign to it, you change the original string +TQChar, but if you assign to it, you change the original string (which will detach itself because of TQString's copy-on-write semantics). You will get compilation errors if you try to use the result as anything but a TQChar. @@ -1395,7 +1395,7 @@ reference to the string.

          Equivalent to insert(0, ch).

          See also insert(). -

          TQString & TQString::prepend ( TQChar ch ) +

          TQString & TQString::prepend ( TQChar ch )

          This is an overloaded member function, provided for convenience. It behaves essentially like the above function. @@ -1425,16 +1425,16 @@ This is an overloaded member function, provided for convenience. It behaves esse

          Equivalent to insert(0, s).

          See also insert(). -

          TQChar & TQString::ref ( uint i ) +

          TQChar & TQString::ref ( uint i )

          -

          Returns the TQChar at index i by reference, expanding the string +

          Returns the TQChar at index i by reference, expanding the string with TQChar::null if necessary. The resulting reference can be assigned to, or otherwise used immediately, but becomes invalid once furher modifications are made to the string.

                   TQString string("ABCDEF");
          -        TQChar ch = string.ref( 3 );         // ch == 'D'
          +        TQChar ch = string.ref( 3 );         // ch == 'D'
               

          See also constref(). @@ -1460,7 +1460,7 @@ reference to the string. otherwise the search is case insensitive.

          This is the same as replace(str, "", cs). -

          TQString & TQString::remove ( TQChar c ) +

          TQString & TQString::remove ( TQChar c )

          This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

          Removes every occurrence of the character c in the string. Returns a reference to the string. @@ -1508,24 +1508,24 @@ length().

          See also insert() and remove().

          Examples: listviews/listviews.cpp, network/networkprotocol/nntp.cpp, qmag/qmag.cpp, and regexptester/regexptester.cpp. -

          TQString & TQString::replace ( uint index, uint len, const TQChar * s, uint slen ) +

          TQString & TQString::replace ( uint index, uint len, const TQChar * s, uint slen )

          This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

          Replaces len characters with slen characters of TQChar data +

          Replaces len characters with slen characters of TQChar data from s, starting at position index, and returns a reference to the string.

          See also insert() and remove(). -

          TQString & TQString::replace ( uint index, uint len, TQChar c ) +

          TQString & TQString::replace ( uint index, uint len, TQChar c )

          This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

          This is the same as replace(index, len, TQString(c)).

          TQString & TQString::replace ( uint index, uint len, char c )

          This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

          -

          This is the same as replace(index, len, TQChar(c)). +

          This is the same as replace(index, len, TQChar(c)). -

          TQString & TQString::replace ( TQChar c, const TQString & after, bool cs = TRUE ) +

          TQString & TQString::replace ( TQChar c, const TQString & after, bool cs = TRUE )

          This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

          Replaces every occurrence of the character c in the string with after. Returns a reference to the string. @@ -1582,7 +1582,7 @@ in after are replaced with rx.cap(1), cap(2), ...

          See also find(), findRev(), and TQRegExp::cap(). -

          TQString & TQString::replace ( TQChar c1, TQChar c2 ) +

          TQString & TQString::replace ( TQChar c1, TQChar c2 )

          This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

          Replaces every occurrence of c1 with the char c2. Returns a reference to the string. @@ -1625,7 +1625,7 @@ string is returned.

          See also left(), mid(), and isEmpty().

          Example: fileiconview/tqfileiconview.cpp. -

          TQString TQString::rightJustify ( uint width, TQChar fill = ' ', bool truncate = FALSE ) const +

          TQString TQString::rightJustify ( uint width, TQChar fill = ' ', bool truncate = FALSE ) const

          Returns a string of length width that contains the fill character followed by the string. @@ -1640,7 +1640,7 @@ character followed by the string.

          See also leftJustify(). -

          TQString TQString::section ( TQChar sep, int start, int end = 0xffffffff, int flags = SectionDefault ) const +

          TQString TQString::section ( TQChar sep, int start, int end = 0xffffffff, int flags = SectionDefault ) const

          This function returns a section of the string. @@ -1757,7 +1757,7 @@ strlen(str). string is created.

          See also isNull() and isEmpty(). -

          void TQString::setExpand ( uint index, TQChar c ) +

          void TQString::setExpand ( uint index, TQChar c )

          This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code.

          Sets the character at position index to c and expands the string if necessary, filling with spaces. @@ -1857,7 +1857,7 @@ This is an overloaded member function, provided for convenience. It behaves esse string.

          The format f can be 'f', 'F', 'e', 'E', 'g' or 'G'. See arg() for an explanation of the formats. -

          TQString & TQString::setUnicode ( const TQChar * unicode, uint len ) +

          TQString & TQString::setUnicode ( const TQChar * unicode, uint len )

          Resizes the string to len characters and copies unicode into the string. If unicode is 0, nothing is copied, but the @@ -1879,7 +1879,7 @@ a null string. Returns a string that has whitespace removed from the start and the end, and which has each sequence of internal whitespace replaced with a single space. -

          Whitespace means any character for which TQChar::isSpace() returns +

          Whitespace means any character for which TQChar::isSpace() returns TRUE. This includes Unicode characters with decimal values 9 (TAB), 10 (LF), 11 (VT), 12 (FF), 13 (CR), and 32 (Space).

          @@ -1913,7 +1913,7 @@ consider using the arg() function instead. This allows the order
           of the replacements to be controlled by the translator, and has
           Unicode support.
           

          The %lc escape sequence expects a unicode character of type ushort -(as returned by TQChar::unicode()). +(as returned by TQChar::unicode()). The %ls escape sequence expects a pointer to a zero-terminated array of unicode characters of type ushort (as returned by TQString::ucs2()). @@ -1943,7 +1943,7 @@ otherwise the search is case insensitive. Returns a string that has whitespace removed from the start and the end. -

          Whitespace means any character for which TQChar::isSpace() returns +

          Whitespace means any character for which TQChar::isSpace() returns TRUE. This includes Unicode characters with decimal values 9 (TAB), 10 (LF), 11 (VT), 12 (FF), 13 (CR) and 32 (Space), and may also include other Unicode characters. @@ -1983,18 +1983,18 @@ characters for the decimal point, thousands group sepearator and even individual digits. TQString's functions try to interpret the string according to the current locale. The current locale is determined from the system at application startup and can be changed -by calling TQLocale::setDefault(). If the string cannot be interpreted +by calling TQLocale::setDefault(). If the string cannot be interpreted according to the current locale, this function falls back on the "C" locale.

                   bool ok;
                   double d;
           
          -        TQLocale::setDefault(TQLocale::C);
          +        TQLocale::setDefault(TQLocale::C);
                   d = TQString( "1234,56" ).toDouble(&ok); // ok == false
                   d = TQString( "1234.56" ).toDouble(&ok); // ok == true, d == 1234.56
           
          -        TQLocale::setDefault(TQLocale::German);
          +        TQLocale::setDefault(TQLocale::German);
                   d = TQString( "1234,56" ).toDouble(&ok); // ok == true, d == 1234.56
                   d = TQString( "1234.56" ).toDouble(&ok); // ok == true, d == 1234.56
               
          @@ -2002,17 +2002,17 @@ on the "C" locale.

          Due to the ambiguity between the decimal point and thousands group separator in various locales, these functions do not handle thousands group separators. If you need to convert such numbers, -use the corresponding function in TQLocale. +use the corresponding function in TQLocale.

                   bool ok;
          -        TQLocale::setDefault(TQLocale::C);
          +        TQLocale::setDefault(TQLocale::C);
                   double d = TQString( "1,234,567.89" ).toDouble(&ok); // ok == false
               

          Warning: If the string contains trailing whitespace this function will fail, and set *ok to false if ok is not 0. Leading whitespace is ignored. -

          See also number(), TQLocale::setDefault(), TQLocale::toDouble(), and stripWhiteSpace(). +

          See also number(), TQLocale::setDefault(), TQLocale::toDouble(), and stripWhiteSpace().

          float TQString::toFloat ( bool * ok = 0 ) const

          @@ -2206,7 +2206,7 @@ if the string is not null; otherwise returns zero.

          The result remains valid so long as one unmodified copy of the source string exists. -

          const TQChar * TQString::unicode () const +

          const TQChar * TQString::unicode () const

          Returns the Unicode representation of the string. The result diff --git a/doc/html/tqstringlist.html b/doc/html/tqstringlist.html index 029a2cd98..22c58777a 100644 --- a/doc/html/tqstringlist.html +++ b/doc/html/tqstringlist.html @@ -289,10 +289,10 @@ the list wherever the separator matches twice without intervening text.

          See also join() and TQString::section(). -

          TQStringList TQStringList::split ( const TQChar & sep, const TQString & str, bool allowEmptyEntries = FALSE ) [static] +

          TQStringList TQStringList::split ( const TQChar & sep, const TQString & str, bool allowEmptyEntries = FALSE ) [static]

          This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

          This version of the function uses a TQChar as separator, rather +

          This version of the function uses a TQChar as separator, rather than a regular expression.

          See also join() and TQString::section(). diff --git a/doc/html/tqstyle.html b/doc/html/tqstyle.html index f281fdcd2..59357ff4e 100644 --- a/doc/html/tqstyle.html +++ b/doc/html/tqstyle.html @@ -510,7 +510,7 @@ custom values must be greater than this value. use a 3D frame when the mouse is over them

        • TQStyle::SH_ToolBox_SelectedPageTitleBold - Boldness of the selected page title in a TQToolBox. -
        • TQStyle::SH_LineEdit_PasswordCharacter - The TQChar Unicode character +
        • TQStyle::SH_LineEdit_PasswordCharacter - The TQChar Unicode character to be used for passwords.
        • TQStyle::SH_Table_GridLineColor
        • TQStyle::SH_UnderlineAccelerator - whether accelerators are underlined diff --git a/doc/html/tqstylesheet.html b/doc/html/tqstylesheet.html index dd325d067..0e062fcba 100644 --- a/doc/html/tqstylesheet.html +++ b/doc/html/tqstylesheet.html @@ -67,9 +67,9 @@ rendering and a generator of tags. definition of a set of tags. This definition will be used by the internal rich text rendering system to parse and display text documents to which the style sheet applies. Rich text is normally -visualized in a TQTextEdit or a TQTextBrowser. However, TQLabel, -TQWhatsThis and TQMessageBox also support it, and other classes are -likely to follow. With TQSimpleRichText it is possible to use the +visualized in a TQTextEdit or a TQTextBrowser. However, TQLabel, +TQWhatsThis and TQMessageBox also support it, and other classes are +likely to follow. With TQSimpleRichText it is possible to use the rich text renderer for custom widgets as well.

          The default TQStyleSheet object has the following style bindings, sorted by structuring bindings, anchors, character style bindings @@ -90,7 +90,7 @@ page of its own. Another style is detail, which can be used to explain certain expressions in more detail in a few sentences. For detail, TQTextBrowser will then keep the current page and display the new document in a small -popup similar to TQWhatsThis. Note that links will not work +popup similar to TQWhatsThis. Note that links will not work in documents with <qt type="detail">...</qt>.

        • bgcolor -- The background color, for example bgcolor="yellow" or bgcolor="#0000FF".
        • background -- The background pixmap, for example background="granite.xpm". The pixmap name will be resolved @@ -295,8 +295,8 @@ simplified whitespaces).

          TQStyleSheet * TQStyleSheet::defaultSheet () [static]

          Returns the application-wide default style sheet. This style sheet -is used by rich text rendering classes such as TQSimpleRichText, -TQWhatsThis and TQMessageBox to define the rendering style and +is used by rich text rendering classes such as TQSimpleRichText, +TQWhatsThis and TQMessageBox to define the rendering style and available tags within rich text documents. It also serves as the initial style sheet for the more complex render widgets, TQTextEdit and TQTextBrowser. @@ -363,7 +363,7 @@ the mime source factory factory.

          context is the optional context of the document, i.e. the path to look for relative links. This becomes important if the text contains relative references, for example within image tags. -TQSimpleRichText always uses the default mime source factory (see +TQSimpleRichText always uses the default mime source factory (see TQMimeSourceFactory::defaultFactory()) to resolve these references. The context will then be used to calculate the absolute path. See TQMimeSourceFactory::makeAbsolute() for details. diff --git a/doc/html/tqsyntaxhighlighter-h.html b/doc/html/tqsyntaxhighlighter-h.html new file mode 100644 index 000000000..3aa958fc5 --- /dev/null +++ b/doc/html/tqsyntaxhighlighter-h.html @@ -0,0 +1,126 @@ + + + + + +tqsyntaxhighlighter.h Include File + + + + + + + +
          + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

          tqsyntaxhighlighter.h

          + +

          This is the verbatim text of the tqsyntaxhighlighter.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


          +
          +/****************************************************************************
          +** $Id: qt/tqsyntaxhighlighter.h   3.3.8   edited Jan 11 14:39 $
          +**
          +** Definition of the TQSyntaxHighlighter class
          +**
          +** Created : 022407
          +**
          +** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
          +**
          +** This file is part of the widgets module of the TQt GUI Toolkit.
          +**
          +** This file may be used under the terms of the GNU General Public
          +** License versions 2.0 or 3.0 as published by the Free Software
          +** Foundation and appearing in the file LICENSE.GPL included in the
          +** packaging of this file. Alternatively you may (at your option) use any
          +** later version of the GNU General Public License if such license has
          +** been publicly approved by Trolltech ASA (or its successors, if any)
          +** and the KDE Free TQt Foundation.
          +**
          +** Please review the following information to ensure GNU General
          +** Public Licensing requirements will be met:
          +** http://trolltech.com/products/qt/licenses/licensing/opensource/.
          +** If you are unsure which license is appropriate for your use, please
          +** review the following information:
          +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
          +** or contact the sales department at sales@trolltech.com.
          +**
          +** This file may be used under the terms of the Q Public License as
          +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
          +** included in the packaging of this file.  Licensees holding valid TQt
          +** Commercial licenses may use this file in accordance with the TQt
          +** Commercial License Agreement provided with the Software.
          +**
          +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
          +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
          +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
          +** herein.
          +**
          +**********************************************************************/
          +
          +#ifndef TQSYNTAXHIGHLIGHTER_H
          +#define TQSYNTAXHIGHLIGHTER_H
          +
          +#ifndef QT_H
          +#include "tqfont.h"
          +#include "tqcolor.h"
          +#include "tqstring.h"
          +#endif // QT_H
          +
          +class TQTextEdit;
          +class TQSyntaxHighlighterInternal;
          +class TQSyntaxHighlighterPrivate;
          +class TQTextParagraph;
          +
          +class TQ_EXPORT TQSyntaxHighlighter : public TQt
          +{
          +    friend class TQSyntaxHighlighterInternal;
          +
          +public:
          +    TQSyntaxHighlighter( TQTextEdit *textEdit );
          +    virtual ~TQSyntaxHighlighter();
          +
          +    virtual int highlightParagraph( const TQString &text, int endStateOfLastPara ) = 0;
          +
          +    void setFormat( int start, int count, const TQFont &font, const TQColor &color );
          +    void setFormat( int start, int count, const TQColor &color );
          +    void setFormat( int start, int count, const TQFont &font );
          +    TQTextEdit *textEdit() const { return edit; }
          +
          +    void rehighlight();
          +
          +    int currentParagraph() const;
          +
          +private:
          +    TQTextParagraph *para;
          +    TQTextEdit *edit;
          +    TQSyntaxHighlighterPrivate *d;
          +
          +};
          +
          +#endif
          +
          + +


          + +
          Copyright © 2007 +TrolltechTrademarks +
          TQt 3.3.8
          +
          + diff --git a/doc/html/tqsyntaxhighlighter-members.html b/doc/html/tqsyntaxhighlighter-members.html new file mode 100644 index 000000000..21aaa55c2 --- /dev/null +++ b/doc/html/tqsyntaxhighlighter-members.html @@ -0,0 +1,53 @@ + + + + + +TQSyntaxHighlighter Member List + + + + + + + +
          + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

          Complete Member List for TQSyntaxHighlighter

          + +

          This is the complete list of member functions for +TQSyntaxHighlighter, including inherited members. + +

          + +


          + +
          Copyright © 2007 +TrolltechTrademarks +
          TQt 3.3.8
          +
          + diff --git a/doc/html/tqsyntaxhighlighter.html b/doc/html/tqsyntaxhighlighter.html new file mode 100644 index 000000000..9c082b74a --- /dev/null +++ b/doc/html/tqsyntaxhighlighter.html @@ -0,0 +1,158 @@ + + + + + +TQSyntaxHighlighter Class + + + + + + + +
          + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

          TQSyntaxHighlighter Class Reference

          + +

          The TQSyntaxHighlighter class is a base class for +implementing TQTextEdit syntax highlighters. +More... +

          #include <tqsyntaxhighlighter.h> +

          Inherits TQt. +

          List of all member functions. +

          Public Members

          + +

          Detailed Description

          + + +The TQSyntaxHighlighter class is a base class for +implementing TQTextEdit syntax highlighters. +

          + +

          A syntax highligher automatically highlights parts of the text in +a TQTextEdit. Syntax highlighters are often used when the user is +entering text in a specific format (for example, source code) and +help the user to read the text and identify syntax errors. +

          To provide your own syntax highlighting for TQTextEdit, you must +subclass TQSyntaxHighlighter and reimplement highlightParagraph(). +

          When you create an instance of your TQSyntaxHighlighter subclass, +pass it the TQTextEdit that you want the syntax highlighting to be +applied to. After this your highlightParagraph() function will be +called automatically whenever necessary. Use your +highlightParagraph() function to apply formatting (e.g. setting +the font and color) to the text that is passed to it. +

          See also Basic Widgets and Text Related Classes. + +


          Member Function Documentation

          +

          TQSyntaxHighlighter::TQSyntaxHighlighter ( TQTextEdit * textEdit ) +

          +Constructs the TQSyntaxHighlighter and installs it on textEdit. +

          It is the caller's responsibility to delete the +TQSyntaxHighlighter when it is no longer needed. + +

          TQSyntaxHighlighter::~TQSyntaxHighlighter () [virtual] +

          +Destructor. Uninstalls this syntax highlighter from the textEdit() + +

          int TQSyntaxHighlighter::currentParagraph () const +

          +Returns the id of the paragraph which is highlighted, or -1 of no +paragraph is currently highlighted. +

          Usually this function is called from within highlightParagraph(). + +

          int TQSyntaxHighlighter::highlightParagraph ( const TQString & text, int endStateOfLastPara ) [pure virtual] +

          + +

          This function is called when necessary by the rich text engine, +i.e. on paragraphs which have changed. +

          In your reimplementation you should parse the paragraph's text +and call setFormat() as often as necessary to apply any font and +color changes that you require. Your function must return a value +which indicates the paragraph's end state: see below. +

          Some syntaxes can have constructs that span paragraphs. For +example, a C++ syntax highlighter should be able to cope with +/*...*/ comments that span paragraphs. To deal +with these cases it is necessary to know the end state of the +previous paragraph (e.g. "in comment"). +

          If your syntax does not have paragraph spanning constructs, simply +ignore the endStateOfLastPara parameter and always return 0. +

          Whenever highlightParagraph() is called it is passed a value for +endStateOfLastPara. For the very first paragraph this value is +always -2. For any other paragraph the value is the value returned +by the most recent highlightParagraph() call that applied to the +preceding paragraph. +

          The value you return is up to you. We recommend only returning 0 +(to signify that this paragraph's syntax highlighting does not +affect the following paragraph), or a positive integer (to signify +that this paragraph has ended in the middle of a paragraph +spanning construct). +

          To find out which paragraph is highlighted, call +currentParagraph(). +

          For example, if you're writing a simple C++ syntax highlighter, +you might designate 1 to signify "in comment". For a paragraph +that ended in the middle of a comment you'd return 1, and for +other paragraphs you'd return 0. In your parsing code if endStateOfLastPara was 1, you would highlight the text as a C++ +comment until you reached the closing */. + +

          void TQSyntaxHighlighter::rehighlight () +

          Redoes the highlighting of the whole document. + +

          void TQSyntaxHighlighter::setFormat ( int start, int count, const TQFont & font, const TQColor & color ) +

          +This function is applied to the syntax highlighter's current +paragraph (the text of which is passed to the highlightParagraph() +function). +

          The specified font and color are applied to the text from +position start for count characters. (If count is 0, +nothing is done.) + +

          void TQSyntaxHighlighter::setFormat ( int start, int count, const TQColor & color ) +

          This is an overloaded member function, provided for convenience. It behaves essentially like the above function. + +

          void TQSyntaxHighlighter::setFormat ( int start, int count, const TQFont & font ) +

          This is an overloaded member function, provided for convenience. It behaves essentially like the above function. + +

          TQTextEdit * TQSyntaxHighlighter::textEdit () const +

          + +

          Returns the TQTextEdit on which this syntax highlighter is +installed + + +


          +This file is part of the TQt toolkit. +Copyright © 1995-2007 +Trolltech. All Rights Reserved.


          + +
          Copyright © 2007 +TrolltechTrademarks +
          TQt 3.3.8
          +
          + diff --git a/doc/html/tqtextbrowser.html b/doc/html/tqtextbrowser.html index bf9598e40..465992f5c 100644 --- a/doc/html/tqtextbrowser.html +++ b/doc/html/tqtextbrowser.html @@ -114,7 +114,7 @@ the default style sheet. Change the style sheet with TQTextEdit. If you want a text browser without hypertext navigation use TQTextEdit, and use TQTextEdit::setReadOnly() to disable editing. If you just need to display a small piece of rich text -use TQSimpleRichText or TQLabel. +use TQSimpleRichText or TQLabel.

          See also Advanced Widgets, Help System, and Text Related Classes. diff --git a/doc/html/tqtextcodec.html b/doc/html/tqtextcodec.html index 407ee9b6d..7ee90726e 100644 --- a/doc/html/tqtextcodec.html +++ b/doc/html/tqtextcodec.html @@ -242,7 +242,7 @@ Return a TQTextEncoder. TQCString fromUnicode(const TQString& uc, int& lenInOut ) const

        • -Converts lenInOut characters (of type TQChar) from the start of +Converts lenInOut characters (of type TQChar) from the start of the string uc, returning a TQCString result, and also returning the length of the result in lenInOut. @@ -261,7 +261,7 @@ sources.

          A TQTextCodec subclass might have improved performance if you also re-implement:

          -    bool canEncode( TQChar ) const
          +    bool canEncode( TQChar ) const
               
          Test if a Unicode character can be encoded. @@ -294,7 +294,7 @@ terminates.

          Destroys the TQTextCodec. Note that you should not delete codecs yourself: once created they become TQt's responsibility. -

          bool TQTextCodec::canEncode ( TQChar ch ) const [virtual] +

          bool TQTextCodec::canEncode ( TQChar ch ) const [virtual]

          Returns TRUE if the Unicode character ch can be fully encoded with this codec; otherwise returns FALSE. The default diff --git a/doc/html/tqtextedit.html b/doc/html/tqtextedit.html index aee63b096..6538682c2 100644 --- a/doc/html/tqtextedit.html +++ b/doc/html/tqtextedit.html @@ -273,7 +273,7 @@ tags (for color, bold, italic and underline) may be used.

          1.A more complete API that supports setting margins, images, etc., is planned for a later TQt release.

          TQTextEdit can be used as a syntax highlighting editor when used in -conjunction with TQSyntaxHighlighter. +conjunction with TQSyntaxHighlighter.

          We recommend that you always call setTextFormat() to set the mode you want to use. If you use AutoText then setText() and append() will try to determine whether the text they are given is @@ -309,8 +309,8 @@ style sheet. Change the style sheet with setStyleSheet< displayed if they can be interpreted using the text edit's TQMimeSourceFactory; see setMimeSourceFactory().

          If you want a text browser with more navigation use TQTextBrowser. -If you just need to display a small piece of rich text use TQLabel -or TQSimpleRichText. +If you just need to display a small piece of rich text use TQLabel +or TQSimpleRichText.

          If you create a new TQTextEdit, and want to allow the user to edit rich text, call setTextFormat(TQt::RichText) to ensure that the text is treated as rich text. (Rich text uses HTML tags to set @@ -1360,9 +1360,9 @@ to be formatted. For example, if after calling setText(), to know the height of the document (using contentsHeight()), you would call this function first. -

          TQSyntaxHighlighter * TQTextEdit::syntaxHighlighter () const +

          TQSyntaxHighlighter * TQTextEdit::syntaxHighlighter () const

          -Returns the TQSyntaxHighlighter set on this TQTextEdit. 0 is +Returns the TQSyntaxHighlighter set on this TQTextEdit. 0 is returned if no syntax highlighter is set.

          bool TQTextEdit::tabChangesFocus () const diff --git a/doc/html/tqtextstream.html b/doc/html/tqtextstream.html index 62b606a1c..505aa9b1a 100644 --- a/doc/html/tqtextstream.html +++ b/doc/html/tqtextstream.html @@ -319,7 +319,7 @@ otherwise.

          Sets the stream flags to f. Returns the previous stream flags.

          See also setf() and unsetf(). -

          TQTextStream & TQTextStream::operator<< ( TQChar c ) +

          TQTextStream & TQTextStream::operator<< ( TQChar c )

          Writes character char to the stream and returns a reference to the stream. @@ -407,7 +407,7 @@ This is an overloaded member function, provided for convenience. It behaves esse stream.

          The ptr is output as an unsigned long hexadecimal integer. -

          TQTextStream & TQTextStream::operator>> ( TQChar & c ) +

          TQTextStream & TQTextStream::operator>> ( TQChar & c )

          Reads a char c from the stream and returns a reference to the stream. Note that whitespace is not skipped. diff --git a/doc/html/tqtooltip.html b/doc/html/tqtooltip.html index 1c6b2883b..c136bd7b5 100644 --- a/doc/html/tqtooltip.html +++ b/doc/html/tqtooltip.html @@ -142,7 +142,7 @@ should pop up, and maybeTip() decides whether to show a tip. a widget using textFor().

          The global tooltip font and palette can be set with the static setFont() and setPalette() functions respectively. -

          See also TQStatusBar, TQWhatsThis, TQToolTipGroup, GUI Design Handbook: Tool Tip, and Help System. +

          See also TQStatusBar, TQWhatsThis, TQToolTipGroup, GUI Design Handbook: Tool Tip, and Help System.


          Member Function Documentation

          TQToolTip::TQToolTip ( TQWidget * widget, TQToolTipGroup * group = 0 ) diff --git a/doc/html/tqwhatsthis-h.html b/doc/html/tqwhatsthis-h.html new file mode 100644 index 000000000..e1d14cbd7 --- /dev/null +++ b/doc/html/tqwhatsthis-h.html @@ -0,0 +1,126 @@ + + + + + +tqwhatsthis.h Include File + + + + + + + +
          + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

          tqwhatsthis.h

          + +

          This is the verbatim text of the tqwhatsthis.h include file. It is provided only for illustration; the copyright remains with Trolltech. +


          +
          +/****************************************************************************
          +** $Id: qt/tqwhatsthis.h   3.3.8   edited Jan 11 14:39 $
          +**
          +** Definition of TQWhatsThis class
          +**
          +** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
          +**
          +** This file is part of the widgets module of the TQt GUI Toolkit.
          +**
          +** This file may be used under the terms of the GNU General Public
          +** License versions 2.0 or 3.0 as published by the Free Software
          +** Foundation and appearing in the file LICENSE.GPL included in the
          +** packaging of this file. Alternatively you may (at your option) use any
          +** later version of the GNU General Public License if such license has
          +** been publicly approved by Trolltech ASA (or its successors, if any)
          +** and the KDE Free TQt Foundation.
          +**
          +** Please review the following information to ensure GNU General
          +** Public Licensing requirements will be met:
          +** http://trolltech.com/products/qt/licenses/licensing/opensource/.
          +** If you are unsure which license is appropriate for your use, please
          +** review the following information:
          +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
          +** or contact the sales department at sales@trolltech.com.
          +**
          +** This file may be used under the terms of the Q Public License as
          +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
          +** included in the packaging of this file.  Licensees holding valid TQt
          +** Commercial licenses may use this file in accordance with the TQt
          +** Commercial License Agreement provided with the Software.
          +**
          +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
          +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
          +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
          +** herein.
          +**
          +**********************************************************************/
          +
          +#ifndef TQWHATSTHIS_H
          +#define TQWHATSTHIS_H
          +
          +#ifndef QT_H
          +#include "tqobject.h"
          +#endif // QT_H
          +
          +#ifndef TQT_NO_WHATSTHIS
          +
          +#include "ntqcursor.h"
          +
          +class TQToolButton;
          +class TQPopupMenu;
          +class TQStyleSheet;
          +
          +class TQ_EXPORT TQWhatsThis: public TQt
          +{
          +public:
          +    TQWhatsThis( TQWidget *);
          +    virtual ~TQWhatsThis();
          +
          +    virtual TQString text( const TQPoint & );
          +    virtual bool clicked( const TQString& href );
          +
          +    // the common static functions
          +    static void setFont( const TQFont &font );    
          +    
          +    static void add( TQWidget *, const TQString &);
          +    static void remove( TQWidget * );
          +    static TQString textFor( TQWidget *, const TQPoint & pos = TQPoint(), bool includeParents = FALSE );
          +
          +    static TQToolButton * whatsThisButton( TQWidget * parent );
          +
          +    static void enterWhatsThisMode();
          +    static bool inWhatsThisMode();
          +    static void leaveWhatsThisMode( const TQString& = TQString::null, const TQPoint& pos = TQCursor::pos(), TQWidget* w = 0 );
          +
          +    static void display( const TQString& text, const TQPoint& pos = TQCursor::pos(), TQWidget* w = 0 );
          +};
          +
          +#endif // TQT_NO_WHATSTHIS
          +
          +#endif // TQWHATSTHIS_H
          +
          + +


          + +
          Copyright © 2007 +TrolltechTrademarks +
          TQt 3.3.8
          +
          + diff --git a/doc/html/tqwhatsthis-members.html b/doc/html/tqwhatsthis-members.html new file mode 100644 index 000000000..e14392546 --- /dev/null +++ b/doc/html/tqwhatsthis-members.html @@ -0,0 +1,59 @@ + + + + + +TQWhatsThis Member List + + + + + + + +
          + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

          Complete Member List for TQWhatsThis

          + +

          This is the complete list of member functions for +TQWhatsThis, including inherited members. + +

          + +


          + +
          Copyright © 2007 +TrolltechTrademarks +
          TQt 3.3.8
          +
          + diff --git a/doc/html/tqwhatsthis.html b/doc/html/tqwhatsthis.html new file mode 100644 index 000000000..e1217762a --- /dev/null +++ b/doc/html/tqwhatsthis.html @@ -0,0 +1,239 @@ + + + + + +TQWhatsThis Class + + + + + + + +
          + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

          TQWhatsThis Class Reference

          + +

          The TQWhatsThis class provides a simple description of any +widget, i.e. answering the question "What's this?". +More... +

          #include <tqwhatsthis.h> +

          Inherits TQt. +

          List of all member functions. +

          Public Members

          + +

          Static Public Members

          +
            +
          • void setFont ( const TQFont & font )
          • +
          • void add ( TQWidget * widget, const TQString & text )
          • +
          • void remove ( TQWidget * widget )
          • +
          • TQString textFor ( TQWidget * w, const TQPoint & pos = TQPoint ( ), bool includeParents = FALSE )
          • +
          • TQToolButton * whatsThisButton ( TQWidget * parent )
          • +
          • void enterWhatsThisMode ()
          • +
          • bool inWhatsThisMode ()
          • +
          • void leaveWhatsThisMode ( const TQString & text = TQString::null, const TQPoint & pos = TQCursor::pos ( ), TQWidget * w = 0 )
          • +
          • void display ( const TQString & text, const TQPoint & pos = TQCursor::pos ( ), TQWidget * w = 0 )
          • +
          +

          Detailed Description

          + + +The TQWhatsThis class provides a simple description of any +widget, i.e. answering the question "What's this?". +

          + +

          "What's this?" help is part of an application's online help system +that provides users with information about functionality, usage, +background etc., in various levels of detail from short tool tips +to full text browsing help windows. +

          TQWhatsThis provides a single window with an explanatory text that +pops up when the user asks "What's this?". The default way to do +this is to focus the relevant widget and press Shift+F1. The help +text appears immediately; it goes away as soon as the user does +something else. +

          (Note that if there is an accelerator for Shift+F1, this mechanism +will not work.) +

          To add "What's this?" text to a widget you simply call +TQWhatsThis::add() for the widget. For example, to assign text to a +menu item, call TQMenuData::setWhatsThis(); for a global +accelerator key, call TQAccel::setWhatsThis() and If you're using +actions, use TQAction::setWhatsThis(). +

          The text can be either rich text or plain text. If you specify a +rich text formatted string, it will be rendered using the default +stylesheet. This makes it possible to embed images. See +TQStyleSheet::defaultSheet() for details. +

          + +

                  const char * fileOpenText = "<p><img source=\"fileopen\"> "
          +                         "Click this button to open a <em>new file</em>. <br>"
          +                         "You can also select the <b>Open</b> command "
          +                         "from the <b>File</b> menu.</p>";
          +        TQMimeSourceFactory::defaultFactory()->setPixmap( "document-open",
          +                              fileOpenAction->iconSet().pixmap() );
          +        fileOpenAction->setWhatsThis( fileOpenText );
          +
          +

          An alternative way to enter "What's this?" mode is to use the +ready-made tool bar tool button from +TQWhatsThis::whatsThisButton(). By invoking this context help +button (in the picture below the first one from the right) the +user switches into "What's this?" mode. If they now click on a +widget the appropriate help text is shown. The mode is left when +help is given or when the user presses Esc. +

          +

          If you are using TQMainWindow you can also use the +TQMainWindow::whatsThis() slot to invoke the mode from a menu item. +

          For more control you can create a dedicated TQWhatsThis object for +a special widget. By subclassing and reimplementing +TQWhatsThis::text() it is possible to have different help texts, +depending on the position of the mouse click. By reimplementing +TQWhatsThis::clicked() it is possible to have hyperlinks inside the +help texts. +

          If you wish to control the "What's this?" behavior of a widget +manually see TQWidget::customWhatsThis(). +

          The What's This object can be removed using TQWhatsThis::remove(), +although this is rarely necessary because it is automatically +removed when the widget is destroyed. +

          See also TQToolTip and Help System. + +


          Member Function Documentation

          +

          TQWhatsThis::TQWhatsThis ( TQWidget * widget ) +

          +Constructs a dynamic "What's this?" object for widget. The +object is deleted when the widget is destroyed. +

          When the widget is queried by the user the text() function of this +TQWhatsThis will be called to provide the appropriate text, rather +than using the text assigned by add(). + +

          TQWhatsThis::~TQWhatsThis () [virtual] +

          +Destroys the object and frees any allocated resources. + +

          void TQWhatsThis::add ( TQWidget * widget, const TQString & text ) [static] +

          +Adds text as "What's this" help for widget. If the text is +rich text formatted (i.e. it contains markup) it will be rendered +with the default stylesheet TQStyleSheet::defaultSheet(). +

          The text is destroyed if the widget is later destroyed, so it need +not be explicitly removed. +

          See also remove(). + +

          Examples: application/application.cpp, helpsystem/mainwindow.cpp, and mdi/application.cpp. +

          bool TQWhatsThis::clicked ( const TQString & href ) [virtual] +

          + +

          This virtual function is called when the user clicks inside the +"What's this?" window. href is the link the user clicked on, or +TQString::null if there was no link. +

          If the function returns TRUE (the default), the "What's this?" +window is closed, otherwise it remains visible. +

          The default implementation ignores href and returns TRUE. + +

          void TQWhatsThis::display ( const TQString & text, const TQPoint & pos = TQCursor::pos ( ), TQWidget * w = 0 ) [static] +

          +Display text in a help window at the global screen position pos. +

          If widget w is not 0 and has its own dedicated TQWhatsThis +object, this object will receive clicked() messages when the user +clicks on hyperlinks inside the help text. +

          See also TQWhatsThis::clicked(). + +

          void TQWhatsThis::enterWhatsThisMode () [static] +

          +Enters "What's this?" mode and returns immediately. +

          TQt will install a special cursor and take over mouse input until +the user clicks somewhere. It then shows any help available and +ends "What's this?" mode. Finally, TQt removes the special cursor +and help window and then restores ordinary event processing, at +which point the left mouse button is no longer pressed. +

          The user can also use the Esc key to leave "What's this?" mode. +

          See also inWhatsThisMode() and leaveWhatsThisMode(). + +

          bool TQWhatsThis::inWhatsThisMode () [static] +

          +Returns TRUE if the application is in "What's this?" mode; +otherwise returns FALSE. +

          See also enterWhatsThisMode() and leaveWhatsThisMode(). + +

          void TQWhatsThis::leaveWhatsThisMode ( const TQString & text = TQString::null, const TQPoint & pos = TQCursor::pos ( ), TQWidget * w = 0 ) [static] +

          +Leaves "What's this?" question mode. +

          This function is used internally by widgets that support +TQWidget::customWhatsThis(); applications do not usually call it. +An example of such a widget is TQPopupMenu: menus still work +normally in "What's this?" mode but also provide help texts for +individual menu items. +

          If text is not TQString::null, a "What's this?" help window is +displayed at the global screen position pos. If widget w is +not 0 and has its own dedicated TQWhatsThis object, this object +will receive clicked() messages when the user clicks on hyperlinks +inside the help text. +

          See also inWhatsThisMode(), enterWhatsThisMode(), and TQWhatsThis::clicked(). + +

          void TQWhatsThis::remove ( TQWidget * widget ) [static] +

          +Removes the "What's this?" help associated with the widget. +This happens automatically if the widget is destroyed. +

          See also add(). + +

          void TQWhatsThis::setFont ( const TQFont & font ) [static] +

          +Sets the font for all "What's this?" helps to font. + +

          TQString TQWhatsThis::text ( const TQPoint & ) [virtual] +

          +This virtual function returns the text for position p in the +widget that this "What's this?" object documents. If there is no +"What's this?" text for the position, TQString::null is returned. +

          The default implementation returns TQString::null. + +

          TQString TQWhatsThis::textFor ( TQWidget * w, const TQPoint & pos = TQPoint ( ), bool includeParents = FALSE ) [static] +

          +Returns the what's this text for widget w or TQString::null if +there is no "What's this?" help for the widget. pos contains +the mouse position; this is useful, for example, if you've +subclassed to make the text that is displayed position dependent. +

          If includeParents is TRUE, parent widgets are taken into +consideration as well when looking for what's this help text. +

          See also add(). + +

          TQToolButton * TQWhatsThis::whatsThisButton ( TQWidget * parent ) [static] +

          +Creates a TQToolButton preconfigured to enter "What's this?" mode +when clicked. You will often use this with a tool bar as parent: +
          +        (void) TQWhatsThis::whatsThisButton( my_help_tool_bar );
          +    
          + + +

          Example: helpsystem/mainwindow.cpp. + +


          +This file is part of the TQt toolkit. +Copyright © 1995-2007 +Trolltech. All Rights Reserved.


          + +
          Copyright © 2007 +TrolltechTrademarks +
          TQt 3.3.8
          +
          + diff --git a/doc/html/tqwidget.html b/doc/html/tqwidget.html index 8c567bc28..1063a49d2 100644 --- a/doc/html/tqwidget.html +++ b/doc/html/tqwidget.html @@ -731,7 +731,7 @@ can override the application's settings. On Windows, TQt can set whatever flags you want.

          Example:

          -    TQLabel *splashScreen = new TQLabel( 0, "mySplashScreen",
          +    TQLabel *splashScreen = new TQLabel( 0, "mySplashScreen",
                                           WStyle_Customize | WStyle_Splash );
               
          @@ -2002,7 +2002,7 @@ focus proxy.

          void TQWidget::setFont ( const TQFont & ) [virtual]

          Sets the font currently set for the widget. See the "font" property for details. -

          Reimplemented in TQComboBox, TQLabel, and TQTabDialog. +

          Reimplemented in TQComboBox, TQLabel, and TQTabDialog.

          void TQWidget::setFont ( const TQFont & f, bool )

          @@ -2686,12 +2686,12 @@ on top-level widgets. which means the widget will not receive any events in Whats This mode.

          The widget may leave What's This mode by calling -TQWhatsThis::leaveWhatsThisMode(), with or without actually +TQWhatsThis::leaveWhatsThisMode(), with or without actually displaying any help text.

          You can also reimplement customWhatsThis() if your widget is a "passive interactor" supposed to work under all circumstances. Simply don't call TQWhatsThis::leaveWhatsThisMode() in that case. -

          See also TQWhatsThis::inWhatsThisMode() and TQWhatsThis::leaveWhatsThisMode(). +

          See also TQWhatsThis::inWhatsThisMode() and TQWhatsThis::leaveWhatsThisMode().

          Get this property's value with customWhatsThis().

          bool enabled

          diff --git a/doc/html/tqxmlinputsource.html b/doc/html/tqxmlinputsource.html index 1cd23db52..117148589 100644 --- a/doc/html/tqxmlinputsource.html +++ b/doc/html/tqxmlinputsource.html @@ -148,7 +148,7 @@ starts at the beginning of a new XML document and looks for an encoding declaration. If beginning is FALSE, it converts the raw data using the encoding determined from prior calls. -

          TQChar TQXmlInputSource::next () [virtual] +

          TQChar TQXmlInputSource::next () [virtual]

          Returns the next character of the input source. If this function reaches the end of available data, it returns diff --git a/doc/html/tutorial1-12.html b/doc/html/tutorial1-12.html index 3a90243c8..ef3cabd86 100644 --- a/doc/html/tutorial1-12.html +++ b/doc/html/tutorial1-12.html @@ -55,7 +55,7 @@ implementation.

              class TQLabel;
           
          -

          We name declare TQLabel because we want to use a pointer to it in the class +

          We name declare TQLabel because we want to use a pointer to it in the class definition.

              class LCDRange : public TQVBox
               {
          @@ -78,7 +78,7 @@ the parent and name.
           

          Because we now have two constructors, we have chosen to put the common initialization in the private init() function. -

                  TQLabel      *label;
          +

                  TQLabel      *label;
           

          We also have a new private variable: a TQLabel. TQLabel is one of TQt's standard widgets and can show a text or a pixmap with or without a @@ -87,9 +87,9 @@ frame.

          -

              #include <ntqlabel.h>
          +

              #include <tqlabel.h>
           
          -

          Here we include the TQLabel class definition. +

          Here we include the TQLabel class definition.

              LCDRange::LCDRange( TQWidget *parent, const char *name )
                       : TQVBox( parent, name )
               {
          @@ -114,8 +114,8 @@ initialization code.
                   slider->setRange( 0, 99 );
                   slider->setValue( 0 );
           
          -        label = new TQLabel( " ", this, "label"  );
          -        label->setAlignment( AlignCenter );
          +        label = new TQLabel( " ", this, "label"  );
          +        label->setAlignment( AlignCenter );
           
                   connect( slider, TQ_SIGNAL(valueChanged(int)),
                            lcd, TQ_SLOT(display(int)) );
          @@ -126,18 +126,18 @@ initialization code.
               }
           

          The setup of lcd and slider is the same as in the previous -chapter. Next we create a TQLabel and tell it to align the contents +chapter. Next we create a TQLabel and tell it to align the contents centered (both vertically and horizontally). The connect() statements have also been taken from the previous chapter.

              const char *LCDRange::text() const
               {
          -        return label->text();
          +        return label->text();
               }
           

          This function returns the label text.

              void LCDRange::setText( const char *s )
               {
          -        label->setText( s );
          +        label->setText( s );
               }
           

          This function sets the label text. diff --git a/doc/html/tutorial1-13.html b/doc/html/tutorial1-13.html index f8b304804..c2a54718f 100644 --- a/doc/html/tutorial1-13.html +++ b/doc/html/tutorial1-13.html @@ -288,12 +288,12 @@ with the other buttons. Clicking this button will activate the newGame() slot in this widget.

                  hits = new TQLCDNumber( 2, this, "hits" );
                   shotsLeft = new TQLCDNumber( 2, this, "shotsleft" );
          -        TQLabel *hitsL = new TQLabel( "HITS", this, "hitsLabel" );
          +        TQLabel *hitsL = new TQLabel( "HITS", this, "hitsLabel" );
                   TQLabel *shotsLeftL
          -            = new TQLabel( "SHOTS LEFT", this, "shotsleftLabel" );
          +            = new TQLabel( "SHOTS LEFT", this, "shotsleftLabel" );
           

          We create four new widgets. Note that we don't bother to keep the -pointers to the TQLabel widgets in the GameBoard class because there's +pointers to the TQLabel widgets in the GameBoard class because there's nothing much we want to do with them. TQt will delete them when the GameBoard widget is destroyed, and the layout classes will resize them appropriately. diff --git a/doc/html/tutorial2-09.html b/doc/html/tutorial2-09.html index dbc4ad9d5..174c2d3e1 100644 --- a/doc/html/tutorial2-09.html +++ b/doc/html/tutorial2-09.html @@ -50,16 +50,16 @@ apply to all data sets in one place. TQFont font() const { return m_font; } void setFont( TQFont font ); - TQLabel *chartTypeTextLabel; + TQLabel *chartTypeTextLabel; TQComboBox *chartTypeComboBox; TQPushButton *fontPushButton; - TQLabel *fontTextLabel; + TQLabel *fontTextLabel; TQFrame *addValuesFrame; TQButtonGroup *addValuesButtonGroup; TQRadioButton *noRadioButton; TQRadioButton *yesRadioButton; TQRadioButton *asPercentageRadioButton; - TQLabel *decimalPlacesTextLabel; + TQLabel *decimalPlacesTextLabel; TQSpinBox *decimalPlacesSpinBox; TQPushButton *okPushButton; TQPushButton *cancelPushButton; @@ -117,7 +117,7 @@ vertical box layout.

                  chartTypeLayout = new TQHBoxLayout( 0, 0, 6 );
           

          The chart type label and combobox will be laid out side by side. -

                  chartTypeTextLabel = new TQLabel( "&Chart Type", this );
          +

                  chartTypeTextLabel = new TQLabel( "&Chart Type", this );
                   chartTypeLayout->addWidget( chartTypeTextLabel );
           
                   chartTypeComboBox = new TQComboBox( FALSE, this );
          @@ -143,7 +143,7 @@ vertical layout.
                                                          TQSizePolicy::Minimum );
                   fontLayout->addItem( spacer );
           
          -        fontTextLabel = new TQLabel( this ); // Must be set by caller via setFont()
          +        fontTextLabel = new TQLabel( this ); // Must be set by caller via setFont()
                   fontLayout->addWidget( fontTextLabel );
                   optionsFormLayout->addLayout( fontLayout );
           
          @@ -198,8 +198,8 @@ caller to read the data from the dialog's widgets and perform any necessary actions.
        • If the user clicks Cancel we call TQDialog::reject(). -

                  chartTypeTextLabel->setBuddy( chartTypeComboBox );
          -        decimalPlacesTextLabel->setBuddy( decimalPlacesSpinBox );
          +

                  chartTypeTextLabel->setBuddy( chartTypeComboBox );
          +        decimalPlacesTextLabel->setBuddy( decimalPlacesSpinBox );
           

          We use the setBuddy() function to associate widgets with label accelerators. @@ -225,7 +225,7 @@ will present a textual description of the font in the font label. label += " Bold"; if ( font.italic() ) label += " Italic"; - fontTextLabel->setText( label ); + fontTextLabel->setText( label ); m_font = font; }

          diff --git a/doc/html/unicode.html b/doc/html/unicode.html index 07a74ef47..61692afc2 100644 --- a/doc/html/unicode.html +++ b/doc/html/unicode.html @@ -80,7 +80,7 @@ all user-visible strings, and performing all text file I/O using widgets you write; it does not make much difference for slow typists in Western Europe or North America, but for fast typists or people using special input methods using text() is beneficial. -

          All the function arguments in TQt that may be user-visible strings, TQLabel::setText() and a many others, take const TQString &s. +

          All the function arguments in TQt that may be user-visible strings, TQLabel::setText() and a many others, take const TQString &s. TQString provides implicit casting from const char * so that things like

          diff --git a/doc/html/whatsthis b/doc/html/whatsthis
          index e9328f740..fbf74ee06 100644
          --- a/doc/html/whatsthis
          +++ b/doc/html/whatsthis
          @@ -36,7 +36,7 @@ Array of bytes. | TQByteArray
           Array of points. | TQPointArray
           Asynchronous DNS lookups. | TQDns
           Base class for TQMenuBar and TQPopupMenu. | TQMenuData
          -Base class for implementing TQTextEdit syntax highlighters. | QSyntaxHighlighter
          +Base class for implementing TQTextEdit syntax highlighters. | TQSyntaxHighlighter
           Basic functions for reading and writing text using a TQIODevice. | TQTextStream
           Blank space in a layout. | QSpacerItem
           Browsing and editing of SQL tables and views. | TQSqlCursor
          @@ -77,7 +77,7 @@ Conversion to and from the Chinese GB2312 encoding. | TQGb2312Codec
           Conversion to and from the Chinese GBK encoding. | TQGbkCodec
           Conversion to and from the Tamil TSCII encoding. | TQTsciiCodec
           Conversion to and from visually ordered Hebrew. | TQHebrewCodec
          -Converts between numbers and their string representations in various languages. | QLocale
          +Converts between numbers and their string representations in various languages. | TQLocale
           Corner-grip for resizing a top-level window. | TQSizeGrip
           Creates TQStyle objects. | TQStyleFactory
           Creates and manages data entry forms tied to SQL databases. | TQSqlForm
          @@ -147,7 +147,7 @@ Handles keyboard accelerator and shortcut keys. | QAccel
           Hardware-independent pixmap representation with direct access to the pixel data. | TQImage
           Header information for HTTP. | TQHttpHeader
           Header row or column, e.g. for tables and listviews. | QHeader
          -Helper class for TQString. | QCharRef
          +Helper class for TQString. | TQCharRef
           Helper class for XML readers which want to include namespace support. | TQXmlNamespaceSupport
           Horizontal bar suitable for presenting status information. | TQStatusBar
           Horizontal geometry management for its child widgets. | QHBox
          @@ -295,12 +295,12 @@ Serialization of binary data to a TQIODevice. | TQDataStream
           Set of icons with different styles and sizes. | TQIconSet
           Signals that a main icon drag has begun. | TQIconDragEvent
           Simple convenience dialog to get a single value from the user. | QInputDialog
          -Simple description of any widget, i.e. answering the question "What's this?". | QWhatsThis
          +Simple description of any widget, i.e. answering the question "What's this?". | TQWhatsThis
           Simple geometry management of its children. | QGrid
           Simple stored-value drag object for arbitrary MIME data. | TQStoredDrag
           Simplifies locking and unlocking TQMutexes. | TQMutexLocker
           Single item in a TQIconView. | TQIconViewItem
          -Small displayable piece of rich text. | QSimpleRichText
          +Small displayable piece of rich text. | TQSimpleRichText
           Spin box widget (spin button). | QSpinBox
           Splash screen that can be shown during application startup. | QSplashScreen
           Stack of tabbed widgets. | QTabDialog
          @@ -312,7 +312,7 @@ Stores information about URLs. | TQUrlInfo
           Stores meta data about a property. | QMetaProperty
           Stores meta data associated with a SQL field. | TQSqlFieldInfo
           Stream of data provided to a QNPInstance by the browser. | QNPStream
          -String objects using constant Unicode data. | QConstString
          +String objects using constant Unicode data. | TQConstString
           Support for custom events. | QCustomEvent
           Support for socket callbacks. | TQSocketNotifier
           Supports drag and drop operations within a TQIconView. | TQIconDrag
          @@ -334,7 +334,7 @@ Template class that provides guarded pointers to TQObjects. | QGuardedPtr
           Template class which ensures that implicitly shared and explicitly shared classes reference unique data. | TQDeepCopy
           Template collection class that provides a vector (array). | TQPtrVector
           Text object on a TQCanvas. | TQCanvasText
          -Text or image display. | QLabel
          +Text or image display. | TQLabel
           The QDialog API for Motif-based dialogs. | QMotifDialog
           The TQWidget API for Xt/Motif widgets. | QMotifWidget
           The XML handler classes with information about the parsing position within a file. | TQXmlLocator
          diff --git a/doc/html/wizard-example.html b/doc/html/wizard-example.html
          index 98af583a2..d1175ec15 100644
          --- a/doc/html/wizard-example.html
          +++ b/doc/html/wizard-example.html
          @@ -73,7 +73,7 @@ protected:
           
               TQHBox *page1, *page2, *page3;
               TQLineEdit *key, *firstName, *lastName, *address, *phone, *email;
          -    TQLabel *lKey, *lFirstName, *lLastName, *lAddress, *lPhone, *lEmail;
          +    TQLabel *lKey, *lFirstName, *lLastName, *lAddress, *lPhone, *lEmail;
           
           protected slots:
               void keyChanged( const TQString & );
          @@ -101,7 +101,7 @@ protected slots:
           #include <tqwidget.h>
           #include <ntqhbox.h>
           #include <ntqvbox.h>
          -#include <ntqlabel.h>
          +#include <tqlabel.h>
           #include <ntqlineedit.h>
           #include <ntqpushbutton.h>
           #include <ntqvalidator.h>
          @@ -122,10 +122,10 @@ void Wizard::setupPage1()
               page1 = new TQHBox( this );
               page1->setSpacing(8);
           
          -    TQLabel *info = new TQLabel( page1 );
          +    TQLabel *info = new TQLabel( page1 );
               info->setMargin( 11 );
               info->setPalette( yellow );
          -    info->setText( "Enter your personal\n"
          +    info->setText( "Enter your personal\n"
                              "key here.\n\n"
                              "Your personal key\n"
                              "consists of 4 digits" );
          @@ -135,7 +135,7 @@ void Wizard::setupPage1()
           
               TQHBox *row1 = new TQHBox( page );
           
          -    (void)new TQLabel( "Key:", row1 );
          +    (void)new TQLabel( "Key:", row1 );
           
               key = new TQLineEdit( row1 );
               key->setMaxLength( 4 );
          @@ -155,10 +155,10 @@ void Wizard::setupPage2()
               page2 = new TQHBox( this );
               page2->setSpacing(8);
           
          -    TQLabel *info = new TQLabel( page2 );
          +    TQLabel *info = new TQLabel( page2 );
               info->setMargin( 11 );
               info->setPalette( yellow );
          -    info->setText( "\n"
          +    info->setText( "\n"
                              "Enter your personal\n"
                              "data here.\n\n"
                              "The required fields are\n"
          @@ -174,16 +174,16 @@ void Wizard::setupPage2()
               TQHBox *row4 = new TQHBox( page );
               TQHBox *row5 = new TQHBox( page );
           
          -    TQLabel *label1 = new TQLabel( " First Name: ", row1 );
          -    label1->setAlignment( TQt::AlignVCenter );
          -    TQLabel *label2 = new TQLabel( " Last Name: ", row2 );
          -    label2->setAlignment( TQt::AlignVCenter );
          -    TQLabel *label3 = new TQLabel( " Address: ", row3 );
          -    label3->setAlignment( TQt::AlignVCenter );
          -    TQLabel *label4 = new TQLabel( " Phone Number: ", row4 );
          -    label4->setAlignment( TQt::AlignVCenter );
          -    TQLabel *label5 = new TQLabel( " E-Mail: ", row5 );
          -    label5->setAlignment( TQt::AlignVCenter );
          +    TQLabel *label1 = new TQLabel( " First Name: ", row1 );
          +    label1->setAlignment( TQt::AlignVCenter );
          +    TQLabel *label2 = new TQLabel( " Last Name: ", row2 );
          +    label2->setAlignment( TQt::AlignVCenter );
          +    TQLabel *label3 = new TQLabel( " Address: ", row3 );
          +    label3->setAlignment( TQt::AlignVCenter );
          +    TQLabel *label4 = new TQLabel( " Phone Number: ", row4 );
          +    label4->setAlignment( TQt::AlignVCenter );
          +    TQLabel *label5 = new TQLabel( " E-Mail: ", row5 );
          +    label5->setAlignment( TQt::AlignVCenter );
           
               label1->setMinimumWidth( label4->sizeHint().width() );
               label2->setMinimumWidth( label4->sizeHint().width() );
          @@ -214,9 +214,9 @@ void Wizard::setupPage3()
               page3 = new TQHBox( this );
               page3->setSpacing(8);
           
          -    TQLabel *info = new TQLabel( page3 );
          +    TQLabel *info = new TQLabel( page3 );
               info->setPalette( yellow );
          -    info->setText( "\n"
          +    info->setText( "\n"
                              "Look here to see of\n"
                              "the data you entered\n"
                              "is correct. To confirm,\n"
          @@ -224,7 +224,7 @@ void Wizard::setupPage3()
                              "else go back to correct\n"
                              "mistakes." );
               info->setMargin( 11 );
          -    info->setAlignment( AlignTop|AlignLeft );
          +    info->setAlignment( AlignTop|AlignLeft );
               info->setMaximumWidth( info->sizeHint().width() );
           
               TQVBox *page = new TQVBox( page3 );
          @@ -236,18 +236,18 @@ void Wizard::setupPage3()
               TQHBox *row5 = new TQHBox( page );
               TQHBox *row6 = new TQHBox( page );
           
          -    TQLabel *label1 = new TQLabel( " Personal Key: ", row1 );
          -    label1->setAlignment( TQt::AlignVCenter );
          -    TQLabel *label2 = new TQLabel( " First Name: ", row2 );
          -    label2->setAlignment( TQt::AlignVCenter );
          -    TQLabel *label3 = new TQLabel( " Last Name: ", row3 );
          -    label3->setAlignment( TQt::AlignVCenter );
          -    TQLabel *label4 = new TQLabel( " Address: ", row4 );
          -    label4->setAlignment( TQt::AlignVCenter );
          -    TQLabel *label5 = new TQLabel( " Phone Number: ", row5 );
          -    label5->setAlignment( TQt::AlignVCenter );
          -    TQLabel *label6 = new TQLabel( " E-Mail: ", row6 );
          -    label6->setAlignment( TQt::AlignVCenter );
          +    TQLabel *label1 = new TQLabel( " Personal Key: ", row1 );
          +    label1->setAlignment( TQt::AlignVCenter );
          +    TQLabel *label2 = new TQLabel( " First Name: ", row2 );
          +    label2->setAlignment( TQt::AlignVCenter );
          +    TQLabel *label3 = new TQLabel( " Last Name: ", row3 );
          +    label3->setAlignment( TQt::AlignVCenter );
          +    TQLabel *label4 = new TQLabel( " Address: ", row4 );
          +    label4->setAlignment( TQt::AlignVCenter );
          +    TQLabel *label5 = new TQLabel( " Phone Number: ", row5 );
          +    label5->setAlignment( TQt::AlignVCenter );
          +    TQLabel *label6 = new TQLabel( " E-Mail: ", row6 );
          +    label6->setAlignment( TQt::AlignVCenter );
           
               label1->setMinimumWidth( label1->sizeHint().width() );
               label2->setMinimumWidth( label1->sizeHint().width() );
          @@ -256,12 +256,12 @@ void Wizard::setupPage3()
               label5->setMinimumWidth( label1->sizeHint().width() );
               label6->setMinimumWidth( label1->sizeHint().width() );
           
          -    lKey = new TQLabel( row1 );
          -    lFirstName = new TQLabel( row2 );
          -    lLastName = new TQLabel( row3 );
          -    lAddress = new TQLabel( row4 );
          -    lPhone = new TQLabel( row5 );
          -    lEmail = new TQLabel( row6 );
          +    lKey = new TQLabel( row1 );
          +    lFirstName = new TQLabel( row2 );
          +    lLastName = new TQLabel( row3 );
          +    lAddress = new TQLabel( row4 );
          +    lPhone = new TQLabel( row5 );
          +    lEmail = new TQLabel( row6 );
           
               addPage( page3, "Finish" );
           
          @@ -274,12 +274,12 @@ void Wizard::setupPage3()
               if ( page == page1 ) {
               } else if ( page == page2 ) {
               } else if ( page == page3 ) {
          -        lKey->setText( key->text() );
          -        lFirstName->setText( firstName->text() );
          -        lLastName->setText( lastName->text() );
          -        lAddress->setText( address->text() );
          -        lPhone->setText( phone->text() );
          -        lEmail->setText( email->text() );
          +        lKey->setText( key->text() );
          +        lFirstName->setText( firstName->text() );
          +        lLastName->setText( lastName->text() );
          +        lAddress->setText( address->text() );
          +        lPhone->setText( phone->text() );
          +        lEmail->setText( email->text() );
               }
           
               TQWizard::showPage(page);
          diff --git a/doc/html/wizard-wizard-cpp.html b/doc/html/wizard-wizard-cpp.html
          index 7a9c1c835..05215f56a 100644
          --- a/doc/html/wizard-wizard-cpp.html
          +++ b/doc/html/wizard-wizard-cpp.html
          @@ -47,7 +47,7 @@ body { background: #ffffff; color: black; }
           #include <tqwidget.h>
           #include <ntqhbox.h>
           #include <ntqvbox.h>
          -#include <ntqlabel.h>
          +#include <tqlabel.h>
           #include <ntqlineedit.h>
           #include <ntqpushbutton.h>
           #include <ntqvalidator.h>
          @@ -68,10 +68,10 @@ void Wizard::setupPage1()
               page1 = new TQHBox( this );
               page1->setSpacing(8);
           
          -    TQLabel *info = new TQLabel( page1 );
          +    TQLabel *info = new TQLabel( page1 );
               info->setMargin( 11 );
               info->setPalette( yellow );
          -    info->setText( "Enter your personal\n"
          +    info->setText( "Enter your personal\n"
                              "key here.\n\n"
                              "Your personal key\n"
                              "consists of 4 digits" );
          @@ -81,7 +81,7 @@ void Wizard::setupPage1()
           
               TQHBox *row1 = new TQHBox( page );
           
          -    (void)new TQLabel( "Key:", row1 );
          +    (void)new TQLabel( "Key:", row1 );
           
               key = new TQLineEdit( row1 );
               key->setMaxLength( 4 );
          @@ -101,10 +101,10 @@ void Wizard::setupPage2()
               page2 = new TQHBox( this );
               page2->setSpacing(8);
           
          -    TQLabel *info = new TQLabel( page2 );
          +    TQLabel *info = new TQLabel( page2 );
               info->setMargin( 11 );
               info->setPalette( yellow );
          -    info->setText( "\n"
          +    info->setText( "\n"
                              "Enter your personal\n"
                              "data here.\n\n"
                              "The required fields are\n"
          @@ -120,16 +120,16 @@ void Wizard::setupPage2()
               TQHBox *row4 = new TQHBox( page );
               TQHBox *row5 = new TQHBox( page );
           
          -    TQLabel *label1 = new TQLabel( " First Name: ", row1 );
          -    label1->setAlignment( TQt::AlignVCenter );
          -    TQLabel *label2 = new TQLabel( " Last Name: ", row2 );
          -    label2->setAlignment( TQt::AlignVCenter );
          -    TQLabel *label3 = new TQLabel( " Address: ", row3 );
          -    label3->setAlignment( TQt::AlignVCenter );
          -    TQLabel *label4 = new TQLabel( " Phone Number: ", row4 );
          -    label4->setAlignment( TQt::AlignVCenter );
          -    TQLabel *label5 = new TQLabel( " E-Mail: ", row5 );
          -    label5->setAlignment( TQt::AlignVCenter );
          +    TQLabel *label1 = new TQLabel( " First Name: ", row1 );
          +    label1->setAlignment( TQt::AlignVCenter );
          +    TQLabel *label2 = new TQLabel( " Last Name: ", row2 );
          +    label2->setAlignment( TQt::AlignVCenter );
          +    TQLabel *label3 = new TQLabel( " Address: ", row3 );
          +    label3->setAlignment( TQt::AlignVCenter );
          +    TQLabel *label4 = new TQLabel( " Phone Number: ", row4 );
          +    label4->setAlignment( TQt::AlignVCenter );
          +    TQLabel *label5 = new TQLabel( " E-Mail: ", row5 );
          +    label5->setAlignment( TQt::AlignVCenter );
           
               label1->setMinimumWidth( label4->sizeHint().width() );
               label2->setMinimumWidth( label4->sizeHint().width() );
          @@ -160,9 +160,9 @@ void Wizard::setupPage3()
               page3 = new TQHBox( this );
               page3->setSpacing(8);
           
          -    TQLabel *info = new TQLabel( page3 );
          +    TQLabel *info = new TQLabel( page3 );
               info->setPalette( yellow );
          -    info->setText( "\n"
          +    info->setText( "\n"
                              "Look here to see of\n"
                              "the data you entered\n"
                              "is correct. To confirm,\n"
          @@ -170,7 +170,7 @@ void Wizard::setupPage3()
                              "else go back to correct\n"
                              "mistakes." );
               info->setMargin( 11 );
          -    info->setAlignment( AlignTop|AlignLeft );
          +    info->setAlignment( AlignTop|AlignLeft );
               info->setMaximumWidth( info->sizeHint().width() );
           
               TQVBox *page = new TQVBox( page3 );
          @@ -182,18 +182,18 @@ void Wizard::setupPage3()
               TQHBox *row5 = new TQHBox( page );
               TQHBox *row6 = new TQHBox( page );
           
          -    TQLabel *label1 = new TQLabel( " Personal Key: ", row1 );
          -    label1->setAlignment( TQt::AlignVCenter );
          -    TQLabel *label2 = new TQLabel( " First Name: ", row2 );
          -    label2->setAlignment( TQt::AlignVCenter );
          -    TQLabel *label3 = new TQLabel( " Last Name: ", row3 );
          -    label3->setAlignment( TQt::AlignVCenter );
          -    TQLabel *label4 = new TQLabel( " Address: ", row4 );
          -    label4->setAlignment( TQt::AlignVCenter );
          -    TQLabel *label5 = new TQLabel( " Phone Number: ", row5 );
          -    label5->setAlignment( TQt::AlignVCenter );
          -    TQLabel *label6 = new TQLabel( " E-Mail: ", row6 );
          -    label6->setAlignment( TQt::AlignVCenter );
          +    TQLabel *label1 = new TQLabel( " Personal Key: ", row1 );
          +    label1->setAlignment( TQt::AlignVCenter );
          +    TQLabel *label2 = new TQLabel( " First Name: ", row2 );
          +    label2->setAlignment( TQt::AlignVCenter );
          +    TQLabel *label3 = new TQLabel( " Last Name: ", row3 );
          +    label3->setAlignment( TQt::AlignVCenter );
          +    TQLabel *label4 = new TQLabel( " Address: ", row4 );
          +    label4->setAlignment( TQt::AlignVCenter );
          +    TQLabel *label5 = new TQLabel( " Phone Number: ", row5 );
          +    label5->setAlignment( TQt::AlignVCenter );
          +    TQLabel *label6 = new TQLabel( " E-Mail: ", row6 );
          +    label6->setAlignment( TQt::AlignVCenter );
           
               label1->setMinimumWidth( label1->sizeHint().width() );
               label2->setMinimumWidth( label1->sizeHint().width() );
          @@ -202,12 +202,12 @@ void Wizard::setupPage3()
               label5->setMinimumWidth( label1->sizeHint().width() );
               label6->setMinimumWidth( label1->sizeHint().width() );
           
          -    lKey = new TQLabel( row1 );
          -    lFirstName = new TQLabel( row2 );
          -    lLastName = new TQLabel( row3 );
          -    lAddress = new TQLabel( row4 );
          -    lPhone = new TQLabel( row5 );
          -    lEmail = new TQLabel( row6 );
          +    lKey = new TQLabel( row1 );
          +    lFirstName = new TQLabel( row2 );
          +    lLastName = new TQLabel( row3 );
          +    lAddress = new TQLabel( row4 );
          +    lPhone = new TQLabel( row5 );
          +    lEmail = new TQLabel( row6 );
           
               addPage( page3, "Finish" );
           
          @@ -220,12 +220,12 @@ void Wizard::setupPage3()
               if ( page == page1 ) {
               } else if ( page == page2 ) {
               } else if ( page == page3 ) {
          -        lKey->setText( key->text() );
          -        lFirstName->setText( firstName->text() );
          -        lLastName->setText( lastName->text() );
          -        lAddress->setText( address->text() );
          -        lPhone->setText( phone->text() );
          -        lEmail->setText( email->text() );
          +        lKey->setText( key->text() );
          +        lFirstName->setText( firstName->text() );
          +        lLastName->setText( lastName->text() );
          +        lAddress->setText( address->text() );
          +        lPhone->setText( phone->text() );
          +        lEmail->setText( email->text() );
               }
           
               TQWizard::showPage(page);
          diff --git a/doc/html/wizard-wizard-h.html b/doc/html/wizard-wizard-h.html
          index 3c8a7c768..4aa9d2b8d 100644
          --- a/doc/html/wizard-wizard-h.html
          +++ b/doc/html/wizard-wizard-h.html
          @@ -68,7 +68,7 @@ protected:
           
               TQHBox *page1, *page2, *page3;
               TQLineEdit *key, *firstName, *lastName, *address, *phone, *email;
          -    TQLabel *lKey, *lFirstName, *lLastName, *lAddress, *lPhone, *lEmail;
          +    TQLabel *lKey, *lFirstName, *lLastName, *lAddress, *lPhone, *lEmail;
           
           protected slots:
               void keyChanged( const TQString & );
          diff --git a/doc/html/xform-example.html b/doc/html/xform-example.html
          index 7a7752c68..3a7b9bab9 100644
          --- a/doc/html/xform-example.html
          +++ b/doc/html/xform-example.html
          @@ -50,7 +50,7 @@ arbitrarily.
           #include <ntqapplication.h>
           
           #include <ntqdialog.h>
          -#include <ntqlabel.h>
          +#include <tqlabel.h>
           #include <ntqlineedit.h>
           #include <ntqpushbutton.h>
           #include <ntqcheckbox.h>
          diff --git a/doc/html/xml-sax-features-walkthrough.html b/doc/html/xml-sax-features-walkthrough.html
          index d9a201a89..51708fff9 100644
          --- a/doc/html/xml-sax-features-walkthrough.html
          +++ b/doc/html/xml-sax-features-walkthrough.html
          @@ -62,7 +62,7 @@ part: we include all the classes we need:
               #include <ntqlistview.h>
               #include <ntqgrid.h>
               #include <tqmainwindow.h>
          -    #include <ntqlabel.h>
          +    #include <tqlabel.h>
           

          structureparser.h contains the API of the XML parser that we implement in structureparser.cpp. @@ -155,21 +155,21 @@ settings (TRUE/TRUE). with the feature setting http://xml.org/sax/features/namespaces FALSE and http://xml.org/sax/features/namespace-prefixes TRUE.

                  // namespace label
          -        (void) new TQLabel(
          +        (void) new TQLabel(
                            "Default:\n"
                            "http://xml.org/sax/features/namespaces: TRUE\n"
                            "http://xml.org/sax/features/namespace-prefixes: FALSE\n",
                            container );
           
                   // namespace prefix label
          -        (void) new TQLabel(
          +        (void) new TQLabel(
                            "\n"
                            "http://xml.org/sax/features/namespaces: TRUE\n"
                            "http://xml.org/sax/features/namespace-prefixes: TRUE\n",
                            container );
           
                   // prefix label
          -        (void) new TQLabel(
          +        (void) new TQLabel(
                            "\n"
                            "http://xml.org/sax/features/namespaces: FALSE\n"
                            "http://xml.org/sax/features/namespace-prefixes: TRUE\n",
          diff --git a/doc/i18n.doc b/doc/i18n.doc
          index 00b70c4ec..e660f183d 100644
          --- a/doc/i18n.doc
          +++ b/doc/i18n.doc
          @@ -122,7 +122,7 @@ the fl and fi ligatures used in typesetting US and European books.
           Qt tries to take care of all the special features listed above. You
           usually don't have to worry about these features so long as you use
           Qt's input widgets (e.g. QLineEdit, TQTextEdit, and derived classes)
          -and Qt's display widgets (e.g. QLabel).
          +and Qt's display widgets (e.g. TQLabel).
           
           Support for these writing systems is transparent to the programmer
           and completely encapsulated in Qt's text engine. This means that you
          @@ -185,7 +185,7 @@ to achieve this is to use \l TQObject::tr(). For example, assuming the
           \code
               LoginWidget::LoginWidget()
               {
          -        QLabel *label = new QLabel( tr("Password:"), this );
          +        TQLabel *label = new TQLabel( tr("Password:"), this );
                   ...
               }
           \endcode
          @@ -201,13 +201,13 @@ directly:
           \code
               void some_global_function( LoginWidget *logwid )
               {
          -        QLabel *label = new QLabel(
          +        TQLabel *label = new TQLabel(
                           LoginWidget::tr("Password:"), logwid );
               }
           
               void same_global_function( LoginWidget *logwid )
               {
          -        QLabel *label = new QLabel(
          +        TQLabel *label = new TQLabel(
                           tqApp->translate("LoginWidget", "Password:"),
                           logwid );
               }
          diff --git a/doc/layout.doc b/doc/layout.doc
          index 6625d8401..27c3c549b 100644
          --- a/doc/layout.doc
          +++ b/doc/layout.doc
          @@ -99,11 +99,11 @@ resized.
           The grid shown above can be produced by the following code:
           \code
               QGrid *mainGrid = new QGrid( 2 ); // a 2 x n grid
          -    new QLabel( "One", mainGrid );
          -    new QLabel( "Two", mainGrid );
          -    new QLabel( "Three", mainGrid );
          -    new QLabel( "Four", mainGrid );
          -    new QLabel( "Five", mainGrid );
          +    new TQLabel( "One", mainGrid );
          +    new TQLabel( "Two", mainGrid );
          +    new TQLabel( "Three", mainGrid );
          +    new TQLabel( "Four", mainGrid );
          +    new TQLabel( "Five", mainGrid );
           \endcode
           
           You can adjust the layout to some extent by calling
          @@ -177,14 +177,14 @@ improvements:
               QGridLayout *grid = new QGridLayout( main, 1, 1 );
           
               // add the first four widgets with (row, column) addressing
          -    grid->addWidget( new QLabel( "One", main ),   0, 0 );
          -    grid->addWidget( new QLabel( "Two", main ),   0, 1 );
          -    grid->addWidget( new QLabel( "Three", main ), 1, 0 );
          -    grid->addWidget( new QLabel( "Four", main ),  1, 1 );
          +    grid->addWidget( new TQLabel( "One", main ),   0, 0 );
          +    grid->addWidget( new TQLabel( "Two", main ),   0, 1 );
          +    grid->addWidget( new TQLabel( "Three", main ), 1, 0 );
          +    grid->addWidget( new TQLabel( "Four", main ),  1, 1 );
           
               // add the last widget on row 2, spanning from column 0 to
               // column 1, and center aligned 
          -    grid->addMultiCellWidget( new QLabel( "Five", main ), 2, 2, 0, 1,
          +    grid->addMultiCellWidget( new TQLabel( "Five", main ), 2, 2, 0, 1,
           			      TQt::AlignCenter );
           
               // let the ratio between the widths of columns 0 and 1 be 2:3
          @@ -199,7 +199,7 @@ a parameter in the constructor.
               QLineEdit *field = new QLineEdit( main );
               QPushButton *ok = new QPushButton( "OK", main );
               QPushButton *cancel = new QPushButton( "Cancel", main );
          -    QLabel *label = new QLabel( "Write once, compile everywhere.", main );
          +    TQLabel *label = new TQLabel( "Write once, compile everywhere.", main );
           
               // a layout on a widget
               QVBoxLayout *vbox = new QVBoxLayout( main );
          diff --git a/doc/man/man3/tqaccel.3qt b/doc/man/man3/tqaccel.3qt
          index 28420add5..4ad264c2f 100644
          --- a/doc/man/man3/tqaccel.3qt
          +++ b/doc/man/man3/tqaccel.3qt
          @@ -102,7 +102,7 @@ The QAccel class handles keyboard accelerator and shortcut keys.
           .PP
           A keyboard accelerator triggers an action when a certain key combination is pressed. The accelerator handles all keyboard activity for all the children of one top-level widget, so it is not affected by the keyboard focus.
           .PP
          -In most cases, you will not need to use this class directly. Use the TQAction class to create actions with accelerators that can be used in both menus and toolbars. If you're only interested in menus use TQMenuData::insertItem() or TQMenuData::setAccel() to make accelerators for operations that are also available on menus. Many widgets automatically generate accelerators, such as QButton, QGroupBox, QLabel (with QLabel::setBuddy()), TQMenuBar and QTabBar. Example:
          +In most cases, you will not need to use this class directly. Use the TQAction class to create actions with accelerators that can be used in both menus and toolbars. If you're only interested in menus use TQMenuData::insertItem() or TQMenuData::setAccel() to make accelerators for operations that are also available on menus. Many widgets automatically generate accelerators, such as QButton, QGroupBox, TQLabel (with TQLabel::setBuddy()), TQMenuBar and QTabBar. Example:
           .PP
           .nf
           .br
          @@ -120,7 +120,7 @@ Each accelerator item consists of an identifier and a QKeySequence. A single key
           .PP
           When an accelerator key is pressed, the accelerator sends out the signal activated() with a number that identifies this particular accelerator item. Accelerator items can also be individually connected, so that two different keys will activate two different slots (see connectItem() and disconnectItem()).
           .PP
          -The activated() signal is \fInot\fR emitted when two or more accelerators match the same key. Instead, the first matching accelerator sends out the activatedAmbiguously() signal. By pressing the key multiple times, users can navigate between all matching accelerators. Some standard controls like QPushButton and QCheckBox connect the activatedAmbiguously() signal to the harmless setFocus() slot, whereas activated() is connected to a slot invoking the button's action. Most controls, like QLabel and QTabBar, treat activated() and activatedAmbiguously() as equivalent.
          +The activated() signal is \fInot\fR emitted when two or more accelerators match the same key. Instead, the first matching accelerator sends out the activatedAmbiguously() signal. By pressing the key multiple times, users can navigate between all matching accelerators. Some standard controls like QPushButton and QCheckBox connect the activatedAmbiguously() signal to the harmless setFocus() slot, whereas activated() is connected to a slot invoking the button's action. Most controls, like TQLabel and QTabBar, treat activated() and activatedAmbiguously() as equivalent.
           .PP
           Use setEnabled() to enable or disable all the items in an accelerator, or setItemEnabled() to enable or disable individual items. An item is active only when both the QAccel and the item itself are enabled.
           .PP
          @@ -151,7 +151,7 @@ Example:
           .br
           .fi
           .PP
          -See also QKeyEvent, TQWidget::keyPressEvent(), TQMenuData::setAccel(), QButton::accel, QLabel::setBuddy(), QKeySequence, GUI Design Handbook: Keyboard Shortcuts, and Miscellaneous Classes.
          +See also QKeyEvent, TQWidget::keyPressEvent(), TQMenuData::setAccel(), QButton::accel, TQLabel::setBuddy(), QKeySequence, GUI Design Handbook: Keyboard Shortcuts, and Miscellaneous Classes.
           .SH MEMBER FUNCTION DOCUMENTATION
           .SH "QAccel::QAccel ( TQWidget * parent, const char * name = 0 )"
           Constructs a QAccel object called \fIname\fR, with parent \fIparent\fR. The accelerator operates on \fIparent\fR.
          @@ -262,7 +262,7 @@ The text will be shown when the application is in What's This mode and the user
           .PP
           To set What's This help on a menu item (with or without an accelerator key), use TQMenuData::setWhatsThis().
           .PP
          -See also whatsThis(), QWhatsThis::inWhatsThisMode(), TQMenuData::setWhatsThis(), and TQAction::whatsThis.
          +See also whatsThis(), TQWhatsThis::inWhatsThisMode(), TQMenuData::setWhatsThis(), and TQAction::whatsThis.
           .SH "QKeySequence QAccel::shortcutKey ( const TQString & str )\fC [static]\fR"
           Returns the shortcut key sequence for \fIstr\fR, or an invalid key sequence (0) if \fIstr\fR has no shortcut sequence.
           .PP
          diff --git a/doc/man/man3/tqaccessible.3qt b/doc/man/man3/tqaccessible.3qt
          index b3e790457..498c72485 100644
          --- a/doc/man/man3/tqaccessible.3qt
          +++ b/doc/man/man3/tqaccessible.3qt
          @@ -366,7 +366,7 @@ Notifies accessibility clients about a change in \fIobject\fR's accessibility in
           .PP
           \fIreason\fR specifies the cause of the change, for example, ValueChange when the position of a slider has been changed. \fIcontrol\fR is the ID of the child element that has changed. When \fIcontrol\fR is 0, the object itself has changed.
           .PP
          -Call this function whenever the state of your accessible object or one of it's sub-elements has been changed either programmatically (e.g. by calling QLabel::setText()) or by user interaction.
          +Call this function whenever the state of your accessible object or one of it's sub-elements has been changed either programmatically (e.g. by calling TQLabel::setText()) or by user interaction.
           .PP
           If there are no accessibility tools listening to this event, the
           performance penalty for calling this function is minor, but if determining
          diff --git a/doc/man/man3/tqaction.3qt b/doc/man/man3/tqaction.3qt
          index 507e3d4d8..862763dfb 100644
          --- a/doc/man/man3/tqaction.3qt
          +++ b/doc/man/man3/tqaction.3qt
          @@ -506,7 +506,7 @@ This property holds the action's "What's This?" help text.
           .PP
           The whats this text is used to provide a brief description of the action. The text may contain rich text (HTML-like tags -- see TQStyleSheet for the list of supported tags). There is no default" What's This" text.
           .PP
          -See also QWhatsThis.
          +See also TQWhatsThis.
           .PP
           Set this property's value with setWhatsThis() and get this property's value with whatsThis().
           
          diff --git a/doc/man/man3/tqchar.3qt b/doc/man/man3/tqchar.3qt
          index e3786c2f4..86e001d7c 100644
          --- a/doc/man/man3/tqchar.3qt
          +++ b/doc/man/man3/tqchar.3qt
          @@ -16,31 +16,31 @@ Almost all the functions in this class are reentrant when TQt is built with thre
           .SS "Public Members"
           .in +1c
           .ti -1c
          -.BI "\fBQChar\fR ()"
          +.BI "\fBTQChar\fR ()"
           .br
           .ti -1c
          -.BI "\fBQChar\fR ( char c )"
          +.BI "\fBTQChar\fR ( char c )"
           .br
           .ti -1c
          -.BI "\fBQChar\fR ( uchar c )"
          +.BI "\fBTQChar\fR ( uchar c )"
           .br
           .ti -1c
          -.BI "\fBQChar\fR ( uchar c, uchar r )"
          +.BI "\fBTQChar\fR ( uchar c, uchar r )"
           .br
           .ti -1c
          -.BI "\fBQChar\fR ( const TQChar & c )"
          +.BI "\fBTQChar\fR ( const TQChar & c )"
           .br
           .ti -1c
          -.BI "\fBQChar\fR ( ushort rc )"
          +.BI "\fBTQChar\fR ( ushort rc )"
           .br
           .ti -1c
          -.BI "\fBQChar\fR ( short rc )"
          +.BI "\fBTQChar\fR ( short rc )"
           .br
           .ti -1c
          -.BI "\fBQChar\fR ( uint rc )"
          +.BI "\fBTQChar\fR ( uint rc )"
           .br
           .ti -1c
          -.BI "\fBQChar\fR ( int rc )"
          +.BI "\fBTQChar\fR ( int rc )"
           .br
           .ti -1c
           .BI "enum \fBCategory\fR { NoCategory, Mark_NonSpacing, Mark_SpacingCombining, Mark_Enclosing, Number_DecimalDigit, Number_Letter, Number_Other, Separator_Space, Separator_Line, Separator_Paragraph, Other_Control, Other_Format, Other_Surrogate, Other_PrivateUse, Other_NotAssigned, Letter_Uppercase, Letter_Lowercase, Letter_Titlecase, Letter_Modifier, Letter_Other, Punctuation_Connector, Punctuation_Dash, Punctuation_Dask = Punctuation_Dash, Punctuation_Open, Punctuation_Close, Punctuation_InitialQuote, Punctuation_FinalQuote, Punctuation_Other, Symbol_Math, Symbol_Currency, Symbol_Modifier, Symbol_Other }"
          @@ -221,80 +221,80 @@ The conversion functions include unicode() (to a scalar), latin1() (to scalar, b
           .PP
           More information can be found in the document About Unicode.
           .PP
          -See also TQString, QCharRef, and Text Related Classes.
          +See also TQString, TQCharRef, and Text Related Classes.
           .SS "Member Type Documentation"
           .SH "TQChar::Category"
           This enum maps the Unicode character categories.
           .PP
           The following characters are normative in Unicode:
           .TP
          -\fCQChar::Mark_NonSpacing\fR - Unicode class name Mn
          +\fCTQChar::Mark_NonSpacing\fR - Unicode class name Mn
           .TP
          -\fCQChar::Mark_SpacingCombining\fR - Unicode class name Mc
          +\fCTQChar::Mark_SpacingCombining\fR - Unicode class name Mc
           .TP
          -\fCQChar::Mark_Enclosing\fR - Unicode class name Me
          +\fCTQChar::Mark_Enclosing\fR - Unicode class name Me
           .TP
          -\fCQChar::Number_DecimalDigit\fR - Unicode class name Nd
          +\fCTQChar::Number_DecimalDigit\fR - Unicode class name Nd
           .TP
          -\fCQChar::Number_Letter\fR - Unicode class name Nl
          +\fCTQChar::Number_Letter\fR - Unicode class name Nl
           .TP
          -\fCQChar::Number_Other\fR - Unicode class name No
          +\fCTQChar::Number_Other\fR - Unicode class name No
           .TP
          -\fCQChar::Separator_Space\fR - Unicode class name Zs
          +\fCTQChar::Separator_Space\fR - Unicode class name Zs
           .TP
          -\fCQChar::Separator_Line\fR - Unicode class name Zl
          +\fCTQChar::Separator_Line\fR - Unicode class name Zl
           .TP
          -\fCQChar::Separator_Paragraph\fR - Unicode class name Zp
          +\fCTQChar::Separator_Paragraph\fR - Unicode class name Zp
           .TP
          -\fCQChar::Other_Control\fR - Unicode class name Cc
          +\fCTQChar::Other_Control\fR - Unicode class name Cc
           .TP
          -\fCQChar::Other_Format\fR - Unicode class name Cf
          +\fCTQChar::Other_Format\fR - Unicode class name Cf
           .TP
          -\fCQChar::Other_Surrogate\fR - Unicode class name Cs
          +\fCTQChar::Other_Surrogate\fR - Unicode class name Cs
           .TP
          -\fCQChar::Other_PrivateUse\fR - Unicode class name Co
          +\fCTQChar::Other_PrivateUse\fR - Unicode class name Co
           .TP
          -\fCQChar::Other_NotAssigned\fR - Unicode class name Cn
          +\fCTQChar::Other_NotAssigned\fR - Unicode class name Cn
           .PP
           The following categories are informative in Unicode:
           .TP
          -\fCQChar::Letter_Uppercase\fR - Unicode class name Lu
          +\fCTQChar::Letter_Uppercase\fR - Unicode class name Lu
           .TP
          -\fCQChar::Letter_Lowercase\fR - Unicode class name Ll
          +\fCTQChar::Letter_Lowercase\fR - Unicode class name Ll
           .TP
          -\fCQChar::Letter_Titlecase\fR - Unicode class name Lt
          +\fCTQChar::Letter_Titlecase\fR - Unicode class name Lt
           .TP
          -\fCQChar::Letter_Modifier\fR - Unicode class name Lm
          +\fCTQChar::Letter_Modifier\fR - Unicode class name Lm
           .TP
          -\fCQChar::Letter_Other\fR - Unicode class name Lo
          +\fCTQChar::Letter_Other\fR - Unicode class name Lo
           .TP
          -\fCQChar::Punctuation_Connector\fR - Unicode class name Pc
          +\fCTQChar::Punctuation_Connector\fR - Unicode class name Pc
           .TP
          -\fCQChar::Punctuation_Dash\fR - Unicode class name Pd
          +\fCTQChar::Punctuation_Dash\fR - Unicode class name Pd
           .TP
          -\fCQChar::Punctuation_Open\fR - Unicode class name Ps
          +\fCTQChar::Punctuation_Open\fR - Unicode class name Ps
           .TP
          -\fCQChar::Punctuation_Close\fR - Unicode class name Pe
          +\fCTQChar::Punctuation_Close\fR - Unicode class name Pe
           .TP
          -\fCQChar::Punctuation_InitialQuote\fR - Unicode class name Pi
          +\fCTQChar::Punctuation_InitialQuote\fR - Unicode class name Pi
           .TP
          -\fCQChar::Punctuation_FinalQuote\fR - Unicode class name Pf
          +\fCTQChar::Punctuation_FinalQuote\fR - Unicode class name Pf
           .TP
          -\fCQChar::Punctuation_Other\fR - Unicode class name Po
          +\fCTQChar::Punctuation_Other\fR - Unicode class name Po
           .TP
          -\fCQChar::Symbol_Math\fR - Unicode class name Sm
          +\fCTQChar::Symbol_Math\fR - Unicode class name Sm
           .TP
          -\fCQChar::Symbol_Currency\fR - Unicode class name Sc
          +\fCTQChar::Symbol_Currency\fR - Unicode class name Sc
           .TP
          -\fCQChar::Symbol_Modifier\fR - Unicode class name Sk
          +\fCTQChar::Symbol_Modifier\fR - Unicode class name Sk
           .TP
          -\fCQChar::Symbol_Other\fR - Unicode class name So
          +\fCTQChar::Symbol_Other\fR - Unicode class name So
           .PP
           There are two categories that are specific to Qt:
           .TP
          -\fCQChar::NoCategory\fR - used when TQt is dazed and confused and cannot make sense of anything.
          +\fCTQChar::NoCategory\fR - used when TQt is dazed and confused and cannot make sense of anything.
           .TP
          -\fCQChar::Punctuation_Dask\fR - old typo alias for Punctuation_Dash
          +\fCTQChar::Punctuation_Dask\fR - old typo alias for Punctuation_Dash
           .SH "TQChar::CombiningClass"
           This enum type defines names for some of the Unicode combining classes. See the Unicode Standard for a description of the values.
           .SH "TQChar::Decomposition"
          @@ -465,7 +465,7 @@ character \fIch\fR is greater than or equal to that of \fIc\fR;
           otherwise returns FALSE.
           
           .SH "SEE ALSO"
          -.BR http://doc.trolltech.com/qchar.html
          +.BR http://doc.trolltech.com/tqchar.html
           .BR http://www.trolltech.com/faq/tech.html
           .SH COPYRIGHT
           Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com.  See the
          diff --git a/doc/man/man3/tqcharref.3qt b/doc/man/man3/tqcharref.3qt
          index 9427f0c8e..0bdff229a 100644
          --- a/doc/man/man3/tqcharref.3qt
          +++ b/doc/man/man3/tqcharref.3qt
          @@ -1,5 +1,5 @@
           '\" t
          -.TH QCharRef 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*-
          +.TH TQCharRef 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*-
           .\" Copyright 1992-2007 Trolltech ASA.  All rights reserved.  See the
           .\" license file included in the distribution for a complete license
           .\" statement.
          @@ -7,23 +7,23 @@
           .ad l
           .nh
           .SH NAME
          -QCharRef \- Helper class for TQString
          +TQCharRef \- Helper class for TQString
           .SH SYNOPSIS
           All the functions in this class are reentrant when TQt is built with thread support.

          .PP \fC#include \fR .PP .SH DESCRIPTION -The QCharRef class is a helper class for TQString. +The TQCharRef class is a helper class for TQString. .PP -When you get an object of type QCharRef, if you can assign to it, the assignment will apply to the character in the string from which you got the reference. That is its whole purpose in life. The QCharRef becomes invalid once modifications are made to the string: if you want to keep the character, copy it into a TQChar. +When you get an object of type TQCharRef, if you can assign to it, the assignment will apply to the character in the string from which you got the reference. That is its whole purpose in life. The TQCharRef becomes invalid once modifications are made to the string: if you want to keep the character, copy it into a TQChar. .PP -Most of the TQChar member functions also exist in QCharRef. However, they are not explicitly documented here. +Most of the TQChar member functions also exist in TQCharRef. However, they are not explicitly documented here. .PP See also TQString::operator[](), TQString::at(), TQChar, and Text Related Classes. .SH "SEE ALSO" -.BR http://doc.trolltech.com/qcharref.html +.BR http://doc.trolltech.com/tqcharref.html .BR http://www.trolltech.com/faq/tech.html .SH COPYRIGHT Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the diff --git a/doc/man/man3/tqconststring.3qt b/doc/man/man3/tqconststring.3qt index 887f7b76c..4c3e717d1 100644 --- a/doc/man/man3/tqconststring.3qt +++ b/doc/man/man3/tqconststring.3qt @@ -1,5 +1,5 @@ '\" t -.TH QConstString 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- +.TH TQConstString 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- .\" Copyright 1992-2007 Trolltech ASA. All rights reserved. See the .\" license file included in the distribution for a complete license .\" statement. @@ -7,7 +7,7 @@ .ad l .nh .SH NAME -QConstString \- String objects using constant Unicode data +TQConstString \- String objects using constant Unicode data .SH SYNOPSIS All the functions in this class are reentrant when TQt is built with thread support.

          .PP @@ -16,36 +16,36 @@ All the functions in this class are reentrant when TQt is built with thread supp .SS "Public Members" .in +1c .ti -1c -.BI "\fBQConstString\fR ( const TQChar * unicode, uint length )" +.BI "\fBTQConstString\fR ( const TQChar * unicode, uint length )" .br .ti -1c -.BI "\fB~QConstString\fR ()" +.BI "\fB~TQConstString\fR ()" .br .ti -1c .BI "const TQString & \fBstring\fR () const" .br .in -1c .SH DESCRIPTION -The QConstString class provides string objects using constant Unicode data. +The TQConstString class provides string objects using constant Unicode data. .PP -In order to minimize copying, highly optimized applications can use QConstString to provide a TQString-compatible object from existing Unicode data. It is then the programmer's responsibility to ensure that the Unicode data exists for the entire lifetime of the QConstString object. +In order to minimize copying, highly optimized applications can use TQConstString to provide a TQString-compatible object from existing Unicode data. It is then the programmer's responsibility to ensure that the Unicode data exists for the entire lifetime of the TQConstString object. .PP -A QConstString is created with the QConstString constructor. The string held by the object can be obtained by calling string(). +A TQConstString is created with the TQConstString constructor. The string held by the object can be obtained by calling string(). .PP See also Text Related Classes. .SH MEMBER FUNCTION DOCUMENTATION -.SH "QConstString::QConstString ( const TQChar * unicode, uint length )" -Constructs a QConstString that uses the first \fIlength\fR Unicode characters in the array \fIunicode\fR. Any attempt to modify copies of the string will cause it to create a copy of the data, thus it remains forever unmodified. +.SH "TQConstString::TQConstString ( const TQChar * unicode, uint length )" +Constructs a TQConstString that uses the first \fIlength\fR Unicode characters in the array \fIunicode\fR. Any attempt to modify copies of the string will cause it to create a copy of the data, thus it remains forever unmodified. .PP The data in \fIunicode\fR is not copied. The caller must be able to guarantee that \fIunicode\fR will not be deleted or modified. -.SH "QConstString::~QConstString ()" -Destroys the QConstString, creating a copy of the data if other strings are still using it. -.SH "const TQString & QConstString::string () const" +.SH "TQConstString::~TQConstString ()" +Destroys the TQConstString, creating a copy of the data if other strings are still using it. +.SH "const TQString & TQConstString::string () const" Returns a constant string referencing the data passed during construction. .SH "SEE ALSO" -.BR http://doc.trolltech.com/qconststring.html +.BR http://doc.trolltech.com/tqconststring.html .BR http://www.trolltech.com/faq/tech.html .SH COPYRIGHT Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the diff --git a/doc/man/man3/tqerrormessage.3qt b/doc/man/man3/tqerrormessage.3qt index 81a84b9f5..8effc51ff 100644 --- a/doc/man/man3/tqerrormessage.3qt +++ b/doc/man/man3/tqerrormessage.3qt @@ -37,7 +37,7 @@ Inherits QDialog. .SH DESCRIPTION The QErrorMessage class provides an error message display dialog. .PP -This is basically a QLabel and a "show this message again" checkbox which remembers what not to show. +This is basically a TQLabel and a "show this message again" checkbox which remembers what not to show. .PP There are two ways to use this class:
            .IP 1 diff --git a/doc/man/man3/tqfiledialog.3qt b/doc/man/man3/tqfiledialog.3qt index de55d1923..4bdadcc70 100644 --- a/doc/man/man3/tqfiledialog.3qt +++ b/doc/man/man3/tqfiledialog.3qt @@ -214,7 +214,7 @@ Inherits QDialog. .SS "Protected Members" .in +1c .ti -1c -.BI "void \fBaddWidgets\fR ( QLabel * l, TQWidget * w, QPushButton * b )" +.BI "void \fBaddWidgets\fR ( TQLabel * l, TQWidget * w, QPushButton * b )" .br .ti -1c .BI "void \fBaddToolButton\fR ( QButton * b, bool separator = FALSE )" @@ -311,13 +311,13 @@ A preview widget is a widget that is placed inside a TQFileDialog so that the us .PP .nf .br - class Preview : public QLabel, public TQFilePreview + class Preview : public TQLabel, public TQFilePreview .br { .br public: .br - Preview( TQWidget *parent=0 ) : QLabel( parent ) {} + Preview( TQWidget *parent=0 ) : TQLabel( parent ) {} .br .br void previewUrl( const TQUrl &u ) @@ -342,7 +342,7 @@ A preview widget is a widget that is placed inside a TQFileDialog so that the us .br .fi .PP -In the above snippet, we create a preview widget which inherits from QLabel and TQFilePreview. File preview widgets \fImust\fR inherit from TQFilePreview. +In the above snippet, we create a preview widget which inherits from TQLabel and TQFilePreview. File preview widgets \fImust\fR inherit from TQFilePreview. .PP Inside the class we reimplement TQFilePreview::previewUrl(), this is where we determine what happens when a file is selected. In the above example we only show a preview of the file if it is a valid pixmap. Here's how to make a file dialog use a preview widget: .PP @@ -447,7 +447,7 @@ See also addLeftWidget(), addWidgets(), and addToolButton(). Adds the tool button \fIb\fR to the row of tool buttons at the top of the file dialog. The button is appended to the right of this row. If \fIseparator\fR is TRUE, a small space is inserted between the last button of the row and the new button \fIb\fR. .PP See also addWidgets(), addLeftWidget(), and addRightWidget(). -.SH "void TQFileDialog::addWidgets ( QLabel * l, TQWidget * w, QPushButton * b )\fC [protected]\fR" +.SH "void TQFileDialog::addWidgets ( TQLabel * l, TQWidget * w, QPushButton * b )\fC [protected]\fR" Adds the specified widgets to the bottom of the file dialog. The label \fIl\fR is placed underneath the "file name" and the "file types" labels. The widget \fIw\fR is placed underneath the file types combobox. The button \fIb\fR is placed underneath the Cancel pushbutton. .PP .nf @@ -458,7 +458,7 @@ Adds the specified widgets to the bottom of the file dialog. The label \fIl\fR i .br { .br - QLabel* label = new QLabel( "Added widgets", this ); + TQLabel* label = new TQLabel( "Added widgets", this ); .br QLineEdit* lineedit = new QLineEdit( this ); .br @@ -687,13 +687,13 @@ Normally you would create a preview widget that derives from both TQWidget and T .PP .nf .br - class Preview : public QLabel, public TQFilePreview + class Preview : public TQLabel, public TQFilePreview .br { .br public: .br - Preview( TQWidget *parent=0 ) : QLabel( parent ) {} + Preview( TQWidget *parent=0 ) : TQLabel( parent ) {} .br .br void previewUrl( const TQUrl &u ) @@ -813,13 +813,13 @@ Normally you would create a preview widget that derives from both TQWidget and T .PP .nf .br - class Preview : public QLabel, public TQFilePreview + class Preview : public TQLabel, public TQFilePreview .br { .br public: .br - Preview( TQWidget *parent=0 ) : QLabel( parent ) {} + Preview( TQWidget *parent=0 ) : TQLabel( parent ) {} .br .br void previewUrl( const TQUrl &u ) diff --git a/doc/man/man3/tqframe.3qt b/doc/man/man3/tqframe.3qt index 7ff469fb3..0d9fcaff7 100644 --- a/doc/man/man3/tqframe.3qt +++ b/doc/man/man3/tqframe.3qt @@ -13,7 +13,7 @@ QFrame \- The base class of widgets that can have a frame .PP Inherits TQWidget. .PP -Inherited by QGroupBox, QScrollView, QDockWindow, QGrid, QHBox, QLabel, QLCDNumber, QLineEdit, TQMenuBar, TQPopupMenu, QProgressBar, QSplitter, TQToolBox, and TQWidgetStack. +Inherited by QGroupBox, QScrollView, QDockWindow, QGrid, QHBox, TQLabel, QLCDNumber, QLineEdit, TQMenuBar, TQPopupMenu, QProgressBar, QSplitter, TQToolBox, and TQWidgetStack. .PP .SS "Public Members" .in +1c @@ -125,11 +125,11 @@ The QFrame class is the base class of widgets that can have a frame. .PP It draws a frame and calls a virtual function, drawContents(), to fill in the frame. This function is reimplemented by subclasses. There are also two other less useful functions: drawFrame() and frameChanged(). .PP -TQPopupMenu uses this to "raise" the menu above the surrounding screen. QProgressBar has a "sunken" look. QLabel has a flat look. The frames of widgets like these can be changed. +TQPopupMenu uses this to "raise" the menu above the surrounding screen. QProgressBar has a "sunken" look. TQLabel has a flat look. The frames of widgets like these can be changed. .PP .nf .br - QLabel label(...); + TQLabel label(...); .br label.setFrameStyle( QFrame::Panel | QFrame::Raised ); .br @@ -228,7 +228,7 @@ This function is reimplemented by subclasses that draw something inside the fram .PP See also contentsRect and TQPainter::setClipRect(). .PP -Reimplemented in QLabel, QLCDNumber, TQMenuBar, and TQPopupMenu. +Reimplemented in TQLabel, QLCDNumber, TQMenuBar, and TQPopupMenu. .SH "void QFrame::drawFrame ( TQPainter * p )\fC [virtual protected]\fR" Draws the frame using the painter \fIp\fR and the current frame attributes and color group. The rectangle inside the frame is not affected. .PP diff --git a/doc/man/man3/tqgridlayout.3qt b/doc/man/man3/tqgridlayout.3qt index 5fb3d2a55..2a2f1a250 100644 --- a/doc/man/man3/tqgridlayout.3qt +++ b/doc/man/man3/tqgridlayout.3qt @@ -154,7 +154,7 @@ This illustration shows a fragment of a dialog with a five-column, three-row gri .PP .PP -Columns 0, 2 and 4 in this dialog fragment are made up of a QLabel, a QLineEdit, and a QListBox. Columns 1 and 3 are placeholders made with addColSpacing(). Row 0 consists of three QLabel objects, row 1 of three QLineEdit objects and row 2 of three QListBox objects. We used placeholder columns (1 and 3) to get the right amount of space between the columns. +Columns 0, 2 and 4 in this dialog fragment are made up of a TQLabel, a QLineEdit, and a QListBox. Columns 1 and 3 are placeholders made with addColSpacing(). Row 0 consists of three TQLabel objects, row 1 of three QLineEdit objects and row 2 of three QListBox objects. We used placeholder columns (1 and 3) to get the right amount of space between the columns. .PP Note that the columns and rows are not equally wide or tall. If you want two columns to have the same width, you must set their minimum widths and stretch factors to be the same yourself. You do this using addColSpacing() and setColStretch(). .PP diff --git a/doc/man/man3/tqguardedptr.3qt b/doc/man/man3/tqguardedptr.3qt index 580a8b955..b6c8e7a12 100644 --- a/doc/man/man3/tqguardedptr.3qt +++ b/doc/man/man3/tqguardedptr.3qt @@ -61,12 +61,12 @@ Example: .PP .nf .br - QGuardedPtr label = new QLabel( 0, "label" ); + QGuardedPtr label = new TQLabel( 0, "label" ); .br label->setText( "I like guarded pointers" ); .br .br - delete (QLabel*) label; // simulate somebody destroying the label + delete (TQLabel*) label; // simulate somebody destroying the label .br .br if ( label) diff --git a/doc/man/man3/tqhebrewcodec.3qt b/doc/man/man3/tqhebrewcodec.3qt index 8ebd2f338..3fe11e4cb 100644 --- a/doc/man/man3/tqhebrewcodec.3qt +++ b/doc/man/man3/tqhebrewcodec.3qt @@ -44,7 +44,7 @@ Transforms the logically ordered TQString, \fIuc\fR, into a visually ordered str .PP The algorithm is designed to work on whole paragraphs of text, so processing a line at a time may produce incorrect results. This approach is taken because the reordering of the contents of a particular line in a paragraph may depend on the previous line in the same paragraph. .PP -Some encodings (for example Japanese or UTF-8) are multibyte (so one input character is mapped to two output characters). The \fIlenInOut\fR argument specifies the number of QChars that should be converted and is set to the number of characters returned. +Some encodings (for example Japanese or UTF-8) are multibyte (so one input character is mapped to two output characters). The \fIlenInOut\fR argument specifies the number of TQChars that should be converted and is set to the number of characters returned. .PP Reimplemented from TQTextCodec. .SH "const char * TQHebrewCodec::mimeName () const\fC [virtual]\fR" diff --git a/doc/man/man3/tqimageconsumer.3qt b/doc/man/man3/tqimageconsumer.3qt index b0db864f2..bd37843b5 100644 --- a/doc/man/man3/tqimageconsumer.3qt +++ b/doc/man/man3/tqimageconsumer.3qt @@ -38,7 +38,7 @@ TQImageConsumer \- Abstraction used by TQImageDecoder .SH DESCRIPTION The TQImageConsumer class is an abstraction used by TQImageDecoder. .PP -The TQMovie class, or QLabel::setMovie(), are easy to use and for most situations do what you want with regards animated images. +The TQMovie class, or TQLabel::setMovie(), are easy to use and for most situations do what you want with regards animated images. .PP A TQImageConsumer consumes information about changes to the TQImage maintained by a TQImageDecoder. Think of the TQImage as the model or source of the image data, with the TQImageConsumer as a view of that data and the TQImageDecoder being the controller that orchestrates the relationship between the model and the view. .PP diff --git a/doc/man/man3/tqlabel.3qt b/doc/man/man3/tqlabel.3qt index 838034f99..c3e5cc25c 100644 --- a/doc/man/man3/tqlabel.3qt +++ b/doc/man/man3/tqlabel.3qt @@ -1,5 +1,5 @@ '\" t -.TH QLabel 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- +.TH TQLabel 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- .\" Copyright 1992-2007 Trolltech ASA. All rights reserved. See the .\" license file included in the distribution for a complete license .\" statement. @@ -7,25 +7,25 @@ .ad l .nh .SH NAME -QLabel \- Text or image display +TQLabel \- Text or image display .SH SYNOPSIS -\fC#include \fR +\fC#include \fR .PP Inherits QFrame. .PP .SS "Public Members" .in +1c .ti -1c -.BI "\fBQLabel\fR ( TQWidget * parent, const char * name = 0, WFlags f = 0 )" +.BI "\fBTQLabel\fR ( TQWidget * parent, const char * name = 0, WFlags f = 0 )" .br .ti -1c -.BI "\fBQLabel\fR ( const TQString & text, TQWidget * parent, const char * name = 0, WFlags f = 0 )" +.BI "\fBTQLabel\fR ( const TQString & text, TQWidget * parent, const char * name = 0, WFlags f = 0 )" .br .ti -1c -.BI "\fBQLabel\fR ( TQWidget * buddy, const TQString & text, TQWidget * parent, const char * name = 0, WFlags f = 0 )" +.BI "\fBTQLabel\fR ( TQWidget * buddy, const TQString & text, TQWidget * parent, const char * name = 0, WFlags f = 0 )" .br .ti -1c -.BI "\fB~QLabel\fR ()" +.BI "\fB~TQLabel\fR ()" .br .ti -1c .BI "TQString \fBtext\fR () const" @@ -134,11 +134,11 @@ Inherits QFrame. .br .in -1c .SH DESCRIPTION -The QLabel widget provides a text or image display. +The TQLabel widget provides a text or image display. .PP -QLabel is used for displaying text or an image. No user interaction functionality is provided. The visual appearance of the label can be configured in various ways, and it can be used for specifying a focus accelerator key for another widget. +TQLabel is used for displaying text or an image. No user interaction functionality is provided. The visual appearance of the label can be configured in various ways, and it can be used for specifying a focus accelerator key for another widget. .PP -A QLabel can contain any of the following content types:
            .nf +A TQLabel can contain any of the following content types:
            .nf .TS l - l. Content Setting Plain text Pass a TQString to setText(). Rich text Pass a TQString that contains rich text to setText(). A pixmap Pass a TQPixmap to setPixmap(). A movie Pass a TQMovie to setMovie(). A number Pass an \fIint\fR or a \fIdouble\fR to setNum(), which converts the number to plain text. Nothing .TE @@ -147,11 +147,11 @@ l - l. Content Setting Plain text Pass a TQString to setText(). Rich text Pass a .PP When the content is changed using any of these functions, any previous content is cleared. .PP -The look of a QLabel can be tuned in several ways. All the settings of QFrame are available for specifying a widget frame. The positioning of the content within the QLabel widget area can be tuned with setAlignment() and setIndent(). For example, this code sets up a sunken panel with a two-line text in the bottom right corner (both lines being flush with the right side of the label): +The look of a TQLabel can be tuned in several ways. All the settings of QFrame are available for specifying a widget frame. The positioning of the content within the TQLabel widget area can be tuned with setAlignment() and setIndent(). For example, this code sets up a sunken panel with a two-line text in the bottom right corner (both lines being flush with the right side of the label): .PP .nf .br - QLabel *label = new QLabel( this ); + TQLabel *label = new TQLabel( this ); .br label->setFrameStyle( QFrame::Panel | QFrame::Sunken ); .br @@ -161,13 +161,13 @@ The look of a QLabel can be tuned in several ways. All the settings of QFrame ar .br .fi .PP -A QLabel is often used as a label for an interactive widget. For this use QLabel provides a useful mechanism for adding an accelerator key (see QAccel) that will set the keyboard focus to the other widget (called the QLabel's "buddy"). For example: +A TQLabel is often used as a label for an interactive widget. For this use TQLabel provides a useful mechanism for adding an accelerator key (see QAccel) that will set the keyboard focus to the other widget (called the TQLabel's "buddy"). For example: .PP .nf .br QLineEdit* phoneEdit = new QLineEdit( this, "phoneEdit" ); .br - QLabel* phoneLabel = new QLabel( phoneEdit, "&Phone:", this, "phoneLabel" ); + TQLabel* phoneLabel = new TQLabel( phoneEdit, "&Phone:", this, "phoneLabel" ); .br .fi .PP @@ -182,19 +182,19 @@ In this example, keyboard focus is transferred to the label's buddy (the QLineEd .PP See also QLineEdit, TQTextEdit, TQPixmap, TQMovie, GUI Design Handbook: Label, Basic Widgets, and Text Related Classes. .SH MEMBER FUNCTION DOCUMENTATION -.SH "QLabel::QLabel ( TQWidget * parent, const char * name = 0, WFlags f = 0 )" +.SH "TQLabel::TQLabel ( TQWidget * parent, const char * name = 0, WFlags f = 0 )" Constructs an empty label. .PP The \fIparent\fR, \fIname\fR and widget flag \fIf\fR, arguments are passed to the QFrame constructor. .PP See also alignment, setFrameStyle(), and indent. -.SH "QLabel::QLabel ( const TQString & text, TQWidget * parent, const char * name = 0, WFlags f = 0 )" +.SH "TQLabel::TQLabel ( const TQString & text, TQWidget * parent, const char * name = 0, WFlags f = 0 )" Constructs a label that displays the text, \fItext\fR. .PP The \fIparent\fR, \fIname\fR and widget flag \fIf\fR, arguments are passed to the QFrame constructor. .PP See also text, alignment, setFrameStyle(), and indent. -.SH "QLabel::QLabel ( TQWidget * buddy, const TQString & text, TQWidget * parent, const char * name = 0, WFlags f = 0 )" +.SH "TQLabel::TQLabel ( TQWidget * buddy, const TQString & text, TQWidget * parent, const char * name = 0, WFlags f = 0 )" Constructs a label that displays the text \fItext\fR. The label has a buddy widget, \fIbuddy\fR. .PP If the \fItext\fR contains an underlined letter (a letter preceded by an ampersand, &), and the text is in plain text format, when the user presses Alt+ the underlined letter, focus is passed to the buddy widget. @@ -202,11 +202,11 @@ If the \fItext\fR contains an underlined letter (a letter preceded by an ampersa The \fIparent\fR, \fIname\fR and widget flag, \fIf\fR, arguments are passed to the QFrame constructor. .PP See also text, setBuddy(), alignment, setFrameStyle(), and indent. -.SH "QLabel::~QLabel ()" +.SH "TQLabel::~TQLabel ()" Destroys the label. -.SH "int QLabel::alignment () const" +.SH "int TQLabel::alignment () const" Returns the alignment of the label's contents. See the "alignment" property for details. -.SH "bool QLabel::autoResize () const" +.SH "bool TQLabel::autoResize () const" \fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code. .PP Returns TRUE if auto-resizing is enabled, or FALSE if auto-resizing is disabled. @@ -214,46 +214,46 @@ Returns TRUE if auto-resizing is enabled, or FALSE if auto-resizing is disabled. Auto-resizing is disabled by default. .PP See also setAutoResize(). -.SH "TQWidget * QLabel::buddy () const" +.SH "TQWidget * TQLabel::buddy () const" Returns this label's buddy, or 0 if no buddy is currently set. .PP See also setBuddy(). -.SH "void QLabel::clear ()\fC [slot]\fR" +.SH "void TQLabel::clear ()\fC [slot]\fR" Clears any label contents. Equivalent to setText( "" ). -.SH "void QLabel::drawContents ( TQPainter * p )\fC [virtual protected]\fR" +.SH "void TQLabel::drawContents ( TQPainter * p )\fC [virtual protected]\fR" Draws the label contents using the painter \fIp\fR. .PP Reimplemented from QFrame. -.SH "bool QLabel::hasScaledContents () const" +.SH "bool TQLabel::hasScaledContents () const" Returns TRUE if the label will scale its contents to fill all available space; otherwise returns FALSE. See the "scaledContents" property for details. -.SH "int QLabel::indent () const" +.SH "int TQLabel::indent () const" Returns the label's text indent in pixels. See the "indent" property for details. -.SH "TQMovie * QLabel::movie () const" +.SH "TQMovie * TQLabel::movie () const" Returns a pointer to the label's movie, or 0 if no movie has been set. .PP See also setMovie(). -.SH "TQPicture * QLabel::picture () const" +.SH "TQPicture * TQLabel::picture () const" Returns the label's picture or 0 if the label doesn't have a picture. -.SH "TQPixmap * QLabel::pixmap () const" +.SH "TQPixmap * TQLabel::pixmap () const" Returns the label's pixmap. See the "pixmap" property for details. -.SH "void QLabel::setAlignment ( int )\fC [virtual]\fR" +.SH "void TQLabel::setAlignment ( int )\fC [virtual]\fR" Sets the alignment of the label's contents. See the "alignment" property for details. -.SH "void QLabel::setAutoResize ( bool enable )\fC [virtual]\fR" +.SH "void TQLabel::setAutoResize ( bool enable )\fC [virtual]\fR" \fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code. .PP Enables auto-resizing if \fIenable\fR is TRUE, or disables it if \fIenable\fR is FALSE. .PP -When auto-resizing is enabled the label will resize itself to fit the contents whenever the contents change. The top-left corner is not moved. This is useful for QLabel widgets that are not managed by a QLayout (e.g., top-level widgets). +When auto-resizing is enabled the label will resize itself to fit the contents whenever the contents change. The top-left corner is not moved. This is useful for TQLabel widgets that are not managed by a QLayout (e.g., top-level widgets). .PP Auto-resizing is disabled by default. .PP See also autoResize(), adjustSize(), and sizeHint. -.SH "void QLabel::setBuddy ( TQWidget * buddy )\fC [virtual]\fR" +.SH "void TQLabel::setBuddy ( TQWidget * buddy )\fC [virtual]\fR" Sets this label's buddy to \fIbuddy\fR. .PP When the user presses the accelerator key indicated by this label, the keyboard focus is transferred to the label's buddy widget. .PP -The buddy mechanism is only available for QLabels that contain plain text in which one letter is prefixed with an ampersand, &. This letter is set as the accelerator key. The letter is displayed underlined, and the '&' is not displayed (i.e. the ShowPrefix alignment flag is turned on; see setAlignment()). +The buddy mechanism is only available for TQLabels that contain plain text in which one letter is prefixed with an ampersand, &. This letter is set as the accelerator key. The letter is displayed underlined, and the '&' is not displayed (i.e. the ShowPrefix alignment flag is turned on; see setAlignment()). .PP In a dialog, you might create two data entry widgets and a label for each, and set up the geometry layout so each label is just to the left of its data entry widget (its "buddy"), for example: .PP @@ -261,13 +261,13 @@ In a dialog, you might create two data entry widgets and a label for each, and s .br QLineEdit *nameEd = new QLineEdit( this ); .br - QLabel *nameLb = new QLabel( "&Name:", this ); + TQLabel *nameLb = new TQLabel( "&Name:", this ); .br nameLb->setBuddy( nameEd ); .br QLineEdit *phoneEd = new QLineEdit( this ); .br - QLabel *phoneLb = new QLabel( "&Phone:", this ); + TQLabel *phoneLb = new TQLabel( "&Phone:", this ); .br phoneLb->setBuddy( phoneEd ); .br @@ -283,15 +283,15 @@ See also buddy(), text, QAccel, and alignment. .PP Examples: .)l addressbook/centralwidget.cpp, chart/optionsform.cpp, and regexptester/regexptester.cpp. -.SH "void QLabel::setFont ( const TQFont & f )\fC [virtual]\fR" -Sets the font used on the QLabel to font \fIf\fR. +.SH "void TQLabel::setFont ( const TQFont & f )\fC [virtual]\fR" +Sets the font used on the TQLabel to font \fIf\fR. .PP Example: menu/menu.cpp. .PP Reimplemented from TQWidget. -.SH "void QLabel::setIndent ( int )" +.SH "void TQLabel::setIndent ( int )" Sets the label's text indent in pixels. See the "indent" property for details. -.SH "void QLabel::setMovie ( const TQMovie & movie )\fC [virtual slot]\fR" +.SH "void TQLabel::setMovie ( const TQMovie & movie )\fC [virtual slot]\fR" Sets the label contents to \fImovie\fR. Any previous content is cleared. .PP The buddy accelerator, if any, is disabled. @@ -299,7 +299,7 @@ The buddy accelerator, if any, is disabled. The label resizes itself if auto-resizing is enabled. .PP See also movie() and setBuddy(). -.SH "void QLabel::setNum ( int num )\fC [virtual slot]\fR" +.SH "void TQLabel::setNum ( int num )\fC [virtual slot]\fR" Sets the label contents to plain text containing the textual representation of integer \fInum\fR. Any previous content is cleared. Does nothing if the integer's string representation is the same as the current contents of the label. .PP The buddy accelerator, if any, is disabled. @@ -307,7 +307,7 @@ The buddy accelerator, if any, is disabled. The label resizes itself if auto-resizing is enabled. .PP See also text, TQString::setNum(), and setBuddy(). -.SH "void QLabel::setNum ( double num )\fC [virtual slot]\fR" +.SH "void TQLabel::setNum ( double num )\fC [virtual slot]\fR" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP Sets the label contents to plain text containing the textual representation of double \fInum\fR. Any previous content is cleared. Does nothing if the double's string representation is the same as the current contents of the label. @@ -317,29 +317,29 @@ The buddy accelerator, if any, is disabled. The label resizes itself if auto-resizing is enabled. .PP See also text, TQString::setNum(), and setBuddy(). -.SH "void QLabel::setPicture ( const TQPicture & picture )\fC [virtual slot]\fR" +.SH "void TQLabel::setPicture ( const TQPicture & picture )\fC [virtual slot]\fR" Sets the label contents to \fIpicture\fR. Any previous content is cleared. .PP The buddy accelerator, if any, is disabled. .PP See also picture() and setBuddy(). -.SH "void QLabel::setPixmap ( const TQPixmap & )\fC [virtual slot]\fR" +.SH "void TQLabel::setPixmap ( const TQPixmap & )\fC [virtual slot]\fR" Sets the label's pixmap. See the "pixmap" property for details. -.SH "void QLabel::setScaledContents ( bool )" +.SH "void TQLabel::setScaledContents ( bool )" Sets whether the label will scale its contents to fill all available space. See the "scaledContents" property for details. -.SH "void QLabel::setText ( const TQString & )\fC [virtual slot]\fR" +.SH "void TQLabel::setText ( const TQString & )\fC [virtual slot]\fR" Sets the label's text. See the "text" property for details. -.SH "void QLabel::setTextFormat ( TextFormat )" +.SH "void TQLabel::setTextFormat ( TextFormat )" Sets the label's text format. See the "textFormat" property for details. -.SH "TQString QLabel::text () const" +.SH "TQString TQLabel::text () const" Returns the label's text. See the "text" property for details. -.SH "TextFormat QLabel::textFormat () const" +.SH "TextFormat TQLabel::textFormat () const" Returns the label's text format. See the "textFormat" property for details. .SS "Property Documentation" .SH "Alignment alignment" This property holds the alignment of the label's contents. .PP -The alignment is a bitwise OR of TQt::AlignmentFlags and TQt::TextFlags values. The ExpandTabs, SingleLine and ShowPrefix flags apply only if the label contains plain text; otherwise they are ignored. The DontClip flag is always ignored. WordBreak applies to both rich text and plain text labels. The BreakAnywhere flag is not supported in QLabel. +The alignment is a bitwise OR of TQt::AlignmentFlags and TQt::TextFlags values. The ExpandTabs, SingleLine and ShowPrefix flags apply only if the label contains plain text; otherwise they are ignored. The DontClip flag is always ignored. WordBreak applies to both rich text and plain text labels. The BreakAnywhere flag is not supported in TQLabel. .PP If the label has a buddy, the ShowPrefix flag is forced to TRUE. .PP @@ -369,7 +369,7 @@ This property holds the label's pixmap. .PP If no pixmap has been set this will return an invalid pixmap. .PP -Setting the pixmap clears any previous content, and resizes the label if QLabel::autoResize() is TRUE. The buddy accelerator, if any, is disabled. +Setting the pixmap clears any previous content, and resizes the label if TQLabel::autoResize() is TRUE. The buddy accelerator, if any, is disabled. .PP Set this property's value with setPixmap() and get this property's value with pixmap(). .SH "bool scaledContents" @@ -387,13 +387,13 @@ This property holds the label's text. .PP If no text has been set this will return an empty string. Setting the text clears any previous content, unless they are the same. .PP -The text will be interpreted either as a plain text or as a rich text, depending on the text format setting; see setTextFormat(). The default setting is AutoText, i.e. QLabel will try to auto-detect the format of the text set. +The text will be interpreted either as a plain text or as a rich text, depending on the text format setting; see setTextFormat(). The default setting is AutoText, i.e. TQLabel will try to auto-detect the format of the text set. .PP If the text is interpreted as a plain text and a buddy has been set, the buddy accelerator key is updated from the new text. .PP The label resizes itself if auto-resizing is enabled. .PP -Note that Qlabel is well-suited to display small rich text documents, i.e. those small documents that get their document specific settings (font, text color, link color) from the label's palette and font properties. For large documents, use TQTextEdit in read-only mode instead. TQTextEdit will flicker less on resize and can also provide a scrollbar when necessary. +Note that TQLabel is well-suited to display small rich text documents, i.e. those small documents that get their document specific settings (font, text color, link color) from the label's palette and font properties. For large documents, use TQTextEdit in read-only mode instead. TQTextEdit will flicker less on resize and can also provide a scrollbar when necessary. .PP See also textFormat, setBuddy(), and alignment. .PP @@ -410,7 +410,7 @@ See also text. Set this property's value with setTextFormat() and get this property's value with textFormat(). .SH "SEE ALSO" -.BR http://doc.trolltech.com/ntqlabel.html +.BR http://doc.trolltech.com/tqlabel.html .BR http://www.trolltech.com/faq/tech.html .SH COPYRIGHT Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the diff --git a/doc/man/man3/tqlcdnumber.3qt b/doc/man/man3/tqlcdnumber.3qt index b7213c2fa..e9b215ec1 100644 --- a/doc/man/man3/tqlcdnumber.3qt +++ b/doc/man/man3/tqlcdnumber.3qt @@ -146,7 +146,7 @@ Incidentally, QLCDNumber is the very oldest part of Qt, tracing back to a BASIC .ce 1 .B "[Image Omitted]" .PP -See also QLabel, QFrame, and Basic Widgets. +See also TQLabel, QFrame, and Basic Widgets. .SS "Member Type Documentation" .SH "QLCDNumber::Mode" This type determines how numbers are shown. diff --git a/doc/man/man3/tqlineedit.3qt b/doc/man/man3/tqlineedit.3qt index 1b1a18ab0..a0fd587a4 100644 --- a/doc/man/man3/tqlineedit.3qt +++ b/doc/man/man3/tqlineedit.3qt @@ -310,7 +310,7 @@ Any other key sequence that represents a valid character, will cause the charact .ce 1 .B "[Image Omitted]" .PP -See also TQTextEdit, QLabel, QComboBox, GUI Design Handbook: Field, Entry, and Basic Widgets. +See also TQTextEdit, TQLabel, QComboBox, GUI Design Handbook: Field, Entry, and Basic Widgets. .SS "Member Type Documentation" .SH "QLineEdit::EchoMode" This enum type describes how a line edit should display its contents. diff --git a/doc/man/man3/tqlocale.3qt b/doc/man/man3/tqlocale.3qt index b7a0ac4aa..23232bfda 100644 --- a/doc/man/man3/tqlocale.3qt +++ b/doc/man/man3/tqlocale.3qt @@ -1,5 +1,5 @@ '\" t -.TH QLocale 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- +.TH TQLocale 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- .\" Copyright 1992-2007 Trolltech ASA. All rights reserved. See the .\" license file included in the distribution for a complete license .\" statement. @@ -7,11 +7,11 @@ .ad l .nh .SH NAME -QLocale \- Converts between numbers and their string representations in various languages +TQLocale \- Converts between numbers and their string representations in various languages .SH SYNOPSIS Almost all the functions in this class are reentrant when TQt is built with thread support. The exception is \fBsetDefault\fR().

            .PP -\fC#include \fR +\fC#include \fR .PP .SS "Public Members" .in +1c @@ -22,19 +22,19 @@ Almost all the functions in this class are reentrant when TQt is built with thre .BI "enum \fBCountry\fR { AnyCountry = 0, Afghanistan = 1, Albania = 2, Algeria = 3, AmericanSamoa = 4, Andorra = 5, Angola = 6, Anguilla = 7, Antarctica = 8, AntiguaAndBarbuda = 9, Argentina = 10, Armenia = 11, Aruba = 12, Australia = 13, Austria = 14, Azerbaijan = 15, Bahamas = 16, Bahrain = 17, Bangladesh = 18, Barbados = 19, Belarus = 20, Belgium = 21, Belize = 22, Benin = 23, Bermuda = 24, Bhutan = 25, Bolivia = 26, BosniaAndHerzegowina = 27, Botswana = 28, BouvetIsland = 29, Brazil = 30, BritishIndianOceanTerritory = 31, BruneiDarussalam = 32, Bulgaria = 33, BurkinaFaso = 34, Burundi = 35, Cambodia = 36, Cameroon = 37, Canada = 38, CapeVerde = 39, CaymanIslands = 40, CentralAfricanRepublic = 41, Chad = 42, Chile = 43, China = 44, ChristmasIsland = 45, CocosIslands = 46, Colombia = 47, Comoros = 48, DemocraticRepublicOfCongo = 49, PeoplesRepublicOfCongo = 50, CookIslands = 51, CostaRica = 52, IvoryCoast = 53, Croatia = 54, Cuba = 55, Cyprus = 56, CzechRepublic = 57, Denmark = 58, Djibouti = 59, Dominica = 60, DominicanRepublic = 61, EastTimor = 62, Ecuador = 63, Egypt = 64, ElSalvador = 65, EquatorialGuinea = 66, Eritrea = 67, Estonia = 68, Ethiopia = 69, FalklandIslands = 70, FaroeIslands = 71, FijiCountry = 72, Finland = 73, France = 74, MetropolitanFrance = 75, FrenchGuiana = 76, FrenchPolynesia = 77, FrenchSouthernTerritories = 78, Gabon = 79, Gambia = 80, Georgia = 81, Germany = 82, Ghana = 83, Gibraltar = 84, Greece = 85, Greenland = 86, Grenada = 87, Guadeloupe = 88, Guam = 89, Guatemala = 90, Guinea = 91, GuineaBissau = 92, Guyana = 93, Haiti = 94, HeardAndMcDonaldIslands = 95, Honduras = 96, HongKong = 97, Hungary = 98, Iceland = 99, India = 100, Indonesia = 101, Iran = 102, Iraq = 103, Ireland = 104, Israel = 105, Italy = 106, Jamaica = 107, Japan = 108, Jordan = 109, Kazakhstan = 110, Kenya = 111, Kiribati = 112, DemocraticRepublicOfKorea = 113, RepublicOfKorea = 114, Kuwait = 115, Kyrgyzstan = 116, Lao = 117, Latvia = 118, Lebanon = 119, Lesotho = 120, Liberia = 121, LibyanArabJamahiriya = 122, Liechtenstein = 123, Lithuania = 124, Luxembourg = 125, Macau = 126, Macedonia = 127, Madagascar = 128, Malawi = 129, Malaysia = 130, Maldives = 131, Mali = 132, Malta = 133, MarshallIslands = 134, Martinique = 135, Mauritania = 136, Mauritius = 137, Mayotte = 138, Mexico = 139, Micronesia = 140, Moldova = 141, Monaco = 142, Mongolia = 143, Montserrat = 144, Morocco = 145, Mozambique = 146, Myanmar = 147, Namibia = 148, NauruCountry = 149, Nepal = 150, Netherlands = 151, NetherlandsAntilles = 152, NewCaledonia = 153, NewZealand = 154, Nicaragua = 155, Niger = 156, Nigeria = 157, Niue = 158, NorfolkIsland = 159, NorthernMarianaIslands = 160, Norway = 161, Oman = 162, Pakistan = 163, Palau = 164, PalestinianTerritory = 165, Panama = 166, PapuaNewGuinea = 167, Paraguay = 168, Peru = 169, Philippines = 170, Pitcairn = 171, Poland = 172, Portugal = 173, PuertoRico = 174, Qatar = 175, Reunion = 176, Romania = 177, RussianFederation = 178, Rwanda = 179, SaintKittsAndNevis = 180, StLucia = 181, StVincentAndTheGrenadines = 182, Samoa = 183, SanMarino = 184, SaoTomeAndPrincipe = 185, SaudiArabia = 186, Senegal = 187, Seychelles = 188, SierraLeone = 189, Singapore = 190, Slovakia = 191, Slovenia = 192, SolomonIslands = 193, Somalia = 194, SouthAfrica = 195, SouthGeorgiaAndTheSouthSandwichIslands = 196, Spain = 197, SriLanka = 198, StHelena = 199, StPierreAndMiquelon = 200, Sudan = 201, Suriname = 202, SvalbardAndJanMayenIslands = 203, Swaziland = 204, Sweden = 205, Switzerland = 206, SyrianArabRepublic = 207, Taiwan = 208, Tajikistan = 209, Tanzania = 210, Thailand = 211, Togo = 212, Tokelau = 213, TongaCountry = 214, TrinidadAndTobago = 215, Tunisia = 216, Turkey = 217, Turkmenistan = 218, TurksAndCaicosIslands = 219, Tuvalu = 220, Uganda = 221, Ukraine = 222, UnitedArabEmirates = 223, UnitedKingdom = 224, UnitedStates = 225, UnitedStatesMinorOutlyingIslands = 226, Uruguay = 227, Uzbekistan = 228, Vanuatu = 229, VaticanCityState = 230, Venezuela = 231, VietNam = 232, BritishVirginIslands = 233, USVirginIslands = 234, WallisAndFutunaIslands = 235, WesternSahara = 236, Yemen = 237, Yugoslavia = 238, Zambia = 239, Zimbabwe = 240, LastCountry = Zimbabwe }" .br .ti -1c -.BI "\fBQLocale\fR ()" +.BI "\fBTQLocale\fR ()" .br .ti -1c -.BI "\fBQLocale\fR ( const TQString & name )" +.BI "\fBTQLocale\fR ( const TQString & name )" .br .ti -1c -.BI "\fBQLocale\fR ( Language language, Country country = AnyCountry )" +.BI "\fBTQLocale\fR ( Language language, Country country = AnyCountry )" .br .ti -1c -.BI "\fBQLocale\fR ( const QLocale & other )" +.BI "\fBTQLocale\fR ( const TQLocale & other )" .br .ti -1c -.BI "QLocale & \fBoperator=\fR ( const QLocale & other )" +.BI "TQLocale & \fBoperator=\fR ( const TQLocale & other )" .br .ti -1c .BI "Language \fBlanguage\fR () const" @@ -115,23 +115,23 @@ Almost all the functions in this class are reentrant when TQt is built with thre .BI "TQString \fBcountryToString\fR ( Country country )" .br .ti -1c -.BI "void \fBsetDefault\fR ( const QLocale & locale )" +.BI "void \fBsetDefault\fR ( const TQLocale & locale )" .br .ti -1c -.BI "QLocale \fBc\fR ()" +.BI "TQLocale \fBc\fR ()" .br .ti -1c -.BI "QLocale \fBsystem\fR ()" +.BI "TQLocale \fBsystem\fR ()" .br .in -1c .SH DESCRIPTION -The QLocale class converts between numbers and their string representations in various languages. +The TQLocale class converts between numbers and their string representations in various languages. .PP It is initialized with a country/language pair in its constructor and offers number-to-string and string-to-number conversion functions simmilar to those in TQString. .PP .nf .br - QLocale egyptian(QLocale::Arabic, QLocale::Egypt); + TQLocale egyptian(TQLocale::Arabic, TQLocale::Egypt); .br TQString s1 = egyptian.toString(1.571429E+07, 'e'); .br @@ -144,9 +144,9 @@ It is initialized with a country/language pair in its constructor and offers num .br .fi .PP -QLocale supports the concept of a default locale, which is determined from the system's locale settings at application startup. The default locale can be changed by calling the static member setDefault(). The default locale has the following effects: +TQLocale supports the concept of a default locale, which is determined from the system's locale settings at application startup. The default locale can be changed by calling the static member setDefault(). The default locale has the following effects: .TP -If a QLocale object is constructed with the default constructor, it will use the default locale's settings. +If a TQLocale object is constructed with the default constructor, it will use the default locale's settings. .TP TQString::toDouble() interprets the string according to the default locale. If this fails, it falls back on the "C" locale. .TP @@ -154,9 +154,9 @@ TQString::arg() uses the default locale to format a number when its position spe .PP .nf .br - QLocale::setDefault(QLocale(QLocale::Hebrew, QLocale::Israel)); + TQLocale::setDefault(TQLocale(TQLocale::Hebrew, TQLocale::Israel)); .br - QLocale hebrew; // Constructs a default QLocale + TQLocale hebrew; // Constructs a default TQLocale .br TQString s1 = hebrew.toString(15714.3, 'e'); .br @@ -166,21 +166,21 @@ TQString::arg() uses the default locale to format a number when its position spe double d; .br .br - QLocale::setDefault(QLocale::C); + TQLocale::setDefault(TQLocale::C); .br d = TQString( "1234,56" ).toDouble(&ok); // ok == false .br d = TQString( "1234.56" ).toDouble(&ok); // ok == true, d == 1234.56 .br .br - QLocale::setDefault(QLocale::German); + TQLocale::setDefault(TQLocale::German); .br d = TQString( "1234,56" ).toDouble(&ok); // ok == true, d == 1234.56 .br d = TQString( "1234.56" ).toDouble(&ok); // ok == true, d == 1234.56 .br .br - QLocale::setDefault(QLocale(QLocale::English, QLocale::UnitedStates)); + TQLocale::setDefault(TQLocale(TQLocale::English, TQLocale::UnitedStates)); .br str = TQString( "%1 %L2 %L3" ) .br @@ -200,25 +200,25 @@ If the language/country pair is found in the database, it is used. .TP If the language is found but the country is not, or if the country is AnyCountry, the language is used with the most appropriate available country (for example, Germany for German), .TP -If neither the language nor the country are found, QLocale defaults to the default locale (see setDefault()). +If neither the language nor the country are found, TQLocale defaults to the default locale (see setDefault()). .PP The "C" locale is identical to English/UnitedStates. .PP Use language() and country() to determine the actual language and country values used. .PP -An alternative method for constructing a QLocale object is by specifying the locale name. +An alternative method for constructing a TQLocale object is by specifying the locale name. .PP .nf .br - QLocale korean("ko"); + TQLocale korean("ko"); .br - QLocale swiss("de_CH"); + TQLocale swiss("de_CH"); .br .fi .PP This constructor converts the locale name to a language/country pair; it does not use the system locale database. .PP -All the methods in QLocale, with the exception of setDefault(), are reentrant. +All the methods in TQLocale, with the exception of setDefault(), are reentrant. .PP See also TQString::toDouble(), TQString::arg(), and Text Related Classes. .PP @@ -232,779 +232,779 @@ THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED WARRANTY .PP This product includes software developed by the University of California, Berkeley and its contributors. .SS "Member Type Documentation" -.SH "QLocale::Country" +.SH "TQLocale::Country" This enumerated type is used to specify a country. .TP -\fCQLocale::AnyCountry\fR +\fCTQLocale::AnyCountry\fR .TP -\fCQLocale::Afghanistan\fR +\fCTQLocale::Afghanistan\fR .TP -\fCQLocale::Albania\fR +\fCTQLocale::Albania\fR .TP -\fCQLocale::Algeria\fR +\fCTQLocale::Algeria\fR .TP -\fCQLocale::AmericanSamoa\fR +\fCTQLocale::AmericanSamoa\fR .TP -\fCQLocale::Andorra\fR +\fCTQLocale::Andorra\fR .TP -\fCQLocale::Angola\fR +\fCTQLocale::Angola\fR .TP -\fCQLocale::Anguilla\fR +\fCTQLocale::Anguilla\fR .TP -\fCQLocale::Antarctica\fR +\fCTQLocale::Antarctica\fR .TP -\fCQLocale::AntiguaAndBarbuda\fR +\fCTQLocale::AntiguaAndBarbuda\fR .TP -\fCQLocale::Argentina\fR +\fCTQLocale::Argentina\fR .TP -\fCQLocale::Armenia\fR +\fCTQLocale::Armenia\fR .TP -\fCQLocale::Aruba\fR +\fCTQLocale::Aruba\fR .TP -\fCQLocale::Australia\fR +\fCTQLocale::Australia\fR .TP -\fCQLocale::Austria\fR +\fCTQLocale::Austria\fR .TP -\fCQLocale::Azerbaijan\fR +\fCTQLocale::Azerbaijan\fR .TP -\fCQLocale::Bahamas\fR +\fCTQLocale::Bahamas\fR .TP -\fCQLocale::Bahrain\fR +\fCTQLocale::Bahrain\fR .TP -\fCQLocale::Bangladesh\fR +\fCTQLocale::Bangladesh\fR .TP -\fCQLocale::Barbados\fR +\fCTQLocale::Barbados\fR .TP -\fCQLocale::Belarus\fR +\fCTQLocale::Belarus\fR .TP -\fCQLocale::Belgium\fR +\fCTQLocale::Belgium\fR .TP -\fCQLocale::Belize\fR +\fCTQLocale::Belize\fR .TP -\fCQLocale::Benin\fR +\fCTQLocale::Benin\fR .TP -\fCQLocale::Bermuda\fR +\fCTQLocale::Bermuda\fR .TP -\fCQLocale::Bhutan\fR +\fCTQLocale::Bhutan\fR .TP -\fCQLocale::Bolivia\fR +\fCTQLocale::Bolivia\fR .TP -\fCQLocale::BosniaAndHerzegowina\fR +\fCTQLocale::BosniaAndHerzegowina\fR .TP -\fCQLocale::Botswana\fR +\fCTQLocale::Botswana\fR .TP -\fCQLocale::BouvetIsland\fR +\fCTQLocale::BouvetIsland\fR .TP -\fCQLocale::Brazil\fR +\fCTQLocale::Brazil\fR .TP -\fCQLocale::BritishIndianOceanTerritory\fR +\fCTQLocale::BritishIndianOceanTerritory\fR .TP -\fCQLocale::BruneiDarussalam\fR +\fCTQLocale::BruneiDarussalam\fR .TP -\fCQLocale::Bulgaria\fR +\fCTQLocale::Bulgaria\fR .TP -\fCQLocale::BurkinaFaso\fR +\fCTQLocale::BurkinaFaso\fR .TP -\fCQLocale::Burundi\fR +\fCTQLocale::Burundi\fR .TP -\fCQLocale::Cambodia\fR +\fCTQLocale::Cambodia\fR .TP -\fCQLocale::Cameroon\fR +\fCTQLocale::Cameroon\fR .TP -\fCQLocale::Canada\fR +\fCTQLocale::Canada\fR .TP -\fCQLocale::CapeVerde\fR +\fCTQLocale::CapeVerde\fR .TP -\fCQLocale::CaymanIslands\fR +\fCTQLocale::CaymanIslands\fR .TP -\fCQLocale::CentralAfricanRepublic\fR +\fCTQLocale::CentralAfricanRepublic\fR .TP -\fCQLocale::Chad\fR +\fCTQLocale::Chad\fR .TP -\fCQLocale::Chile\fR +\fCTQLocale::Chile\fR .TP -\fCQLocale::China\fR +\fCTQLocale::China\fR .TP -\fCQLocale::ChristmasIsland\fR +\fCTQLocale::ChristmasIsland\fR .TP -\fCQLocale::CocosIslands\fR +\fCTQLocale::CocosIslands\fR .TP -\fCQLocale::Colombia\fR +\fCTQLocale::Colombia\fR .TP -\fCQLocale::Comoros\fR +\fCTQLocale::Comoros\fR .TP -\fCQLocale::DemocraticRepublicOfCongo\fR +\fCTQLocale::DemocraticRepublicOfCongo\fR .TP -\fCQLocale::PeoplesRepublicOfCongo\fR +\fCTQLocale::PeoplesRepublicOfCongo\fR .TP -\fCQLocale::CookIslands\fR +\fCTQLocale::CookIslands\fR .TP -\fCQLocale::CostaRica\fR +\fCTQLocale::CostaRica\fR .TP -\fCQLocale::IvoryCoast\fR +\fCTQLocale::IvoryCoast\fR .TP -\fCQLocale::Croatia\fR +\fCTQLocale::Croatia\fR .TP -\fCQLocale::Cuba\fR +\fCTQLocale::Cuba\fR .TP -\fCQLocale::Cyprus\fR +\fCTQLocale::Cyprus\fR .TP -\fCQLocale::CzechRepublic\fR +\fCTQLocale::CzechRepublic\fR .TP -\fCQLocale::Denmark\fR +\fCTQLocale::Denmark\fR .TP -\fCQLocale::Djibouti\fR +\fCTQLocale::Djibouti\fR .TP -\fCQLocale::Dominica\fR +\fCTQLocale::Dominica\fR .TP -\fCQLocale::DominicanRepublic\fR +\fCTQLocale::DominicanRepublic\fR .TP -\fCQLocale::EastTimor\fR +\fCTQLocale::EastTimor\fR .TP -\fCQLocale::Ecuador\fR +\fCTQLocale::Ecuador\fR .TP -\fCQLocale::Egypt\fR +\fCTQLocale::Egypt\fR .TP -\fCQLocale::ElSalvador\fR +\fCTQLocale::ElSalvador\fR .TP -\fCQLocale::EquatorialGuinea\fR +\fCTQLocale::EquatorialGuinea\fR .TP -\fCQLocale::Eritrea\fR +\fCTQLocale::Eritrea\fR .TP -\fCQLocale::Estonia\fR +\fCTQLocale::Estonia\fR .TP -\fCQLocale::Ethiopia\fR +\fCTQLocale::Ethiopia\fR .TP -\fCQLocale::FalklandIslands\fR +\fCTQLocale::FalklandIslands\fR .TP -\fCQLocale::FaroeIslands\fR +\fCTQLocale::FaroeIslands\fR .TP -\fCQLocale::FijiCountry\fR +\fCTQLocale::FijiCountry\fR .TP -\fCQLocale::Finland\fR +\fCTQLocale::Finland\fR .TP -\fCQLocale::France\fR +\fCTQLocale::France\fR .TP -\fCQLocale::MetropolitanFrance\fR +\fCTQLocale::MetropolitanFrance\fR .TP -\fCQLocale::FrenchGuiana\fR +\fCTQLocale::FrenchGuiana\fR .TP -\fCQLocale::FrenchPolynesia\fR +\fCTQLocale::FrenchPolynesia\fR .TP -\fCQLocale::FrenchSouthernTerritories\fR +\fCTQLocale::FrenchSouthernTerritories\fR .TP -\fCQLocale::Gabon\fR +\fCTQLocale::Gabon\fR .TP -\fCQLocale::Gambia\fR +\fCTQLocale::Gambia\fR .TP -\fCQLocale::Georgia\fR +\fCTQLocale::Georgia\fR .TP -\fCQLocale::Germany\fR +\fCTQLocale::Germany\fR .TP -\fCQLocale::Ghana\fR +\fCTQLocale::Ghana\fR .TP -\fCQLocale::Gibraltar\fR +\fCTQLocale::Gibraltar\fR .TP -\fCQLocale::Greece\fR +\fCTQLocale::Greece\fR .TP -\fCQLocale::Greenland\fR +\fCTQLocale::Greenland\fR .TP -\fCQLocale::Grenada\fR +\fCTQLocale::Grenada\fR .TP -\fCQLocale::Guadeloupe\fR +\fCTQLocale::Guadeloupe\fR .TP -\fCQLocale::Guam\fR +\fCTQLocale::Guam\fR .TP -\fCQLocale::Guatemala\fR +\fCTQLocale::Guatemala\fR .TP -\fCQLocale::Guinea\fR +\fCTQLocale::Guinea\fR .TP -\fCQLocale::GuineaBissau\fR +\fCTQLocale::GuineaBissau\fR .TP -\fCQLocale::Guyana\fR +\fCTQLocale::Guyana\fR .TP -\fCQLocale::Haiti\fR +\fCTQLocale::Haiti\fR .TP -\fCQLocale::HeardAndMcDonaldIslands\fR +\fCTQLocale::HeardAndMcDonaldIslands\fR .TP -\fCQLocale::Honduras\fR +\fCTQLocale::Honduras\fR .TP -\fCQLocale::HongKong\fR +\fCTQLocale::HongKong\fR .TP -\fCQLocale::Hungary\fR +\fCTQLocale::Hungary\fR .TP -\fCQLocale::Iceland\fR +\fCTQLocale::Iceland\fR .TP -\fCQLocale::India\fR +\fCTQLocale::India\fR .TP -\fCQLocale::Indonesia\fR +\fCTQLocale::Indonesia\fR .TP -\fCQLocale::Iran\fR +\fCTQLocale::Iran\fR .TP -\fCQLocale::Iraq\fR +\fCTQLocale::Iraq\fR .TP -\fCQLocale::Ireland\fR +\fCTQLocale::Ireland\fR .TP -\fCQLocale::Israel\fR +\fCTQLocale::Israel\fR .TP -\fCQLocale::Italy\fR +\fCTQLocale::Italy\fR .TP -\fCQLocale::Jamaica\fR +\fCTQLocale::Jamaica\fR .TP -\fCQLocale::Japan\fR +\fCTQLocale::Japan\fR .TP -\fCQLocale::Jordan\fR +\fCTQLocale::Jordan\fR .TP -\fCQLocale::Kazakhstan\fR +\fCTQLocale::Kazakhstan\fR .TP -\fCQLocale::Kenya\fR +\fCTQLocale::Kenya\fR .TP -\fCQLocale::Kiribati\fR +\fCTQLocale::Kiribati\fR .TP -\fCQLocale::DemocraticRepublicOfKorea\fR +\fCTQLocale::DemocraticRepublicOfKorea\fR .TP -\fCQLocale::RepublicOfKorea\fR +\fCTQLocale::RepublicOfKorea\fR .TP -\fCQLocale::Kuwait\fR +\fCTQLocale::Kuwait\fR .TP -\fCQLocale::Kyrgyzstan\fR +\fCTQLocale::Kyrgyzstan\fR .TP -\fCQLocale::Lao\fR +\fCTQLocale::Lao\fR .TP -\fCQLocale::Latvia\fR +\fCTQLocale::Latvia\fR .TP -\fCQLocale::Lebanon\fR +\fCTQLocale::Lebanon\fR .TP -\fCQLocale::Lesotho\fR +\fCTQLocale::Lesotho\fR .TP -\fCQLocale::Liberia\fR +\fCTQLocale::Liberia\fR .TP -\fCQLocale::LibyanArabJamahiriya\fR +\fCTQLocale::LibyanArabJamahiriya\fR .TP -\fCQLocale::Liechtenstein\fR +\fCTQLocale::Liechtenstein\fR .TP -\fCQLocale::Lithuania\fR +\fCTQLocale::Lithuania\fR .TP -\fCQLocale::Luxembourg\fR +\fCTQLocale::Luxembourg\fR .TP -\fCQLocale::Macau\fR +\fCTQLocale::Macau\fR .TP -\fCQLocale::Macedonia\fR +\fCTQLocale::Macedonia\fR .TP -\fCQLocale::Madagascar\fR +\fCTQLocale::Madagascar\fR .TP -\fCQLocale::Malawi\fR +\fCTQLocale::Malawi\fR .TP -\fCQLocale::Malaysia\fR +\fCTQLocale::Malaysia\fR .TP -\fCQLocale::Maldives\fR +\fCTQLocale::Maldives\fR .TP -\fCQLocale::Mali\fR +\fCTQLocale::Mali\fR .TP -\fCQLocale::Malta\fR +\fCTQLocale::Malta\fR .TP -\fCQLocale::MarshallIslands\fR +\fCTQLocale::MarshallIslands\fR .TP -\fCQLocale::Martinique\fR +\fCTQLocale::Martinique\fR .TP -\fCQLocale::Mauritania\fR +\fCTQLocale::Mauritania\fR .TP -\fCQLocale::Mauritius\fR +\fCTQLocale::Mauritius\fR .TP -\fCQLocale::Mayotte\fR +\fCTQLocale::Mayotte\fR .TP -\fCQLocale::Mexico\fR +\fCTQLocale::Mexico\fR .TP -\fCQLocale::Micronesia\fR +\fCTQLocale::Micronesia\fR .TP -\fCQLocale::Moldova\fR +\fCTQLocale::Moldova\fR .TP -\fCQLocale::Monaco\fR +\fCTQLocale::Monaco\fR .TP -\fCQLocale::Mongolia\fR +\fCTQLocale::Mongolia\fR .TP -\fCQLocale::Montserrat\fR +\fCTQLocale::Montserrat\fR .TP -\fCQLocale::Morocco\fR +\fCTQLocale::Morocco\fR .TP -\fCQLocale::Mozambique\fR +\fCTQLocale::Mozambique\fR .TP -\fCQLocale::Myanmar\fR +\fCTQLocale::Myanmar\fR .TP -\fCQLocale::Namibia\fR +\fCTQLocale::Namibia\fR .TP -\fCQLocale::NauruCountry\fR +\fCTQLocale::NauruCountry\fR .TP -\fCQLocale::Nepal\fR +\fCTQLocale::Nepal\fR .TP -\fCQLocale::Netherlands\fR +\fCTQLocale::Netherlands\fR .TP -\fCQLocale::NetherlandsAntilles\fR +\fCTQLocale::NetherlandsAntilles\fR .TP -\fCQLocale::NewCaledonia\fR +\fCTQLocale::NewCaledonia\fR .TP -\fCQLocale::NewZealand\fR +\fCTQLocale::NewZealand\fR .TP -\fCQLocale::Nicaragua\fR +\fCTQLocale::Nicaragua\fR .TP -\fCQLocale::Niger\fR +\fCTQLocale::Niger\fR .TP -\fCQLocale::Nigeria\fR +\fCTQLocale::Nigeria\fR .TP -\fCQLocale::Niue\fR +\fCTQLocale::Niue\fR .TP -\fCQLocale::NorfolkIsland\fR +\fCTQLocale::NorfolkIsland\fR .TP -\fCQLocale::NorthernMarianaIslands\fR +\fCTQLocale::NorthernMarianaIslands\fR .TP -\fCQLocale::Norway\fR +\fCTQLocale::Norway\fR .TP -\fCQLocale::Oman\fR +\fCTQLocale::Oman\fR .TP -\fCQLocale::Pakistan\fR +\fCTQLocale::Pakistan\fR .TP -\fCQLocale::Palau\fR +\fCTQLocale::Palau\fR .TP -\fCQLocale::PalestinianTerritory\fR +\fCTQLocale::PalestinianTerritory\fR .TP -\fCQLocale::Panama\fR +\fCTQLocale::Panama\fR .TP -\fCQLocale::PapuaNewGuinea\fR +\fCTQLocale::PapuaNewGuinea\fR .TP -\fCQLocale::Paraguay\fR +\fCTQLocale::Paraguay\fR .TP -\fCQLocale::Peru\fR +\fCTQLocale::Peru\fR .TP -\fCQLocale::Philippines\fR +\fCTQLocale::Philippines\fR .TP -\fCQLocale::Pitcairn\fR +\fCTQLocale::Pitcairn\fR .TP -\fCQLocale::Poland\fR +\fCTQLocale::Poland\fR .TP -\fCQLocale::Portugal\fR +\fCTQLocale::Portugal\fR .TP -\fCQLocale::PuertoRico\fR +\fCTQLocale::PuertoRico\fR .TP -\fCQLocale::Qatar\fR +\fCTQLocale::Qatar\fR .TP -\fCQLocale::Reunion\fR +\fCTQLocale::Reunion\fR .TP -\fCQLocale::Romania\fR +\fCTQLocale::Romania\fR .TP -\fCQLocale::RussianFederation\fR +\fCTQLocale::RussianFederation\fR .TP -\fCQLocale::Rwanda\fR +\fCTQLocale::Rwanda\fR .TP -\fCQLocale::SaintKittsAndNevis\fR +\fCTQLocale::SaintKittsAndNevis\fR .TP -\fCQLocale::StLucia\fR +\fCTQLocale::StLucia\fR .TP -\fCQLocale::StVincentAndTheGrenadines\fR +\fCTQLocale::StVincentAndTheGrenadines\fR .TP -\fCQLocale::Samoa\fR +\fCTQLocale::Samoa\fR .TP -\fCQLocale::SanMarino\fR +\fCTQLocale::SanMarino\fR .TP -\fCQLocale::SaoTomeAndPrincipe\fR +\fCTQLocale::SaoTomeAndPrincipe\fR .TP -\fCQLocale::SaudiArabia\fR +\fCTQLocale::SaudiArabia\fR .TP -\fCQLocale::Senegal\fR +\fCTQLocale::Senegal\fR .TP -\fCQLocale::Seychelles\fR +\fCTQLocale::Seychelles\fR .TP -\fCQLocale::SierraLeone\fR +\fCTQLocale::SierraLeone\fR .TP -\fCQLocale::Singapore\fR +\fCTQLocale::Singapore\fR .TP -\fCQLocale::Slovakia\fR +\fCTQLocale::Slovakia\fR .TP -\fCQLocale::Slovenia\fR +\fCTQLocale::Slovenia\fR .TP -\fCQLocale::SolomonIslands\fR +\fCTQLocale::SolomonIslands\fR .TP -\fCQLocale::Somalia\fR +\fCTQLocale::Somalia\fR .TP -\fCQLocale::SouthAfrica\fR +\fCTQLocale::SouthAfrica\fR .TP -\fCQLocale::SouthGeorgiaAndTheSouthSandwichIslands\fR +\fCTQLocale::SouthGeorgiaAndTheSouthSandwichIslands\fR .TP -\fCQLocale::Spain\fR +\fCTQLocale::Spain\fR .TP -\fCQLocale::SriLanka\fR +\fCTQLocale::SriLanka\fR .TP -\fCQLocale::StHelena\fR +\fCTQLocale::StHelena\fR .TP -\fCQLocale::StPierreAndMiquelon\fR +\fCTQLocale::StPierreAndMiquelon\fR .TP -\fCQLocale::Sudan\fR +\fCTQLocale::Sudan\fR .TP -\fCQLocale::Suriname\fR +\fCTQLocale::Suriname\fR .TP -\fCQLocale::SvalbardAndJanMayenIslands\fR +\fCTQLocale::SvalbardAndJanMayenIslands\fR .TP -\fCQLocale::Swaziland\fR +\fCTQLocale::Swaziland\fR .TP -\fCQLocale::Sweden\fR +\fCTQLocale::Sweden\fR .TP -\fCQLocale::Switzerland\fR +\fCTQLocale::Switzerland\fR .TP -\fCQLocale::SyrianArabRepublic\fR +\fCTQLocale::SyrianArabRepublic\fR .TP -\fCQLocale::Taiwan\fR +\fCTQLocale::Taiwan\fR .TP -\fCQLocale::Tajikistan\fR +\fCTQLocale::Tajikistan\fR .TP -\fCQLocale::Tanzania\fR +\fCTQLocale::Tanzania\fR .TP -\fCQLocale::Thailand\fR +\fCTQLocale::Thailand\fR .TP -\fCQLocale::Togo\fR +\fCTQLocale::Togo\fR .TP -\fCQLocale::Tokelau\fR +\fCTQLocale::Tokelau\fR .TP -\fCQLocale::TongaCountry\fR +\fCTQLocale::TongaCountry\fR .TP -\fCQLocale::TrinidadAndTobago\fR +\fCTQLocale::TrinidadAndTobago\fR .TP -\fCQLocale::Tunisia\fR +\fCTQLocale::Tunisia\fR .TP -\fCQLocale::Turkey\fR +\fCTQLocale::Turkey\fR .TP -\fCQLocale::Turkmenistan\fR +\fCTQLocale::Turkmenistan\fR .TP -\fCQLocale::TurksAndCaicosIslands\fR +\fCTQLocale::TurksAndCaicosIslands\fR .TP -\fCQLocale::Tuvalu\fR +\fCTQLocale::Tuvalu\fR .TP -\fCQLocale::Uganda\fR +\fCTQLocale::Uganda\fR .TP -\fCQLocale::Ukraine\fR +\fCTQLocale::Ukraine\fR .TP -\fCQLocale::UnitedArabEmirates\fR +\fCTQLocale::UnitedArabEmirates\fR .TP -\fCQLocale::UnitedKingdom\fR +\fCTQLocale::UnitedKingdom\fR .TP -\fCQLocale::UnitedStates\fR +\fCTQLocale::UnitedStates\fR .TP -\fCQLocale::UnitedStatesMinorOutlyingIslands\fR +\fCTQLocale::UnitedStatesMinorOutlyingIslands\fR .TP -\fCQLocale::Uruguay\fR +\fCTQLocale::Uruguay\fR .TP -\fCQLocale::Uzbekistan\fR +\fCTQLocale::Uzbekistan\fR .TP -\fCQLocale::Vanuatu\fR +\fCTQLocale::Vanuatu\fR .TP -\fCQLocale::VaticanCityState\fR +\fCTQLocale::VaticanCityState\fR .TP -\fCQLocale::Venezuela\fR +\fCTQLocale::Venezuela\fR .TP -\fCQLocale::VietNam\fR +\fCTQLocale::VietNam\fR .TP -\fCQLocale::BritishVirginIslands\fR +\fCTQLocale::BritishVirginIslands\fR .TP -\fCQLocale::USVirginIslands\fR +\fCTQLocale::USVirginIslands\fR .TP -\fCQLocale::WallisAndFutunaIslands\fR +\fCTQLocale::WallisAndFutunaIslands\fR .TP -\fCQLocale::WesternSahara\fR +\fCTQLocale::WesternSahara\fR .TP -\fCQLocale::Yemen\fR +\fCTQLocale::Yemen\fR .TP -\fCQLocale::Yugoslavia\fR +\fCTQLocale::Yugoslavia\fR .TP -\fCQLocale::Zambia\fR +\fCTQLocale::Zambia\fR .TP -\fCQLocale::Zimbabwe\fR -.SH "QLocale::Language" +\fCTQLocale::Zimbabwe\fR +.SH "TQLocale::Language" This enumerated type is used to specify a language. .TP -\fCQLocale::C\fR - Identical to English/UnitedStates +\fCTQLocale::C\fR - Identical to English/UnitedStates .TP -\fCQLocale::Abkhazian\fR +\fCTQLocale::Abkhazian\fR .TP -\fCQLocale::Afan\fR +\fCTQLocale::Afan\fR .TP -\fCQLocale::Afar\fR +\fCTQLocale::Afar\fR .TP -\fCQLocale::Afrikaans\fR +\fCTQLocale::Afrikaans\fR .TP -\fCQLocale::Albanian\fR +\fCTQLocale::Albanian\fR .TP -\fCQLocale::Amharic\fR +\fCTQLocale::Amharic\fR .TP -\fCQLocale::Arabic\fR +\fCTQLocale::Arabic\fR .TP -\fCQLocale::Armenian\fR +\fCTQLocale::Armenian\fR .TP -\fCQLocale::Assamese\fR +\fCTQLocale::Assamese\fR .TP -\fCQLocale::Aymara\fR +\fCTQLocale::Aymara\fR .TP -\fCQLocale::Azerbaijani\fR +\fCTQLocale::Azerbaijani\fR .TP -\fCQLocale::Bashkir\fR +\fCTQLocale::Bashkir\fR .TP -\fCQLocale::Basque\fR +\fCTQLocale::Basque\fR .TP -\fCQLocale::Bengali\fR +\fCTQLocale::Bengali\fR .TP -\fCQLocale::Bhutani\fR +\fCTQLocale::Bhutani\fR .TP -\fCQLocale::Bihari\fR +\fCTQLocale::Bihari\fR .TP -\fCQLocale::Bislama\fR +\fCTQLocale::Bislama\fR .TP -\fCQLocale::Breton\fR +\fCTQLocale::Breton\fR .TP -\fCQLocale::Bulgarian\fR +\fCTQLocale::Bulgarian\fR .TP -\fCQLocale::Burmese\fR +\fCTQLocale::Burmese\fR .TP -\fCQLocale::Byelorussian\fR +\fCTQLocale::Byelorussian\fR .TP -\fCQLocale::Cambodian\fR +\fCTQLocale::Cambodian\fR .TP -\fCQLocale::Catalan\fR +\fCTQLocale::Catalan\fR .TP -\fCQLocale::Chinese\fR +\fCTQLocale::Chinese\fR .TP -\fCQLocale::Corsican\fR +\fCTQLocale::Corsican\fR .TP -\fCQLocale::Croatian\fR +\fCTQLocale::Croatian\fR .TP -\fCQLocale::Czech\fR +\fCTQLocale::Czech\fR .TP -\fCQLocale::Danish\fR +\fCTQLocale::Danish\fR .TP -\fCQLocale::Dutch\fR +\fCTQLocale::Dutch\fR .TP -\fCQLocale::English\fR +\fCTQLocale::English\fR .TP -\fCQLocale::Esperanto\fR +\fCTQLocale::Esperanto\fR .TP -\fCQLocale::Estonian\fR +\fCTQLocale::Estonian\fR .TP -\fCQLocale::Faroese\fR +\fCTQLocale::Faroese\fR .TP -\fCQLocale::FijiLanguage\fR +\fCTQLocale::FijiLanguage\fR .TP -\fCQLocale::Finnish\fR +\fCTQLocale::Finnish\fR .TP -\fCQLocale::French\fR +\fCTQLocale::French\fR .TP -\fCQLocale::Frisian\fR +\fCTQLocale::Frisian\fR .TP -\fCQLocale::Gaelic\fR +\fCTQLocale::Gaelic\fR .TP -\fCQLocale::Galician\fR +\fCTQLocale::Galician\fR .TP -\fCQLocale::Georgian\fR +\fCTQLocale::Georgian\fR .TP -\fCQLocale::German\fR +\fCTQLocale::German\fR .TP -\fCQLocale::Greek\fR +\fCTQLocale::Greek\fR .TP -\fCQLocale::Greenlandic\fR +\fCTQLocale::Greenlandic\fR .TP -\fCQLocale::Guarani\fR +\fCTQLocale::Guarani\fR .TP -\fCQLocale::Gujarati\fR +\fCTQLocale::Gujarati\fR .TP -\fCQLocale::Hausa\fR +\fCTQLocale::Hausa\fR .TP -\fCQLocale::Hebrew\fR +\fCTQLocale::Hebrew\fR .TP -\fCQLocale::Hindi\fR +\fCTQLocale::Hindi\fR .TP -\fCQLocale::Hungarian\fR +\fCTQLocale::Hungarian\fR .TP -\fCQLocale::Icelandic\fR +\fCTQLocale::Icelandic\fR .TP -\fCQLocale::Indonesian\fR +\fCTQLocale::Indonesian\fR .TP -\fCQLocale::Interlingua\fR +\fCTQLocale::Interlingua\fR .TP -\fCQLocale::Interlingue\fR +\fCTQLocale::Interlingue\fR .TP -\fCQLocale::Inuktitut\fR +\fCTQLocale::Inuktitut\fR .TP -\fCQLocale::Inupiak\fR +\fCTQLocale::Inupiak\fR .TP -\fCQLocale::Irish\fR +\fCTQLocale::Irish\fR .TP -\fCQLocale::Italian\fR +\fCTQLocale::Italian\fR .TP -\fCQLocale::Japanese\fR +\fCTQLocale::Japanese\fR .TP -\fCQLocale::Javanese\fR +\fCTQLocale::Javanese\fR .TP -\fCQLocale::Kannada\fR +\fCTQLocale::Kannada\fR .TP -\fCQLocale::Kashmiri\fR +\fCTQLocale::Kashmiri\fR .TP -\fCQLocale::Kazakh\fR +\fCTQLocale::Kazakh\fR .TP -\fCQLocale::Kinyarwanda\fR +\fCTQLocale::Kinyarwanda\fR .TP -\fCQLocale::Kirghiz\fR +\fCTQLocale::Kirghiz\fR .TP -\fCQLocale::Korean\fR +\fCTQLocale::Korean\fR .TP -\fCQLocale::Kurdish\fR +\fCTQLocale::Kurdish\fR .TP -\fCQLocale::Kurundi\fR +\fCTQLocale::Kurundi\fR .TP -\fCQLocale::Laothian\fR +\fCTQLocale::Laothian\fR .TP -\fCQLocale::Latin\fR +\fCTQLocale::Latin\fR .TP -\fCQLocale::Latvian\fR +\fCTQLocale::Latvian\fR .TP -\fCQLocale::Lingala\fR +\fCTQLocale::Lingala\fR .TP -\fCQLocale::Lithuanian\fR +\fCTQLocale::Lithuanian\fR .TP -\fCQLocale::Macedonian\fR +\fCTQLocale::Macedonian\fR .TP -\fCQLocale::Malagasy\fR +\fCTQLocale::Malagasy\fR .TP -\fCQLocale::Malay\fR +\fCTQLocale::Malay\fR .TP -\fCQLocale::Malayalam\fR +\fCTQLocale::Malayalam\fR .TP -\fCQLocale::Maltese\fR +\fCTQLocale::Maltese\fR .TP -\fCQLocale::Maori\fR +\fCTQLocale::Maori\fR .TP -\fCQLocale::Marathi\fR +\fCTQLocale::Marathi\fR .TP -\fCQLocale::Moldavian\fR +\fCTQLocale::Moldavian\fR .TP -\fCQLocale::Mongolian\fR +\fCTQLocale::Mongolian\fR .TP -\fCQLocale::NauruLanguage\fR +\fCTQLocale::NauruLanguage\fR .TP -\fCQLocale::Nepali\fR +\fCTQLocale::Nepali\fR .TP -\fCQLocale::Norwegian\fR +\fCTQLocale::Norwegian\fR .TP -\fCQLocale::Occitan\fR +\fCTQLocale::Occitan\fR .TP -\fCQLocale::Oriya\fR +\fCTQLocale::Oriya\fR .TP -\fCQLocale::Pashto\fR +\fCTQLocale::Pashto\fR .TP -\fCQLocale::Persian\fR +\fCTQLocale::Persian\fR .TP -\fCQLocale::Polish\fR +\fCTQLocale::Polish\fR .TP -\fCQLocale::Portuguese\fR +\fCTQLocale::Portuguese\fR .TP -\fCQLocale::Punjabi\fR +\fCTQLocale::Punjabi\fR .TP -\fCQLocale::Quechua\fR +\fCTQLocale::Quechua\fR .TP -\fCQLocale::RhaetoRomance\fR +\fCTQLocale::RhaetoRomance\fR .TP -\fCQLocale::Romanian\fR +\fCTQLocale::Romanian\fR .TP -\fCQLocale::Russian\fR +\fCTQLocale::Russian\fR .TP -\fCQLocale::Samoan\fR +\fCTQLocale::Samoan\fR .TP -\fCQLocale::Sangho\fR +\fCTQLocale::Sangho\fR .TP -\fCQLocale::Sanskrit\fR +\fCTQLocale::Sanskrit\fR .TP -\fCQLocale::Serbian\fR +\fCTQLocale::Serbian\fR .TP -\fCQLocale::SerboCroatian\fR +\fCTQLocale::SerboCroatian\fR .TP -\fCQLocale::Sesotho\fR +\fCTQLocale::Sesotho\fR .TP -\fCQLocale::Setswana\fR +\fCTQLocale::Setswana\fR .TP -\fCQLocale::Shona\fR +\fCTQLocale::Shona\fR .TP -\fCQLocale::Sindhi\fR +\fCTQLocale::Sindhi\fR .TP -\fCQLocale::Singhalese\fR +\fCTQLocale::Singhalese\fR .TP -\fCQLocale::Siswati\fR +\fCTQLocale::Siswati\fR .TP -\fCQLocale::Slovak\fR +\fCTQLocale::Slovak\fR .TP -\fCQLocale::Slovenian\fR +\fCTQLocale::Slovenian\fR .TP -\fCQLocale::Somali\fR +\fCTQLocale::Somali\fR .TP -\fCQLocale::Spanish\fR +\fCTQLocale::Spanish\fR .TP -\fCQLocale::Sundanese\fR +\fCTQLocale::Sundanese\fR .TP -\fCQLocale::Swahili\fR +\fCTQLocale::Swahili\fR .TP -\fCQLocale::Swedish\fR +\fCTQLocale::Swedish\fR .TP -\fCQLocale::Tagalog\fR +\fCTQLocale::Tagalog\fR .TP -\fCQLocale::Tajik\fR +\fCTQLocale::Tajik\fR .TP -\fCQLocale::Tamil\fR +\fCTQLocale::Tamil\fR .TP -\fCQLocale::Tatar\fR +\fCTQLocale::Tatar\fR .TP -\fCQLocale::Telugu\fR +\fCTQLocale::Telugu\fR .TP -\fCQLocale::Thai\fR +\fCTQLocale::Thai\fR .TP -\fCQLocale::Tibetan\fR +\fCTQLocale::Tibetan\fR .TP -\fCQLocale::Tigrinya\fR +\fCTQLocale::Tigrinya\fR .TP -\fCQLocale::TongaLanguage\fR +\fCTQLocale::TongaLanguage\fR .TP -\fCQLocale::Tsonga\fR +\fCTQLocale::Tsonga\fR .TP -\fCQLocale::Turkish\fR +\fCTQLocale::Turkish\fR .TP -\fCQLocale::Turkmen\fR +\fCTQLocale::Turkmen\fR .TP -\fCQLocale::Twi\fR +\fCTQLocale::Twi\fR .TP -\fCQLocale::Uigur\fR +\fCTQLocale::Uigur\fR .TP -\fCQLocale::Ukrainian\fR +\fCTQLocale::Ukrainian\fR .TP -\fCQLocale::Urdu\fR +\fCTQLocale::Urdu\fR .TP -\fCQLocale::Uzbek\fR +\fCTQLocale::Uzbek\fR .TP -\fCQLocale::Vietnamese\fR +\fCTQLocale::Vietnamese\fR .TP -\fCQLocale::Volapuk\fR +\fCTQLocale::Volapuk\fR .TP -\fCQLocale::Welsh\fR +\fCTQLocale::Welsh\fR .TP -\fCQLocale::Wolof\fR +\fCTQLocale::Wolof\fR .TP -\fCQLocale::Xhosa\fR +\fCTQLocale::Xhosa\fR .TP -\fCQLocale::Yiddish\fR +\fCTQLocale::Yiddish\fR .TP -\fCQLocale::Yoruba\fR +\fCTQLocale::Yoruba\fR .TP -\fCQLocale::Zhuang\fR +\fCTQLocale::Zhuang\fR .TP -\fCQLocale::Zulu\fR +\fCTQLocale::Zulu\fR .SH MEMBER FUNCTION DOCUMENTATION -.SH "QLocale::QLocale ()" -Constructs a QLocale object initialized with the default locale. +.SH "TQLocale::TQLocale ()" +Constructs a TQLocale object initialized with the default locale. .PP See also setDefault(). -.SH "QLocale::QLocale ( const TQString & name )" -Constructs a QLocale object with the specified \fIname\fR, which has the format" language[_country][.codeset][@modifier]" or "C", where: +.SH "TQLocale::TQLocale ( const TQString & name )" +Constructs a TQLocale object with the specified \fIname\fR, which has the format" language[_country][.codeset][@modifier]" or "C", where: .TP language is a lowercase, two-letter, ISO 639 language code, .TP @@ -1014,58 +1014,58 @@ and codeset and modifier are ignored. .PP If the string violates the locale format, or language is not a valid ISO 369 code, the "C" locale is used instead. If country is not present, or is not a valid ISO 3166 code, the most appropriate country is chosen for the specified language. .PP -The language and country codes are converted to their respective Language and Country enums. After this conversion is performed the constructor behaves exactly like QLocale(Country, Language). +The language and country codes are converted to their respective Language and Country enums. After this conversion is performed the constructor behaves exactly like TQLocale(Country, Language). .PP -This constructor is much slower than QLocale(Country, Language). +This constructor is much slower than TQLocale(Country, Language). .PP See also name(). -.SH "QLocale::QLocale ( Language language, Country country = AnyCountry )" -Constructs a QLocale object with the specified \fIlanguage\fR and \fIcountry\fR. +.SH "TQLocale::TQLocale ( Language language, Country country = AnyCountry )" +Constructs a TQLocale object with the specified \fIlanguage\fR and \fIcountry\fR. .TP If the language/country pair is found in the database, it is used. .TP If the language is found but the country is not, or if the country is AnyCountry, the language is used with the most appropriate available country (for example, Germany for German), .TP -If neither the language nor the country are found, QLocale defaults to the default locale (see setDefault()). +If neither the language nor the country are found, TQLocale defaults to the default locale (see setDefault()). .PP The language and country that are actually used can be queried using language() and country(). .PP See also setDefault(), language(), and country(). -.SH "QLocale::QLocale ( const QLocale & other )" -Constructs a QLocale object as a copy of \fIother\fR. -.SH "QLocale QLocale::c ()\fC [static]\fR" -Returns a QLocale object initialized to the "C" locale. +.SH "TQLocale::TQLocale ( const TQLocale & other )" +Constructs a TQLocale object as a copy of \fIother\fR. +.SH "TQLocale TQLocale::c ()\fC [static]\fR" +Returns a TQLocale object initialized to the "C" locale. .PP See also system(). -.SH "Country QLocale::country () const" +.SH "Country TQLocale::country () const" Returns the country of this locale. .PP -See also QLocale(). -.SH "TQString QLocale::countryToString ( Country country )\fC [static]\fR" +See also TQLocale(). +.SH "TQString TQLocale::countryToString ( Country country )\fC [static]\fR" Returns a TQString containing the name of \fIcountry\fR. -.SH "Language QLocale::language () const" +.SH "Language TQLocale::language () const" Returns the language of this locale. .PP -See also QLocale(). -.SH "TQString QLocale::languageToString ( Language language )\fC [static]\fR" +See also TQLocale(). +.SH "TQString TQLocale::languageToString ( Language language )\fC [static]\fR" Returns a TQString containing the name of \fIlanguage\fR. -.SH "TQString QLocale::name () const" +.SH "TQString TQLocale::name () const" Returns the language and country of this locale as a string of the form "language_country", where language is a lowercase, two-letter ISO 639 language code, and country is an uppercase, two-letter ISO 3166 country code. .PP -See also QLocale(). -.SH "QLocale & QLocale::operator= ( const QLocale & other )" -Assigns \fIother\fR to this QLocale object and returns a reference to this QLocale object. -.SH "void QLocale::setDefault ( const QLocale & locale )\fC [static]\fR" +See also TQLocale(). +.SH "TQLocale & TQLocale::operator= ( const TQLocale & other )" +Assigns \fIother\fR to this TQLocale object and returns a reference to this TQLocale object. +.SH "void TQLocale::setDefault ( const TQLocale & locale )\fC [static]\fR" \fBWarning:\fR This function is \fInot\fR reentrant.

            .PP -Sets the global default locale to \fIlocale\fR. These values are used when a QLocale object is constructed with no arguments. If this function is not called, the system's locale is used. +Sets the global default locale to \fIlocale\fR. These values are used when a TQLocale object is constructed with no arguments. If this function is not called, the system's locale is used. .PP \fBWarning:\fR In a multithreaded application, the default locale should be set at application startup, before any non-GUI threads are created. .PP See also system() and c(). -.SH "QLocale QLocale::system ()\fC [static]\fR" -Returns a QLocale object initialized to the system locale. -.SH "double QLocale::toDouble ( const TQString & s, bool * ok = 0 ) const" +.SH "TQLocale TQLocale::system ()\fC [static]\fR" +Returns a TQLocale object initialized to the system locale. +.SH "double TQLocale::toDouble ( const TQString & s, bool * ok = 0 ) const" Returns the double represented by the localized string \fIs\fR, or 0.0 if the conversion failed. .PP If \fIok\fR is not 0, reports failure by setting *ok to false and success by setting *ok to true. @@ -1079,7 +1079,7 @@ Unlike TQString::toDouble(), this function does not fall back to the "C" locale double d; .br .br - QLocale c(QLocale::C); + TQLocale c(TQLocale::C); .br d = c.toDouble( "1234.56", &ok ); // ok == true, d == 1234.56 .br @@ -1088,7 +1088,7 @@ Unlike TQString::toDouble(), this function does not fall back to the "C" locale d = c.toDouble( "1234,56", &ok ); // ok == false .br .br - QLocale german(QLocale::German); + TQLocale german(TQLocale::German); .br d = german.toDouble( "1234,56", &ok ); // ok == true, d == 1234.56 .br @@ -1106,7 +1106,7 @@ Notice that the last conversion returns 1234.0, because '.' is the thousands gro This function ignores leading and trailing whitespace. .PP See also toString() and TQString::toDouble(). -.SH "float QLocale::toFloat ( const TQString & s, bool * ok = 0 ) const" +.SH "float TQLocale::toFloat ( const TQString & s, bool * ok = 0 ) const" Returns the float represented by the localized string \fIs\fR, or 0.0 if the conversion failed. .PP If \fIok\fR is not 0, reports failure by setting *ok to false and success by setting *ok to true. @@ -1114,7 +1114,7 @@ If \fIok\fR is not 0, reports failure by setting *ok to false and success by set This function ignores leading and trailing whitespace. .PP See also toString(). -.SH "int QLocale::toInt ( const TQString & s, bool * ok = 0 ) const" +.SH "int TQLocale::toInt ( const TQString & s, bool * ok = 0 ) const" Returns the int represented by the localized string \fIs\fR, or 0 if the conversion failed. .PP If \fIok\fR is not 0, reports failure by setting *ok to false and success by setting *ok to true. @@ -1122,7 +1122,7 @@ If \fIok\fR is not 0, reports failure by setting *ok to false and success by set This function ignores leading and trailing whitespace. .PP See also toString(). -.SH "TQ_LONG QLocale::toLong ( const TQString & s, bool * ok = 0 ) const" +.SH "TQ_LONG TQLocale::toLong ( const TQString & s, bool * ok = 0 ) const" Returns the long int represented by the localized string \fIs\fR, or 0 if the conversion failed. .PP If \fIok\fR is not 0, reports failure by setting *ok to false and success by setting *ok to true. @@ -1130,7 +1130,7 @@ If \fIok\fR is not 0, reports failure by setting *ok to false and success by set This function ignores leading and trailing whitespace. .PP See also toString(). -.SH "TQ_LLONG QLocale::toLongLong ( const TQString & s, bool * ok = 0 ) const" +.SH "TQ_LLONG TQLocale::toLongLong ( const TQString & s, bool * ok = 0 ) const" Returns the long long int represented by the localized string \fIs\fR, or 0 if the conversion failed. .PP If \fIok\fR is not 0, reports failure by setting *ok to false and success by setting *ok to true. @@ -1138,7 +1138,7 @@ If \fIok\fR is not 0, reports failure by setting *ok to false and success by set This function ignores leading and trailing whitespace. .PP See also toString(). -.SH "short QLocale::toShort ( const TQString & s, bool * ok = 0 ) const" +.SH "short TQLocale::toShort ( const TQString & s, bool * ok = 0 ) const" Returns the short int represented by the localized string \fIs\fR, or 0 if the conversion failed. .PP If \fIok\fR is not 0, reports failure by setting *ok to false and success by setting *ok to true. @@ -1146,51 +1146,51 @@ If \fIok\fR is not 0, reports failure by setting *ok to false and success by set This function ignores leading and trailing whitespace. .PP See also toString(). -.SH "TQString QLocale::toString ( TQ_LLONG i ) const" +.SH "TQString TQLocale::toString ( TQ_LLONG i ) const" Returns a localized string representation of \fIi\fR. .PP See also toLongLong(). -.SH "TQString QLocale::toString ( short i ) const" +.SH "TQString TQLocale::toString ( short i ) const" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP See also toShort(). -.SH "TQString QLocale::toString ( ushort i ) const" +.SH "TQString TQLocale::toString ( ushort i ) const" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP See also toUShort(). -.SH "TQString QLocale::toString ( int i ) const" +.SH "TQString TQLocale::toString ( int i ) const" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP See also toInt(). -.SH "TQString QLocale::toString ( uint i ) const" +.SH "TQString TQLocale::toString ( uint i ) const" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP See also toUInt(). -.SH "TQString QLocale::toString ( TQ_LONG i ) const" +.SH "TQString TQLocale::toString ( TQ_LONG i ) const" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP See also toLong(). -.SH "TQString QLocale::toString ( TQ_ULONG i ) const" +.SH "TQString TQLocale::toString ( TQ_ULONG i ) const" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP See also toULong(). -.SH "TQString QLocale::toString ( TQ_ULLONG i ) const" +.SH "TQString TQLocale::toString ( TQ_ULLONG i ) const" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP See also toULongLong(). -.SH "TQString QLocale::toString ( float i, char f = 'g', int prec = 6 ) const" +.SH "TQString TQLocale::toString ( float i, char f = 'g', int prec = 6 ) const" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP \fIf\fR and \fIprec\fR have the same meaning as in TQString::number(double, char, int). .PP See also toDouble(). -.SH "TQString QLocale::toString ( double i, char f = 'g', int prec = 6 ) const" +.SH "TQString TQLocale::toString ( double i, char f = 'g', int prec = 6 ) const" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP \fIf\fR and \fIprec\fR have the same meaning as in TQString::number(double, char, int). .PP See also toDouble(). -.SH "uint QLocale::toUInt ( const TQString & s, bool * ok = 0 ) const" +.SH "uint TQLocale::toUInt ( const TQString & s, bool * ok = 0 ) const" Returns the unsigned int represented by the localized string \fIs\fR, or 0 if the conversion failed. .PP If \fIok\fR is not 0, reports failure by setting *ok to false and success by setting *ok to true. @@ -1198,7 +1198,7 @@ If \fIok\fR is not 0, reports failure by setting *ok to false and success by set This function ignores leading and trailing whitespace. .PP See also toString(). -.SH "TQ_ULONG QLocale::toULong ( const TQString & s, bool * ok = 0 ) const" +.SH "TQ_ULONG TQLocale::toULong ( const TQString & s, bool * ok = 0 ) const" Returns the unsigned long int represented by the localized string \fIs\fR, or 0 if the conversion failed. .PP If \fIok\fR is not 0, reports failure by setting *ok to false and success by setting *ok to true. @@ -1206,7 +1206,7 @@ If \fIok\fR is not 0, reports failure by setting *ok to false and success by set This function ignores leading and trailing whitespace. .PP See also toString(). -.SH "TQ_ULLONG QLocale::toULongLong ( const TQString & s, bool * ok = 0 ) const" +.SH "TQ_ULLONG TQLocale::toULongLong ( const TQString & s, bool * ok = 0 ) const" Returns the unsigned long long int represented by the localized string \fIs\fR, or 0 if the conversion failed. .PP If \fIok\fR is not 0, reports failure by setting *ok to false and success by setting *ok to true. @@ -1214,7 +1214,7 @@ If \fIok\fR is not 0, reports failure by setting *ok to false and success by set This function ignores leading and trailing whitespace. .PP See also toString(). -.SH "ushort QLocale::toUShort ( const TQString & s, bool * ok = 0 ) const" +.SH "ushort TQLocale::toUShort ( const TQString & s, bool * ok = 0 ) const" Returns the unsigned short int represented by the localized string \fIs\fR, or 0 if the conversion failed. .PP If \fIok\fR is not 0, reports failure by setting *ok to false and success by setting *ok to true. @@ -1224,7 +1224,7 @@ This function ignores leading and trailing whitespace. See also toString(). .SH "SEE ALSO" -.BR http://doc.trolltech.com/ntqlocale.html +.BR http://doc.trolltech.com/tqlocale.html .BR http://www.trolltech.com/faq/tech.html .SH COPYRIGHT Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the diff --git a/doc/man/man3/tqmainwindow.3qt b/doc/man/man3/tqmainwindow.3qt index 191d948d7..d09ffec84 100644 --- a/doc/man/man3/tqmainwindow.3qt +++ b/doc/man/man3/tqmainwindow.3qt @@ -745,7 +745,7 @@ This signal is emitted whenever the setUsesTextLabel() is called with a value di .SH "void TQMainWindow::whatsThis ()\fC [virtual slot]\fR" Enters 'What's This?' mode and returns immediately. .PP -This is the same as QWhatsThis::enterWhatsThisMode(), but implemented as a main window object's slot. This way it can easily be used for popup menus, for example: +This is the same as TQWhatsThis::enterWhatsThisMode(), but implemented as a main window object's slot. This way it can easily be used for popup menus, for example: .PP .nf .br @@ -755,7 +755,7 @@ This is the same as QWhatsThis::enterWhatsThisMode(), but implemented as a main .br .fi .PP -See also QWhatsThis::enterWhatsThisMode(). +See also TQWhatsThis::enterWhatsThisMode(). .SS "Property Documentation" .SH "bool dockWindowsMovable" This property holds whether the dock windows are movable. diff --git a/doc/man/man3/tqmenubar.3qt b/doc/man/man3/tqmenubar.3qt index b296e0da6..50e597908 100644 --- a/doc/man/man3/tqmenubar.3qt +++ b/doc/man/man3/tqmenubar.3qt @@ -445,7 +445,7 @@ Ownership of \fIwidget\fR is transferred to the popup menu or to the menu bar. .PP Theoretically, any widget can be inserted into a popup menu. In practice, this only makes sense with certain widgets. .PP -If a widget is not focus-enabled (see TQWidget::isFocusEnabled()), the menu treats it as a separator; this means that the item is not selectable and will never get focus. In this way you can, for example, simply insert a QLabel if you need a popup menu with a title. +If a widget is not focus-enabled (see TQWidget::isFocusEnabled()), the menu treats it as a separator; this means that the item is not selectable and will never get focus. In this way you can, for example, simply insert a TQLabel if you need a popup menu with a title. .PP If the widget is focus-enabled it will get focus when the user traverses the popup menu with the arrow keys. If the widget does not accept \fCArrowUp\fR and \fCArrowDown\fR in its key event handler, the focus will move back to the menu when the respective arrow key is hit one more time. This works with a QLineEdit, for example. If the widget accepts the arrow key itself, it must also provide the possibility to put the focus back on the menu again by calling TQWidget::focusNextPrevChild(). Futhermore, if the embedded widget closes the menu when the user made a selection, this can be done safely by calling: .PP diff --git a/doc/man/man3/tqmenudata.3qt b/doc/man/man3/tqmenudata.3qt index 8c092dd88..6a0d238f3 100644 --- a/doc/man/man3/tqmenudata.3qt +++ b/doc/man/man3/tqmenudata.3qt @@ -485,7 +485,7 @@ Ownership of \fIwidget\fR is transferred to the popup menu or to the menu bar. .PP Theoretically, any widget can be inserted into a popup menu. In practice, this only makes sense with certain widgets. .PP -If a widget is not focus-enabled (see TQWidget::isFocusEnabled()), the menu treats it as a separator; this means that the item is not selectable and will never get focus. In this way you can, for example, simply insert a QLabel if you need a popup menu with a title. +If a widget is not focus-enabled (see TQWidget::isFocusEnabled()), the menu treats it as a separator; this means that the item is not selectable and will never get focus. In this way you can, for example, simply insert a TQLabel if you need a popup menu with a title. .PP If the widget is focus-enabled it will get focus when the user traverses the popup menu with the arrow keys. If the widget does not accept \fCArrowUp\fR and \fCArrowDown\fR in its key event handler, the focus will move back to the menu when the respective arrow key is hit one more time. This works with a QLineEdit, for example. If the widget accepts the arrow key itself, it must also provide the possibility to put the focus back on the menu again by calling TQWidget::focusNextPrevChild(). Futhermore, if the embedded widget closes the menu when the user made a selection, this can be done safely by calling: .PP diff --git a/doc/man/man3/tqmimesourcefactory.3qt b/doc/man/man3/tqmimesourcefactory.3qt index c1f5db94c..7f66d1202 100644 --- a/doc/man/man3/tqmimesourcefactory.3qt +++ b/doc/man/man3/tqmimesourcefactory.3qt @@ -78,7 +78,7 @@ A TQMimeSourceFactory provides an abstract interface to a collection of informat .PP The base TQMimeSourceFactory can be used in two ways: as an abstraction of a collection of files or as specifically stored data. For it to access files, call setFilePath() before accessing data. For stored data, call setData() for each item (there are also convenience functions, e.g. setText(), setImage() and setPixmap(), that simply call setData() with appropriate parameters). .PP -The rich text widgets, TQTextEdit and TQTextBrowser, use TQMimeSourceFactory to resolve references such as images or links within rich text documents. They either access the default factory (see defaultFactory()) or their own (see TQTextEdit::setMimeSourceFactory()). Other classes that are capable of displaying rich text (such as QLabel, QWhatsThis or QMessageBox) always use the default factory. +The rich text widgets, TQTextEdit and TQTextBrowser, use TQMimeSourceFactory to resolve references such as images or links within rich text documents. They either access the default factory (see defaultFactory()) or their own (see TQTextEdit::setMimeSourceFactory()). Other classes that are capable of displaying rich text (such as TQLabel, TQWhatsThis or QMessageBox) always use the default factory. .PP A factory can also be used as a container to store data associated with a name. This technique is useful whenever rich text contains images that are stored in the program itself, not loaded from the hard disk. Your program may, for example, define some image data as: .PP @@ -94,7 +94,7 @@ A factory can also be used as a container to store data associated with a name. .br .fi .PP -To be able to use this image within some rich text, for example inside a QLabel, you must create a TQImage from the raw data and insert it into the factory with a unique name: +To be able to use this image within some rich text, for example inside a TQLabel, you must create a TQImage from the raw data and insert it into the factory with a unique name: .PP .nf .br @@ -102,11 +102,11 @@ To be able to use this image within some rich text, for example inside a QLabel, .br .fi .PP -Now you can create a rich text QLabel with +Now you can create a rich text TQLabel with .PP .nf .br - QLabel* label = new QLabel( + TQLabel* label = new TQLabel( .br "Rich text with embedded image:" .br @@ -166,7 +166,7 @@ This is an overloaded member function, provided for convenience. It behaves esse .PP A convenience function. See data(const TQString& abs_name). The file name is given in \fIabs_or_rel_name\fR and the path is in \fIcontext\fR. .SH "TQMimeSourceFactory * TQMimeSourceFactory::defaultFactory ()\fC [static]\fR" -Returns the application-wide default mime source factory. This factory is used by rich text rendering classes such as QSimpleRichText, QWhatsThis and QMessageBox to resolve named references within rich text documents. It serves also as the initial factory for the more complex render widgets, TQTextEdit and TQTextBrowser. +Returns the application-wide default mime source factory. This factory is used by rich text rendering classes such as TQSimpleRichText, TQWhatsThis and QMessageBox to resolve named references within rich text documents. It serves also as the initial factory for the more complex render widgets, TQTextEdit and TQTextBrowser. .PP See also setDefaultFactory(). .PP diff --git a/doc/man/man3/tqmovie.3qt b/doc/man/man3/tqmovie.3qt index 97f337f4a..aa5047956 100644 --- a/doc/man/man3/tqmovie.3qt +++ b/doc/man/man3/tqmovie.3qt @@ -122,7 +122,7 @@ TQMovie \- Incremental loading of animations or images, signalling as it progres .SH DESCRIPTION The TQMovie class provides incremental loading of animations or images, signalling as it progresses. .PP -The simplest way to display a TQMovie is to use a QLabel and QLabel::setMovie(). +The simplest way to display a TQMovie is to use a TQLabel and TQLabel::setMovie(). .PP A TQMovie provides a TQPixmap as the framePixmap(); connections can be made via connectResize() and connectUpdate() to receive notification of size and pixmap changes. All decoding is driven by the normal event-processing mechanisms. .PP @@ -146,7 +146,7 @@ GIF support may be removed completely in a future version of Qt. We recommend us .PP
            .PP -See also QLabel::setMovie(), Graphics Classes, Image Processing Classes, and Multimedia Classes. +See also TQLabel::setMovie(), Graphics Classes, Image Processing Classes, and Multimedia Classes. .SS "Member Type Documentation" .SH "TQMovie::Status" .TP diff --git a/doc/man/man3/tqobject.3qt b/doc/man/man3/tqobject.3qt index 39be265fe..f52bbde23 100644 --- a/doc/man/man3/tqobject.3qt +++ b/doc/man/man3/tqobject.3qt @@ -302,7 +302,7 @@ You must use the TQ_SIGNAL() and TQ_SLOT() macros when specifying the \fIsignal\ .PP .nf .br - QLabel *label = new QLabel; + TQLabel *label = new TQLabel; .br QScrollBar *scroll = new QScrollBar; .br diff --git a/doc/man/man3/tqpixmap.3qt b/doc/man/man3/tqpixmap.3qt index 3342e11c6..404637246 100644 --- a/doc/man/man3/tqpixmap.3qt +++ b/doc/man/man3/tqpixmap.3qt @@ -226,7 +226,7 @@ bitBlt() the pixmap contents onto the widget. .PP Pixel data in a pixmap is internal and is managed by the underlying window system. Pixels can be accessed only through TQPainter functions, through bitBlt(), and by converting the TQPixmap to a TQImage. .PP -You can easily display a TQPixmap on the screen using QLabel::setPixmap(). For example, all the QButton subclasses support pixmap use. +You can easily display a TQPixmap on the screen using TQLabel::setPixmap(). For example, all the QButton subclasses support pixmap use. .PP The TQPixmap class uses copy-on-write, so it is practical to pass TQPixmap objects by value. .PP diff --git a/doc/man/man3/tqpopupmenu.3qt b/doc/man/man3/tqpopupmenu.3qt index ef8b119ff..d17106a5e 100644 --- a/doc/man/man3/tqpopupmenu.3qt +++ b/doc/man/man3/tqpopupmenu.3qt @@ -231,7 +231,7 @@ A popup menu can display check marks for certain items when enabled with setChec .PP Items are either enabled or disabled. You toggle their state with setItemEnabled(). Just before a popup menu becomes visible, it emits the aboutToShow() signal. You can use this signal to set the correct enabled/disabled states of all menu items before the user sees it. The corresponding aboutToHide() signal is emitted when the menu hides again. .PP -You can provide What's This? help for single menu items with setWhatsThis(). See QWhatsThis for general information about this kind of lightweight online help. +You can provide What's This? help for single menu items with setWhatsThis(). See TQWhatsThis for general information about this kind of lightweight online help. .PP For ultimate flexibility, you can also add entire widgets as items into a popup menu (for example, a color selector). .PP @@ -573,7 +573,7 @@ Ownership of \fIwidget\fR is transferred to the popup menu or to the menu bar. .PP Theoretically, any widget can be inserted into a popup menu. In practice, this only makes sense with certain widgets. .PP -If a widget is not focus-enabled (see TQWidget::isFocusEnabled()), the menu treats it as a separator; this means that the item is not selectable and will never get focus. In this way you can, for example, simply insert a QLabel if you need a popup menu with a title. +If a widget is not focus-enabled (see TQWidget::isFocusEnabled()), the menu treats it as a separator; this means that the item is not selectable and will never get focus. In this way you can, for example, simply insert a TQLabel if you need a popup menu with a title. .PP If the widget is focus-enabled it will get focus when the user traverses the popup menu with the arrow keys. If the widget does not accept \fCArrowUp\fR and \fCArrowDown\fR in its key event handler, the focus will move back to the menu when the respective arrow key is hit one more time. This works with a QLineEdit, for example. If the widget accepts the arrow key itself, it must also provide the possibility to put the focus back on the menu again by calling TQWidget::focusNextPrevChild(). Futhermore, if the embedded widget closes the menu when the user made a selection, this can be done safely by calling: .PP diff --git a/doc/man/man3/tqprogressdialog.3qt b/doc/man/man3/tqprogressdialog.3qt index 6c225a88c..5383a4da7 100644 --- a/doc/man/man3/tqprogressdialog.3qt +++ b/doc/man/man3/tqprogressdialog.3qt @@ -25,7 +25,7 @@ Inherits QDialog. .BI "\fB~QProgressDialog\fR ()" .br .ti -1c -.BI "void \fBsetLabel\fR ( QLabel * label )" +.BI "void \fBsetLabel\fR ( TQLabel * label )" .br .ti -1c .BI "void \fBsetCancelButton\fR ( QPushButton * cancelButton )" @@ -314,7 +314,7 @@ See also setCancelButtonText(). Sets the cancel button's text to \fIcancelButtonText\fR. .PP See also setCancelButton(). -.SH "void QProgressDialog::setLabel ( QLabel * label )" +.SH "void QProgressDialog::setLabel ( TQLabel * label )" Sets the label to \fIlabel\fR. The progress dialog resizes to fit. The label becomes owned by the progress dialog and will be deleted when necessary, so do not pass the address of an object on the stack. .PP See also labelText. diff --git a/doc/man/man3/tqregexp.3qt b/doc/man/man3/tqregexp.3qt index 2077d70f1..09cf52cc2 100644 --- a/doc/man/man3/tqregexp.3qt +++ b/doc/man/man3/tqregexp.3qt @@ -689,7 +689,7 @@ If \fIindexIsStart\fR is TRUE (the default), the position \fIindex\fR in the str .PP Use search() and matchedLength() instead of this function. .PP -See also TQString::mid() and QConstString. +See also TQString::mid() and TQConstString. .PP Example: qmag/qmag.cpp. .SH "int TQRegExp::matchedLength () const" diff --git a/doc/man/man3/tqscrollview.3qt b/doc/man/man3/tqscrollview.3qt index 55f564f02..baf27b35a 100644 --- a/doc/man/man3/tqscrollview.3qt +++ b/doc/man/man3/tqscrollview.3qt @@ -336,17 +336,17 @@ You can go on to add arbitrary child widgets to the single child in the scrollvi .PP .nf .br - QLabel* child1 = new QLabel("CHILD", big_box); + TQLabel* child1 = new TQLabel("CHILD", big_box); .br - QLabel* child2 = new QLabel("CHILD", big_box); + TQLabel* child2 = new TQLabel("CHILD", big_box); .br - QLabel* child3 = new QLabel("CHILD", big_box); + TQLabel* child3 = new TQLabel("CHILD", big_box); .br ... .br .fi .PP -Here the QScrollView has four children: the viewport(), the verticalScrollBar(), the horizontalScrollBar() and a small cornerWidget(). The viewport() has one child: the big QVBox. The QVBox has the three QLabel objects as child widgets. When the view is scrolled, the QVBox is moved; its children move with it as child widgets normally do. +Here the QScrollView has four children: the viewport(), the verticalScrollBar(), the horizontalScrollBar() and a small cornerWidget(). The viewport() has one child: the big QVBox. The QVBox has the three TQLabel objects as child widgets. When the view is scrolled, the QVBox is moved; its children move with it as child widgets normally do. .SH "Using a Very Big View with Some Widgets"
            .ce 1 @@ -360,20 +360,20 @@ The second usage of QScrollView (depicted above) is appropriate when few, if any .br QScrollView* sv = new QScrollView(...); .br - QLabel* child1 = new QLabel("CHILD", sv->viewport()); + TQLabel* child1 = new TQLabel("CHILD", sv->viewport()); .br sv->addChild(child1); .br - QLabel* child2 = new QLabel("CHILD", sv->viewport()); + TQLabel* child2 = new TQLabel("CHILD", sv->viewport()); .br sv->addChild(child2); .br - QLabel* child3 = new QLabel("CHILD", sv->viewport()); + TQLabel* child3 = new TQLabel("CHILD", sv->viewport()); .br sv->addChild(child3); .br .fi -Here, the QScrollView has the same four children: the viewport(), the verticalScrollBar(), the horizontalScrollBar() and a small cornerWidget(). The viewport() has the three QLabel objects as child widgets. When the view is scrolled, the scrollview moves the child widgets individually. +Here, the QScrollView has the same four children: the viewport(), the verticalScrollBar(), the horizontalScrollBar() and a small cornerWidget(). The viewport() has the three TQLabel objects as child widgets. When the view is scrolled, the scrollview moves the child widgets individually. .SH "Using a Very Big View with Many Widgets"
            .ce 1 @@ -389,15 +389,15 @@ The final usage of QScrollView (depicted above) is appropriate when many widgets .br sv->enableClipper(TRUE); .br - QLabel* child1 = new QLabel("CHILD", sv->viewport()); + TQLabel* child1 = new TQLabel("CHILD", sv->viewport()); .br sv->addChild(child1); .br - QLabel* child2 = new QLabel("CHILD", sv->viewport()); + TQLabel* child2 = new TQLabel("CHILD", sv->viewport()); .br sv->addChild(child2); .br - QLabel* child3 = new QLabel("CHILD", sv->viewport()); + TQLabel* child3 = new TQLabel("CHILD", sv->viewport()); .br sv->addChild(child3); .br diff --git a/doc/man/man3/tqsimplerichtext.3qt b/doc/man/man3/tqsimplerichtext.3qt index 6b4208e96..c1f02b62f 100644 --- a/doc/man/man3/tqsimplerichtext.3qt +++ b/doc/man/man3/tqsimplerichtext.3qt @@ -1,5 +1,5 @@ '\" t -.TH QSimpleRichText 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- +.TH TQSimpleRichText 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- .\" Copyright 1992-2007 Trolltech ASA. All rights reserved. See the .\" license file included in the distribution for a complete license .\" statement. @@ -7,20 +7,20 @@ .ad l .nh .SH NAME -QSimpleRichText \- Small displayable piece of rich text +TQSimpleRichText \- Small displayable piece of rich text .SH SYNOPSIS -\fC#include \fR +\fC#include \fR .PP .SS "Public Members" .in +1c .ti -1c -.BI "\fBQSimpleRichText\fR ( const TQString & text, const TQFont & fnt, const TQString & context = TQString::null, const TQStyleSheet * sheet = 0 )" +.BI "\fBTQSimpleRichText\fR ( const TQString & text, const TQFont & fnt, const TQString & context = TQString::null, const TQStyleSheet * sheet = 0 )" .br .ti -1c -.BI "\fBQSimpleRichText\fR ( const TQString & text, const TQFont & fnt, const TQString & context, const TQStyleSheet * sheet, const TQMimeSourceFactory * factory, int pageBreak = -1, const TQColor & linkColor = TQt::blue, bool linkUnderline = TRUE )" +.BI "\fBTQSimpleRichText\fR ( const TQString & text, const TQFont & fnt, const TQString & context, const TQStyleSheet * sheet, const TQMimeSourceFactory * factory, int pageBreak = -1, const TQColor & linkColor = TQt::blue, bool linkUnderline = TRUE )" .br .ti -1c -.BI "\fB~QSimpleRichText\fR ()" +.BI "\fB~TQSimpleRichText\fR ()" .br .ti -1c .BI "void \fBsetWidth\fR ( int w )" @@ -60,77 +60,77 @@ QSimpleRichText \- Small displayable piece of rich text .br .in -1c .SH DESCRIPTION -The QSimpleRichText class provides a small displayable piece of rich text. +The TQSimpleRichText class provides a small displayable piece of rich text. .PP This class encapsulates simple rich text usage in which a string is interpreted as rich text and can be drawn. This is particularly useful if you want to display some rich text in a custom widget. A TQStyleSheet is needed to interpret the tags and format the rich text. TQt provides a default HTML-like style sheet, but you may define custom style sheets. .PP -Once created, the rich text object can be queried for its width(), height(), and the actual width used (see widthUsed()). Most importantly, it can be drawn on any given TQPainter with draw(). QSimpleRichText can also be used to implement hypertext or active text facilities by using anchorAt(). A hit test through inText() makes it possible to use simple rich text for text objects in editable drawing canvases. +Once created, the rich text object can be queried for its width(), height(), and the actual width used (see widthUsed()). Most importantly, it can be drawn on any given TQPainter with draw(). TQSimpleRichText can also be used to implement hypertext or active text facilities by using anchorAt(). A hit test through inText() makes it possible to use simple rich text for text objects in editable drawing canvases. .PP Once constructed from a string the contents cannot be changed, only resized. If the contents change, just throw the rich text object away and make a new one with the new contents. .PP -For large documents use TQTextEdit or TQTextBrowser. For very small items of rich text you can use a QLabel. +For large documents use TQTextEdit or TQTextBrowser. For very small items of rich text you can use a TQLabel. .PP -If you are using QSimpleRichText to print in high resolution you should call setWidth(TQPainter, int) so that the content will be laid out properly on the page. +If you are using TQSimpleRichText to print in high resolution you should call setWidth(TQPainter, int) so that the content will be laid out properly on the page. .PP See also Text Related Classes. .SH MEMBER FUNCTION DOCUMENTATION -.SH "QSimpleRichText::QSimpleRichText ( const TQString & text, const TQFont & fnt, const TQString & context = TQString::null, const TQStyleSheet * sheet = 0 )" -Constructs a QSimpleRichText from the rich text string \fItext\fR and the font \fIfnt\fR. +.SH "TQSimpleRichText::TQSimpleRichText ( const TQString & text, const TQFont & fnt, const TQString & context = TQString::null, const TQStyleSheet * sheet = 0 )" +Constructs a TQSimpleRichText from the rich text string \fItext\fR and the font \fIfnt\fR. .PP The font is used as a basis for the text rendering. When using rich text rendering on a widget \fIw\fR, you would normally specify the widget's font, for example: .PP .nf .br - QSimpleRichText myrichtext( contents, mywidget->font() ); + TQSimpleRichText myrichtext( contents, mywidget->font() ); .br .fi .PP -\fIcontext\fR is the optional context of the rich text object. This becomes important if \fItext\fR contains relative references, for example within image tags. QSimpleRichText always uses the default mime source factory (see TQMimeSourceFactory::defaultFactory()) to resolve those references. The context will then be used to calculate the absolute path. See TQMimeSourceFactory::makeAbsolute() for details. +\fIcontext\fR is the optional context of the rich text object. This becomes important if \fItext\fR contains relative references, for example within image tags. TQSimpleRichText always uses the default mime source factory (see TQMimeSourceFactory::defaultFactory()) to resolve those references. The context will then be used to calculate the absolute path. See TQMimeSourceFactory::makeAbsolute() for details. .PP The \fIsheet\fR is an optional style sheet. If it is 0, the default style sheet will be used (see TQStyleSheet::defaultSheet()). -.SH "QSimpleRichText::QSimpleRichText ( const TQString & text, const TQFont & fnt, const TQString & context, const TQStyleSheet * sheet, const TQMimeSourceFactory * factory, int pageBreak = -1, const TQColor & linkColor = TQt::blue, bool linkUnderline = TRUE )" -Constructs a QSimpleRichText from the rich text string \fItext\fR and the font \fIfnt\fR. +.SH "TQSimpleRichText::TQSimpleRichText ( const TQString & text, const TQFont & fnt, const TQString & context, const TQStyleSheet * sheet, const TQMimeSourceFactory * factory, int pageBreak = -1, const TQColor & linkColor = TQt::blue, bool linkUnderline = TRUE )" +Constructs a TQSimpleRichText from the rich text string \fItext\fR and the font \fIfnt\fR. .PP -This is a slightly more complex constructor for QSimpleRichText that takes an additional mime source factory \fIfactory\fR, a page break parameter \fIpageBreak\fR and a bool \fIlinkUnderline\fR. \fIlinkColor\fR is only provided for compatibility, but has no effect, as TQColorGroup's TQColorGroup::link() color is used now. +This is a slightly more complex constructor for TQSimpleRichText that takes an additional mime source factory \fIfactory\fR, a page break parameter \fIpageBreak\fR and a bool \fIlinkUnderline\fR. \fIlinkColor\fR is only provided for compatibility, but has no effect, as TQColorGroup's TQColorGroup::link() color is used now. .PP -\fIcontext\fR is the optional context of the rich text object. This becomes important if \fItext\fR contains relative references, for example within image tags. QSimpleRichText always uses the default mime source factory (see TQMimeSourceFactory::defaultFactory()) to resolve those references. The context will then be used to calculate the absolute path. See TQMimeSourceFactory::makeAbsolute() for details. +\fIcontext\fR is the optional context of the rich text object. This becomes important if \fItext\fR contains relative references, for example within image tags. TQSimpleRichText always uses the default mime source factory (see TQMimeSourceFactory::defaultFactory()) to resolve those references. The context will then be used to calculate the absolute path. See TQMimeSourceFactory::makeAbsolute() for details. .PP The \fIsheet\fR is an optional style sheet. If it is 0, the default style sheet will be used (see TQStyleSheet::defaultSheet()). .PP -This constructor is useful for creating a QSimpleRichText object suitable for printing. Set \fIpageBreak\fR to be the height of the contents area of the pages. -.SH "QSimpleRichText::~QSimpleRichText ()" +This constructor is useful for creating a TQSimpleRichText object suitable for printing. Set \fIpageBreak\fR to be the height of the contents area of the pages. +.SH "TQSimpleRichText::~TQSimpleRichText ()" Destroys the rich text object, freeing memory. -.SH "void QSimpleRichText::adjustSize ()" +.SH "void TQSimpleRichText::adjustSize ()" Adjusts the richt text object to a reasonable size. .PP See also setWidth(). -.SH "TQString QSimpleRichText::anchorAt ( const TQPoint & pos ) const" +.SH "TQString TQSimpleRichText::anchorAt ( const TQPoint & pos ) const" Returns the anchor at the requested position, \fIpos\fR. An empty string is returned if no anchor is specified for this position. -.SH "TQString QSimpleRichText::context () const" +.SH "TQString TQSimpleRichText::context () const" Returns the context of the rich text object. If no context has been specified in the constructor, a null string is returned. The context is the path to use to look up relative links, such as image tags and anchor references. -.SH "void QSimpleRichText::draw ( TQPainter * p, int x, int y, const TQRect & clipRect, const TQColorGroup & cg, const TQBrush * paper = 0 ) const" +.SH "void TQSimpleRichText::draw ( TQPainter * p, int x, int y, const TQRect & clipRect, const TQColorGroup & cg, const TQBrush * paper = 0 ) const" Draws the formatted text with painter \fIp\fR, at position (\fIx\fR, \fIy\fR), clipped to \fIclipRect\fR. The clipping rectangle is given in the rich text object's coordinates translated by (\fIx\fR, \fIy\fR). Passing an null rectangle results in no clipping. Colors from the color group \fIcg\fR are used as needed, and if not 0, \fI*paper\fR is used as the background brush. .PP Note that the display code is highly optimized to reduce flicker, so passing a brush for \fIpaper\fR is preferable to simply clearing the area to be painted and then calling this without a brush. .PP Examples: .)l action/application.cpp, application/application.cpp, helpviewer/helpwindow.cpp, and mdi/application.cpp. -.SH "void QSimpleRichText::draw ( TQPainter * p, int x, int y, const TQRegion & clipRegion, const TQColorGroup & cg, const TQBrush * paper = 0 ) const" +.SH "void TQSimpleRichText::draw ( TQPainter * p, int x, int y, const TQRegion & clipRegion, const TQColorGroup & cg, const TQBrush * paper = 0 ) const" \fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code. .PP Use the version with clipRect instead. The region version has problems with larger documents on some platforms (on X11 regions internally are represented with 16bit coordinates). -.SH "int QSimpleRichText::height () const" +.SH "int TQSimpleRichText::height () const" Returns the height of the rich text object in pixels. .PP See also setWidth(). .PP Examples: .)l action/application.cpp, application/application.cpp, helpviewer/helpwindow.cpp, and mdi/application.cpp. -.SH "bool QSimpleRichText::inText ( const TQPoint & pos ) const" +.SH "bool TQSimpleRichText::inText ( const TQPoint & pos ) const" Returns TRUE if \fIpos\fR is within a text line of the rich text object; otherwise returns FALSE. -.SH "void QSimpleRichText::setDefaultFont ( const TQFont & f )" +.SH "void TQSimpleRichText::setDefaultFont ( const TQFont & f )" Sets the default font for the rich text object to \fIf\fR -.SH "void QSimpleRichText::setWidth ( TQPainter * p, int w )" +.SH "void TQSimpleRichText::setWidth ( TQPainter * p, int w )" Sets the width of the rich text object to \fIw\fR pixels, recalculating the layout as if it were to be drawn with painter \fIp\fR. .PP Passing a painter is useful when you intend drawing on devices other than the screen, for example a TQPrinter. @@ -139,17 +139,17 @@ See also height() and adjustSize(). .PP Examples: .)l action/application.cpp, application/application.cpp, helpviewer/helpwindow.cpp, and mdi/application.cpp. -.SH "void QSimpleRichText::setWidth ( int w )" +.SH "void TQSimpleRichText::setWidth ( int w )" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP Sets the width of the rich text object to \fIw\fR pixels. .PP See also height() and adjustSize(). -.SH "int QSimpleRichText::width () const" +.SH "int TQSimpleRichText::width () const" Returns the set width of the rich text object in pixels. .PP See also widthUsed(). -.SH "int QSimpleRichText::widthUsed () const" +.SH "int TQSimpleRichText::widthUsed () const" Returns the width in pixels that is actually used by the rich text object. This can be smaller or wider than the set width. .PP It may be wider, for example, if the text contains images or non-breakable words that are already wider than the available space. It's smaller when the object only consists of lines that do not fill the width completely. @@ -157,7 +157,7 @@ It may be wider, for example, if the text contains images or non-breakable words See also width(). .SH "SEE ALSO" -.BR http://doc.trolltech.com/ntqsimplerichtext.html +.BR http://doc.trolltech.com/tqsimplerichtext.html .BR http://www.trolltech.com/faq/tech.html .SH COPYRIGHT Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the diff --git a/doc/man/man3/tqsizepolicy.3qt b/doc/man/man3/tqsizepolicy.3qt index 96fae066b..541edca7a 100644 --- a/doc/man/man3/tqsizepolicy.3qt +++ b/doc/man/man3/tqsizepolicy.3qt @@ -132,7 +132,7 @@ This is the constructor normally used to return a value in the overridden TQWidg .PP It constructs a TQSizePolicy with independent horizontal and vertical sizing types, \fIhor\fR and \fIver\fR respectively. These sizing types affect how the widget is treated by the layout engine. .PP -If \fIhfw\fR is TRUE, the preferred height of the widget is dependent on the width of the widget (for example, a QLabel with line wrapping). +If \fIhfw\fR is TRUE, the preferred height of the widget is dependent on the width of the widget (for example, a TQLabel with line wrapping). .PP See also horData(), verData(), and hasHeightForWidth(). .SH "TQSizePolicy::TQSizePolicy ( SizeType hor, SizeType ver, uchar horStretch, uchar verStretch, bool hfw = FALSE )" diff --git a/doc/man/man3/tqsqlpropertymap.3qt b/doc/man/man3/tqsqlpropertymap.3qt index bf0e380aa..a41aeb310 100644 --- a/doc/man/man3/tqsqlpropertymap.3qt +++ b/doc/man/man3/tqsqlpropertymap.3qt @@ -123,7 +123,7 @@ Constructs a TQSqlPropertyMap. .PP The default property mappings used by TQt widgets are:
            .nf .TS -l - l. Widgets Property QCheckBox, QRadioButton checked QComboBox, QListBox currentItem TQDateEdit date TQDateTimeEdit dateTime TQTextBrowser source QButton, QDial, QLabel, QLineEdit, QMultiLineEdit, QPushButton, TQTextEdit, text TQTimeEdit time QLCDNumber, QScrollBar QSlider, QSpinBox +l - l. Widgets Property QCheckBox, QRadioButton checked QComboBox, QListBox currentItem TQDateEdit date TQDateTimeEdit dateTime TQTextBrowser source QButton, QDial, TQLabel, QLineEdit, QMultiLineEdit, QPushButton, TQTextEdit, text TQTimeEdit time QLCDNumber, QScrollBar QSlider, QSpinBox .TE .fi
            diff --git a/doc/man/man3/tqstatusbar.3qt b/doc/man/man3/tqstatusbar.3qt index b7871a461..10802279d 100644 --- a/doc/man/man3/tqstatusbar.3qt +++ b/doc/man/man3/tqstatusbar.3qt @@ -100,7 +100,7 @@ To display a \fItemporary\fR message, call message() (perhaps by connecting a su .br .fi .PP -\fINormal\fR and \fIPermanent\fR messages are displayed by creating a small widget and then adding it to the status bar with addWidget(). Widgets like QLabel, QProgressBar or even TQToolButton are useful for adding to status bars. removeWidget() is used to remove widgets. +\fINormal\fR and \fIPermanent\fR messages are displayed by creating a small widget and then adding it to the status bar with addWidget(). Widgets like TQLabel, QProgressBar or even TQToolButton are useful for adding to status bars. removeWidget() is used to remove widgets. .PP .nf .br @@ -117,7 +117,7 @@ By default TQStatusBar provides a TQSizeGrip in the lower-right corner. You can .ce 1 .B "[Image Omitted]" .PP -See also TQToolBar, TQMainWindow, QLabel, GUI Design Handbook: Status Bar, Main Window and Related Classes, and Help System. +See also TQToolBar, TQMainWindow, TQLabel, GUI Design Handbook: Status Bar, Main Window and Related Classes, and Help System. .SH MEMBER FUNCTION DOCUMENTATION .SH "TQStatusBar::TQStatusBar ( TQWidget * parent = 0, const char * name = 0 )" Constructs a status bar called \fIname\fR with parent \fIparent\fR and with a size grip. diff --git a/doc/man/man3/tqstring.3qt b/doc/man/man3/tqstring.3qt index 9a9fb8852..670cb7164 100644 --- a/doc/man/man3/tqstring.3qt +++ b/doc/man/man3/tqstring.3qt @@ -400,10 +400,10 @@ All the functions in this class are reentrant when TQt is built with thread supp .BI "TQChar \fBoperator[]\fR ( int i ) const" .br .ti -1c -.BI "QCharRef \fBat\fR ( uint i )" +.BI "TQCharRef \fBat\fR ( uint i )" .br .ti -1c -.BI "QCharRef \fBoperator[]\fR ( int i )" +.BI "TQCharRef \fBoperator[]\fR ( int i )" .br .ti -1c .BI "TQChar \fBconstref\fR ( uint i ) const" @@ -655,7 +655,7 @@ The 'copying' of input to output is almost as fast as copying a pointer because .PP If you wish to create a deep copy of a TQString without losing any Unicode information then you should use TQDeepCopy. .PP -See also TQChar, TQCString, TQByteArray, QConstString, Implicitly and Explicitly Shared Classes, Text Related Classes, and Non-GUI Classes. +See also TQChar, TQCString, TQByteArray, TQConstString, Implicitly and Explicitly Shared Classes, Text Related Classes, and Non-GUI Classes. .SS "Member Type Documentation" .SH "TQString::SectionFlags" .TP @@ -780,7 +780,7 @@ The \fIfieldWidth\fR value specifies the minimum amount of space that \fIa\fR is .PP \fIa\fR is expressed in base \fIbase\fR, which is 10 by default and must be between 2 and 36. .PP -The '%' can be followed by an 'L', in which case the sequence is replaced with a localized representation of \fIa\fR. The conversion uses the default locale. The default locale is determined from the system's locale settings at application startup. It can be changed using QLocale::setDefault(). The 'L' flag is ignored if \fIbase\fR is not 10. +The '%' can be followed by an 'L', in which case the sequence is replaced with a localized representation of \fIa\fR. The conversion uses the default locale. The default locale is determined from the system's locale settings at application startup. It can be changed using TQLocale::setDefault(). The 'L' flag is ignored if \fIbase\fR is not 10. .PP .nf .br @@ -793,7 +793,7 @@ The '%' can be followed by an 'L', in which case the sequence is replaced with a // str == "Decimal 63 is 3f in hexadecimal" .br .br - QLocale::setDefault(QLocale::English, QLocale::UnitedStates); + TQLocale::setDefault(TQLocale::English, TQLocale::UnitedStates); .br str = TQString( "%1 %L2 %L3" ) .br @@ -916,7 +916,7 @@ Returns the character at index \fIi\fR, or 0 if \fIi\fR is beyond the length of .fi .PP If the TQString is not const (i.e. const TQString) or const& (i.e. const TQString &), then the non-const overload of at() will be used instead. -.SH "QCharRef TQString::at ( uint i )" +.SH "TQCharRef TQString::at ( uint i )" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP The function returns a reference to the character at index \fIi\fR. The resulting reference can then be assigned to, or used immediately, but it will become invalid once further modifications are made to the original string. @@ -1553,14 +1553,14 @@ Sets the string to contain just the single character \fIc\fR. Returns the character at index \fIi\fR, or TQChar::null if \fIi\fR is beyond the length of the string. .PP If the TQString is not const (i.e., const TQString) or const& (i.e., const TQString&), then the non-const overload of operator[] will be used instead. -.SH "QCharRef TQString::operator[] ( int i )" +.SH "TQCharRef TQString::operator[] ( int i )" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP The function returns a reference to the character at index \fIi\fR. The resulting reference can then be assigned to, or used immediately, but it will become invalid once further modifications are made to the original string. .PP -If \fIi\fR is beyond the length of the string then the string is expanded with TQChar::nulls, so that the QCharRef references a valid (null) character in the string. +If \fIi\fR is beyond the length of the string then the string is expanded with TQChar::nulls, so that the TQCharRef references a valid (null) character in the string. .PP -The QCharRef internal class can be used much like a constant TQChar, but if you assign to it, you change the original string (which will detach itself because of TQString's copy-on-write semantics). You will get compilation errors if you try to use the result as anything but a TQChar. +The TQCharRef internal class can be used much like a constant TQChar, but if you assign to it, you change the original string (which will detach itself because of TQString's copy-on-write semantics). You will get compilation errors if you try to use the result as anything but a TQChar. .SH "TQString & TQString::prepend ( const TQString & s )" Inserts \fIs\fR at the beginning of the string and returns a reference to the string. .PP @@ -2147,7 +2147,7 @@ toULongLong() .TP toFloat() .TP -toDouble() can handle numbers represented in various locales. These representations may use different characters for the decimal point, thousands group sepearator and even individual digits. TQString's functions try to interpret the string according to the current locale. The current locale is determined from the system at application startup and can be changed by calling QLocale::setDefault(). If the string cannot be interpreted according to the current locale, this function falls back on the "C" locale. +toDouble() can handle numbers represented in various locales. These representations may use different characters for the decimal point, thousands group sepearator and even individual digits. TQString's functions try to interpret the string according to the current locale. The current locale is determined from the system at application startup and can be changed by calling TQLocale::setDefault(). If the string cannot be interpreted according to the current locale, this function falls back on the "C" locale. .PP .nf .br @@ -2156,14 +2156,14 @@ toDouble() can handle numbers represented in various locales. These representati double d; .br .br - QLocale::setDefault(QLocale::C); + TQLocale::setDefault(TQLocale::C); .br d = TQString( "1234,56" ).toDouble(&ok); // ok == false .br d = TQString( "1234.56" ).toDouble(&ok); // ok == true, d == 1234.56 .br .br - QLocale::setDefault(QLocale::German); + TQLocale::setDefault(TQLocale::German); .br d = TQString( "1234,56" ).toDouble(&ok); // ok == true, d == 1234.56 .br @@ -2171,13 +2171,13 @@ toDouble() can handle numbers represented in various locales. These representati .br .fi .PP -Due to the ambiguity between the decimal point and thousands group separator in various locales, these functions do not handle thousands group separators. If you need to convert such numbers, use the corresponding function in QLocale. +Due to the ambiguity between the decimal point and thousands group separator in various locales, these functions do not handle thousands group separators. If you need to convert such numbers, use the corresponding function in TQLocale. .PP .nf .br bool ok; .br - QLocale::setDefault(QLocale::C); + TQLocale::setDefault(TQLocale::C); .br double d = TQString( "1,234,567.89" ).toDouble(&ok); // ok == false .br @@ -2185,7 +2185,7 @@ Due to the ambiguity between the decimal point and thousands group separator in .PP \fBWarning:\fR If the string contains trailing whitespace this function will fail, and set \fI*ok\fR to false if \fIok\fR is not 0. Leading whitespace is ignored. .PP -See also number(), QLocale::setDefault(), QLocale::toDouble(), and stripWhiteSpace(). +See also number(), TQLocale::setDefault(), TQLocale::toDouble(), and stripWhiteSpace(). .SH "float TQString::toFloat ( bool * ok = 0 ) const" Returns the string converted to a \fCfloat\fR value. .PP diff --git a/doc/man/man3/tqstylesheet.3qt b/doc/man/man3/tqstylesheet.3qt index 5ff18ce22..c2d4a0922 100644 --- a/doc/man/man3/tqstylesheet.3qt +++ b/doc/man/man3/tqstylesheet.3qt @@ -58,7 +58,7 @@ Inherits TQObject. .SH DESCRIPTION The TQStyleSheet class is a collection of styles for rich text rendering and a generator of tags. .PP -By creating TQStyleSheetItem objects for a style sheet you build a definition of a set of tags. This definition will be used by the internal rich text rendering system to parse and display text documents to which the style sheet applies. Rich text is normally visualized in a TQTextEdit or a TQTextBrowser. However, QLabel, QWhatsThis and QMessageBox also support it, and other classes are likely to follow. With QSimpleRichText it is possible to use the rich text renderer for custom widgets as well. +By creating TQStyleSheetItem objects for a style sheet you build a definition of a set of tags. This definition will be used by the internal rich text rendering system to parse and display text documents to which the style sheet applies. Rich text is normally visualized in a TQTextEdit or a TQTextBrowser. However, TQLabel, TQWhatsThis and QMessageBox also support it, and other classes are likely to follow. With TQSimpleRichText it is possible to use the rich text renderer for custom widgets as well. .PP The default TQStyleSheet object has the following style bindings, sorted by structuring bindings, anchors, character style bindings (i.e. inline styles), special elements such as horizontal lines or images, and other tags. In addition, rich text supports simple HTML tables. .PP @@ -152,7 +152,7 @@ See also escape(). Examples: .)l action/application.cpp, application/application.cpp, and mdi/application.cpp. .SH "TQStyleSheet * TQStyleSheet::defaultSheet ()\fC [static]\fR" -Returns the application-wide default style sheet. This style sheet is used by rich text rendering classes such as QSimpleRichText, QWhatsThis and QMessageBox to define the rendering style and available tags within rich text documents. It also serves as the initial style sheet for the more complex render widgets, TQTextEdit and TQTextBrowser. +Returns the application-wide default style sheet. This style sheet is used by rich text rendering classes such as TQSimpleRichText, TQWhatsThis and QMessageBox to define the rendering style and available tags within rich text documents. It also serves as the initial style sheet for the more complex render widgets, TQTextEdit and TQTextBrowser. .PP See also setDefaultSheet(). .SH "void TQStyleSheet::error ( const TQString & msg ) const\fC [virtual]\fR" @@ -192,7 +192,7 @@ See also defaultSheet(). .PP Generates an internal object for the tag called \fIname\fR, given the attributes \fIattr\fR, and using additional information provided by the mime source factory \fIfactory\fR. .PP -\fIcontext\fR is the optional context of the document, i.e. the path to look for relative links. This becomes important if the text contains relative references, for example within image tags. QSimpleRichText always uses the default mime source factory (see TQMimeSourceFactory::defaultFactory()) to resolve these references. The context will then be used to calculate the absolute path. See TQMimeSourceFactory::makeAbsolute() for details. +\fIcontext\fR is the optional context of the document, i.e. the path to look for relative links. This becomes important if the text contains relative references, for example within image tags. TQSimpleRichText always uses the default mime source factory (see TQMimeSourceFactory::defaultFactory()) to resolve these references. The context will then be used to calculate the absolute path. See TQMimeSourceFactory::makeAbsolute() for details. .PP \fIemptyTag\fR and \fIdoc\fR are for internal use only. .PP diff --git a/doc/man/man3/tqsyntaxhighlighter.3qt b/doc/man/man3/tqsyntaxhighlighter.3qt index 058be188e..2d3e92973 100644 --- a/doc/man/man3/tqsyntaxhighlighter.3qt +++ b/doc/man/man3/tqsyntaxhighlighter.3qt @@ -1,5 +1,5 @@ '\" t -.TH QSyntaxHighlighter 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- +.TH TQSyntaxHighlighter 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- .\" Copyright 1992-2007 Trolltech ASA. All rights reserved. See the .\" license file included in the distribution for a complete license .\" statement. @@ -7,19 +7,19 @@ .ad l .nh .SH NAME -QSyntaxHighlighter \- Base class for implementing TQTextEdit syntax highlighters +TQSyntaxHighlighter \- Base class for implementing TQTextEdit syntax highlighters .SH SYNOPSIS -\fC#include \fR +\fC#include \fR .PP Inherits Qt. .PP .SS "Public Members" .in +1c .ti -1c -.BI "\fBQSyntaxHighlighter\fR ( TQTextEdit * textEdit )" +.BI "\fBTQSyntaxHighlighter\fR ( TQTextEdit * textEdit )" .br .ti -1c -.BI "virtual \fB~QSyntaxHighlighter\fR ()" +.BI "virtual \fB~TQSyntaxHighlighter\fR ()" .br .ti -1c .BI "virtual int \fBhighlightParagraph\fR ( const TQString & text, int endStateOfLastPara ) = 0" @@ -44,27 +44,27 @@ Inherits Qt. .br .in -1c .SH DESCRIPTION -The QSyntaxHighlighter class is a base class for implementing TQTextEdit syntax highlighters. +The TQSyntaxHighlighter class is a base class for implementing TQTextEdit syntax highlighters. .PP A syntax highligher automatically highlights parts of the text in a TQTextEdit. Syntax highlighters are often used when the user is entering text in a specific format (for example, source code) and help the user to read the text and identify syntax errors. .PP -To provide your own syntax highlighting for TQTextEdit, you must subclass QSyntaxHighlighter and reimplement highlightParagraph(). +To provide your own syntax highlighting for TQTextEdit, you must subclass TQSyntaxHighlighter and reimplement highlightParagraph(). .PP -When you create an instance of your QSyntaxHighlighter subclass, pass it the TQTextEdit that you want the syntax highlighting to be applied to. After this your highlightParagraph() function will be called automatically whenever necessary. Use your highlightParagraph() function to apply formatting (e.g. setting the font and color) to the text that is passed to it. +When you create an instance of your TQSyntaxHighlighter subclass, pass it the TQTextEdit that you want the syntax highlighting to be applied to. After this your highlightParagraph() function will be called automatically whenever necessary. Use your highlightParagraph() function to apply formatting (e.g. setting the font and color) to the text that is passed to it. .PP See also Basic Widgets and Text Related Classes. .SH MEMBER FUNCTION DOCUMENTATION -.SH "QSyntaxHighlighter::QSyntaxHighlighter ( TQTextEdit * textEdit )" -Constructs the QSyntaxHighlighter and installs it on \fItextEdit\fR. +.SH "TQSyntaxHighlighter::TQSyntaxHighlighter ( TQTextEdit * textEdit )" +Constructs the TQSyntaxHighlighter and installs it on \fItextEdit\fR. .PP -It is the caller's responsibility to delete the QSyntaxHighlighter when it is no longer needed. -.SH "QSyntaxHighlighter::~QSyntaxHighlighter ()\fC [virtual]\fR" +It is the caller's responsibility to delete the TQSyntaxHighlighter when it is no longer needed. +.SH "TQSyntaxHighlighter::~TQSyntaxHighlighter ()\fC [virtual]\fR" Destructor. Uninstalls this syntax highlighter from the textEdit() -.SH "int QSyntaxHighlighter::currentParagraph () const" +.SH "int TQSyntaxHighlighter::currentParagraph () const" Returns the id of the paragraph which is highlighted, or -1 of no paragraph is currently highlighted. .PP Usually this function is called from within highlightParagraph(). -.SH "int QSyntaxHighlighter::highlightParagraph ( const TQString & text, int endStateOfLastPara )\fC [pure virtual]\fR" +.SH "int TQSyntaxHighlighter::highlightParagraph ( const TQString & text, int endStateOfLastPara )\fC [pure virtual]\fR" This function is called when necessary by the rich text engine, i.e. on paragraphs which have changed. .PP In your reimplementation you should parse the paragraph's \fItext\fR and call setFormat() as often as necessary to apply any font and color changes that you require. Your function must return a value which indicates the paragraph's end state: see below. @@ -80,22 +80,22 @@ The value you return is up to you. We recommend only returning 0 (to signify tha To find out which paragraph is highlighted, call currentParagraph(). .PP For example, if you're writing a simple C++ syntax highlighter, you might designate 1 to signify "in comment". For a paragraph that ended in the middle of a comment you'd return 1, and for other paragraphs you'd return 0. In your parsing code if \fIendStateOfLastPara\fR was 1, you would highlight the text as a C++ comment until you reached the closing \fC*\fR\fC/\fR. -.SH "void QSyntaxHighlighter::rehighlight ()" +.SH "void TQSyntaxHighlighter::rehighlight ()" Redoes the highlighting of the whole document. -.SH "void QSyntaxHighlighter::setFormat ( int start, int count, const TQFont & font, const TQColor & color )" +.SH "void TQSyntaxHighlighter::setFormat ( int start, int count, const TQFont & font, const TQColor & color )" This function is applied to the syntax highlighter's current paragraph (the text of which is passed to the highlightParagraph() function). .PP The specified \fIfont\fR and \fIcolor\fR are applied to the text from position \fIstart\fR for \fIcount\fR characters. (If \fIcount\fR is 0, nothing is done.) -.SH "void QSyntaxHighlighter::setFormat ( int start, int count, const TQColor & color )" +.SH "void TQSyntaxHighlighter::setFormat ( int start, int count, const TQColor & color )" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -.SH "void QSyntaxHighlighter::setFormat ( int start, int count, const TQFont & font )" +.SH "void TQSyntaxHighlighter::setFormat ( int start, int count, const TQFont & font )" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -.SH "TQTextEdit * QSyntaxHighlighter::textEdit () const" +.SH "TQTextEdit * TQSyntaxHighlighter::textEdit () const" Returns the TQTextEdit on which this syntax highlighter is installed .SH "SEE ALSO" -.BR http://doc.trolltech.com/ntqsyntaxhighlighter.html +.BR http://doc.trolltech.com/tqsyntaxhighlighter.html .BR http://www.trolltech.com/faq/tech.html .SH COPYRIGHT Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the diff --git a/doc/man/man3/tqt.3qt b/doc/man/man3/tqt.3qt index 631bac95b..0921bb909 100644 --- a/doc/man/man3/tqt.3qt +++ b/doc/man/man3/tqt.3qt @@ -11,7 +11,7 @@ Qt \- Namespace for miscellaneous identifiers that need to be global-like .SH SYNOPSIS \fC#include \fR .PP -Inherited by TQObject, TQPixmap, TQBrush, TQCanvasItem, QCursor, TQPainter, QEvent, TQIconViewItem, QKeySequence, QListViewItem, QCustomMenuItem, TQPen, TQStyleSheetItem, QSyntaxHighlighter, QTab, QTableItem, TQThread, TQToolTip, and QWhatsThis. +Inherited by TQObject, TQPixmap, TQBrush, TQCanvasItem, QCursor, TQPainter, QEvent, TQIconViewItem, QKeySequence, QListViewItem, QCustomMenuItem, TQPen, TQStyleSheetItem, TQSyntaxHighlighter, QTab, QTableItem, TQThread, TQToolTip, and TQWhatsThis. .PP .SS "Public Members" .in +1c @@ -1210,7 +1210,7 @@ You can use as many modifier flags as you want, except that SingleLine and WordB .PP Flags that are inappropriate for a given use (e.g. ShowPrefix to QGridLayout::addWidget()) are generally ignored. .SH "TQt::TextFormat" -This enum is used in widgets that can display both plain text and rich text, e.g. QLabel. It is used for deciding whether a text string should be interpreted as one or the other. This is normally done by passing one of the enum values to a setTextFormat() function. +This enum is used in widgets that can display both plain text and rich text, e.g. TQLabel. It is used for deciding whether a text string should be interpreted as one or the other. This is normally done by passing one of the enum values to a setTextFormat() function. .TP \fCQt::PlainText\fR - The text string is interpreted as a plain text string. .TP diff --git a/doc/man/man3/tqtextbrowser.3qt b/doc/man/man3/tqtextbrowser.3qt index 84d740581..b4d93f33c 100644 --- a/doc/man/man3/tqtextbrowser.3qt +++ b/doc/man/man3/tqtextbrowser.3qt @@ -108,7 +108,7 @@ This is to ensure that the factory is able to resolve the document names. .PP TQTextBrowser interprets the tags it processes in accordance with the default style sheet. Change the style sheet with setStyleSheet(); see TQStyleSheet for details. .PP -If you want to provide your users with editable rich text use TQTextEdit. If you want a text browser without hypertext navigation use TQTextEdit, and use TQTextEdit::setReadOnly() to disable editing. If you just need to display a small piece of rich text use QSimpleRichText or QLabel. +If you want to provide your users with editable rich text use TQTextEdit. If you want a text browser without hypertext navigation use TQTextEdit, and use TQTextEdit::setReadOnly() to disable editing. If you just need to display a small piece of rich text use TQSimpleRichText or TQLabel. .PP .ce 1 .B "[Image Omitted]" diff --git a/doc/man/man3/tqtextedit.3qt b/doc/man/man3/tqtextedit.3qt index cf041bf7b..b990e3b25 100644 --- a/doc/man/man3/tqtextedit.3qt +++ b/doc/man/man3/tqtextedit.3qt @@ -192,7 +192,7 @@ Inherited by QMultiLineEdit, TQTextBrowser, and TQTextView. .BI "uint \fBautoFormatting\fR () const" .br .ti -1c -.BI "QSyntaxHighlighter * \fBsyntaxHighlighter\fR () const" +.BI "TQSyntaxHighlighter * \fBsyntaxHighlighter\fR () const" .br .in -1c .SS "Public Slots" @@ -539,7 +539,7 @@ l - l. Mode Command Notes Plain Text Editor setTextFormat(PlainText) Set text wi .PP 1.A more complete API that supports setting margins, images, etc., is planned for a later TQt release. .PP -TQTextEdit can be used as a syntax highlighting editor when used in conjunction with QSyntaxHighlighter. +TQTextEdit can be used as a syntax highlighting editor when used in conjunction with TQSyntaxHighlighter. .PP We recommend that you always call setTextFormat() to set the mode you want to use. If you use AutoText then setText() and append() will try to determine whether the text they are given is plain text or rich text. If you use RichText then setText() and append() will assume that the text they are given is rich text. insert() simply inserts the text it is given. .PP @@ -553,7 +553,7 @@ The text edit documentation uses the following concepts: .PP TQTextEdit can display images (using TQMimeSourceFactory), lists and tables. If the text is too large to view within the text edit's viewport, scrollbars 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 styleSheet(). Custom tags can be created and placed in a custom style sheet. Change the style sheet with setStyleSheet(); see TQStyleSheet for details. The images identified by image tags are displayed if they can be interpreted using the text edit's TQMimeSourceFactory; see setMimeSourceFactory(). .PP -If you want a text browser with more navigation use TQTextBrowser. If you just need to display a small piece of rich text use QLabel or QSimpleRichText. +If you want a text browser with more navigation use TQTextBrowser. If you just need to display a small piece of rich text use TQLabel or TQSimpleRichText. .PP If you create a new TQTextEdit, and want to allow the user to edit rich text, call setTextFormat(TQt::RichText) to ensure that the text is treated as rich text. (Rich text uses HTML tags to set text formatting attributes. See TQStyleSheet for information on the HTML tags that are supported.). If you don't call setTextFormat() 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(TQt::PlainText) to preserve such text. .PP @@ -1215,8 +1215,8 @@ Examples: TQTextEdit is optimized for large amounts text. One of its optimizations is to format only the visible text, formatting the rest on demand, e.g. as the user scrolls, so you don't usually need to call this function. .PP In some situations you may want to force the whole text to be formatted. For example, if after calling setText(), you wanted to know the height of the document (using contentsHeight()), you would call this function first. -.SH "QSyntaxHighlighter * TQTextEdit::syntaxHighlighter () const" -Returns the QSyntaxHighlighter set on this TQTextEdit. 0 is returned if no syntax highlighter is set. +.SH "TQSyntaxHighlighter * TQTextEdit::syntaxHighlighter () const" +Returns the TQSyntaxHighlighter set on this TQTextEdit. 0 is returned if no syntax highlighter is set. .SH "bool TQTextEdit::tabChangesFocus () const" Returns TRUE if TAB changes focus or is accepted as input; otherwise returns FALSE. See the "tabChangesFocus" property for details. .SH "int TQTextEdit::tabStopWidth () const" diff --git a/doc/man/man3/tqtooltip.3qt b/doc/man/man3/tqtooltip.3qt index efc66404f..5c1756001 100644 --- a/doc/man/man3/tqtooltip.3qt +++ b/doc/man/man3/tqtooltip.3qt @@ -163,7 +163,7 @@ You can retrieve the text of a tooltip for a given position within a widget usin .PP The global tooltip font and palette can be set with the static setFont() and setPalette() functions respectively. .PP -See also TQStatusBar, QWhatsThis, TQToolTipGroup, GUI Design Handbook: Tool Tip, and Help System. +See also TQStatusBar, TQWhatsThis, TQToolTipGroup, GUI Design Handbook: Tool Tip, and Help System. .SH MEMBER FUNCTION DOCUMENTATION .SH "TQToolTip::TQToolTip ( TQWidget * widget, TQToolTipGroup * group = 0 )" Constructs a tool tip object. This is only necessary if you need tool tips on regions that can move within the widget (most often because the widget's contents can scroll). diff --git a/doc/man/man3/tqwhatsthis.3qt b/doc/man/man3/tqwhatsthis.3qt index 0912cee25..40de1c1ab 100644 --- a/doc/man/man3/tqwhatsthis.3qt +++ b/doc/man/man3/tqwhatsthis.3qt @@ -1,5 +1,5 @@ '\" t -.TH QWhatsThis 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- +.TH TQWhatsThis 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- .\" Copyright 1992-2007 Trolltech ASA. All rights reserved. See the .\" license file included in the distribution for a complete license .\" statement. @@ -7,19 +7,19 @@ .ad l .nh .SH NAME -QWhatsThis \- Simple description of any widget, i.e. answering the question "What's this?" +TQWhatsThis \- Simple description of any widget, i.e. answering the question "What's this?" .SH SYNOPSIS -\fC#include \fR +\fC#include \fR .PP Inherits Qt. .PP .SS "Public Members" .in +1c .ti -1c -.BI "\fBQWhatsThis\fR ( TQWidget * widget )" +.BI "\fBTQWhatsThis\fR ( TQWidget * widget )" .br .ti -1c -.BI "virtual \fB~QWhatsThis\fR ()" +.BI "virtual \fB~TQWhatsThis\fR ()" .br .ti -1c .BI "virtual TQString \fBtext\fR ( const TQPoint & )" @@ -59,16 +59,16 @@ Inherits Qt. .br .in -1c .SH DESCRIPTION -The QWhatsThis class provides a simple description of any widget, i.e. answering the question "What's this?". +The TQWhatsThis class provides a simple description of any widget, i.e. answering the question "What's this?". .PP .PP" What's this?" help is part of an application's online help system that provides users with information about functionality, usage, background etc., in various levels of detail from short tool tips to full text browsing help windows. .PP -QWhatsThis provides a single window with an explanatory text that pops up when the user asks "What's this?". The default way to do this is to focus the relevant widget and press Shift+F1. The help text appears immediately; it goes away as soon as the user does something else. +TQWhatsThis provides a single window with an explanatory text that pops up when the user asks "What's this?". The default way to do this is to focus the relevant widget and press Shift+F1. The help text appears immediately; it goes away as soon as the user does something else. .PP (Note that if there is an accelerator for Shift+F1, this mechanism will not work.) .PP -To add "What's this?" text to a widget you simply call QWhatsThis::add() for the widget. For example, to assign text to a menu item, call TQMenuData::setWhatsThis(); for a global accelerator key, call QAccel::setWhatsThis() and If you're using actions, use TQAction::setWhatsThis(). +To add "What's this?" text to a widget you simply call TQWhatsThis::add() for the widget. For example, to assign text to a menu item, call TQMenuData::setWhatsThis(); for a global accelerator key, call QAccel::setWhatsThis() and If you're using actions, use TQAction::setWhatsThis(). .PP The text can be either rich text or plain text. If you specify a rich text formatted string, it will be rendered using the default stylesheet. This makes it possible to embed images. See TQStyleSheet::defaultSheet() for details. .PP @@ -89,7 +89,7 @@ The text can be either rich text or plain text. If you specify a rich text forma fileOpenAction->setWhatsThis( fileOpenText ); .fi .PP -An alternative way to enter "What's this?" mode is to use the ready-made tool bar tool button from QWhatsThis::whatsThisButton(). By invoking this context help button (in the picture below the first one from the right) the user switches into "What's this?" mode. If they now click on a widget the appropriate help text is shown. The mode is left when help is given or when the user presses Esc. +An alternative way to enter "What's this?" mode is to use the ready-made tool bar tool button from TQWhatsThis::whatsThisButton(). By invoking this context help button (in the picture below the first one from the right) the user switches into "What's this?" mode. If they now click on a widget the appropriate help text is shown. The mode is left when help is given or when the user presses Esc. .PP
            .ce 1 @@ -99,21 +99,21 @@ An alternative way to enter "What's this?" mode is to use the ready-made tool ba .PP If you are using TQMainWindow you can also use the TQMainWindow::whatsThis() slot to invoke the mode from a menu item. .PP -For more control you can create a dedicated QWhatsThis object for a special widget. By subclassing and reimplementing QWhatsThis::text() it is possible to have different help texts, depending on the position of the mouse click. By reimplementing QWhatsThis::clicked() it is possible to have hyperlinks inside the help texts. +For more control you can create a dedicated TQWhatsThis object for a special widget. By subclassing and reimplementing TQWhatsThis::text() it is possible to have different help texts, depending on the position of the mouse click. By reimplementing TQWhatsThis::clicked() it is possible to have hyperlinks inside the help texts. .PP If you wish to control the "What's this?" behavior of a widget manually see TQWidget::customWhatsThis(). .PP -The What's This object can be removed using QWhatsThis::remove(), although this is rarely necessary because it is automatically removed when the widget is destroyed. +The What's This object can be removed using TQWhatsThis::remove(), although this is rarely necessary because it is automatically removed when the widget is destroyed. .PP See also TQToolTip and Help System. .SH MEMBER FUNCTION DOCUMENTATION -.SH "QWhatsThis::QWhatsThis ( TQWidget * widget )" +.SH "TQWhatsThis::TQWhatsThis ( TQWidget * widget )" Constructs a dynamic "What's this?" object for \fIwidget\fR. The object is deleted when the \fIwidget\fR is destroyed. .PP -When the widget is queried by the user the text() function of this QWhatsThis will be called to provide the appropriate text, rather than using the text assigned by add(). -.SH "QWhatsThis::~QWhatsThis ()\fC [virtual]\fR" +When the widget is queried by the user the text() function of this TQWhatsThis will be called to provide the appropriate text, rather than using the text assigned by add(). +.SH "TQWhatsThis::~TQWhatsThis ()\fC [virtual]\fR" Destroys the object and frees any allocated resources. -.SH "void QWhatsThis::add ( TQWidget * widget, const TQString & text )\fC [static]\fR" +.SH "void TQWhatsThis::add ( TQWidget * widget, const TQString & text )\fC [static]\fR" Adds \fItext\fR as "What's this" help for \fIwidget\fR. If the text is rich text formatted (i.e. it contains markup) it will be rendered with the default stylesheet TQStyleSheet::defaultSheet(). .PP The text is destroyed if the widget is later destroyed, so it need not be explicitly removed. @@ -122,19 +122,19 @@ See also remove(). .PP Examples: .)l application/application.cpp, helpsystem/mainwindow.cpp, and mdi/application.cpp. -.SH "bool QWhatsThis::clicked ( const TQString & href )\fC [virtual]\fR" +.SH "bool TQWhatsThis::clicked ( const TQString & href )\fC [virtual]\fR" This virtual function is called when the user clicks inside the" What's this?" window. \fIhref\fR is the link the user clicked on, or TQString::null if there was no link. .PP If the function returns TRUE (the default), the "What's this?" window is closed, otherwise it remains visible. .PP The default implementation ignores \fIhref\fR and returns TRUE. -.SH "void QWhatsThis::display ( const TQString & text, const TQPoint & pos = QCursor::pos ( ), TQWidget * w = 0 )\fC [static]\fR" +.SH "void TQWhatsThis::display ( const TQString & text, const TQPoint & pos = QCursor::pos ( ), TQWidget * w = 0 )\fC [static]\fR" Display \fItext\fR in a help window at the global screen position \fIpos\fR. .PP -If widget \fIw\fR is not 0 and has its own dedicated QWhatsThis object, this object will receive clicked() messages when the user clicks on hyperlinks inside the help text. +If widget \fIw\fR is not 0 and has its own dedicated TQWhatsThis object, this object will receive clicked() messages when the user clicks on hyperlinks inside the help text. .PP -See also QWhatsThis::clicked(). -.SH "void QWhatsThis::enterWhatsThisMode ()\fC [static]\fR" +See also TQWhatsThis::clicked(). +.SH "void TQWhatsThis::enterWhatsThisMode ()\fC [static]\fR" Enters "What's this?" mode and returns immediately. .PP Qt will install a special cursor and take over mouse input until the user clicks somewhere. It then shows any help available and ends "What's this?" mode. Finally, TQt removes the special cursor and help window and then restores ordinary event processing, at which point the left mouse button is no longer pressed. @@ -142,47 +142,47 @@ Qt will install a special cursor and take over mouse input until the user clicks The user can also use the Esc key to leave "What's this?" mode. .PP See also inWhatsThisMode() and leaveWhatsThisMode(). -.SH "bool QWhatsThis::inWhatsThisMode ()\fC [static]\fR" +.SH "bool TQWhatsThis::inWhatsThisMode ()\fC [static]\fR" Returns TRUE if the application is in "What's this?" mode; otherwise returns FALSE. .PP See also enterWhatsThisMode() and leaveWhatsThisMode(). -.SH "void QWhatsThis::leaveWhatsThisMode ( const TQString & text = TQString::null, const TQPoint & pos = QCursor::pos ( ), TQWidget * w = 0 )\fC [static]\fR" +.SH "void TQWhatsThis::leaveWhatsThisMode ( const TQString & text = TQString::null, const TQPoint & pos = QCursor::pos ( ), TQWidget * w = 0 )\fC [static]\fR" Leaves "What's this?" question mode. .PP This function is used internally by widgets that support TQWidget::customWhatsThis(); applications do not usually call it. An example of such a widget is TQPopupMenu: menus still work normally in "What's this?" mode but also provide help texts for individual menu items. .PP -If \fItext\fR is not TQString::null, a "What's this?" help window is displayed at the global screen position \fIpos\fR. If widget \fIw\fR is not 0 and has its own dedicated QWhatsThis object, this object will receive clicked() messages when the user clicks on hyperlinks inside the help text. +If \fItext\fR is not TQString::null, a "What's this?" help window is displayed at the global screen position \fIpos\fR. If widget \fIw\fR is not 0 and has its own dedicated TQWhatsThis object, this object will receive clicked() messages when the user clicks on hyperlinks inside the help text. .PP -See also inWhatsThisMode(), enterWhatsThisMode(), and QWhatsThis::clicked(). -.SH "void QWhatsThis::remove ( TQWidget * widget )\fC [static]\fR" +See also inWhatsThisMode(), enterWhatsThisMode(), and TQWhatsThis::clicked(). +.SH "void TQWhatsThis::remove ( TQWidget * widget )\fC [static]\fR" Removes the "What's this?" help associated with the \fIwidget\fR. This happens automatically if the widget is destroyed. .PP See also add(). -.SH "void QWhatsThis::setFont ( const TQFont & font )\fC [static]\fR" +.SH "void TQWhatsThis::setFont ( const TQFont & font )\fC [static]\fR" Sets the font for all "What's this?" helps to \fIfont\fR. -.SH "TQString QWhatsThis::text ( const TQPoint & )\fC [virtual]\fR" +.SH "TQString TQWhatsThis::text ( const TQPoint & )\fC [virtual]\fR" This virtual function returns the text for position \fIp\fR in the widget that this "What's this?" object documents. If there is no" What's this?" text for the position, TQString::null is returned. .PP The default implementation returns TQString::null. -.SH "TQString QWhatsThis::textFor ( TQWidget * w, const TQPoint & pos = TQPoint ( ), bool includeParents = FALSE )\fC [static]\fR" +.SH "TQString TQWhatsThis::textFor ( TQWidget * w, const TQPoint & pos = TQPoint ( ), bool includeParents = FALSE )\fC [static]\fR" Returns the what's this text for widget \fIw\fR or TQString::null if there is no "What's this?" help for the widget. \fIpos\fR contains the mouse position; this is useful, for example, if you've subclassed to make the text that is displayed position dependent. .PP If \fIincludeParents\fR is TRUE, parent widgets are taken into consideration as well when looking for what's this help text. .PP See also add(). -.SH "TQToolButton * QWhatsThis::whatsThisButton ( TQWidget * parent )\fC [static]\fR" +.SH "TQToolButton * TQWhatsThis::whatsThisButton ( TQWidget * parent )\fC [static]\fR" Creates a TQToolButton preconfigured to enter "What's this?" mode when clicked. You will often use this with a tool bar as \fIparent\fR: .PP .nf .br - (void) QWhatsThis::whatsThisButton( my_help_tool_bar ); + (void) TQWhatsThis::whatsThisButton( my_help_tool_bar ); .br .fi .PP Example: helpsystem/mainwindow.cpp. .SH "SEE ALSO" -.BR http://doc.trolltech.com/ntqwhatsthis.html +.BR http://doc.trolltech.com/tqwhatsthis.html .BR http://www.trolltech.com/faq/tech.html .SH COPYRIGHT Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the diff --git a/doc/man/man3/tqwidget.3qt b/doc/man/man3/tqwidget.3qt index bc612f78d..3d4822f35 100644 --- a/doc/man/man3/tqwidget.3qt +++ b/doc/man/man3/tqwidget.3qt @@ -1146,7 +1146,7 @@ Example: .PP .nf .br - QLabel *splashScreen = new QLabel( 0, "mySplashScreen", + TQLabel *splashScreen = new TQLabel( 0, "mySplashScreen", .br WStyle_Customize | WStyle_Splash ); .br @@ -2079,7 +2079,7 @@ See also focusProxy(). .SH "void TQWidget::setFont ( const TQFont & )\fC [virtual]\fR" Sets the font currently set for the widget. See the "font" property for details. .PP -Reimplemented in QComboBox, QLabel, and QTabDialog. +Reimplemented in QComboBox, TQLabel, and QTabDialog. .SH "void TQWidget::setFont ( const TQFont & f, bool )" \fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code. .PP @@ -2646,11 +2646,11 @@ This property holds whether the widget wants to handle What's This help manually .PP The default implementation of customWhatsThis() returns FALSE, which means the widget will not receive any events in Whats This mode. .PP -The widget may leave What's This mode by calling QWhatsThis::leaveWhatsThisMode(), with or without actually displaying any help text. +The widget may leave What's This mode by calling TQWhatsThis::leaveWhatsThisMode(), with or without actually displaying any help text. .PP -You can also reimplement customWhatsThis() if your widget is a" passive interactor" supposed to work under all circumstances. Simply don't call QWhatsThis::leaveWhatsThisMode() in that case. +You can also reimplement customWhatsThis() if your widget is a" passive interactor" supposed to work under all circumstances. Simply don't call TQWhatsThis::leaveWhatsThisMode() in that case. .PP -See also QWhatsThis::inWhatsThisMode() and QWhatsThis::leaveWhatsThisMode(). +See also TQWhatsThis::inWhatsThisMode() and TQWhatsThis::leaveWhatsThisMode(). .PP Get this property's value with customWhatsThis(). .SH "bool enabled" diff --git a/doc/pictures.doc b/doc/pictures.doc index 8fe1192ce..f325c1bed 100644 --- a/doc/pictures.doc +++ b/doc/pictures.doc @@ -134,7 +134,7 @@ like in this screenshot. The screenshot below shows a \l QTabDialog. The tabs (\l QTabBar) or the more convenient class \l QTabWidget, which combines a tab bar with the pages, can be used separately. In the visible page you see a \l -QLabel, the range controls \l QSlider and \l QSpinBox and below a \l +TQLabel, the range controls \l QSlider and \l QSpinBox and below a \l QLCDNumber. In the bottom row there are some \l {QPushButton}s. \img qtabdlg-w.png diff --git a/doc/porting3.doc b/doc/porting3.doc index 3da5dab47..1ab796639 100644 --- a/doc/porting3.doc +++ b/doc/porting3.doc @@ -286,8 +286,8 @@ new code. \i TQFontDatabase::smoothSizes( const TQString \& family, const TQString \& style, const TQString \& ) \i TQFontDatabase::styles( const TQString \& family, const TQString \& ) const \i TQFontDatabase::weight( const TQString \& family, const TQString \& style, const TQString \& ) const -\i QLabel::autoResize() const -\i QLabel::setAutoResize( bool enable ) +\i TQLabel::autoResize() const +\i TQLabel::setAutoResize( bool enable ) \i QListBox::cellHeight( int i ) const \i QListBox::cellHeight() const \i QListBox::cellWidth() const @@ -317,7 +317,7 @@ new code. \i TQRegExp::match( const TQString \& str, int index = 0, int *len = 0, bool indexIsStart = TRUE ) const \i QScrollView::childIsVisible( TQWidget *child ) \i QScrollView::showChild( TQWidget *child, bool show = TRUE ) -\i QSimpleRichText::draw( TQPainter *p, int x, int y, const TQRegion \& clipRegion, const TQColorGroup \& cg, const TQBrush *paper = 0 ) const +\i TQSimpleRichText::draw( TQPainter *p, int x, int y, const TQRegion \& clipRegion, const TQColorGroup \& cg, const TQBrush *paper = 0 ) const \i TQString::ascii() const \i TQString::data() const \i TQString::setExpand( uint index, TQChar c ) diff --git a/doc/tutorial.doc b/doc/tutorial.doc index 43a2068f3..6528e00e8 100644 --- a/doc/tutorial.doc +++ b/doc/tutorial.doc @@ -1741,10 +1741,10 @@ The LCDRange now has a text label. \quotefile t12/lcdrange.h -\skipto QLabel -\printline QLabel +\skipto TQLabel +\printline TQLabel -We name declare QLabel because we want to use a pointer to it in the class +We name declare TQLabel because we want to use a pointer to it in the class definition. \skipto class @@ -1771,10 +1771,10 @@ This slot sets the label text. Because we now have two constructors, we have chosen to put the common initialization in the private init() function. -\skipto QLabel +\skipto TQLabel \printline label -We also have a new private variable: a QLabel. QLabel is one of Qt's +We also have a new private variable: a TQLabel. TQLabel is one of Qt's standard widgets and can show a text or a pixmap with or without a frame. @@ -1783,10 +1783,10 @@ frame. \quotefile t12/lcdrange.cpp -\skipto qlabel +\skipto tqlabel \printline include -Here we include the QLabel class definition. +Here we include the TQLabel class definition. \skipto ::LCDRange \printuntil } @@ -1803,7 +1803,7 @@ This constructor first calls init() and then sets the label text. \printuntil } The setup of \c lcd and \c slider is the same as in the previous -chapter. Next we create a QLabel and tell it to align the contents +chapter. Next we create a TQLabel and tell it to align the contents centered (both vertically and horizontally). The connect() statements have also been taken from the previous chapter. @@ -2281,10 +2281,10 @@ with the other buttons. Clicking this button will activate the newGame() slot in this widget. \printuntil shotsLeftL -\printline QLabel +\printline TQLabel We create four new widgets. Note that we don't bother to keep the -pointers to the QLabel widgets in the GameBoard class because there's +pointers to the TQLabel widgets in the GameBoard class because there's nothing much we want to do with them. TQt will delete them when the GameBoard widget is destroyed, and the layout classes will resize them appropriately. diff --git a/doc/tutorial2.doc b/doc/tutorial2.doc index e9dc37dc7..be63894aa 100644 --- a/doc/tutorial2.doc +++ b/doc/tutorial2.doc @@ -1289,7 +1289,7 @@ All the widgets will be laid out within the form's vertical box layout. The chart type label and combobox will be laid out side by side. -\skipto QLabel +\skipto TQLabel \printuntil addLayout We create the chart type label (with an accelerator which we'll relate diff --git a/doc/unicode.doc b/doc/unicode.doc index 8eb99d8de..2d6f50707 100644 --- a/doc/unicode.doc +++ b/doc/unicode.doc @@ -111,7 +111,7 @@ in Western Europe or North America, but for fast typists or people using special input methods using text() is beneficial. All the function arguments in TQt that may be user-visible strings, \l -QLabel::setText() and a many others, take \c{const TQString &}s. +TQLabel::setText() and a many others, take \c{const TQString &}s. \l TQString provides implicit casting from \c{const char *} so that things like \code diff --git a/doc/xml-sax-features-walkthrough.doc b/doc/xml-sax-features-walkthrough.doc index 72ca41d2a..ee054a63c 100644 --- a/doc/xml-sax-features-walkthrough.doc +++ b/doc/xml-sax-features-walkthrough.doc @@ -73,7 +73,7 @@ part: we include all the classes we need: \skipto include \printline structureparser.h -\printuntil ntqlabel.h +\printuntil tqlabel.h \link #structureparser.h structureparser.h \endlink contains the API of the XML parser that we implement in \link #structureparser.cpp diff --git a/examples/README b/examples/README index d95703fbe..decd59dee 100644 --- a/examples/README +++ b/examples/README @@ -21,7 +21,7 @@ action It shows how to implement a typical modern application, how to create a TQMainWindow subclass, and how to create actions that can be assigned to menus (TQPopupMenu) and toolbars (TQToolBar) using - TQAction. It also shows how to print using QSimpleRichText. + TQAction. It also shows how to print using TQSimpleRichText. addressbook [obsolete] @@ -56,7 +56,7 @@ checklists cursor This example shows how to set the mouse cursor for a widget. Shows - Qt's cursors and a custom cursor using QLabel and QCursor. + Qt's cursors and a custom cursor using TQLabel and QCursor. customlayout This examples demonstrates how to write a customized layout @@ -136,7 +136,7 @@ helpdemo helpsystem This example shows how to implement context-sensitive help in - various ways in a TQt application using TQToolTip, QWhatsThis, and + various ways in a TQt application using TQToolTip, TQWhatsThis, and QAssistantClient to control TQt Assistant. helpviewer @@ -193,7 +193,7 @@ menu movies The Movies example displays animated GIF files using the TQMovie - and QLabel classes. + and TQLabel classes. network/archivesearch Shows how to use TQHttp to request and receive data from a web @@ -259,7 +259,7 @@ progress This example presents a long-running process (drawing lots of rectangles) and a QProgressDialog. Two types of progress dialog are offered, one that simply shows text, and a custom one that - shows an animation using a QLabel and a TQTimer. + shows an animation using a TQLabel and a TQTimer. progressbar Shows how to use a QProgressBar. diff --git a/examples/action/application.cpp b/examples/action/application.cpp index 0a6502a41..1687b2117 100644 --- a/examples/action/application.cpp +++ b/examples/action/application.cpp @@ -26,9 +26,9 @@ #include #include #include -#include +#include #include -#include +#include #include "filesave.xpm" #include "fileopen.xpm" diff --git a/examples/addressbook/centralwidget.cpp b/examples/addressbook/centralwidget.cpp index fb4255f1a..4a2a3f97c 100644 --- a/examples/addressbook/centralwidget.cpp +++ b/examples/addressbook/centralwidget.cpp @@ -13,10 +13,10 @@ #include #include #include -#include +#include #include #include -#include +#include #include #include #include diff --git a/examples/application/application.cpp b/examples/application/application.cpp index e1385fdff..8da8e9460 100644 --- a/examples/application/application.cpp +++ b/examples/application/application.cpp @@ -26,8 +26,8 @@ #include #include #include -#include -#include +#include +#include #include "filesave.xpm" #include "fileopen.xpm" diff --git a/examples/canvas/canvas.cpp b/examples/canvas/canvas.cpp index a6d410db7..fb04e1b03 100644 --- a/examples/canvas/canvas.cpp +++ b/examples/canvas/canvas.cpp @@ -6,7 +6,7 @@ #include #include #include -#include +#include #include #include #include "canvas.h" diff --git a/examples/chart/optionsform.cpp b/examples/chart/optionsform.cpp index dd2c8d2b8..09c05d4ef 100644 --- a/examples/chart/optionsform.cpp +++ b/examples/chart/optionsform.cpp @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/examples/checklists/checklists.cpp b/examples/checklists/checklists.cpp index aaf4fcd8a..f2a1cdbfb 100644 --- a/examples/checklists/checklists.cpp +++ b/examples/checklists/checklists.cpp @@ -11,7 +11,7 @@ #include #include -#include +#include #include #include #include diff --git a/examples/cursor/cursor.cpp b/examples/cursor/cursor.cpp index 253d9a8d2..661c32a44 100644 --- a/examples/cursor/cursor.cpp +++ b/examples/cursor/cursor.cpp @@ -7,7 +7,7 @@ ** *****************************************************************************/ -#include +#include #include #include #include diff --git a/examples/customlayout/main.cpp b/examples/customlayout/main.cpp index c988d9de9..33443dc32 100644 --- a/examples/customlayout/main.cpp +++ b/examples/customlayout/main.cpp @@ -14,7 +14,7 @@ #include "card.h" #include -#include +#include #include #include #include diff --git a/examples/demo/dnd/styledbutton.cpp b/examples/demo/dnd/styledbutton.cpp index 51e8968cf..ee393a106 100644 --- a/examples/demo/dnd/styledbutton.cpp +++ b/examples/demo/dnd/styledbutton.cpp @@ -35,7 +35,7 @@ #include #include -#include +#include #include #include #include diff --git a/examples/demo/graph.cpp b/examples/demo/graph.cpp index 07222f898..26b203455 100644 --- a/examples/demo/graph.cpp +++ b/examples/demo/graph.cpp @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include const int bounce_rtti = 1234; diff --git a/examples/demo/i18n/i18n.cpp b/examples/demo/i18n/i18n.cpp index 1986189a8..8e40398d4 100644 --- a/examples/demo/i18n/i18n.cpp +++ b/examples/demo/i18n/i18n.cpp @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include diff --git a/examples/demo/qasteroids/toplevel.cpp b/examples/demo/qasteroids/toplevel.cpp index c2a22ea14..d40ea72a6 100644 --- a/examples/demo/qasteroids/toplevel.cpp +++ b/examples/demo/qasteroids/toplevel.cpp @@ -5,7 +5,7 @@ */ // --- toplevel.cpp --- #include -#include +#include #include #include #include diff --git a/examples/demo/textdrawing/example.html b/examples/demo/textdrawing/example.html index 12d21ff72..a4fe80929 100644 --- a/examples/demo/textdrawing/example.html +++ b/examples/demo/textdrawing/example.html @@ -11,10 +11,10 @@ a:visited { color: #672967; text-decoration: none }body { background: white; col The TQLabel widget provides a static information display More...

            -#include <ntqlabel.h> +#include <tqlabel.h>

            Inherits TQFrame. -

            List of all member functions. +

            List of all member functions.

            Public Members

            • TQLabel(TQWidget*parent, constchar*name=0, WFlagsf=0)
              @@ -87,7 +87,7 @@ positioning of the content within the TQLabel widget area can be tuned with setAlignment() and setIndent(). For example, this code sets up a sunken panel with a two-line text in the bottom right corner (both lines being flush with the right side of the label): -

                  TQLabel *label = new TQLabel;
              +

                  TQLabel *label = new TQLabel;
                   label->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
                   label->setText( "first line\nsecond line" );
                   label->setAlignment( AlignBottom | AlignRight );
              @@ -97,7 +97,7 @@ widget. For this use, TQLabel provides a handy mechanism for adding
               an accelerator key (see TQAccel) that will set the keyboard focus to
               the other widget (called the TQLabel's "buddy"). Example:
               

                   TQLineEdit* phoneEdit = new TQLineEdit( this, "phoneEdit" );
              -     TQLabel* phoneLabel = new TQLabel( phoneEdit, "&Phone:", this, "phoneLabel" );
              +     TQLabel* phoneLabel = new TQLabel( phoneEdit, "&Phone:", this, "phoneLabel" );
               

              In this example, keyboard focus is transferred to the label's buddy (the TQLineEdit) when the user presses Alt-P. You can also @@ -224,10 +224,10 @@ alignment flag is turned on; see setAlignment()). each, and set up the geometry layout so each label is just to the left of its data entry widget (its "buddy"), somewhat like this:

                  TQLineEdit *nameEd  = new TQLineEdit( this );
              -    TQLabel    *nameLb  = new TQLabel( "&Name:", this );
              +    TQLabel    *nameLb  = new TQLabel( "&Name:", this );
                   nameLb->setBuddy( nameEd );
                   TQLineEdit *phoneEd = new TQLineEdit( this );
              -    TQLabel    *phoneLb = new TQLabel( "&Phone:", this );
              +    TQLabel    *phoneLb = new TQLabel( "&Phone:", this );
                   phoneLb->setBuddy( phoneEd );
                   // ( layout setup not shown )
               
              @@ -293,7 +293,7 @@ the format of text.

              If text is interpreted as a plain text, and a buddy has been set, the buddy accelerator key is updated from the new text.

              The label resizes itself if auto-resizing is enabled. -

              Note that Qlabel is well suited to display small rich text documents +

              Note that TQLabel is well suited to display small rich text documents only. For large documents, use TQTextView instead. It will flicker less on resize and can also provide a scrollbar if necessary.

              See also text(), setTextFormat(), setBuddy() and setAlignment(). diff --git a/examples/demo/textdrawing/helpwindow.cpp b/examples/demo/textdrawing/helpwindow.cpp index 90ed211d4..6859d57e7 100644 --- a/examples/demo/textdrawing/helpwindow.cpp +++ b/examples/demo/textdrawing/helpwindow.cpp @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include diff --git a/examples/demo/textdrawing/textedit.cpp b/examples/demo/textdrawing/textedit.cpp index 66e7e8b11..f2017762f 100644 --- a/examples/demo/textdrawing/textedit.cpp +++ b/examples/demo/textdrawing/textedit.cpp @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include diff --git a/examples/dragdrop/dropsite.h b/examples/dragdrop/dropsite.h index 0714bbb3b..fa58eb25d 100644 --- a/examples/dragdrop/dropsite.h +++ b/examples/dragdrop/dropsite.h @@ -14,7 +14,7 @@ #ifndef DROPSITE_H #define DROPSITE_H -#include +#include #include #include "tqdropsite.h" diff --git a/examples/dragdrop/main.cpp b/examples/dragdrop/main.cpp index 91244fd83..acc721b8f 100644 --- a/examples/dragdrop/main.cpp +++ b/examples/dragdrop/main.cpp @@ -14,7 +14,7 @@ #include "secret.h" #include #include -#include +#include #include static void addStuff( TQWidget * parent, bool image, bool secret = FALSE ) diff --git a/examples/dragdrop/secret.h b/examples/dragdrop/secret.h index b05547944..b7d9d257a 100644 --- a/examples/dragdrop/secret.h +++ b/examples/dragdrop/secret.h @@ -15,7 +15,7 @@ #define SECRETDRAG_H #include -#include +#include class SecretDrag: public TQStoredDrag { public: diff --git a/examples/fileiconview/mainwindow.cpp b/examples/fileiconview/mainwindow.cpp index 1a508be52..eccf8885a 100644 --- a/examples/fileiconview/mainwindow.cpp +++ b/examples/fileiconview/mainwindow.cpp @@ -13,7 +13,7 @@ #include #include -#include +#include #include #include #include diff --git a/examples/helpsystem/helpsystem.doc b/examples/helpsystem/helpsystem.doc index 89107b08e..8c0906964 100644 --- a/examples/helpsystem/helpsystem.doc +++ b/examples/helpsystem/helpsystem.doc @@ -8,7 +8,7 @@ that can be used to provide context sensitive help in an application. - It uses TQToolTip and QWhatsThis to provide both static and + It uses TQToolTip and TQWhatsThis to provide both static and dynamic balloon help for the widgets in the application, and TQToolTipGroup to display extended information for each tooltip in the statusbar. QAssistantClient is used to display help @@ -77,7 +77,7 @@ The WhatsThis class is a subclass of both TQObject and - QWhatsThis and serves as a base class for the HeaderWhatsThis + TQWhatsThis and serves as a base class for the HeaderWhatsThis and TableWhatsThis classes. \footnote Note that moc requires that TQObject is the first base class. \endfootnote WhatsThis reimplements clicked() which will be called when the user clicks @@ -91,7 +91,7 @@ but some widgets, like QTable, are more complex and have a viewport() widget which receives the events. If such a widget is passed to the constructor it will propagate the parameter to - the QWhatsThis constructor and store the TQWidget pointer itself + the TQWhatsThis constructor and store the TQWidget pointer itself in it's member variable to allow easier use of the TQWidget API later on. \skipto bool WhatsThis::clicked @@ -124,7 +124,7 @@ a string which states the header's orientation and section. \footnote Note that we have to explicitly scope the orientation - (TQObject or QWhatsThis) since HeaderWhatsThis uses multiple + (TQObject or TQWhatsThis) since HeaderWhatsThis uses multiple inheritance. \endfootnote \printuntil } @@ -165,7 +165,7 @@ The MainWindow constructor creates an instance of QAssistantClient using TQString::null as the first argument so that the system path is used. - \printto QWhatsThis::whatsThisButton + \printto TQWhatsThis::whatsThisButton A QTable is used as the central widget and the table, the menus and the toolbar are populated. diff --git a/examples/helpsystem/whatsthis.h b/examples/helpsystem/whatsthis.h index 85a77fee5..d9cda8ddc 100644 --- a/examples/helpsystem/whatsthis.h +++ b/examples/helpsystem/whatsthis.h @@ -10,7 +10,7 @@ #ifndef WHATSTHIS_H #define WHATSTHIS_H -#include +#include class TQHeader; class TQTable; diff --git a/examples/helpviewer/helpwindow.cpp b/examples/helpviewer/helpwindow.cpp index 2954fd2b3..9d1a7cd1f 100644 --- a/examples/helpviewer/helpwindow.cpp +++ b/examples/helpviewer/helpwindow.cpp @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include diff --git a/examples/i18n/mywidget.cpp b/examples/i18n/mywidget.cpp index def27cba0..ce9218ce7 100644 --- a/examples/i18n/mywidget.cpp +++ b/examples/i18n/mywidget.cpp @@ -9,10 +9,10 @@ #include #include -#include +#include #include #include -#include +#include #include #include #include diff --git a/examples/layout/layout.cpp b/examples/layout/layout.cpp index 872a31d25..3bf6070cc 100644 --- a/examples/layout/layout.cpp +++ b/examples/layout/layout.cpp @@ -8,7 +8,7 @@ *****************************************************************************/ #include -#include +#include #include #include #include diff --git a/examples/life/lifedlg.cpp b/examples/life/lifedlg.cpp index 8fcb0c231..7f1371b6f 100644 --- a/examples/life/lifedlg.cpp +++ b/examples/life/lifedlg.cpp @@ -10,7 +10,7 @@ #include "lifedlg.h" #include #include -#include +#include #include #include #include diff --git a/examples/lineedits/lineedits.cpp b/examples/lineedits/lineedits.cpp index 6e778c62d..d4d42597a 100644 --- a/examples/lineedits/lineedits.cpp +++ b/examples/lineedits/lineedits.cpp @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include diff --git a/examples/listbox/listbox.cpp b/examples/listbox/listbox.cpp index 6f0a018b6..af9b4b2aa 100644 --- a/examples/listbox/listbox.cpp +++ b/examples/listbox/listbox.cpp @@ -9,7 +9,7 @@ #include "listbox.h" -#include +#include #include #include #include diff --git a/examples/listboxcombo/listboxcombo.cpp b/examples/listboxcombo/listboxcombo.cpp index dac9bdc12..1b5a719c4 100644 --- a/examples/listboxcombo/listboxcombo.cpp +++ b/examples/listboxcombo/listboxcombo.cpp @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/examples/listviews/listviews.cpp b/examples/listviews/listviews.cpp index adb02b743..dc5b84063 100644 --- a/examples/listviews/listviews.cpp +++ b/examples/listviews/listviews.cpp @@ -9,7 +9,7 @@ #include "listviews.h" -#include +#include #include #include #include diff --git a/examples/mdi/application.cpp b/examples/mdi/application.cpp index db6480560..458b8e751 100644 --- a/examples/mdi/application.cpp +++ b/examples/mdi/application.cpp @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include #include #include @@ -29,10 +29,10 @@ #include #include #include -#include +#include #include #include -#include +#include #include "filesave.xpm" #include "fileopen.xpm" diff --git a/examples/menu/menu.h b/examples/menu/menu.h index 3878d72c4..5bde69ec4 100644 --- a/examples/menu/menu.h +++ b/examples/menu/menu.h @@ -12,7 +12,7 @@ #include #include -#include +#include class MenuExample : public TQWidget diff --git a/examples/movies/main.cpp b/examples/movies/main.cpp index c94d51271..40fe25c4e 100644 --- a/examples/movies/main.cpp +++ b/examples/movies/main.cpp @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/examples/movies/movies.doc b/examples/movies/movies.doc index eba88ef3c..c894cfdb3 100644 --- a/examples/movies/movies.doc +++ b/examples/movies/movies.doc @@ -6,7 +6,7 @@ \title Movies or the Story of the Animated GIF file The Movies example displays MNG and animated GIF files using the TQMovie and - QLabel classes. + TQLabel classes. The movies will only read an animated GIF if GIF reading was enabled when TQt was built. diff --git a/examples/network/clientserver/client/client.cpp b/examples/network/clientserver/client/client.cpp index 81389ccc3..5d7eed62d 100644 --- a/examples/network/clientserver/client/client.cpp +++ b/examples/network/clientserver/client/client.cpp @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include diff --git a/examples/network/clientserver/server/server.cpp b/examples/network/clientserver/server/server.cpp index fef3b9f4a..0550e92fa 100644 --- a/examples/network/clientserver/server/server.cpp +++ b/examples/network/clientserver/server/server.cpp @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include diff --git a/examples/network/httpd/httpd.cpp b/examples/network/httpd/httpd.cpp index 57d897c81..448f87c2e 100644 --- a/examples/network/httpd/httpd.cpp +++ b/examples/network/httpd/httpd.cpp @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include diff --git a/examples/network/infoprotocol/infoclient/client.cpp b/examples/network/infoprotocol/infoclient/client.cpp index 696f35063..114296bc4 100644 --- a/examples/network/infoprotocol/infoclient/client.cpp +++ b/examples/network/infoprotocol/infoclient/client.cpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/examples/network/mail/composer.cpp b/examples/network/mail/composer.cpp index 51f690126..790a47153 100644 --- a/examples/network/mail/composer.cpp +++ b/examples/network/mail/composer.cpp @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include Composer::Composer( TQWidget *parent ) diff --git a/examples/network/networkprotocol/view.cpp b/examples/network/networkprotocol/view.cpp index 15084c5c5..55de084a6 100644 --- a/examples/network/networkprotocol/view.cpp +++ b/examples/network/networkprotocol/view.cpp @@ -9,7 +9,7 @@ #include "view.h" -#include +#include #include #include #include diff --git a/examples/network/remotecontrol/startup.cpp b/examples/network/remotecontrol/startup.cpp index 985ee4965..8f86840f3 100644 --- a/examples/network/remotecontrol/startup.cpp +++ b/examples/network/remotecontrol/startup.cpp @@ -4,7 +4,7 @@ #include "ipcserver.h" #include -#include +#include static const TQ_UINT16 ipcPort = 54923; diff --git a/examples/opengl/glpixmap/globjwin.cpp b/examples/opengl/glpixmap/globjwin.cpp index caee75e44..568117793 100644 --- a/examples/opengl/glpixmap/globjwin.cpp +++ b/examples/opengl/glpixmap/globjwin.cpp @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/examples/popup/popup.h b/examples/popup/popup.h index d8a282363..6145b2139 100644 --- a/examples/popup/popup.h +++ b/examples/popup/popup.h @@ -13,7 +13,7 @@ #ifndef POPUP_H #define POPUP_H -#include +#include #include #include diff --git a/examples/qfd/fontdisplayer.cpp b/examples/qfd/fontdisplayer.cpp index 0e77e7068..d690d155a 100644 --- a/examples/qfd/fontdisplayer.cpp +++ b/examples/qfd/fontdisplayer.cpp @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/examples/qmag/qmag.cpp b/examples/qmag/qmag.cpp index c3463f5b5..c6b810c77 100644 --- a/examples/qmag/qmag.cpp +++ b/examples/qmag/qmag.cpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include diff --git a/examples/rangecontrols/rangecontrols.cpp b/examples/rangecontrols/rangecontrols.cpp index bda0b70bf..808a2ec0d 100644 --- a/examples/rangecontrols/rangecontrols.cpp +++ b/examples/rangecontrols/rangecontrols.cpp @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/examples/regexptester/regexptester.cpp b/examples/regexptester/regexptester.cpp index d6cdd3b4a..13c6ca0e6 100644 --- a/examples/regexptester/regexptester.cpp +++ b/examples/regexptester/regexptester.cpp @@ -2,7 +2,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/examples/scrollview/scrollview.cpp b/examples/scrollview/scrollview.cpp index f7142c126..bfaa81f69 100644 --- a/examples/scrollview/scrollview.cpp +++ b/examples/scrollview/scrollview.cpp @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/examples/showimg/imagetexteditor.cpp b/examples/showimg/imagetexteditor.cpp index 66529190a..cbc09cfdb 100644 --- a/examples/showimg/imagetexteditor.cpp +++ b/examples/showimg/imagetexteditor.cpp @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/examples/showimg/showimg.cpp b/examples/showimg/showimg.cpp index 594d6c0e0..f9fe0a5d8 100644 --- a/examples/showimg/showimg.cpp +++ b/examples/showimg/showimg.cpp @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/examples/splitter/splitter.cpp b/examples/splitter/splitter.cpp index ee85f5d78..5d21e0b13 100644 --- a/examples/splitter/splitter.cpp +++ b/examples/splitter/splitter.cpp @@ -8,7 +8,7 @@ *****************************************************************************/ #include -#include +#include #include #include diff --git a/examples/sql/overview/custom1/main.h b/examples/sql/overview/custom1/main.h index 5eeb10ca7..c3c65a626 100644 --- a/examples/sql/overview/custom1/main.h +++ b/examples/sql/overview/custom1/main.h @@ -9,7 +9,7 @@ #include #include -#include +#include #include #include #include diff --git a/examples/sql/overview/form1/main.cpp b/examples/sql/overview/form1/main.cpp index 9779eb6de..5f3dd8f2e 100644 --- a/examples/sql/overview/form1/main.cpp +++ b/examples/sql/overview/form1/main.cpp @@ -9,7 +9,7 @@ #include #include -#include +#include #include #include #include diff --git a/examples/sql/overview/form2/main.h b/examples/sql/overview/form2/main.h index c626d588b..42d152d41 100644 --- a/examples/sql/overview/form2/main.h +++ b/examples/sql/overview/form2/main.h @@ -9,7 +9,7 @@ #include #include -#include +#include #include #include #include diff --git a/examples/tabdialog/tabdialog.cpp b/examples/tabdialog/tabdialog.cpp index 8813d7757..129013827 100644 --- a/examples/tabdialog/tabdialog.cpp +++ b/examples/tabdialog/tabdialog.cpp @@ -10,7 +10,7 @@ #include "tabdialog.h" #include -#include +#include #include #include #include diff --git a/examples/tablet/tabletstats.cpp b/examples/tablet/tabletstats.cpp index 8fb69a00f..106e0a83b 100644 --- a/examples/tablet/tabletstats.cpp +++ b/examples/tablet/tabletstats.cpp @@ -7,7 +7,7 @@ ** *****************************************************************************/ -#include +#include #include #include #include diff --git a/examples/tetrix/qtetrix.cpp b/examples/tetrix/qtetrix.cpp index 309a1095b..24ee17139 100644 --- a/examples/tetrix/qtetrix.cpp +++ b/examples/tetrix/qtetrix.cpp @@ -9,7 +9,7 @@ #include "qtetrix.h" #include -#include +#include #include diff --git a/examples/tetrix/qtetrix.h b/examples/tetrix/qtetrix.h index b15bbfb1a..b831f96dd 100644 --- a/examples/tetrix/qtetrix.h +++ b/examples/tetrix/qtetrix.h @@ -13,7 +13,7 @@ #include "qtetrixb.h" #include #include -#include +#include #include #include diff --git a/examples/textedit/textedit.cpp b/examples/textedit/textedit.cpp index ce416ccda..ed626896d 100644 --- a/examples/textedit/textedit.cpp +++ b/examples/textedit/textedit.cpp @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include diff --git a/examples/themes/metal.cpp b/examples/themes/metal.cpp index 01ac1e3ab..02ec1c4ad 100644 --- a/examples/themes/metal.cpp +++ b/examples/themes/metal.cpp @@ -18,7 +18,7 @@ #include "tqpixmap.h" // for now #include "tqpalette.h" // for now #include "tqwidget.h" -#include "ntqlabel.h" +#include "tqlabel.h" #include "tqimage.h" #include "ntqpushbutton.h" #include "tqwidget.h" diff --git a/examples/themes/wood.cpp b/examples/themes/wood.cpp index d2f39c0f8..891cf2bf5 100644 --- a/examples/themes/wood.cpp +++ b/examples/themes/wood.cpp @@ -18,7 +18,7 @@ #include "tqpixmap.h" // for now #include "tqpalette.h" // for now #include "tqwidget.h" -#include "ntqlabel.h" +#include "tqlabel.h" #include "tqimage.h" #include "ntqpushbutton.h" #include "tqwidget.h" diff --git a/examples/thread/prodcons/prodcons.cpp b/examples/thread/prodcons/prodcons.cpp index 2e0ab783c..5d0b525a3 100644 --- a/examples/thread/prodcons/prodcons.cpp +++ b/examples/thread/prodcons/prodcons.cpp @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/examples/thread/semaphores/main.cpp b/examples/thread/semaphores/main.cpp index f6b9157dd..d7e481c6f 100644 --- a/examples/thread/semaphores/main.cpp +++ b/examples/thread/semaphores/main.cpp @@ -15,7 +15,7 @@ #include #include #include -#include +#include #if defined(TQT_NO_THREAD) # error Thread support not enabled. diff --git a/examples/tictac/tictac.cpp b/examples/tictac/tictac.cpp index 32656a21d..cb2d1a465 100644 --- a/examples/tictac/tictac.cpp +++ b/examples/tictac/tictac.cpp @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include // rand() function #include // seed for rand() diff --git a/examples/tqdir/tqdir.cpp b/examples/tqdir/tqdir.cpp index 7a29b562a..488c0404f 100644 --- a/examples/tqdir/tqdir.cpp +++ b/examples/tqdir/tqdir.cpp @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/examples/widgets/widgets.cpp b/examples/widgets/widgets.cpp index a47980279..2872ddf3b 100644 --- a/examples/widgets/widgets.cpp +++ b/examples/widgets/widgets.cpp @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include #include @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/examples/wizard/wizard.cpp b/examples/wizard/wizard.cpp index cb7f3ad44..ad8aab9d1 100644 --- a/examples/wizard/wizard.cpp +++ b/examples/wizard/wizard.cpp @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/examples/xform/xform.cpp b/examples/xform/xform.cpp index b466630c0..602a90855 100644 --- a/examples/xform/xform.cpp +++ b/examples/xform/xform.cpp @@ -10,7 +10,7 @@ #include #include -#include +#include #include #include #include diff --git a/examples/xml/tagreader-with-features/tagreader.cpp b/examples/xml/tagreader-with-features/tagreader.cpp index f692394bd..1c49a510a 100644 --- a/examples/xml/tagreader-with-features/tagreader.cpp +++ b/examples/xml/tagreader-with-features/tagreader.cpp @@ -14,7 +14,7 @@ #include #include #include -#include +#include int main( int argc, char **argv ) { diff --git a/include/ntqlabel.h b/include/ntqlabel.h deleted file mode 120000 index 2bb3edf42..000000000 --- a/include/ntqlabel.h +++ /dev/null @@ -1 +0,0 @@ -../src/widgets/ntqlabel.h \ No newline at end of file diff --git a/include/ntqlocale.h b/include/ntqlocale.h deleted file mode 120000 index 5e75a499c..000000000 --- a/include/ntqlocale.h +++ /dev/null @@ -1 +0,0 @@ -../src/tools/ntqlocale.h \ No newline at end of file diff --git a/include/ntqsimplerichtext.h b/include/ntqsimplerichtext.h deleted file mode 120000 index cc1e51b20..000000000 --- a/include/ntqsimplerichtext.h +++ /dev/null @@ -1 +0,0 @@ -../src/kernel/ntqsimplerichtext.h \ No newline at end of file diff --git a/include/ntqsyntaxhighlighter.h b/include/ntqsyntaxhighlighter.h deleted file mode 120000 index 4d73397f8..000000000 --- a/include/ntqsyntaxhighlighter.h +++ /dev/null @@ -1 +0,0 @@ -../src/widgets/ntqsyntaxhighlighter.h \ No newline at end of file diff --git a/include/ntqwhatsthis.h b/include/ntqwhatsthis.h deleted file mode 120000 index 4c01089b6..000000000 --- a/include/ntqwhatsthis.h +++ /dev/null @@ -1 +0,0 @@ -../src/widgets/ntqwhatsthis.h \ No newline at end of file diff --git a/include/private/qlocale_p.h b/include/private/qlocale_p.h deleted file mode 120000 index 1d928c506..000000000 --- a/include/private/qlocale_p.h +++ /dev/null @@ -1 +0,0 @@ -../../src/tools/qlocale_p.h \ No newline at end of file diff --git a/include/private/qsyntaxhighlighter_p.h b/include/private/qsyntaxhighlighter_p.h deleted file mode 120000 index 4a45503d6..000000000 --- a/include/private/qsyntaxhighlighter_p.h +++ /dev/null @@ -1 +0,0 @@ -../../src/widgets/qsyntaxhighlighter_p.h \ No newline at end of file diff --git a/include/private/tqlocale_p.h b/include/private/tqlocale_p.h new file mode 120000 index 000000000..903f5d726 --- /dev/null +++ b/include/private/tqlocale_p.h @@ -0,0 +1 @@ +../../src/tools/tqlocale_p.h \ No newline at end of file diff --git a/include/private/tqsyntaxhighlighter_p.h b/include/private/tqsyntaxhighlighter_p.h new file mode 120000 index 000000000..dae21c2d0 --- /dev/null +++ b/include/private/tqsyntaxhighlighter_p.h @@ -0,0 +1 @@ +../../src/widgets/tqsyntaxhighlighter_p.h \ No newline at end of file diff --git a/include/tqlabel.h b/include/tqlabel.h new file mode 120000 index 000000000..cb1897680 --- /dev/null +++ b/include/tqlabel.h @@ -0,0 +1 @@ +../src/widgets/tqlabel.h \ No newline at end of file diff --git a/include/tqlocale.h b/include/tqlocale.h new file mode 120000 index 000000000..47a05b602 --- /dev/null +++ b/include/tqlocale.h @@ -0,0 +1 @@ +../src/tools/tqlocale.h \ No newline at end of file diff --git a/include/tqsimplerichtext.h b/include/tqsimplerichtext.h new file mode 120000 index 000000000..759d75e38 --- /dev/null +++ b/include/tqsimplerichtext.h @@ -0,0 +1 @@ +../src/kernel/tqsimplerichtext.h \ No newline at end of file diff --git a/include/tqsyntaxhighlighter.h b/include/tqsyntaxhighlighter.h new file mode 120000 index 000000000..6a36cf5aa --- /dev/null +++ b/include/tqsyntaxhighlighter.h @@ -0,0 +1 @@ +../src/widgets/tqsyntaxhighlighter.h \ No newline at end of file diff --git a/include/tqwhatsthis.h b/include/tqwhatsthis.h new file mode 120000 index 000000000..80c9d0839 --- /dev/null +++ b/include/tqwhatsthis.h @@ -0,0 +1 @@ +../src/widgets/tqwhatsthis.h \ No newline at end of file diff --git a/plugins/src/accessible/widgets/qaccessiblewidget.cpp b/plugins/src/accessible/widgets/qaccessiblewidget.cpp index 2d79b4736..b36180136 100644 --- a/plugins/src/accessible/widgets/qaccessiblewidget.cpp +++ b/plugins/src/accessible/widgets/qaccessiblewidget.cpp @@ -10,12 +10,12 @@ #include #include #include -#include +#include #include #include #include #include -#include +#include #include #include #include diff --git a/qmake/Makefile.unix b/qmake/Makefile.unix index db997d9cf..7a3a98720 100644 --- a/qmake/Makefile.unix +++ b/qmake/Makefile.unix @@ -9,7 +9,7 @@ QOBJS=tqstring.o tqtextstream.o tqiodevice.o qglobal.o qgdict.o tqcstring.o \ tqdatastream.o qgarray.o tqbuffer.o qglist.o tqptrcollection.o tqfile.o \ tqfile_unix.o tqregexp.o qgvector.o qgcache.o tqbitarray.o tqdir.o quuid.o \ tqfileinfo_unix.o tqdir_unix.o tqfileinfo.o tqdatetime.o tqstringlist.o tqmap.o \ - qconfig.o qunicodetables.o tqsettings.o qlocale.o @QMAKE_QTOBJS@ + qconfig.o qunicodetables.o tqsettings.o tqlocale.o @QMAKE_QTOBJS@ #all sources, used for the depend target DEPEND_SRC=project.cpp property.cpp meta.cpp main.cpp qtmd5.cpp generators/makefile.cpp generators/unix/unixmake2.cpp \ @@ -30,7 +30,7 @@ DEPEND_SRC=project.cpp property.cpp meta.cpp main.cpp qtmd5.cpp generators/makef @SOURCE_PATH@/src/tools/tqdatetime.cpp @SOURCE_PATH@/src/tools/tqstringlist.cpp \ @SOURCE_PATH@/src/tools/tqmap.cpp @SOURCE_PATH@/src/tools/qconfig.cpp \ @SOURCE_PATH@/src/tools/tqsettings.cpp @SOURCE_PATH@/src/tools/tqurl.cpp \ - @SOURCE_PATH@/src/tools/tqsettings_mac.cpp @SOURCE_PATH@/src/tools/qlocale.cpp + @SOURCE_PATH@/src/tools/tqsettings_mac.cpp @SOURCE_PATH@/src/tools/tqlocale.cpp CXXFLAGS= @QMAKE_CXXFLAGS@ \ -I. -Igenerators -Igenerators/unix -Igenerators/win32 -Igenerators/mac \ @@ -87,8 +87,8 @@ tqurl.o: @SOURCE_PATH@/src/kernel/tqurl.cpp tqstring.o: @SOURCE_PATH@/src/tools/tqstring.cpp $(CXX) -c -o $@ $(CXXFLAGS) @SOURCE_PATH@/src/tools/tqstring.cpp -qlocale.o: @SOURCE_PATH@/src/tools/qlocale.cpp - $(CXX) -c -o $@ $(CXXFLAGS) @SOURCE_PATH@/src/tools/qlocale.cpp +tqlocale.o: @SOURCE_PATH@/src/tools/tqlocale.cpp + $(CXX) -c -o $@ $(CXXFLAGS) @SOURCE_PATH@/src/tools/tqlocale.cpp tqdatastream.o: @SOURCE_PATH@/src/tools/tqdatastream.cpp $(CXX) -c -o $@ $(CXXFLAGS) @SOURCE_PATH@/src/tools/tqdatastream.cpp diff --git a/qmake/Makefile.win32-g++ b/qmake/Makefile.win32-g++ index d700023b1..f2ef722b2 100644 --- a/qmake/Makefile.win32-g++ +++ b/qmake/Makefile.win32-g++ @@ -23,7 +23,7 @@ QTOBJS=tqstring.o quuid.o tqtextstream.o tqiodevice.o qglobal.o qgdict.o tqcstri qgarray.o tqbuffer.o qglist.o tqptrcollection.o tqfile.o tqfile_win.o tqregexp.o qgvector.o \ qgcache.o tqbitarray.o tqdir.o tqfileinfo_win.o tqdir_win.o tqfileinfo.o tqdatetime.o \ tqstringlist.o tqmap.o qlibrary.o qlibrary_win.o qconfig.o tqsettings.o tqsettings_win.o qunicodetables.o \ - qlocale.o + tqlocale.o @@ -70,8 +70,8 @@ tqcstring.o: ..\src\tools\tqcstring.cpp tqstring.o: ..\src\tools\tqstring.cpp $(CXX) $(CXXFLAGS) ..\src\tools\tqstring.cpp -qlocale.o: ..\src\tools\qlocale.cpp - $(CXX) $(CXXFLAGS) ..\src\tools\qlocale.cpp +tqlocale.o: ..\src\tools\tqlocale.cpp + $(CXX) $(CXXFLAGS) ..\src\tools\tqlocale.cpp quuid.o: ..\src\tools\quuid.cpp $(CXX) $(CXXFLAGS) ..\src\tools\quuid.cpp diff --git a/qmake/book/qmake-pch.leaf b/qmake/book/qmake-pch.leaf index 420af717c..d152cf797 100644 --- a/qmake/book/qmake-pch.leaf +++ b/qmake/book/qmake-pch.leaf @@ -58,7 +58,7 @@ like this: #include #include // TQt includes #include - #include + #include #include "thirdparty/include/libmain.h" #include "my_stable_class.h" ... diff --git a/qmake/examples/precompile/main.cpp b/qmake/examples/precompile/main.cpp index 3bdad9540..768d2c14e 100644 --- a/qmake/examples/precompile/main.cpp +++ b/qmake/examples/precompile/main.cpp @@ -1,6 +1,6 @@ #include #include -#include +#include #include "myobject.h" #include "mydialog.h" diff --git a/qmake/examples/precompile/stable.h b/qmake/examples/precompile/stable.h index 62db7215b..1ed5d261b 100644 --- a/qmake/examples/precompile/stable.h +++ b/qmake/examples/precompile/stable.h @@ -6,5 +6,5 @@ # include # include # include -# include +# include #endif diff --git a/src/codecs/tqtextcodec.cpp b/src/codecs/tqtextcodec.cpp index c5cdedc3c..ac22ea7f1 100644 --- a/src/codecs/tqtextcodec.cpp +++ b/src/codecs/tqtextcodec.cpp @@ -69,7 +69,7 @@ #include "tqfile.h" #include "tqstrlist.h" #include "tqstring.h" -#include "../tools/qlocale_p.h" +#include "../tools/tqlocale_p.h" #if !defined(TQT_NO_CODECS) && !defined(TQT_NO_BIG_CODECS) && defined(TQ_WS_X11) # include "tqfontcodecs_p.h" diff --git a/src/dialogs/ntqprogressdialog.h b/src/dialogs/ntqprogressdialog.h index eb5e065a1..dc32aa390 100644 --- a/src/dialogs/ntqprogressdialog.h +++ b/src/dialogs/ntqprogressdialog.h @@ -43,7 +43,7 @@ #ifndef QT_H #include "ntqdialog.h" -#include "ntqlabel.h" // ### remove or keep for users' convenience? +#include "tqlabel.h" // ### remove or keep for users' convenience? #include "ntqprogressbar.h" // ### remove or keep for users' convenience? #endif // QT_H diff --git a/src/dialogs/qdialog.cpp b/src/dialogs/qdialog.cpp index 46844a568..9f1f624a9 100644 --- a/src/dialogs/qdialog.cpp +++ b/src/dialogs/qdialog.cpp @@ -49,7 +49,7 @@ #include "tqwidgetlist.h" #include "ntqlayout.h" #include "tqsizegrip.h" -#include "ntqwhatsthis.h" +#include "tqwhatsthis.h" #include "tqpopupmenu.h" #include "ntqcursor.h" #if defined(QT_ACCESSIBILITY_SUPPORT) diff --git a/src/dialogs/qerrormessage.cpp b/src/dialogs/qerrormessage.cpp index 116712ec1..5d21cf717 100644 --- a/src/dialogs/qerrormessage.cpp +++ b/src/dialogs/qerrormessage.cpp @@ -45,7 +45,7 @@ #include "ntqapplication.h" #include "ntqcheckbox.h" #include "tqdict.h" -#include "ntqlabel.h" +#include "tqlabel.h" #include "ntqlayout.h" #include "ntqmessagebox.h" #include "ntqpushbutton.h" diff --git a/src/dialogs/qinputdialog.cpp b/src/dialogs/qinputdialog.cpp index 084039c7a..6e8e7627c 100644 --- a/src/dialogs/qinputdialog.cpp +++ b/src/dialogs/qinputdialog.cpp @@ -43,7 +43,7 @@ #ifndef TQT_NO_INPUTDIALOG #include "ntqlayout.h" -#include "ntqlabel.h" +#include "tqlabel.h" #include "ntqlineedit.h" #include "ntqpushbutton.h" #include "ntqspinbox.h" diff --git a/src/dialogs/qmessagebox.cpp b/src/dialogs/qmessagebox.cpp index e0bbae0cf..a80a26886 100644 --- a/src/dialogs/qmessagebox.cpp +++ b/src/dialogs/qmessagebox.cpp @@ -43,7 +43,7 @@ #ifndef TQT_NO_MESSAGEBOX #include "ntqaccel.h" -#include "ntqlabel.h" +#include "tqlabel.h" #include "ntqpushbutton.h" #include "tqimage.h" #include "ntqapplication.h" diff --git a/src/dialogs/qprintdialog.cpp b/src/dialogs/qprintdialog.cpp index 42efc6e81..0fc6f6935 100644 --- a/src/dialogs/qprintdialog.cpp +++ b/src/dialogs/qprintdialog.cpp @@ -47,7 +47,7 @@ #include "tqtextstream.h" #include "ntqcombobox.h" #include "ntqframe.h" -#include "ntqlabel.h" +#include "tqlabel.h" #include "ntqlineedit.h" #include "ntqpushbutton.h" #include "tqprinter.h" diff --git a/src/dialogs/qwizard.cpp b/src/dialogs/qwizard.cpp index 3f8371ea7..6669a4e7a 100644 --- a/src/dialogs/qwizard.cpp +++ b/src/dialogs/qwizard.cpp @@ -45,7 +45,7 @@ #include "ntqlayout.h" #include "ntqpushbutton.h" #include "ntqcursor.h" -#include "ntqlabel.h" +#include "tqlabel.h" #include "tqwidgetstack.h" #include "ntqapplication.h" #include "tqptrlist.h" diff --git a/src/dialogs/tqcolordialog.cpp b/src/dialogs/tqcolordialog.cpp index f90f8df2e..19e08c61a 100644 --- a/src/dialogs/tqcolordialog.cpp +++ b/src/dialogs/tqcolordialog.cpp @@ -44,7 +44,7 @@ #include "tqpainter.h" #include "ntqlayout.h" -#include "ntqlabel.h" +#include "tqlabel.h" #include "ntqpushbutton.h" #include "ntqlineedit.h" #include "tqimage.h" diff --git a/src/dialogs/tqfiledialog.cpp b/src/dialogs/tqfiledialog.cpp index 194d7478a..5ed1ff6be 100644 --- a/src/dialogs/tqfiledialog.cpp +++ b/src/dialogs/tqfiledialog.cpp @@ -68,7 +68,7 @@ #include "ntqguardedptr.h" #include "ntqhbox.h" #include "ntqheader.h" -#include "ntqlabel.h" +#include "tqlabel.h" #include "ntqlayout.h" #include "ntqlibrary.h" #include "ntqlineedit.h" diff --git a/src/dialogs/tqfontdialog.cpp b/src/dialogs/tqfontdialog.cpp index 8e7999a2b..c9b5daef0 100644 --- a/src/dialogs/tqfontdialog.cpp +++ b/src/dialogs/tqfontdialog.cpp @@ -52,7 +52,7 @@ #include "ntqlayout.h" #include "ntqvgroupbox.h" #include "ntqhgroupbox.h" -#include "ntqlabel.h" +#include "tqlabel.h" #include "ntqapplication.h" #include "tqfontdatabase.h" #include "tqstyle.h" diff --git a/src/kernel/ntqsimplerichtext.h b/src/kernel/ntqsimplerichtext.h deleted file mode 100644 index 8d3d9ad8b..000000000 --- a/src/kernel/ntqsimplerichtext.h +++ /dev/null @@ -1,104 +0,0 @@ -/**************************************************************************** -** -** Definition of the TQSimpleRichText class -** -** Created : 990101 -** -** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. -** -** This file is part of the kernel module of the TQt GUI Toolkit. -** -** This file may be used under the terms of the GNU General -** Public License versions 2.0 or 3.0 as published by the Free -** Software Foundation and appearing in the files LICENSE.GPL2 -** and LICENSE.GPL3 included in the packaging of this file. -** Alternatively you may (at your option) use any later version -** of the GNU General Public License if such license has been -** publicly approved by Trolltech ASA (or its successors, if any) -** and the KDE Free TQt Foundation. -** -** Please review the following information to ensure GNU General -** Public Licensing requirements will be met: -** http://trolltech.com/products/qt/licenses/licensing/opensource/. -** If you are unsure which license is appropriate for your use, please -** review the following information: -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview -** or contact the sales department at sales@trolltech.com. -** -** This file may be used under the terms of the Q Public License as -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL -** included in the packaging of this file. Licensees holding valid TQt -** Commercial licenses may use this file in accordance with the TQt -** Commercial License Agreement provided with the Software. -** -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted -** herein. -** -**********************************************************************/ - -#ifndef TQSIMPLERICHTEXT_H -#define TQSIMPLERICHTEXT_H - -#ifndef QT_H -#include "ntqnamespace.h" -#include "tqstring.h" -#include "tqregion.h" -#endif // QT_H - -#ifndef TQT_NO_RICHTEXT - -class TQPainter; -class TQWidget; -class TQStyleSheet; -class TQBrush; -class TQMimeSourceFactory; -class TQSimpleRichTextData; - -class TQ_EXPORT TQSimpleRichText -{ -public: - TQSimpleRichText( const TQString& text, const TQFont& fnt, - const TQString& context = TQString::null, const TQStyleSheet* sheet = 0); - TQSimpleRichText( const TQString& text, const TQFont& fnt, - const TQString& context, const TQStyleSheet* sheet, - const TQMimeSourceFactory* factory, int pageBreak = -1, - const TQColor& linkColor = TQt::blue, bool linkUnderline = TRUE ); - ~TQSimpleRichText(); - - void setWidth( int ); - void setWidth( TQPainter*, int ); - void setDefaultFont( const TQFont &f ); - int width() const; - int widthUsed() const; - int height() const; - void adjustSize(); - - void draw( TQPainter* p, int x, int y, const TQRect& clipRect, - const TQColorGroup& cg, const TQBrush* paper = 0) const; - - // obsolete - void draw( TQPainter* p, int x, int y, const TQRegion& clipRegion, - const TQColorGroup& cg, const TQBrush* paper = 0) const { - draw( p, x, y, clipRegion.boundingRect(), cg, paper ); - } - - TQString context() const; - TQString anchorAt( const TQPoint& pos ) const; - - bool inText( const TQPoint& pos ) const; - -private: - TQSimpleRichTextData* d; - -private: // Disabled copy constructor and operator= -#if defined(TQ_DISABLE_COPY) - TQSimpleRichText( const TQSimpleRichText & ); - TQSimpleRichText &operator=( const TQSimpleRichText & ); -#endif -}; - -#endif // TQT_NO_RICHTEXT - -#endif // TQSIMPLERICHTEXT_H diff --git a/src/kernel/ntqt.h b/src/kernel/ntqt.h index 51eb62b33..5d9f7d4bc 100644 --- a/src/kernel/ntqt.h +++ b/src/kernel/ntqt.h @@ -116,7 +116,7 @@ #include #include #include -#include "ntqlabel.h" +#include "tqlabel.h" #include "ntqlayout.h" #include #include @@ -188,7 +188,7 @@ #include "tqtimer.h" #include #include -#include +#include #include "tqwmatrix.h" #include #include @@ -225,7 +225,7 @@ #include #include #include "tqtextedit.h" -#include +#include #include #include "tqsqleditorfactory.h" #include @@ -258,7 +258,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/kernel/qaccel.cpp b/src/kernel/qaccel.cpp index b11c6b427..fabd7dcf4 100644 --- a/src/kernel/qaccel.cpp +++ b/src/kernel/qaccel.cpp @@ -46,7 +46,7 @@ #include "ntqapplication.h" #include "tqwidget.h" #include "tqptrlist.h" -#include "ntqwhatsthis.h" +#include "tqwhatsthis.h" #include "ntqguardedptr.h" #include "tqstatusbar.h" #include "ntqdockwindow.h" diff --git a/src/kernel/qapplication_x11.cpp b/src/kernel/qapplication_x11.cpp index fbe329e98..aa6fd907b 100644 --- a/src/kernel/qapplication_x11.cpp +++ b/src/kernel/qapplication_x11.cpp @@ -83,7 +83,7 @@ #include "tqdict.h" #include "ntqguardedptr.h" #include "tqclipboard.h" -#include "ntqwhatsthis.h" // ######## dependency +#include "tqwhatsthis.h" // ######## dependency #include "tqsettings.h" #include "tqstylefactory.h" #include "tqfileinfo.h" diff --git a/src/kernel/qsimplerichtext.cpp b/src/kernel/qsimplerichtext.cpp deleted file mode 100644 index a6e1271c4..000000000 --- a/src/kernel/qsimplerichtext.cpp +++ /dev/null @@ -1,421 +0,0 @@ -/**************************************************************************** -** -** Implementation of the TQSimpleRichText class -** -** Created : 990101 -** -** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. -** -** This file is part of the kernel module of the TQt GUI Toolkit. -** -** This file may be used under the terms of the GNU General -** Public License versions 2.0 or 3.0 as published by the Free -** Software Foundation and appearing in the files LICENSE.GPL2 -** and LICENSE.GPL3 included in the packaging of this file. -** Alternatively you may (at your option) use any later version -** of the GNU General Public License if such license has been -** publicly approved by Trolltech ASA (or its successors, if any) -** and the KDE Free TQt Foundation. -** -** Please review the following information to ensure GNU General -** Public Licensing requirements will be met: -** http://trolltech.com/products/qt/licenses/licensing/opensource/. -** If you are unsure which license is appropriate for your use, please -** review the following information: -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview -** or contact the sales department at sales@trolltech.com. -** -** This file may be used under the terms of the Q Public License as -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL -** included in the packaging of this file. Licensees holding valid TQt -** Commercial licenses may use this file in accordance with the TQt -** Commercial License Agreement provided with the Software. -** -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted -** herein. -** -**********************************************************************/ - -#include "ntqsimplerichtext.h" - -#ifndef TQT_NO_RICHTEXT -#include "qrichtext_p.h" -#include "ntqapplication.h" - -class TQSimpleRichTextData -{ -public: - TQTextDocument *doc; - TQFont font; - int cachedWidth; - bool cachedWidthWithPainter; - void adjustSize(TQPainter *p = 0); -}; - -// Pull this private function in from qglobal.cpp -extern unsigned int qt_int_sqrt( unsigned int n ); - -void TQSimpleRichTextData::adjustSize(TQPainter *p) { - TQFontMetrics fm( font ); - int mw = fm.width( 'x' ) * 80; - int w = mw; - doc->doLayout(p, w); - if ( doc->widthUsed() != 0 ) { - w = qt_int_sqrt( 5 * doc->height() * doc->widthUsed() / 3 ); - doc->doLayout(p, TQMIN(w, mw)); - - if ( w*3 < 5*doc->height() ) { - w = qt_int_sqrt( 2 * doc->height() * doc->widthUsed() ); - doc->doLayout(p, TQMIN(w, mw)); - } - } - cachedWidth = doc->width(); - cachedWidthWithPainter = FALSE; -} - -/*! - \class TQSimpleRichText ntqsimplerichtext.h - \brief The TQSimpleRichText class provides a small displayable piece of rich text. - - \ingroup text - \mainclass - - This class encapsulates simple rich text usage in which a string - is interpreted as rich text and can be drawn. This is particularly - useful if you want to display some rich text in a custom widget. A - TQStyleSheet is needed to interpret the tags and format the rich - text. TQt provides a default HTML-like style sheet, but you may - define custom style sheets. - - Once created, the rich text object can be queried for its width(), - height(), and the actual width used (see widthUsed()). Most - importantly, it can be drawn on any given TQPainter with draw(). - TQSimpleRichText can also be used to implement hypertext or active - text facilities by using anchorAt(). A hit test through inText() - makes it possible to use simple rich text for text objects in - editable drawing canvases. - - Once constructed from a string the contents cannot be changed, - only resized. If the contents change, just throw the rich text - object away and make a new one with the new contents. - - For large documents use TQTextEdit or TQTextBrowser. For very small - items of rich text you can use a TQLabel. - - If you are using TQSimpleRichText to print in high resolution you - should call setWidth(TQPainter, int) so that the content will be - laid out properly on the page. -*/ - -/*! - Constructs a TQSimpleRichText from the rich text string \a text and - the font \a fnt. - - The font is used as a basis for the text rendering. When using - rich text rendering on a widget \e w, you would normally specify - the widget's font, for example: - - \code - TQSimpleRichText myrichtext( contents, mywidget->font() ); - \endcode - - \a context is the optional context of the rich text object. This - becomes important if \a text contains relative references, for - example within image tags. TQSimpleRichText always uses the default - mime source factory (see \l{TQMimeSourceFactory::defaultFactory()}) - to resolve those references. The context will then be used to - calculate the absolute path. See - TQMimeSourceFactory::makeAbsolute() for details. - - The \a sheet is an optional style sheet. If it is 0, the default - style sheet will be used (see \l{TQStyleSheet::defaultSheet()}). -*/ - -TQSimpleRichText::TQSimpleRichText( const TQString& text, const TQFont& fnt, - const TQString& context, const TQStyleSheet* sheet ) -{ - d = new TQSimpleRichTextData; - d->cachedWidth = -1; - d->cachedWidthWithPainter = FALSE; - d->font = fnt; - d->doc = new TQTextDocument( 0 ); - d->doc->setTextFormat( TQt::RichText ); - d->doc->setLeftMargin( 0 ); - d->doc->setRightMargin( 0 ); - d->doc->setFormatter( new TQTextFormatterBreakWords ); - d->doc->setStyleSheet( (TQStyleSheet*)sheet ); - d->doc->setDefaultFormat( fnt, TQColor() ); - d->doc->setText( text, context ); -} - - -/*! - Constructs a TQSimpleRichText from the rich text string \a text and - the font \a fnt. - - This is a slightly more complex constructor for TQSimpleRichText - that takes an additional mime source factory \a factory, a page - break parameter \a pageBreak and a bool \a linkUnderline. \a - linkColor is only provided for compatibility, but has no effect, - as TQColorGroup's TQColorGroup::link() color is used now. - - \a context is the optional context of the rich text object. This - becomes important if \a text contains relative references, for - example within image tags. TQSimpleRichText always uses the default - mime source factory (see \l{TQMimeSourceFactory::defaultFactory()}) - to resolve those references. The context will then be used to - calculate the absolute path. See - TQMimeSourceFactory::makeAbsolute() for details. - - The \a sheet is an optional style sheet. If it is 0, the default - style sheet will be used (see \l{TQStyleSheet::defaultSheet()}). - - This constructor is useful for creating a TQSimpleRichText object - suitable for printing. Set \a pageBreak to be the height of the - contents area of the pages. -*/ - -TQSimpleRichText::TQSimpleRichText( const TQString& text, const TQFont& fnt, - const TQString& context, const TQStyleSheet* sheet, - const TQMimeSourceFactory* factory, int pageBreak, - const TQColor& /*linkColor*/, bool linkUnderline ) -{ - d = new TQSimpleRichTextData; - d->cachedWidth = -1; - d->cachedWidthWithPainter = FALSE; - d->font = fnt; - d->doc = new TQTextDocument( 0 ); - d->doc->setTextFormat( TQt::RichText ); - d->doc->setFormatter( new TQTextFormatterBreakWords ); - d->doc->setStyleSheet( (TQStyleSheet*)sheet ); - d->doc->setDefaultFormat( fnt, TQColor() ); - d->doc->flow()->setPageSize( pageBreak ); - d->doc->setPageBreakEnabled( TRUE ); -#ifndef TQT_NO_MIME - d->doc->setMimeSourceFactory( (TQMimeSourceFactory*)factory ); -#endif - d->doc->setUnderlineLinks( linkUnderline ); - d->doc->setText( text, context ); -} - -/*! - Destroys the rich text object, freeing memory. -*/ - -TQSimpleRichText::~TQSimpleRichText() -{ - delete d->doc; - delete d; -} - -/*! - \overload - - Sets the width of the rich text object to \a w pixels. - - \sa height(), adjustSize() -*/ - -void TQSimpleRichText::setWidth( int w ) -{ - if ( w == d->cachedWidth && !d->cachedWidthWithPainter ) - return; - d->doc->formatter()->setAllowBreakInWords( d->doc->isPageBreakEnabled() ); - d->cachedWidth = w; - d->cachedWidthWithPainter = FALSE; - d->doc->doLayout( 0, w ); -} - -/*! - Sets the width of the rich text object to \a w pixels, - recalculating the layout as if it were to be drawn with painter \a - p. - - Passing a painter is useful when you intend drawing on devices - other than the screen, for example a TQPrinter. - - \sa height(), adjustSize() -*/ - -void TQSimpleRichText::setWidth( TQPainter *p, int w ) -{ - if ( w == d->cachedWidth && d->cachedWidthWithPainter ) - return; - d->doc->formatter()->setAllowBreakInWords( d->doc->isPageBreakEnabled() || - (p && p->device() && - (p->device()->devType() == TQInternal::Printer)) ); - p->save(); - d->cachedWidth = w; - d->cachedWidthWithPainter = TRUE; - d->doc->doLayout( p, w ); - p->restore(); -} - -/*! - Returns the set width of the rich text object in pixels. - - \sa widthUsed() -*/ - -int TQSimpleRichText::width() const -{ - if ( d->cachedWidth < 0 ) - d->adjustSize(); - return d->doc->width(); -} - -/*! - Returns the width in pixels that is actually used by the rich text - object. This can be smaller or wider than the set width. - - It may be wider, for example, if the text contains images or - non-breakable words that are already wider than the available - space. It's smaller when the object only consists of lines that do - not fill the width completely. - - \sa width() -*/ - -int TQSimpleRichText::widthUsed() const -{ - if ( d->cachedWidth < 0 ) - d->adjustSize(); - return d->doc->widthUsed(); -} - -/*! - Returns the height of the rich text object in pixels. - - \sa setWidth() -*/ - -int TQSimpleRichText::height() const -{ - if ( d->cachedWidth < 0 ) - d->adjustSize(); - return d->doc->height(); -} - -/*! - Adjusts the richt text object to a reasonable size. - - \sa setWidth() -*/ - -void TQSimpleRichText::adjustSize() -{ - d->adjustSize(); -} - -/*! - Draws the formatted text with painter \a p, at position (\a x, \a - y), clipped to \a clipRect. The clipping rectangle is given in the - rich text object's coordinates translated by (\a x, \a y). Passing - an null rectangle results in no clipping. Colors from the color - group \a cg are used as needed, and if not 0, \a *paper is used as - the background brush. - - Note that the display code is highly optimized to reduce flicker, - so passing a brush for \a paper is preferable to simply clearing - the area to be painted and then calling this without a brush. -*/ - -void TQSimpleRichText::draw( TQPainter *p, int x, int y, const TQRect& clipRect, - const TQColorGroup& cg, const TQBrush* paper ) const -{ - p->save(); - if ( d->cachedWidth < 0 ) - d->adjustSize(p); - - TQRect r = clipRect; - if ( !r.isNull() ) - r.moveBy( -x, -y ); - - if ( paper ) - d->doc->setPaper( new TQBrush( *paper ) ); - TQColorGroup g = cg; - if ( d->doc->paper() ) - g.setBrush( TQColorGroup::Base, *d->doc->paper() ); - - if ( !clipRect.isNull() ) - p->setClipRect( clipRect, TQPainter::CoordPainter ); - p->translate( x, y ); - d->doc->draw( p, r, g, paper ); - p->translate( -x, -y ); - p->restore(); -} - - -/*! \fn void TQSimpleRichText::draw( TQPainter *p, int x, int y, const TQRegion& clipRegion, - const TQColorGroup& cg, const TQBrush* paper ) const - - \obsolete - - Use the version with clipRect instead. The region version has - problems with larger documents on some platforms (on X11 regions - internally are represented with 16bit coordinates). -*/ - - - -/*! - Returns the context of the rich text object. If no context has - been specified in the constructor, a null string is returned. The - context is the path to use to look up relative links, such as - image tags and anchor references. -*/ - -TQString TQSimpleRichText::context() const -{ - return d->doc->context(); -} - -/*! - Returns the anchor at the requested position, \a pos. An empty - string is returned if no anchor is specified for this position. -*/ - -TQString TQSimpleRichText::anchorAt( const TQPoint& pos ) const -{ - if ( d->cachedWidth < 0 ) - d->adjustSize(); - TQTextCursor c( d->doc ); - c.place( pos, d->doc->firstParagraph(), TRUE ); - return c.paragraph()->at( c.index() )->anchorHref(); -} - -/*! - Returns TRUE if \a pos is within a text line of the rich text - object; otherwise returns FALSE. -*/ - -bool TQSimpleRichText::inText( const TQPoint& pos ) const -{ - if ( d->cachedWidth < 0 ) - d->adjustSize(); - if ( pos.y() > d->doc->height() ) - return FALSE; - TQTextCursor c( d->doc ); - c.place( pos, d->doc->firstParagraph() ); - return c.totalOffsetX() + c.paragraph()->at( c.index() )->x + - c.paragraph()->at( c.index() )->format()->width( c.paragraph()->at( c.index() )->c ) > pos.x(); -} - -/*! - Sets the default font for the rich text object to \a f -*/ - -void TQSimpleRichText::setDefaultFont( const TQFont &f ) -{ - if ( d->font == f ) - return; - d->font = f; - d->cachedWidth = -1; - d->cachedWidthWithPainter = FALSE; - d->doc->setDefaultFormat( f, TQColor() ); - d->doc->setText( d->doc->originalText(), d->doc->context() ); -} - -#endif //TQT_NO_RICHTEXT diff --git a/src/kernel/qt_kernel.pri b/src/kernel/qt_kernel.pri index c56afb6b2..c97ca4618 100644 --- a/src/kernel/qt_kernel.pri +++ b/src/kernel/qt_kernel.pri @@ -92,7 +92,7 @@ kernel { $$KERNEL_P/qrichtext_p.h \ $$KERNEL_P/qinternal_p.h \ $$KERNEL_H/ntqgplugin.h \ - $$KERNEL_H/ntqsimplerichtext.h \ + $$KERNEL_H/tqsimplerichtext.h \ $$KERNEL_CPP/qscriptengine_p.h \ $$KERNEL_CPP/tqtextengine_p.h \ $$KERNEL_CPP/tqfontengine_p.h \ @@ -261,7 +261,7 @@ kernel { $$KERNEL_CPP/qinternal.cpp \ $$KERNEL_CPP/qrichtext_p.cpp \ $$KERNEL_CPP/qgplugin.cpp \ - $$KERNEL_CPP/qsimplerichtext.cpp \ + $$KERNEL_CPP/tqsimplerichtext.cpp \ $$KERNEL_CPP/qscriptengine.cpp \ $$KERNEL_CPP/tqtextlayout.cpp \ $$KERNEL_CPP/tqtextengine.cpp diff --git a/src/kernel/qt_pch.h b/src/kernel/qt_pch.h index 54ca333f9..908254769 100644 --- a/src/kernel/qt_pch.h +++ b/src/kernel/qt_pch.h @@ -18,7 +18,7 @@ # if defined(__GNUC__) # ifndef TQT_NO_STL # include -# undef _GLIBCPP_FULLY_COMPLIANT_HEADERS // Makes qlocale.cpp compile +# undef _GLIBCPP_FULLY_COMPLIANT_HEADERS // Makes tqlocale.cpp compile # endif # endif #include // I must be first! diff --git a/src/kernel/tqfontengine_x11.cpp b/src/kernel/tqfontengine_x11.cpp index 8002c42df..6363aac97 100644 --- a/src/kernel/tqfontengine_x11.cpp +++ b/src/kernel/tqfontengine_x11.cpp @@ -2264,8 +2264,6 @@ struct OTScripts { int flags; }; -// Refer to https://learn.microsoft.com/en-us/typography/opentype/spec/scripttags -// for OpenType language tags definition static const OTScripts ot_scripts [] = { // // European Alphabetic Scripts // Latin, @@ -2353,7 +2351,6 @@ static const OTScripts ot_scripts [] = { { FT_MAKE_TAG( 'c', 'a', 'n', 's' ), 0 }, // Mongolian, { FT_MAKE_TAG( 'm', 'o', 'n', 'g' ), 0 }, - // // Symbols // CurrencySymbols, { FT_MAKE_TAG( 'D', 'F', 'L', 'T' ), 0 }, @@ -2373,26 +2370,13 @@ static const OTScripts ot_scripts [] = { { FT_MAKE_TAG( 'D', 'F', 'L', 'T' ), 0 }, // Braille, { FT_MAKE_TAG( 'b', 'r', 'a', 'i' ), 0 }, - -// Unicode - { FT_MAKE_TAG( 'D', 'F', 'L', 'T' ), 0 }, - -// Tagalog, - { FT_MAKE_TAG( 't', 'g', 'l', 'g' ), 0 }, -// Hanunoo, - { FT_MAKE_TAG( 'h', 'a', 'n', 'o' ), 0 }, -// Buhid, - { FT_MAKE_TAG( 'b', 'u', 'h', 'd' ), 0 }, -// Tagbanwa, - { FT_MAKE_TAG( 't', 'a', 'g', 'b' ), 0 }, - -// KatakanaHalfWidth, -- can't find it, use Katakana code - { FT_MAKE_TAG( 'k', 'a', 'n', 'a' ), 0 }, - -// Limbu, - { FT_MAKE_TAG( 'l', 'i', 'm', 'b' ), 0 }, -// TaiLe, - { FT_MAKE_TAG( 't', 'a', 'l', 'e' ), 0 } +// Unicode, should be used + { FT_MAKE_TAG( 'D', 'F', 'L', 'T' ), 0 } + // ### where are these? +// { FT_MAKE_TAG( 'b', 'y', 'z', 'm' ), 0 }, +// { FT_MAKE_TAG( 'D', 'F', 'L', 'T' ), 0 }, + // ### Hangul Jamo +// { FT_MAKE_TAG( 'j', 'a', 'm', 'o' ), 0 }, }; TQOpenType::TQOpenType(TQFontEngineXft *fe) @@ -2451,10 +2435,7 @@ TQOpenType::~TQOpenType() bool TQOpenType::checkScript(unsigned int script) { - if (script >= TQFont::NScripts || script >= sizeof(ot_scripts) / sizeof(OTScripts)) - { - return false; - } + assert(script < TQFont::NScripts); uint tag = ot_scripts[script].tag; int requirements = ot_scripts[script].flags; @@ -2496,11 +2477,7 @@ void TQOpenType::selectScript(unsigned int script, const Features *features) if (current_script == script) return; - if (script >= TQFont::NScripts || script >= sizeof(ot_scripts) / sizeof(OTScripts)) - { - return; - } - + assert(script < TQFont::NScripts); // find script in our list of supported scripts. uint tag = ot_scripts[script].tag; diff --git a/src/kernel/tqsimplerichtext.cpp b/src/kernel/tqsimplerichtext.cpp new file mode 100644 index 000000000..2288a5692 --- /dev/null +++ b/src/kernel/tqsimplerichtext.cpp @@ -0,0 +1,421 @@ +/**************************************************************************** +** +** Implementation of the TQSimpleRichText class +** +** Created : 990101 +** +** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. +** +** This file is part of the kernel module of the TQt GUI Toolkit. +** +** This file may be used under the terms of the GNU General +** Public License versions 2.0 or 3.0 as published by the Free +** Software Foundation and appearing in the files LICENSE.GPL2 +** and LICENSE.GPL3 included in the packaging of this file. +** Alternatively you may (at your option) use any later version +** of the GNU General Public License if such license has been +** publicly approved by Trolltech ASA (or its successors, if any) +** and the KDE Free TQt Foundation. +** +** Please review the following information to ensure GNU General +** Public Licensing requirements will be met: +** http://trolltech.com/products/qt/licenses/licensing/opensource/. +** If you are unsure which license is appropriate for your use, please +** review the following information: +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview +** or contact the sales department at sales@trolltech.com. +** +** This file may be used under the terms of the Q Public License as +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL +** included in the packaging of this file. Licensees holding valid TQt +** Commercial licenses may use this file in accordance with the TQt +** Commercial License Agreement provided with the Software. +** +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted +** herein. +** +**********************************************************************/ + +#include "tqsimplerichtext.h" + +#ifndef TQT_NO_RICHTEXT +#include "qrichtext_p.h" +#include "ntqapplication.h" + +class TQSimpleRichTextData +{ +public: + TQTextDocument *doc; + TQFont font; + int cachedWidth; + bool cachedWidthWithPainter; + void adjustSize(TQPainter *p = 0); +}; + +// Pull this private function in from qglobal.cpp +extern unsigned int qt_int_sqrt( unsigned int n ); + +void TQSimpleRichTextData::adjustSize(TQPainter *p) { + TQFontMetrics fm( font ); + int mw = fm.width( 'x' ) * 80; + int w = mw; + doc->doLayout(p, w); + if ( doc->widthUsed() != 0 ) { + w = qt_int_sqrt( 5 * doc->height() * doc->widthUsed() / 3 ); + doc->doLayout(p, TQMIN(w, mw)); + + if ( w*3 < 5*doc->height() ) { + w = qt_int_sqrt( 2 * doc->height() * doc->widthUsed() ); + doc->doLayout(p, TQMIN(w, mw)); + } + } + cachedWidth = doc->width(); + cachedWidthWithPainter = FALSE; +} + +/*! + \class TQSimpleRichText tqsimplerichtext.h + \brief The TQSimpleRichText class provides a small displayable piece of rich text. + + \ingroup text + \mainclass + + This class encapsulates simple rich text usage in which a string + is interpreted as rich text and can be drawn. This is particularly + useful if you want to display some rich text in a custom widget. A + TQStyleSheet is needed to interpret the tags and format the rich + text. TQt provides a default HTML-like style sheet, but you may + define custom style sheets. + + Once created, the rich text object can be queried for its width(), + height(), and the actual width used (see widthUsed()). Most + importantly, it can be drawn on any given TQPainter with draw(). + TQSimpleRichText can also be used to implement hypertext or active + text facilities by using anchorAt(). A hit test through inText() + makes it possible to use simple rich text for text objects in + editable drawing canvases. + + Once constructed from a string the contents cannot be changed, + only resized. If the contents change, just throw the rich text + object away and make a new one with the new contents. + + For large documents use TQTextEdit or TQTextBrowser. For very small + items of rich text you can use a TQLabel. + + If you are using TQSimpleRichText to print in high resolution you + should call setWidth(TQPainter, int) so that the content will be + laid out properly on the page. +*/ + +/*! + Constructs a TQSimpleRichText from the rich text string \a text and + the font \a fnt. + + The font is used as a basis for the text rendering. When using + rich text rendering on a widget \e w, you would normally specify + the widget's font, for example: + + \code + TQSimpleRichText myrichtext( contents, mywidget->font() ); + \endcode + + \a context is the optional context of the rich text object. This + becomes important if \a text contains relative references, for + example within image tags. TQSimpleRichText always uses the default + mime source factory (see \l{TQMimeSourceFactory::defaultFactory()}) + to resolve those references. The context will then be used to + calculate the absolute path. See + TQMimeSourceFactory::makeAbsolute() for details. + + The \a sheet is an optional style sheet. If it is 0, the default + style sheet will be used (see \l{TQStyleSheet::defaultSheet()}). +*/ + +TQSimpleRichText::TQSimpleRichText( const TQString& text, const TQFont& fnt, + const TQString& context, const TQStyleSheet* sheet ) +{ + d = new TQSimpleRichTextData; + d->cachedWidth = -1; + d->cachedWidthWithPainter = FALSE; + d->font = fnt; + d->doc = new TQTextDocument( 0 ); + d->doc->setTextFormat( TQt::RichText ); + d->doc->setLeftMargin( 0 ); + d->doc->setRightMargin( 0 ); + d->doc->setFormatter( new TQTextFormatterBreakWords ); + d->doc->setStyleSheet( (TQStyleSheet*)sheet ); + d->doc->setDefaultFormat( fnt, TQColor() ); + d->doc->setText( text, context ); +} + + +/*! + Constructs a TQSimpleRichText from the rich text string \a text and + the font \a fnt. + + This is a slightly more complex constructor for TQSimpleRichText + that takes an additional mime source factory \a factory, a page + break parameter \a pageBreak and a bool \a linkUnderline. \a + linkColor is only provided for compatibility, but has no effect, + as TQColorGroup's TQColorGroup::link() color is used now. + + \a context is the optional context of the rich text object. This + becomes important if \a text contains relative references, for + example within image tags. TQSimpleRichText always uses the default + mime source factory (see \l{TQMimeSourceFactory::defaultFactory()}) + to resolve those references. The context will then be used to + calculate the absolute path. See + TQMimeSourceFactory::makeAbsolute() for details. + + The \a sheet is an optional style sheet. If it is 0, the default + style sheet will be used (see \l{TQStyleSheet::defaultSheet()}). + + This constructor is useful for creating a TQSimpleRichText object + suitable for printing. Set \a pageBreak to be the height of the + contents area of the pages. +*/ + +TQSimpleRichText::TQSimpleRichText( const TQString& text, const TQFont& fnt, + const TQString& context, const TQStyleSheet* sheet, + const TQMimeSourceFactory* factory, int pageBreak, + const TQColor& /*linkColor*/, bool linkUnderline ) +{ + d = new TQSimpleRichTextData; + d->cachedWidth = -1; + d->cachedWidthWithPainter = FALSE; + d->font = fnt; + d->doc = new TQTextDocument( 0 ); + d->doc->setTextFormat( TQt::RichText ); + d->doc->setFormatter( new TQTextFormatterBreakWords ); + d->doc->setStyleSheet( (TQStyleSheet*)sheet ); + d->doc->setDefaultFormat( fnt, TQColor() ); + d->doc->flow()->setPageSize( pageBreak ); + d->doc->setPageBreakEnabled( TRUE ); +#ifndef TQT_NO_MIME + d->doc->setMimeSourceFactory( (TQMimeSourceFactory*)factory ); +#endif + d->doc->setUnderlineLinks( linkUnderline ); + d->doc->setText( text, context ); +} + +/*! + Destroys the rich text object, freeing memory. +*/ + +TQSimpleRichText::~TQSimpleRichText() +{ + delete d->doc; + delete d; +} + +/*! + \overload + + Sets the width of the rich text object to \a w pixels. + + \sa height(), adjustSize() +*/ + +void TQSimpleRichText::setWidth( int w ) +{ + if ( w == d->cachedWidth && !d->cachedWidthWithPainter ) + return; + d->doc->formatter()->setAllowBreakInWords( d->doc->isPageBreakEnabled() ); + d->cachedWidth = w; + d->cachedWidthWithPainter = FALSE; + d->doc->doLayout( 0, w ); +} + +/*! + Sets the width of the rich text object to \a w pixels, + recalculating the layout as if it were to be drawn with painter \a + p. + + Passing a painter is useful when you intend drawing on devices + other than the screen, for example a TQPrinter. + + \sa height(), adjustSize() +*/ + +void TQSimpleRichText::setWidth( TQPainter *p, int w ) +{ + if ( w == d->cachedWidth && d->cachedWidthWithPainter ) + return; + d->doc->formatter()->setAllowBreakInWords( d->doc->isPageBreakEnabled() || + (p && p->device() && + (p->device()->devType() == TQInternal::Printer)) ); + p->save(); + d->cachedWidth = w; + d->cachedWidthWithPainter = TRUE; + d->doc->doLayout( p, w ); + p->restore(); +} + +/*! + Returns the set width of the rich text object in pixels. + + \sa widthUsed() +*/ + +int TQSimpleRichText::width() const +{ + if ( d->cachedWidth < 0 ) + d->adjustSize(); + return d->doc->width(); +} + +/*! + Returns the width in pixels that is actually used by the rich text + object. This can be smaller or wider than the set width. + + It may be wider, for example, if the text contains images or + non-breakable words that are already wider than the available + space. It's smaller when the object only consists of lines that do + not fill the width completely. + + \sa width() +*/ + +int TQSimpleRichText::widthUsed() const +{ + if ( d->cachedWidth < 0 ) + d->adjustSize(); + return d->doc->widthUsed(); +} + +/*! + Returns the height of the rich text object in pixels. + + \sa setWidth() +*/ + +int TQSimpleRichText::height() const +{ + if ( d->cachedWidth < 0 ) + d->adjustSize(); + return d->doc->height(); +} + +/*! + Adjusts the richt text object to a reasonable size. + + \sa setWidth() +*/ + +void TQSimpleRichText::adjustSize() +{ + d->adjustSize(); +} + +/*! + Draws the formatted text with painter \a p, at position (\a x, \a + y), clipped to \a clipRect. The clipping rectangle is given in the + rich text object's coordinates translated by (\a x, \a y). Passing + an null rectangle results in no clipping. Colors from the color + group \a cg are used as needed, and if not 0, \a *paper is used as + the background brush. + + Note that the display code is highly optimized to reduce flicker, + so passing a brush for \a paper is preferable to simply clearing + the area to be painted and then calling this without a brush. +*/ + +void TQSimpleRichText::draw( TQPainter *p, int x, int y, const TQRect& clipRect, + const TQColorGroup& cg, const TQBrush* paper ) const +{ + p->save(); + if ( d->cachedWidth < 0 ) + d->adjustSize(p); + + TQRect r = clipRect; + if ( !r.isNull() ) + r.moveBy( -x, -y ); + + if ( paper ) + d->doc->setPaper( new TQBrush( *paper ) ); + TQColorGroup g = cg; + if ( d->doc->paper() ) + g.setBrush( TQColorGroup::Base, *d->doc->paper() ); + + if ( !clipRect.isNull() ) + p->setClipRect( clipRect, TQPainter::CoordPainter ); + p->translate( x, y ); + d->doc->draw( p, r, g, paper ); + p->translate( -x, -y ); + p->restore(); +} + + +/*! \fn void TQSimpleRichText::draw( TQPainter *p, int x, int y, const TQRegion& clipRegion, + const TQColorGroup& cg, const TQBrush* paper ) const + + \obsolete + + Use the version with clipRect instead. The region version has + problems with larger documents on some platforms (on X11 regions + internally are represented with 16bit coordinates). +*/ + + + +/*! + Returns the context of the rich text object. If no context has + been specified in the constructor, a null string is returned. The + context is the path to use to look up relative links, such as + image tags and anchor references. +*/ + +TQString TQSimpleRichText::context() const +{ + return d->doc->context(); +} + +/*! + Returns the anchor at the requested position, \a pos. An empty + string is returned if no anchor is specified for this position. +*/ + +TQString TQSimpleRichText::anchorAt( const TQPoint& pos ) const +{ + if ( d->cachedWidth < 0 ) + d->adjustSize(); + TQTextCursor c( d->doc ); + c.place( pos, d->doc->firstParagraph(), TRUE ); + return c.paragraph()->at( c.index() )->anchorHref(); +} + +/*! + Returns TRUE if \a pos is within a text line of the rich text + object; otherwise returns FALSE. +*/ + +bool TQSimpleRichText::inText( const TQPoint& pos ) const +{ + if ( d->cachedWidth < 0 ) + d->adjustSize(); + if ( pos.y() > d->doc->height() ) + return FALSE; + TQTextCursor c( d->doc ); + c.place( pos, d->doc->firstParagraph() ); + return c.totalOffsetX() + c.paragraph()->at( c.index() )->x + + c.paragraph()->at( c.index() )->format()->width( c.paragraph()->at( c.index() )->c ) > pos.x(); +} + +/*! + Sets the default font for the rich text object to \a f +*/ + +void TQSimpleRichText::setDefaultFont( const TQFont &f ) +{ + if ( d->font == f ) + return; + d->font = f; + d->cachedWidth = -1; + d->cachedWidthWithPainter = FALSE; + d->doc->setDefaultFormat( f, TQColor() ); + d->doc->setText( d->doc->originalText(), d->doc->context() ); +} + +#endif //TQT_NO_RICHTEXT diff --git a/src/kernel/tqsimplerichtext.h b/src/kernel/tqsimplerichtext.h new file mode 100644 index 000000000..8d3d9ad8b --- /dev/null +++ b/src/kernel/tqsimplerichtext.h @@ -0,0 +1,104 @@ +/**************************************************************************** +** +** Definition of the TQSimpleRichText class +** +** Created : 990101 +** +** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. +** +** This file is part of the kernel module of the TQt GUI Toolkit. +** +** This file may be used under the terms of the GNU General +** Public License versions 2.0 or 3.0 as published by the Free +** Software Foundation and appearing in the files LICENSE.GPL2 +** and LICENSE.GPL3 included in the packaging of this file. +** Alternatively you may (at your option) use any later version +** of the GNU General Public License if such license has been +** publicly approved by Trolltech ASA (or its successors, if any) +** and the KDE Free TQt Foundation. +** +** Please review the following information to ensure GNU General +** Public Licensing requirements will be met: +** http://trolltech.com/products/qt/licenses/licensing/opensource/. +** If you are unsure which license is appropriate for your use, please +** review the following information: +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview +** or contact the sales department at sales@trolltech.com. +** +** This file may be used under the terms of the Q Public License as +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL +** included in the packaging of this file. Licensees holding valid TQt +** Commercial licenses may use this file in accordance with the TQt +** Commercial License Agreement provided with the Software. +** +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted +** herein. +** +**********************************************************************/ + +#ifndef TQSIMPLERICHTEXT_H +#define TQSIMPLERICHTEXT_H + +#ifndef QT_H +#include "ntqnamespace.h" +#include "tqstring.h" +#include "tqregion.h" +#endif // QT_H + +#ifndef TQT_NO_RICHTEXT + +class TQPainter; +class TQWidget; +class TQStyleSheet; +class TQBrush; +class TQMimeSourceFactory; +class TQSimpleRichTextData; + +class TQ_EXPORT TQSimpleRichText +{ +public: + TQSimpleRichText( const TQString& text, const TQFont& fnt, + const TQString& context = TQString::null, const TQStyleSheet* sheet = 0); + TQSimpleRichText( const TQString& text, const TQFont& fnt, + const TQString& context, const TQStyleSheet* sheet, + const TQMimeSourceFactory* factory, int pageBreak = -1, + const TQColor& linkColor = TQt::blue, bool linkUnderline = TRUE ); + ~TQSimpleRichText(); + + void setWidth( int ); + void setWidth( TQPainter*, int ); + void setDefaultFont( const TQFont &f ); + int width() const; + int widthUsed() const; + int height() const; + void adjustSize(); + + void draw( TQPainter* p, int x, int y, const TQRect& clipRect, + const TQColorGroup& cg, const TQBrush* paper = 0) const; + + // obsolete + void draw( TQPainter* p, int x, int y, const TQRegion& clipRegion, + const TQColorGroup& cg, const TQBrush* paper = 0) const { + draw( p, x, y, clipRegion.boundingRect(), cg, paper ); + } + + TQString context() const; + TQString anchorAt( const TQPoint& pos ) const; + + bool inText( const TQPoint& pos ) const; + +private: + TQSimpleRichTextData* d; + +private: // Disabled copy constructor and operator= +#if defined(TQ_DISABLE_COPY) + TQSimpleRichText( const TQSimpleRichText & ); + TQSimpleRichText &operator=( const TQSimpleRichText & ); +#endif +}; + +#endif // TQT_NO_RICHTEXT + +#endif // TQSIMPLERICHTEXT_H diff --git a/src/moc/moc.pro b/src/moc/moc.pro index dabdef560..e1b56f668 100644 --- a/src/moc/moc.pro +++ b/src/moc/moc.pro @@ -28,7 +28,7 @@ SOURCES = ../tools/tqbuffer.cpp \ ../tools/tqiodevice.cpp \ ../tools/tqregexp.cpp \ ../tools/tqstring.cpp \ - ../tools/qlocale.cpp \ + ../tools/tqlocale.cpp \ ../tools/qunicodetables.cpp \ ../tools/tqstringlist.cpp \ ../tools/tqtextstream.cpp \ diff --git a/src/sql/tqeditorfactory.cpp b/src/sql/tqeditorfactory.cpp index 7893a1355..00f625b55 100644 --- a/src/sql/tqeditorfactory.cpp +++ b/src/sql/tqeditorfactory.cpp @@ -39,7 +39,7 @@ **********************************************************************/ #include "ntqcleanuphandler.h" -#include "ntqlabel.h" +#include "tqlabel.h" #include "ntqlineedit.h" #include "ntqspinbox.h" #include "ntqcombobox.h" diff --git a/src/sql/tqsqleditorfactory.cpp b/src/sql/tqsqleditorfactory.cpp index 6be4a2d36..cf4944ae4 100644 --- a/src/sql/tqsqleditorfactory.cpp +++ b/src/sql/tqsqleditorfactory.cpp @@ -44,7 +44,7 @@ #include "tqsqlfield.h" #include "ntqcleanuphandler.h" -#include "ntqlabel.h" +#include "tqlabel.h" #include "ntqlineedit.h" #include "ntqspinbox.h" #include "ntqcombobox.h" diff --git a/src/styles/qinterlacestyle.cpp b/src/styles/qinterlacestyle.cpp index 5322c68ba..43917bd27 100644 --- a/src/styles/qinterlacestyle.cpp +++ b/src/styles/qinterlacestyle.cpp @@ -49,7 +49,7 @@ #include "ntqdrawutil.h" // for now #include "tqpalette.h" // for now #include "tqwidget.h" -#include "ntqlabel.h" +#include "tqlabel.h" #include "ntqpushbutton.h" #include "tqwidget.h" #include "ntqrangecontrol.h" diff --git a/src/styles/qwindowsstyle.cpp b/src/styles/qwindowsstyle.cpp index 1a9fff5e9..27437724f 100644 --- a/src/styles/qwindowsstyle.cpp +++ b/src/styles/qwindowsstyle.cpp @@ -48,7 +48,7 @@ #include "ntqdrawutil.h" // for now #include "tqpixmap.h" // for now #include "tqwidget.h" -#include "ntqlabel.h" +#include "tqlabel.h" #include "tqimage.h" #include "ntqpushbutton.h" #include "ntqcombobox.h" diff --git a/src/tools/ntqlocale.h b/src/tools/ntqlocale.h deleted file mode 100644 index d3a578d1c..000000000 --- a/src/tools/ntqlocale.h +++ /dev/null @@ -1,494 +0,0 @@ -/**************************************************************************** -** -** Declaration of the TQLocale class -** -** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. -** -** This file is part of the tools module of the TQt GUI Toolkit. -** -** This file may be used under the terms of the GNU General -** Public License versions 2.0 or 3.0 as published by the Free -** Software Foundation and appearing in the files LICENSE.GPL2 -** and LICENSE.GPL3 included in the packaging of this file. -** Alternatively you may (at your option) use any later version -** of the GNU General Public License if such license has been -** publicly approved by Trolltech ASA (or its successors, if any) -** and the KDE Free TQt Foundation. -** -** Please review the following information to ensure GNU General -** Public Licensing requirements will be met: -** http://trolltech.com/products/qt/licenses/licensing/opensource/. -** If you are unsure which license is appropriate for your use, please -** review the following information: -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview -** or contact the sales department at sales@trolltech.com. -** -** This file may be used under the terms of the Q Public License as -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL -** included in the packaging of this file. Licensees holding valid TQt -** Commercial licenses may use this file in accordance with the TQt -** Commercial License Agreement provided with the Software. -** -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted -** herein. -** -**********************************************************************/ - -#ifndef TQLOCALE_H -#define TQLOCALE_H - -#include "tqstring.h" - -struct TQLocalePrivate; - -class TQ_EXPORT TQLocale -{ - friend class TQString; - -public: - enum Language { - C = 1, - Abkhazian = 2, - Afan = 3, - Afar = 4, - Afrikaans = 5, - Albanian = 6, - Amharic = 7, - Arabic = 8, - Armenian = 9, - Assamese = 10, - Aymara = 11, - Azerbaijani = 12, - Bashkir = 13, - Basque = 14, - Bengali = 15, - Bhutani = 16, - Bihari = 17, - Bislama = 18, - Breton = 19, - Bulgarian = 20, - Burmese = 21, - Byelorussian = 22, - Cambodian = 23, - Catalan = 24, - Chinese = 25, - Corsican = 26, - Croatian = 27, - Czech = 28, - Danish = 29, - Dutch = 30, - English = 31, - Esperanto = 32, - Estonian = 33, - Faroese = 34, - FijiLanguage = 35, - Finnish = 36, - French = 37, - Frisian = 38, - Gaelic = 39, - Galician = 40, - Georgian = 41, - German = 42, - Greek = 43, - Greenlandic = 44, - Guarani = 45, - Gujarati = 46, - Hausa = 47, - Hebrew = 48, - Hindi = 49, - Hungarian = 50, - Icelandic = 51, - Indonesian = 52, - Interlingua = 53, - Interlingue = 54, - Inuktitut = 55, - Inupiak = 56, - Irish = 57, - Italian = 58, - Japanese = 59, - Javanese = 60, - Kannada = 61, - Kashmiri = 62, - Kazakh = 63, - Kinyarwanda = 64, - Kirghiz = 65, - Korean = 66, - Kurdish = 67, - Kurundi = 68, - Laothian = 69, - Latin = 70, - Latvian = 71, - Lingala = 72, - Lithuanian = 73, - Macedonian = 74, - Malagasy = 75, - Malay = 76, - Malayalam = 77, - Maltese = 78, - Maori = 79, - Marathi = 80, - Moldavian = 81, - Mongolian = 82, - NauruLanguage = 83, - Nepali = 84, - Norwegian = 85, - Occitan = 86, - Oriya = 87, - Pashto = 88, - Persian = 89, - Polish = 90, - Portuguese = 91, - Punjabi = 92, - Quechua = 93, - RhaetoRomance = 94, - Romanian = 95, - Russian = 96, - Samoan = 97, - Sangho = 98, - Sanskrit = 99, - Serbian = 100, - SerboCroatian = 101, - Sesotho = 102, - Setswana = 103, - Shona = 104, - Sindhi = 105, - Singhalese = 106, - Siswati = 107, - Slovak = 108, - Slovenian = 109, - Somali = 110, - Spanish = 111, - Sundanese = 112, - Swahili = 113, - Swedish = 114, - Tagalog = 115, - Tajik = 116, - Tamil = 117, - Tatar = 118, - Telugu = 119, - Thai = 120, - Tibetan = 121, - Tigrinya = 122, - TongaLanguage = 123, - Tsonga = 124, - Turkish = 125, - Turkmen = 126, - Twi = 127, - Uigur = 128, - Ukrainian = 129, - Urdu = 130, - Uzbek = 131, - Vietnamese = 132, - Volapuk = 133, - Welsh = 134, - Wolof = 135, - Xhosa = 136, - Yiddish = 137, - Yoruba = 138, - Zhuang = 139, - Zulu = 140, - LastLanguage = Zulu - }; - - enum Country { - AnyCountry = 0, - Afghanistan = 1, - Albania = 2, - Algeria = 3, - AmericanSamoa = 4, - Andorra = 5, - Angola = 6, - Anguilla = 7, - Antarctica = 8, - AntiguaAndBarbuda = 9, - Argentina = 10, - Armenia = 11, - Aruba = 12, - Australia = 13, - Austria = 14, - Azerbaijan = 15, - Bahamas = 16, - Bahrain = 17, - Bangladesh = 18, - Barbados = 19, - Belarus = 20, - Belgium = 21, - Belize = 22, - Benin = 23, - Bermuda = 24, - Bhutan = 25, - Bolivia = 26, - BosniaAndHerzegowina = 27, - Botswana = 28, - BouvetIsland = 29, - Brazil = 30, - BritishIndianOceanTerritory = 31, - BruneiDarussalam = 32, - Bulgaria = 33, - BurkinaFaso = 34, - Burundi = 35, - Cambodia = 36, - Cameroon = 37, - Canada = 38, - CapeVerde = 39, - CaymanIslands = 40, - CentralAfricanRepublic = 41, - Chad = 42, - Chile = 43, - China = 44, - ChristmasIsland = 45, - CocosIslands = 46, - Colombia = 47, - Comoros = 48, - DemocraticRepublicOfCongo = 49, - PeoplesRepublicOfCongo = 50, - CookIslands = 51, - CostaRica = 52, - IvoryCoast = 53, - Croatia = 54, - Cuba = 55, - Cyprus = 56, - CzechRepublic = 57, - Denmark = 58, - Djibouti = 59, - Dominica = 60, - DominicanRepublic = 61, - EastTimor = 62, - Ecuador = 63, - Egypt = 64, - ElSalvador = 65, - EquatorialGuinea = 66, - Eritrea = 67, - Estonia = 68, - Ethiopia = 69, - FalklandIslands = 70, - FaroeIslands = 71, - FijiCountry = 72, - Finland = 73, - France = 74, - MetropolitanFrance = 75, - FrenchGuiana = 76, - FrenchPolynesia = 77, - FrenchSouthernTerritories = 78, - Gabon = 79, - Gambia = 80, - Georgia = 81, - Germany = 82, - Ghana = 83, - Gibraltar = 84, - Greece = 85, - Greenland = 86, - Grenada = 87, - Guadeloupe = 88, - Guam = 89, - Guatemala = 90, - Guinea = 91, - GuineaBissau = 92, - Guyana = 93, - Haiti = 94, - HeardAndMcDonaldIslands = 95, - Honduras = 96, - HongKong = 97, - Hungary = 98, - Iceland = 99, - India = 100, - Indonesia = 101, - Iran = 102, - Iraq = 103, - Ireland = 104, - Israel = 105, - Italy = 106, - Jamaica = 107, - Japan = 108, - Jordan = 109, - Kazakhstan = 110, - Kenya = 111, - Kiribati = 112, - DemocraticRepublicOfKorea = 113, - RepublicOfKorea = 114, - Kuwait = 115, - Kyrgyzstan = 116, - Lao = 117, - Latvia = 118, - Lebanon = 119, - Lesotho = 120, - Liberia = 121, - LibyanArabJamahiriya = 122, - Liechtenstein = 123, - Lithuania = 124, - Luxembourg = 125, - Macau = 126, - Macedonia = 127, - Madagascar = 128, - Malawi = 129, - Malaysia = 130, - Maldives = 131, - Mali = 132, - Malta = 133, - MarshallIslands = 134, - Martinique = 135, - Mauritania = 136, - Mauritius = 137, - Mayotte = 138, - Mexico = 139, - Micronesia = 140, - Moldova = 141, - Monaco = 142, - Mongolia = 143, - Montserrat = 144, - Morocco = 145, - Mozambique = 146, - Myanmar = 147, - Namibia = 148, - NauruCountry = 149, - Nepal = 150, - Netherlands = 151, - NetherlandsAntilles = 152, - NewCaledonia = 153, - NewZealand = 154, - Nicaragua = 155, - Niger = 156, - Nigeria = 157, - Niue = 158, - NorfolkIsland = 159, - NorthernMarianaIslands = 160, - Norway = 161, - Oman = 162, - Pakistan = 163, - Palau = 164, - PalestinianTerritory = 165, - Panama = 166, - PapuaNewGuinea = 167, - Paraguay = 168, - Peru = 169, - Philippines = 170, - Pitcairn = 171, - Poland = 172, - Portugal = 173, - PuertoRico = 174, - Qatar = 175, - Reunion = 176, - Romania = 177, - RussianFederation = 178, - Rwanda = 179, - SaintKittsAndNevis = 180, - StLucia = 181, - StVincentAndTheGrenadines = 182, - Samoa = 183, - SanMarino = 184, - SaoTomeAndPrincipe = 185, - SaudiArabia = 186, - Senegal = 187, - Seychelles = 188, - SierraLeone = 189, - Singapore = 190, - Slovakia = 191, - Slovenia = 192, - SolomonIslands = 193, - Somalia = 194, - SouthAfrica = 195, - SouthGeorgiaAndTheSouthSandwichIslands = 196, - Spain = 197, - SriLanka = 198, - StHelena = 199, - StPierreAndMiquelon = 200, - Sudan = 201, - Suriname = 202, - SvalbardAndJanMayenIslands = 203, - Swaziland = 204, - Sweden = 205, - Switzerland = 206, - SyrianArabRepublic = 207, - Taiwan = 208, - Tajikistan = 209, - Tanzania = 210, - Thailand = 211, - Togo = 212, - Tokelau = 213, - TongaCountry = 214, - TrinidadAndTobago = 215, - Tunisia = 216, - Turkey = 217, - Turkmenistan = 218, - TurksAndCaicosIslands = 219, - Tuvalu = 220, - Uganda = 221, - Ukraine = 222, - UnitedArabEmirates = 223, - UnitedKingdom = 224, - UnitedStates = 225, - UnitedStatesMinorOutlyingIslands = 226, - Uruguay = 227, - Uzbekistan = 228, - Vanuatu = 229, - VaticanCityState = 230, - Venezuela = 231, - VietNam = 232, - BritishVirginIslands = 233, - USVirginIslands = 234, - WallisAndFutunaIslands = 235, - WesternSahara = 236, - Yemen = 237, - Yugoslavia = 238, - Zambia = 239, - Zimbabwe = 240, - LastCountry = Zimbabwe - }; - - TQLocale(); - TQLocale(const TQString &name); - TQLocale(Language language, Country country = AnyCountry); - TQLocale(const TQLocale &other); - - TQLocale &operator=(const TQLocale &other); - - Language language() const; - Country country() const; - TQString name() const; - - short toShort(const TQString &s, bool *ok = 0) const; - ushort toUShort(const TQString &s, bool *ok = 0) const; - int toInt(const TQString &s, bool *ok = 0) const; - uint toUInt(const TQString &s, bool *ok = 0) const; - TQ_LONG toLong(const TQString &s, bool *ok = 0) const; - TQ_ULONG toULong(const TQString &s, bool *ok = 0) const; - TQ_LLONG toLongLong(const TQString &s, bool *ok = 0) const; - TQ_ULLONG toULongLong(const TQString &s, bool *ok = 0) const; - float toFloat(const TQString &s, bool *ok = 0) const; - double toDouble(const TQString &s, bool *ok = 0) const; - - TQString toString(short i) const - { return toString((TQ_LLONG)i); } - TQString toString(ushort i) const - { return toString((TQ_ULLONG)i); } - TQString toString(int i) const - { return toString((TQ_LLONG)i); } - TQString toString(uint i) const - { return toString((TQ_ULLONG)i); } -#if !defined(Q_OS_WIN64) - TQString toString(TQ_LONG i) const - { return toString((TQ_LLONG)i); } - TQString toString(TQ_ULONG i) const - { return toString((TQ_ULLONG)i); } -#endif - TQString toString(TQ_LLONG i) const; - TQString toString(TQ_ULLONG i) const; - TQString toString(float i, char f = 'g', int prec = 6) const - { return toString((double) i, f, prec); } - TQString toString(double i, char f = 'g', int prec = 6) const; - - static TQString languageToString(Language language); - static TQString countryToString(Country country); - static void setDefault(const TQLocale &locale); - - static TQLocale c() { return TQLocale(C); } - static TQLocale system(); - -private: - const TQLocalePrivate *d; - static const TQLocalePrivate *default_d; -}; - -#endif diff --git a/src/tools/qfeatures.txt b/src/tools/qfeatures.txt index 323f38109..89917cbec 100644 --- a/src/tools/qfeatures.txt +++ b/src/tools/qfeatures.txt @@ -591,7 +591,7 @@ SeeAlso: ??? Feature: LABEL Section: Widgets Requires: FRAME -Name: QLabel +Name: TQLabel SeeAlso: ??? Feature: TOOLBAR diff --git a/src/tools/qglobal.cpp b/src/tools/qglobal.cpp index ff5fd5c74..5e9f38a8a 100644 --- a/src/tools/qglobal.cpp +++ b/src/tools/qglobal.cpp @@ -862,7 +862,7 @@ TQtMsgHandler qInstallMsgHandler( TQtMsgHandler h ) /* Dijkstra's bisection algorithm to find the square root as an integer. Deliberately not exported as part of the TQt API, but used in - qsimplerichtext.cpp + tqsimplerichtext.cpp */ unsigned int qt_int_sqrt( unsigned int n ) { diff --git a/src/tools/qlocale.cpp b/src/tools/qlocale.cpp deleted file mode 100644 index fc02f8ef2..000000000 --- a/src/tools/qlocale.cpp +++ /dev/null @@ -1,6322 +0,0 @@ -/**************************************************************************** -** -** Implementation of the TQLocale class -** -** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. -** -** This file is part of the tools module of the TQt GUI Toolkit. -** -** This file may be used under the terms of the GNU General -** Public License versions 2.0 or 3.0 as published by the Free -** Software Foundation and appearing in the files LICENSE.GPL2 -** and LICENSE.GPL3 included in the packaging of this file. -** Alternatively you may (at your option) use any later version -** of the GNU General Public License if such license has been -** publicly approved by Trolltech ASA (or its successors, if any) -** and the KDE Free TQt Foundation. -** -** Please review the following information to ensure GNU General -** Public Licensing requirements will be met: -** http://trolltech.com/products/qt/licenses/licensing/opensource/. -** If you are unsure which license is appropriate for your use, please -** review the following information: -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview -** or contact the sales department at sales@trolltech.com. -** -** This file may be used under the terms of the Q Public License as -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL -** included in the packaging of this file. Licensees holding valid TQt -** Commercial licenses may use this file in accordance with the TQt -** Commercial License Agreement provided with the Software. -** -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted -** herein. -** -**********************************************************************/ - -#include -#include -#include -#include -#include -#include - -#include "ntqlocale.h" -#include "qlocale_p.h" -#include "ntqnamespace.h" - -#ifdef QT_QLOCALE_USES_FCVT -# include -# include -#endif - -#if defined (Q_OS_WIN) -# include -# undef NAN // we want to use our fallback on Windows -# undef INFINITY -#endif - -#ifdef Q_OS_LINUX -# include -#endif - -#if defined( Q_OS_MAC ) -# include -#endif - -#if defined (Q_OS_SOLARIS) -# include -#endif - -#if defined (Q_OS_OSF) && (defined(__DECC) || defined(__DECCXX)) -# define INFINITY DBL_INFINITY -# define NAN DBL_QNAN -#endif - -#if (defined(Q_CC_GNU) && defined(Q_OS_WIN)) || __GNUC__ == 4 || defined(QT_QLOCALE_NEEDS_VOLATILE) -# define NEEDS_VOLATILE volatile -#else -# define NEEDS_VOLATILE -#endif - -enum { - LittleEndian, - BigEndian - -#ifdef TQ_BYTE_ORDER -# if TQ_BYTE_ORDER == TQ_BIG_ENDIAN - , ByteOrder = BigEndian -# elif TQ_BYTE_ORDER == TQ_LITTLE_ENDIAN - , ByteOrder = LittleEndian -# else -# error "undefined byte order" -# endif -}; -#else -}; -static const unsigned int one = 1; -static const bool ByteOrder = ((*((unsigned char *) &one) == 0) ? BigEndian : LittleEndian); -#endif - -#if !defined(INFINITY) -static const unsigned char be_inf_bytes[] = { 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 }; -static const unsigned char le_inf_bytes[] = { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f }; -static inline double inf() -{ - return (ByteOrder == BigEndian ? - *((const double *) be_inf_bytes) : - *((const double *) le_inf_bytes)); -} -# define INFINITY (::inf()) -#endif - -#if !defined(NAN) -static const unsigned char be_nan_bytes[] = { 0x7f, 0xf8, 0, 0, 0, 0, 0, 0 }; -static const unsigned char le_nan_bytes[] = { 0, 0, 0, 0, 0, 0, 0xf8, 0x7f }; -static inline double nan() -{ - return (ByteOrder == BigEndian ? - *((const double *) be_nan_bytes) : - *((const double *) le_nan_bytes)); -} -# define NAN (::nan()) -#endif - -// We can't rely on -NAN, since all operations on a NAN should return a NAN. -static double be_neg_nan; -static double le_neg_nan; -static const unsigned char be_neg_nan_bytes[] = { 0xff, 0xf8, 0, 0, 0, 0, 0, 0 }; -static const unsigned char le_neg_nan_bytes[] = { 0, 0, 0, 0, 0, 0, 0xf8, 0xff }; -static bool neg_nan_init = false; - -static inline double negNan() -{ - if (!neg_nan_init) - { - memcpy(&be_neg_nan,be_neg_nan_bytes,sizeof(be_neg_nan_bytes)); - memcpy(&le_neg_nan,le_neg_nan_bytes,sizeof(le_neg_nan_bytes)); - neg_nan_init = true; - } - return (ByteOrder == BigEndian ? - be_neg_nan : - le_neg_nan); - -} - -// Sizes as defined by the ISO C99 standard - fallback -#ifndef LLONG_MAX -# define LLONG_MAX TQ_INT64_C(9223372036854775807) -#endif -#ifndef LLONG_MIN -# define LLONG_MIN (-LLONG_MAX - TQ_INT64_C(1)) -#endif -#ifndef ULLONG_MAX -# define ULLONG_MAX TQ_UINT64_C(0xffffffffffffffff) -#endif - -#ifndef QT_QLOCALE_USES_FCVT -static char *qdtoa(double d, int mode, int ndigits, int *decpt, - int *sign, char **rve, char **digits_str); -static char *_qdtoa(double d, int mode, int ndigits, int *decpt, - int *sign, char **rve, char **digits_str); -static double qstrtod(const char *s00, char const **se, bool *ok); -#endif -static TQ_LLONG qstrtoll(const char *nptr, const char **endptr, int base, bool *ok); -static TQ_ULLONG qstrtoull(const char *nptr, const char **endptr, int base, bool *ok); - -static inline bool compareBits(double d1, double d2) -{ - return memcmp((const char*)&d1, (const char*)&d2, sizeof(double)) == 0; -} - -static inline bool qIsInf(double d) -{ - return compareBits(d, INFINITY) || compareBits(d, -INFINITY); -} - -static inline bool qIsNan(double d) -{ - return compareBits(d, NAN) || compareBits(d, negNan()); -} - -static const uint locale_index[] = { - 0, // unused - 0, // C - 0, // Abkhazian - 0, // Afan - 0, // Afar - 1, // Afrikaans - 2, // Albanian - 0, // Amharic - 3, // Arabic - 19, // Armenian - 0, // Assamese - 0, // Aymara - 20, // Azerbaijani - 0, // Bashkir - 21, // Basque - 22, // Bengali - 0, // Bhutani - 0, // Bihari - 0, // Bislama - 0, // Breton - 23, // Bulgarian - 0, // Burmese - 24, // Byelorussian - 0, // Cambodian - 25, // Catalan - 26, // Chinese - 0, // Corsican - 31, // Croatian - 32, // Czech - 33, // Danish - 34, // Dutch - 36, // English - 0, // Esperanto - 48, // Estonian - 49, // Faroese - 0, // Fiji - 50, // Finnish - 51, // French - 0, // Frisian - 0, // Gaelic - 57, // Galician - 58, // Georgian - 59, // German - 64, // Greek - 0, // Greenlandic - 0, // Guarani - 65, // Gujarati - 0, // Hausa - 66, // Hebrew - 67, // Hindi - 68, // Hungarian - 69, // Icelandic - 70, // Indonesian - 0, // Interlingua - 0, // Interlingue - 0, // Inuktitut - 0, // Inupiak - 0, // Irish - 71, // Italian - 73, // Japanese - 0, // Javanese - 74, // Kannada - 0, // Kashmiri - 75, // Kazakh - 0, // Kinyarwanda - 76, // Kirghiz - 77, // Korean - 0, // Kurdish - 0, // Kurundi - 0, // Laothian - 0, // Latin - 78, // Latvian - 0, // Lingala - 79, // Lithuanian - 80, // Macedonian - 0, // Malagasy - 81, // Malay - 0, // Malayalam - 0, // Maltese - 0, // Maori - 83, // Marathi - 0, // Moldavian - 84, // Mongolian - 0, // Nauru - 0, // Nepali - 85, // Norwegian - 0, // Occitan - 0, // Oriya - 0, // Pashto - 86, // Persian - 87, // Polish - 88, // Portuguese - 90, // Punjabi - 0, // Quechua - 0, // RhaetoRomance - 91, // Romanian - 92, // Russian - 0, // Samoan - 0, // Sangho - 93, // Sanskrit - 0, // Serbian - 0, // SerboCroatian - 0, // Sesotho - 0, // Setswana - 0, // Shona - 0, // Sindhi - 0, // Singhalese - 0, // Siswati - 94, // Slovak - 95, // Slovenian - 0, // Somali - 96, // Spanish - 0, // Sundanese - 115, // Swahili - 116, // Swedish - 0, // Tagalog - 0, // Tajik - 118, // Tamil - 0, // Tatar - 119, // Telugu - 120, // Thai - 0, // Tibetan - 0, // Tigrinya - 0, // Tonga - 0, // Tsonga - 121, // Turkish - 0, // Turkmen - 0, // Twi - 0, // Uigur - 122, // Ukrainian - 123, // Urdu - 124, // Uzbek - 125, // Vietnamese - 0, // Volapuk - 0, // Welsh - 0, // Wolof - 0, // Xhosa - 0, // Yiddish - 0, // Yoruba - 0, // Zhuang - 0, // Zulu - 0 // trailing 0 -}; - -static const TQLocalePrivate locale_data[] = { -// lang terr dec group list prcnt zero minus exp - { 1, 0, 46, 44, 59, 37, 48, 45, 101 }, // C/AnyCountry - { 5, 195, 46, 44, 44, 37, 48, 45, 101 }, // Afrikaans/SouthAfrica - { 6, 2, 44, 46, 59, 37, 48, 45, 101 }, // Albanian/Albania - { 8, 186, 46, 44, 59, 37, 1632, 45, 101 }, // Arabic/SaudiArabia - { 8, 3, 46, 44, 59, 37, 48, 45, 101 }, // Arabic/Algeria - { 8, 17, 46, 44, 59, 37, 1632, 45, 101 }, // Arabic/Bahrain - { 8, 64, 46, 44, 59, 37, 1632, 45, 101 }, // Arabic/Egypt - { 8, 103, 46, 44, 59, 37, 1632, 45, 101 }, // Arabic/Iraq - { 8, 109, 46, 44, 59, 37, 1632, 45, 101 }, // Arabic/Jordan - { 8, 115, 46, 44, 59, 37, 1632, 45, 101 }, // Arabic/Kuwait - { 8, 119, 46, 44, 59, 37, 1632, 45, 101 }, // Arabic/Lebanon - { 8, 122, 46, 44, 59, 37, 48, 45, 101 }, // Arabic/LibyanArabJamahiriya - { 8, 145, 46, 44, 59, 37, 48, 45, 101 }, // Arabic/Morocco - { 8, 162, 46, 44, 59, 37, 1632, 45, 101 }, // Arabic/Oman - { 8, 175, 46, 44, 59, 37, 1632, 45, 101 }, // Arabic/Qatar - { 8, 207, 46, 44, 59, 37, 1632, 45, 101 }, // Arabic/SyrianArabRepublic - { 8, 216, 46, 44, 59, 37, 48, 45, 101 }, // Arabic/Tunisia - { 8, 223, 46, 44, 59, 37, 1632, 45, 101 }, // Arabic/UnitedArabEmirates - { 8, 237, 46, 44, 59, 37, 1632, 45, 101 }, // Arabic/Yemen - { 9, 11, 46, 44, 44, 37, 48, 45, 101 }, // Armenian/Armenia - { 12, 15, 44, 160, 59, 37, 48, 45, 101 }, // Azerbaijani/Azerbaijan - { 14, 197, 44, 46, 59, 37, 48, 45, 101 }, // Basque/Spain - { 15, 100, 46, 44, 59, 37, 48, 45, 101 }, // Bengali/India - { 20, 33, 44, 160, 59, 37, 48, 45, 101 }, // Bulgarian/Bulgaria - { 22, 20, 44, 160, 59, 37, 48, 45, 101 }, // Byelorussian/Belarus - { 24, 197, 44, 46, 59, 37, 48, 45, 101 }, // Catalan/Spain - { 25, 44, 46, 44, 44, 37, 48, 45, 101 }, // Chinese/China - { 25, 97, 46, 44, 44, 37, 48, 45, 101 }, // Chinese/HongKong - { 25, 126, 46, 44, 44, 37, 48, 45, 101 }, // Chinese/Macau - { 25, 190, 46, 44, 44, 37, 48, 45, 101 }, // Chinese/Singapore - { 25, 208, 46, 44, 44, 37, 48, 45, 101 }, // Chinese/Taiwan - { 27, 54, 44, 46, 59, 37, 48, 45, 101 }, // Croatian/Croatia - { 28, 57, 44, 160, 59, 37, 48, 45, 101 }, // Czech/CzechRepublic - { 29, 58, 44, 46, 59, 37, 48, 45, 101 }, // Danish/Denmark - { 30, 151, 44, 46, 59, 37, 48, 45, 101 }, // Dutch/Netherlands - { 30, 21, 44, 46, 59, 37, 48, 45, 101 }, // Dutch/Belgium - { 31, 225, 46, 44, 44, 37, 48, 45, 101 }, // English/UnitedStates - { 31, 13, 46, 44, 44, 37, 48, 45, 101 }, // English/Australia - { 31, 22, 46, 44, 59, 37, 48, 45, 101 }, // English/Belize - { 31, 38, 46, 44, 44, 37, 48, 45, 101 }, // English/Canada - { 31, 104, 46, 44, 44, 37, 48, 45, 101 }, // English/Ireland - { 31, 107, 46, 44, 44, 37, 48, 45, 101 }, // English/Jamaica - { 31, 154, 46, 44, 44, 37, 48, 45, 101 }, // English/NewZealand - { 31, 170, 46, 44, 44, 37, 48, 45, 101 }, // English/Philippines - { 31, 195, 46, 44, 44, 37, 48, 45, 101 }, // English/SouthAfrica - { 31, 215, 46, 44, 59, 37, 48, 45, 101 }, // English/TrinidadAndTobago - { 31, 224, 46, 44, 44, 37, 48, 45, 101 }, // English/UnitedKingdom - { 31, 240, 46, 44, 44, 37, 48, 45, 101 }, // English/Zimbabwe - { 33, 68, 44, 160, 59, 37, 48, 45, 101 }, // Estonian/Estonia - { 34, 71, 44, 46, 59, 37, 48, 45, 101 }, // Faroese/FaroeIslands - { 36, 73, 44, 160, 59, 37, 48, 45, 101 }, // Finnish/Finland - { 37, 74, 44, 160, 59, 37, 48, 45, 101 }, // French/France - { 37, 21, 44, 46, 59, 37, 48, 45, 101 }, // French/Belgium - { 37, 38, 44, 160, 59, 37, 48, 45, 101 }, // French/Canada - { 37, 125, 44, 160, 59, 37, 48, 45, 101 }, // French/Luxembourg - { 37, 142, 44, 160, 59, 37, 48, 45, 101 }, // French/Monaco - { 37, 206, 46, 39, 59, 37, 48, 45, 101 }, // French/Switzerland - { 40, 197, 44, 46, 44, 37, 48, 45, 101 }, // Galician/Spain - { 41, 81, 44, 160, 59, 37, 48, 45, 101 }, // Georgian/Georgia - { 42, 82, 44, 46, 59, 37, 48, 45, 101 }, // German/Germany - { 42, 14, 44, 46, 59, 37, 48, 45, 101 }, // German/Austria - { 42, 123, 46, 39, 59, 37, 48, 45, 101 }, // German/Liechtenstein - { 42, 125, 44, 46, 59, 37, 48, 45, 101 }, // German/Luxembourg - { 42, 206, 46, 39, 59, 37, 48, 45, 101 }, // German/Switzerland - { 43, 85, 44, 46, 59, 37, 48, 45, 101 }, // Greek/Greece - { 46, 100, 46, 44, 44, 37, 2790, 45, 101 }, // Gujarati/India - { 48, 105, 46, 44, 44, 37, 48, 45, 101 }, // Hebrew/Israel - { 49, 100, 46, 44, 44, 37, 48, 45, 101 }, // Hindi/India - { 50, 98, 44, 160, 59, 37, 48, 45, 101 }, // Hungarian/Hungary - { 51, 99, 44, 46, 59, 37, 48, 45, 101 }, // Icelandic/Iceland - { 52, 101, 44, 46, 59, 37, 48, 45, 101 }, // Indonesian/Indonesia - { 58, 106, 44, 46, 59, 37, 48, 45, 101 }, // Italian/Italy - { 58, 206, 46, 39, 59, 37, 48, 45, 101 }, // Italian/Switzerland - { 59, 108, 46, 44, 44, 37, 48, 45, 101 }, // Japanese/Japan - { 61, 100, 46, 44, 44, 37, 3302, 45, 101 }, // Kannada/India - { 63, 110, 44, 160, 59, 37, 48, 45, 101 }, // Kazakh/Kazakhstan - { 65, 116, 44, 160, 59, 37, 48, 45, 101 }, // Kirghiz/Kyrgyzstan - { 66, 114, 46, 44, 44, 37, 48, 45, 101 }, // Korean/RepublicOfKorea - { 71, 118, 44, 160, 59, 37, 48, 45, 101 }, // Latvian/Latvia - { 73, 124, 44, 46, 59, 37, 48, 45, 101 }, // Lithuanian/Lithuania - { 74, 127, 44, 46, 59, 37, 48, 45, 101 }, // Macedonian/Macedonia - { 76, 130, 44, 46, 59, 37, 48, 45, 101 }, // Malay/Malaysia - { 76, 32, 44, 46, 59, 37, 48, 45, 101 }, // Malay/BruneiDarussalam - { 80, 100, 46, 44, 44, 37, 2406, 45, 101 }, // Marathi/India - { 82, 143, 44, 160, 59, 37, 48, 45, 101 }, // Mongolian/Mongolia - { 85, 161, 44, 160, 59, 37, 48, 45, 101 }, // Norwegian/Norway - { 89, 102, 46, 44, 59, 37, 1776, 45, 101 }, // Persian/Iran - { 90, 172, 44, 160, 59, 37, 48, 45, 101 }, // Polish/Poland - { 91, 173, 44, 46, 59, 37, 48, 45, 101 }, // Portuguese/Portugal - { 91, 30, 44, 46, 59, 37, 48, 45, 101 }, // Portuguese/Brazil - { 92, 100, 46, 44, 44, 37, 2662, 45, 101 }, // Punjabi/India - { 95, 177, 44, 46, 59, 37, 48, 45, 101 }, // Romanian/Romania - { 96, 178, 44, 160, 59, 37, 48, 45, 101 }, // Russian/RussianFederation - { 99, 100, 46, 44, 44, 37, 2406, 45, 101 }, // Sanskrit/India - { 108, 191, 44, 160, 59, 37, 48, 45, 101 }, // Slovak/Slovakia - { 109, 192, 44, 46, 59, 37, 48, 45, 101 }, // Slovenian/Slovenia - { 111, 197, 44, 46, 59, 37, 48, 45, 101 }, // Spanish/Spain - { 111, 10, 44, 46, 44, 37, 48, 45, 101 }, // Spanish/Argentina - { 111, 26, 44, 46, 44, 37, 48, 45, 101 }, // Spanish/Bolivia - { 111, 43, 44, 46, 44, 37, 48, 45, 101 }, // Spanish/Chile - { 111, 47, 44, 46, 44, 37, 48, 45, 101 }, // Spanish/Colombia - { 111, 52, 44, 46, 44, 37, 48, 45, 101 }, // Spanish/CostaRica - { 111, 61, 46, 44, 44, 37, 48, 45, 101 }, // Spanish/DominicanRepublic - { 111, 63, 44, 46, 44, 37, 48, 45, 101 }, // Spanish/Ecuador - { 111, 65, 46, 44, 44, 37, 48, 45, 101 }, // Spanish/ElSalvador - { 111, 90, 46, 44, 44, 37, 48, 45, 101 }, // Spanish/Guatemala - { 111, 96, 46, 44, 44, 37, 48, 45, 101 }, // Spanish/Honduras - { 111, 139, 46, 44, 44, 37, 48, 45, 101 }, // Spanish/Mexico - { 111, 155, 46, 44, 44, 37, 48, 45, 101 }, // Spanish/Nicaragua - { 111, 166, 46, 44, 44, 37, 48, 45, 101 }, // Spanish/Panama - { 111, 168, 44, 46, 44, 37, 48, 45, 101 }, // Spanish/Paraguay - { 111, 169, 46, 44, 44, 37, 48, 45, 101 }, // Spanish/Peru - { 111, 174, 46, 44, 44, 37, 48, 45, 101 }, // Spanish/PuertoRico - { 111, 227, 44, 46, 44, 37, 48, 45, 101 }, // Spanish/Uruguay - { 111, 231, 44, 46, 44, 37, 48, 45, 101 }, // Spanish/Venezuela - { 113, 111, 46, 44, 44, 37, 48, 45, 101 }, // Swahili/Kenya - { 114, 205, 44, 160, 59, 37, 48, 45, 101 }, // Swedish/Sweden - { 114, 73, 44, 160, 59, 37, 48, 45, 101 }, // Swedish/Finland - { 117, 100, 46, 44, 44, 37, 48, 45, 101 }, // Tamil/India - { 119, 100, 46, 44, 44, 37, 3174, 45, 101 }, // Telugu/India - { 120, 211, 46, 44, 44, 37, 3664, 45, 101 }, // Thai/Thailand - { 125, 217, 44, 46, 59, 37, 48, 45, 101 }, // Turkish/Turkey - { 129, 222, 44, 160, 59, 37, 48, 45, 101 }, // Ukrainian/Ukraine - { 130, 163, 46, 44, 59, 37, 1776, 45, 101 }, // Urdu/Pakistan - { 131, 228, 44, 160, 59, 37, 48, 45, 101 }, // Uzbek/Uzbekistan - { 132, 232, 44, 46, 44, 37, 48, 45, 101 }, // Vietnamese/VietNam - { 0, 0, 0, 0, 0, 0, 0, 0, 0 } // trailing 0s -}; - -static const char language_name_list[] = -"Default\0" -"C\0" -"Abkhazian\0" -"Afan\0" -"Afar\0" -"Afrikaans\0" -"Albanian\0" -"Amharic\0" -"Arabic\0" -"Armenian\0" -"Assamese\0" -"Aymara\0" -"Azerbaijani\0" -"Bashkir\0" -"Basque\0" -"Bengali\0" -"Bhutani\0" -"Bihari\0" -"Bislama\0" -"Breton\0" -"Bulgarian\0" -"Burmese\0" -"Byelorussian\0" -"Cambodian\0" -"Catalan\0" -"Chinese\0" -"Corsican\0" -"Croatian\0" -"Czech\0" -"Danish\0" -"Dutch\0" -"English\0" -"Esperanto\0" -"Estonian\0" -"Faroese\0" -"Fiji\0" -"Finnish\0" -"French\0" -"Frisian\0" -"Gaelic\0" -"Galician\0" -"Georgian\0" -"German\0" -"Greek\0" -"Greenlandic\0" -"Guarani\0" -"Gujarati\0" -"Hausa\0" -"Hebrew\0" -"Hindi\0" -"Hungarian\0" -"Icelandic\0" -"Indonesian\0" -"Interlingua\0" -"Interlingue\0" -"Inuktitut\0" -"Inupiak\0" -"Irish\0" -"Italian\0" -"Japanese\0" -"Javanese\0" -"Kannada\0" -"Kashmiri\0" -"Kazakh\0" -"Kinyarwanda\0" -"Kirghiz\0" -"Korean\0" -"Kurdish\0" -"Kurundi\0" -"Laothian\0" -"Latin\0" -"Latvian\0" -"Lingala\0" -"Lithuanian\0" -"Macedonian\0" -"Malagasy\0" -"Malay\0" -"Malayalam\0" -"Maltese\0" -"Maori\0" -"Marathi\0" -"Moldavian\0" -"Mongolian\0" -"Nauru\0" -"Nepali\0" -"Norwegian\0" -"Occitan\0" -"Oriya\0" -"Pashto\0" -"Persian\0" -"Polish\0" -"Portuguese\0" -"Punjabi\0" -"Quechua\0" -"RhaetoRomance\0" -"Romanian\0" -"Russian\0" -"Samoan\0" -"Sangho\0" -"Sanskrit\0" -"Serbian\0" -"SerboCroatian\0" -"Sesotho\0" -"Setswana\0" -"Shona\0" -"Sindhi\0" -"Singhalese\0" -"Siswati\0" -"Slovak\0" -"Slovenian\0" -"Somali\0" -"Spanish\0" -"Sundanese\0" -"Swahili\0" -"Swedish\0" -"Tagalog\0" -"Tajik\0" -"Tamil\0" -"Tatar\0" -"Telugu\0" -"Thai\0" -"Tibetan\0" -"Tigrinya\0" -"Tonga\0" -"Tsonga\0" -"Turkish\0" -"Turkmen\0" -"Twi\0" -"Uigur\0" -"Ukrainian\0" -"Urdu\0" -"Uzbek\0" -"Vietnamese\0" -"Volapuk\0" -"Welsh\0" -"Wolof\0" -"Xhosa\0" -"Yiddish\0" -"Yoruba\0" -"Zhuang\0" -"Zulu\0"; - -static const uint language_name_index[] = { - 0,// Unused - 8,// C - 10,// Abkhazian - 20,// Afan - 25,// Afar - 30,// Afrikaans - 40,// Albanian - 49,// Amharic - 57,// Arabic - 64,// Armenian - 73,// Assamese - 82,// Aymara - 89,// Azerbaijani - 101,// Bashkir - 109,// Basque - 116,// Bengali - 124,// Bhutani - 132,// Bihari - 139,// Bislama - 147,// Breton - 154,// Bulgarian - 164,// Burmese - 172,// Byelorussian - 185,// Cambodian - 195,// Catalan - 203,// Chinese - 211,// Corsican - 220,// Croatian - 229,// Czech - 235,// Danish - 242,// Dutch - 248,// English - 256,// Esperanto - 266,// Estonian - 275,// Faroese - 283,// Fiji - 288,// Finnish - 296,// French - 303,// Frisian - 311,// Gaelic - 318,// Galician - 327,// Georgian - 336,// German - 343,// Greek - 349,// Greenlandic - 361,// Guarani - 369,// Gujarati - 378,// Hausa - 384,// Hebrew - 391,// Hindi - 397,// Hungarian - 407,// Icelandic - 417,// Indonesian - 428,// Interlingua - 440,// Interlingue - 452,// Inuktitut - 462,// Inupiak - 470,// Irish - 476,// Italian - 484,// Japanese - 493,// Javanese - 502,// Kannada - 510,// Kashmiri - 519,// Kazakh - 526,// Kinyarwanda - 538,// Kirghiz - 546,// Korean - 553,// Kurdish - 561,// Kurundi - 569,// Laothian - 578,// Latin - 584,// Latvian - 592,// Lingala - 600,// Lithuanian - 611,// Macedonian - 622,// Malagasy - 631,// Malay - 637,// Malayalam - 647,// Maltese - 655,// Maori - 661,// Marathi - 669,// Moldavian - 679,// Mongolian - 689,// Nauru - 695,// Nepali - 702,// Norwegian - 712,// Occitan - 720,// Oriya - 726,// Pashto - 733,// Persian - 741,// Polish - 748,// Portuguese - 759,// Punjabi - 767,// Quechua - 775,// RhaetoRomance - 789,// Romanian - 798,// Russian - 806,// Samoan - 813,// Sangho - 820,// Sanskrit - 829,// Serbian - 837,// SerboCroatian - 851,// Sesotho - 859,// Setswana - 868,// Shona - 874,// Sindhi - 881,// Singhalese - 892,// Siswati - 900,// Slovak - 907,// Slovenian - 917,// Somali - 924,// Spanish - 932,// Sundanese - 942,// Swahili - 950,// Swedish - 958,// Tagalog - 966,// Tajik - 972,// Tamil - 978,// Tatar - 984,// Telugu - 991,// Thai - 996,// Tibetan - 1004,// Tigrinya - 1013,// Tonga - 1019,// Tsonga - 1026,// Turkish - 1034,// Turkmen - 1042,// Twi - 1046,// Uigur - 1052,// Ukrainian - 1062,// Urdu - 1067,// Uzbek - 1073,// Vietnamese - 1084,// Volapuk - 1092,// Welsh - 1098,// Wolof - 1104,// Xhosa - 1110,// Yiddish - 1118,// Yoruba - 1125,// Zhuang - 1132// Zulu -}; - -static const char country_name_list[] = -"Default\0" -"Afghanistan\0" -"Albania\0" -"Algeria\0" -"AmericanSamoa\0" -"Andorra\0" -"Angola\0" -"Anguilla\0" -"Antarctica\0" -"AntiguaAndBarbuda\0" -"Argentina\0" -"Armenia\0" -"Aruba\0" -"Australia\0" -"Austria\0" -"Azerbaijan\0" -"Bahamas\0" -"Bahrain\0" -"Bangladesh\0" -"Barbados\0" -"Belarus\0" -"Belgium\0" -"Belize\0" -"Benin\0" -"Bermuda\0" -"Bhutan\0" -"Bolivia\0" -"BosniaAndHerzegowina\0" -"Botswana\0" -"BouvetIsland\0" -"Brazil\0" -"BritishIndianOceanTerritory\0" -"BruneiDarussalam\0" -"Bulgaria\0" -"BurkinaFaso\0" -"Burundi\0" -"Cambodia\0" -"Cameroon\0" -"Canada\0" -"CapeVerde\0" -"CaymanIslands\0" -"CentralAfricanRepublic\0" -"Chad\0" -"Chile\0" -"China\0" -"ChristmasIsland\0" -"CocosIslands\0" -"Colombia\0" -"Comoros\0" -"DemocraticRepublicOfCongo\0" -"PeoplesRepublicOfCongo\0" -"CookIslands\0" -"CostaRica\0" -"IvoryCoast\0" -"Croatia\0" -"Cuba\0" -"Cyprus\0" -"CzechRepublic\0" -"Denmark\0" -"Djibouti\0" -"Dominica\0" -"DominicanRepublic\0" -"EastTimor\0" -"Ecuador\0" -"Egypt\0" -"ElSalvador\0" -"EquatorialGuinea\0" -"Eritrea\0" -"Estonia\0" -"Ethiopia\0" -"FalklandIslands\0" -"FaroeIslands\0" -"Fiji\0" -"Finland\0" -"France\0" -"MetropolitanFrance\0" -"FrenchGuiana\0" -"FrenchPolynesia\0" -"FrenchSouthernTerritories\0" -"Gabon\0" -"Gambia\0" -"Georgia\0" -"Germany\0" -"Ghana\0" -"Gibraltar\0" -"Greece\0" -"Greenland\0" -"Grenada\0" -"Guadeloupe\0" -"Guam\0" -"Guatemala\0" -"Guinea\0" -"GuineaBissau\0" -"Guyana\0" -"Haiti\0" -"HeardAndMcDonaldIslands\0" -"Honduras\0" -"HongKong\0" -"Hungary\0" -"Iceland\0" -"India\0" -"Indonesia\0" -"Iran\0" -"Iraq\0" -"Ireland\0" -"Israel\0" -"Italy\0" -"Jamaica\0" -"Japan\0" -"Jordan\0" -"Kazakhstan\0" -"Kenya\0" -"Kiribati\0" -"DemocraticRepublicOfKorea\0" -"RepublicOfKorea\0" -"Kuwait\0" -"Kyrgyzstan\0" -"Lao\0" -"Latvia\0" -"Lebanon\0" -"Lesotho\0" -"Liberia\0" -"LibyanArabJamahiriya\0" -"Liechtenstein\0" -"Lithuania\0" -"Luxembourg\0" -"Macau\0" -"Macedonia\0" -"Madagascar\0" -"Malawi\0" -"Malaysia\0" -"Maldives\0" -"Mali\0" -"Malta\0" -"MarshallIslands\0" -"Martinique\0" -"Mauritania\0" -"Mauritius\0" -"Mayotte\0" -"Mexico\0" -"Micronesia\0" -"Moldova\0" -"Monaco\0" -"Mongolia\0" -"Montserrat\0" -"Morocco\0" -"Mozambique\0" -"Myanmar\0" -"Namibia\0" -"Nauru\0" -"Nepal\0" -"Netherlands\0" -"NetherlandsAntilles\0" -"NewCaledonia\0" -"NewZealand\0" -"Nicaragua\0" -"Niger\0" -"Nigeria\0" -"Niue\0" -"NorfolkIsland\0" -"NorthernMarianaIslands\0" -"Norway\0" -"Oman\0" -"Pakistan\0" -"Palau\0" -"PalestinianTerritory\0" -"Panama\0" -"PapuaNewGuinea\0" -"Paraguay\0" -"Peru\0" -"Philippines\0" -"Pitcairn\0" -"Poland\0" -"Portugal\0" -"PuertoRico\0" -"Qatar\0" -"Reunion\0" -"Romania\0" -"RussianFederation\0" -"Rwanda\0" -"SaintKittsAndNevis\0" -"StLucia\0" -"StVincentAndTheGrenadines\0" -"Samoa\0" -"SanMarino\0" -"SaoTomeAndPrincipe\0" -"SaudiArabia\0" -"Senegal\0" -"Seychelles\0" -"SierraLeone\0" -"Singapore\0" -"Slovakia\0" -"Slovenia\0" -"SolomonIslands\0" -"Somalia\0" -"SouthAfrica\0" -"SouthGeorgiaAndTheSouthSandwichIslands\0" -"Spain\0" -"SriLanka\0" -"StHelena\0" -"StPierreAndMiquelon\0" -"Sudan\0" -"Suriname\0" -"SvalbardAndJanMayenIslands\0" -"Swaziland\0" -"Sweden\0" -"Switzerland\0" -"SyrianArabRepublic\0" -"Taiwan\0" -"Tajikistan\0" -"Tanzania\0" -"Thailand\0" -"Togo\0" -"Tokelau\0" -"Tonga\0" -"TrinidadAndTobago\0" -"Tunisia\0" -"Turkey\0" -"Turkmenistan\0" -"TurksAndCaicosIslands\0" -"Tuvalu\0" -"Uganda\0" -"Ukraine\0" -"UnitedArabEmirates\0" -"UnitedKingdom\0" -"UnitedStates\0" -"UnitedStatesMinorOutlyingIslands\0" -"Uruguay\0" -"Uzbekistan\0" -"Vanuatu\0" -"VaticanCityState\0" -"Venezuela\0" -"VietNam\0" -"BritishVirginIslands\0" -"USVirginIslands\0" -"WallisAndFutunaIslands\0" -"WesternSahara\0" -"Yemen\0" -"Yugoslavia\0" -"Zambia\0" -"Zimbabwe\0"; - -static const uint country_name_index[] = { - 0,// AnyCountry - 8,// Afghanistan - 20,// Albania - 28,// Algeria - 36,// AmericanSamoa - 50,// Andorra - 58,// Angola - 65,// Anguilla - 74,// Antarctica - 85,// AntiguaAndBarbuda - 103,// Argentina - 113,// Armenia - 121,// Aruba - 127,// Australia - 137,// Austria - 145,// Azerbaijan - 156,// Bahamas - 164,// Bahrain - 172,// Bangladesh - 183,// Barbados - 192,// Belarus - 200,// Belgium - 208,// Belize - 215,// Benin - 221,// Bermuda - 229,// Bhutan - 236,// Bolivia - 244,// BosniaAndHerzegowina - 265,// Botswana - 274,// BouvetIsland - 287,// Brazil - 294,// BritishIndianOceanTerritory - 322,// BruneiDarussalam - 339,// Bulgaria - 348,// BurkinaFaso - 360,// Burundi - 368,// Cambodia - 377,// Cameroon - 386,// Canada - 393,// CapeVerde - 403,// CaymanIslands - 417,// CentralAfricanRepublic - 440,// Chad - 445,// Chile - 451,// China - 457,// ChristmasIsland - 473,// CocosIslands - 486,// Colombia - 495,// Comoros - 503,// DemocraticRepublicOfCongo - 529,// PeoplesRepublicOfCongo - 552,// CookIslands - 564,// CostaRica - 574,// IvoryCoast - 585,// Croatia - 593,// Cuba - 598,// Cyprus - 605,// CzechRepublic - 619,// Denmark - 627,// Djibouti - 636,// Dominica - 645,// DominicanRepublic - 663,// EastTimor - 673,// Ecuador - 681,// Egypt - 687,// ElSalvador - 698,// EquatorialGuinea - 715,// Eritrea - 723,// Estonia - 731,// Ethiopia - 740,// FalklandIslands - 756,// FaroeIslands - 769,// Fiji - 774,// Finland - 782,// France - 789,// MetropolitanFrance - 808,// FrenchGuiana - 821,// FrenchPolynesia - 837,// FrenchSouthernTerritories - 863,// Gabon - 869,// Gambia - 876,// Georgia - 884,// Germany - 892,// Ghana - 898,// Gibraltar - 908,// Greece - 915,// Greenland - 925,// Grenada - 933,// Guadeloupe - 944,// Guam - 949,// Guatemala - 959,// Guinea - 966,// GuineaBissau - 979,// Guyana - 986,// Haiti - 992,// HeardAndMcDonaldIslands - 1016,// Honduras - 1025,// HongKong - 1034,// Hungary - 1042,// Iceland - 1050,// India - 1056,// Indonesia - 1066,// Iran - 1071,// Iraq - 1076,// Ireland - 1084,// Israel - 1091,// Italy - 1097,// Jamaica - 1105,// Japan - 1111,// Jordan - 1118,// Kazakhstan - 1129,// Kenya - 1135,// Kiribati - 1144,// DemocraticRepublicOfKorea - 1170,// RepublicOfKorea - 1186,// Kuwait - 1193,// Kyrgyzstan - 1204,// Lao - 1208,// Latvia - 1215,// Lebanon - 1223,// Lesotho - 1231,// Liberia - 1239,// LibyanArabJamahiriya - 1260,// Liechtenstein - 1274,// Lithuania - 1284,// Luxembourg - 1295,// Macau - 1301,// Macedonia - 1311,// Madagascar - 1322,// Malawi - 1329,// Malaysia - 1338,// Maldives - 1347,// Mali - 1352,// Malta - 1358,// MarshallIslands - 1374,// Martinique - 1385,// Mauritania - 1396,// Mauritius - 1406,// Mayotte - 1414,// Mexico - 1421,// Micronesia - 1432,// Moldova - 1440,// Monaco - 1447,// Mongolia - 1456,// Montserrat - 1467,// Morocco - 1475,// Mozambique - 1486,// Myanmar - 1494,// Namibia - 1502,// Nauru - 1508,// Nepal - 1514,// Netherlands - 1526,// NetherlandsAntilles - 1546,// NewCaledonia - 1559,// NewZealand - 1570,// Nicaragua - 1580,// Niger - 1586,// Nigeria - 1594,// Niue - 1599,// NorfolkIsland - 1613,// NorthernMarianaIslands - 1636,// Norway - 1643,// Oman - 1648,// Pakistan - 1657,// Palau - 1663,// PalestinianTerritory - 1684,// Panama - 1691,// PapuaNewGuinea - 1706,// Paraguay - 1715,// Peru - 1720,// Philippines - 1732,// Pitcairn - 1741,// Poland - 1748,// Portugal - 1757,// PuertoRico - 1768,// Qatar - 1774,// Reunion - 1782,// Romania - 1790,// RussianFederation - 1808,// Rwanda - 1815,// SaintKittsAndNevis - 1834,// StLucia - 1842,// StVincentAndTheGrenadines - 1868,// Samoa - 1874,// SanMarino - 1884,// SaoTomeAndPrincipe - 1903,// SaudiArabia - 1915,// Senegal - 1923,// Seychelles - 1934,// SierraLeone - 1946,// Singapore - 1956,// Slovakia - 1965,// Slovenia - 1974,// SolomonIslands - 1989,// Somalia - 1997,// SouthAfrica - 2009,// SouthGeorgiaAndTheSouthSandwichIslands - 2048,// Spain - 2054,// SriLanka - 2063,// StHelena - 2072,// StPierreAndMiquelon - 2092,// Sudan - 2098,// Suriname - 2107,// SvalbardAndJanMayenIslands - 2134,// Swaziland - 2144,// Sweden - 2151,// Switzerland - 2163,// SyrianArabRepublic - 2182,// Taiwan - 2189,// Tajikistan - 2200,// Tanzania - 2209,// Thailand - 2218,// Togo - 2223,// Tokelau - 2231,// Tonga - 2237,// TrinidadAndTobago - 2255,// Tunisia - 2263,// Turkey - 2270,// Turkmenistan - 2283,// TurksAndCaicosIslands - 2305,// Tuvalu - 2312,// Uganda - 2319,// Ukraine - 2327,// UnitedArabEmirates - 2346,// UnitedKingdom - 2360,// UnitedStates - 2373,// UnitedStatesMinorOutlyingIslands - 2406,// Uruguay - 2414,// Uzbekistan - 2425,// Vanuatu - 2433,// VaticanCityState - 2450,// Venezuela - 2460,// VietNam - 2468,// BritishVirginIslands - 2489,// USVirginIslands - 2505,// WallisAndFutunaIslands - 2528,// WesternSahara - 2542,// Yemen - 2548,// Yugoslavia - 2559,// Zambia - 2566// Zimbabwe -}; - -static const char language_code_list[] = -" " // Unused -" " // C -"ab" // Abkhazian -"om" // Afan -"aa" // Afar -"af" // Afrikaans -"sq" // Albanian -"am" // Amharic -"ar" // Arabic -"hy" // Armenian -"as" // Assamese -"ay" // Aymara -"az" // Azerbaijani -"ba" // Bashkir -"eu" // Basque -"bn" // Bengali -"dz" // Bhutani -"bh" // Bihari -"bi" // Bislama -"br" // Breton -"bg" // Bulgarian -"my" // Burmese -"be" // Byelorussian -"km" // Cambodian -"ca" // Catalan -"zh" // Chinese -"co" // Corsican -"hr" // Croatian -"cs" // Czech -"da" // Danish -"nl" // Dutch -"en" // English -"eo" // Esperanto -"et" // Estonian -"fo" // Faroese -"fj" // Fiji -"fi" // Finnish -"fr" // French -"fy" // Frisian -"gd" // Gaelic -"gl" // Galician -"ka" // Georgian -"de" // German -"el" // Greek -"kl" // Greenlandic -"gn" // Guarani -"gu" // Gujarati -"ha" // Hausa -"he" // Hebrew -"hi" // Hindi -"hu" // Hungarian -"is" // Icelandic -"id" // Indonesian -"ia" // Interlingua -"ie" // Interlingue -"iu" // Inuktitut -"ik" // Inupiak -"ga" // Irish -"it" // Italian -"ja" // Japanese -"jv" // Javanese -"kn" // Kannada -"ks" // Kashmiri -"kk" // Kazakh -"rw" // Kinyarwanda -"ky" // Kirghiz -"ko" // Korean -"ku" // Kurdish -"rn" // Kurundi -"lo" // Laothian -"la" // Latin -"lv" // Latvian -"ln" // Lingala -"lt" // Lithuanian -"mk" // Macedonian -"mg" // Malagasy -"ms" // Malay -"ml" // Malayalam -"mt" // Maltese -"mi" // Maori -"mr" // Marathi -"mo" // Moldavian -"mn" // Mongolian -"na" // Nauru -"ne" // Nepali -"no" // Norwegian -"oc" // Occitan -"or" // Oriya -"ps" // Pashto -"fa" // Persian -"pl" // Polish -"pt" // Portuguese -"pa" // Punjabi -"qu" // Quechua -"rm" // RhaetoRomance -"ro" // Romanian -"ru" // Russian -"sm" // Samoan -"sg" // Sangho -"sa" // Sanskrit -"sr" // Serbian -"sh" // SerboCroatian -"st" // Sesotho -"tn" // Setswana -"sn" // Shona -"sd" // Sindhi -"si" // Singhalese -"ss" // Siswati -"sk" // Slovak -"sl" // Slovenian -"so" // Somali -"es" // Spanish -"su" // Sundanese -"sw" // Swahili -"sv" // Swedish -"tl" // Tagalog -"tg" // Tajik -"ta" // Tamil -"tt" // Tatar -"te" // Telugu -"th" // Thai -"bo" // Tibetan -"ti" // Tigrinya -"to" // Tonga -"ts" // Tsonga -"tr" // Turkish -"tk" // Turkmen -"tw" // Twi -"ug" // Uigur -"uk" // Ukrainian -"ur" // Urdu -"uz" // Uzbek -"vi" // Vietnamese -"vo" // Volapuk -"cy" // Welsh -"wo" // Wolof -"xh" // Xhosa -"yi" // Yiddish -"yo" // Yoruba -"za" // Zhuang -"zu" // Zulu -; - -static const char country_code_list[] = -" " // AnyLanguage -"AF" // Afghanistan -"AL" // Albania -"DZ" // Algeria -"AS" // AmericanSamoa -"AD" // Andorra -"AO" // Angola -"AI" // Anguilla -"AQ" // Antarctica -"AG" // AntiguaAndBarbuda -"AR" // Argentina -"AM" // Armenia -"AW" // Aruba -"AU" // Australia -"AT" // Austria -"AZ" // Azerbaijan -"BS" // Bahamas -"BH" // Bahrain -"BD" // Bangladesh -"BB" // Barbados -"BY" // Belarus -"BE" // Belgium -"BZ" // Belize -"BJ" // Benin -"BM" // Bermuda -"BT" // Bhutan -"BO" // Bolivia -"BA" // BosniaAndHerzegowina -"BW" // Botswana -"BV" // BouvetIsland -"BR" // Brazil -"IO" // BritishIndianOceanTerritory -"BN" // BruneiDarussalam -"BG" // Bulgaria -"BF" // BurkinaFaso -"BI" // Burundi -"KH" // Cambodia -"CM" // Cameroon -"CA" // Canada -"CV" // CapeVerde -"KY" // CaymanIslands -"CF" // CentralAfricanRepublic -"TD" // Chad -"CL" // Chile -"CN" // China -"CX" // ChristmasIsland -"CC" // CocosIslands -"CO" // Colombia -"KM" // Comoros -"CD" // DemocraticRepublicOfCongo -"CG" // PeoplesRepublicOfCongo -"CK" // CookIslands -"CR" // CostaRica -"CI" // IvoryCoast -"HR" // Croatia -"CU" // Cuba -"CY" // Cyprus -"CZ" // CzechRepublic -"DK" // Denmark -"DJ" // Djibouti -"DM" // Dominica -"DO" // DominicanRepublic -"TL" // EastTimor -"EC" // Ecuador -"EG" // Egypt -"SV" // ElSalvador -"GQ" // EquatorialGuinea -"ER" // Eritrea -"EE" // Estonia -"ET" // Ethiopia -"FK" // FalklandIslands -"FO" // FaroeIslands -"FJ" // Fiji -"FI" // Finland -"FR" // France -"FX" // MetropolitanFrance -"GF" // FrenchGuiana -"PF" // FrenchPolynesia -"TF" // FrenchSouthernTerritories -"GA" // Gabon -"GM" // Gambia -"GE" // Georgia -"DE" // Germany -"GH" // Ghana -"GI" // Gibraltar -"GR" // Greece -"GL" // Greenland -"GD" // Grenada -"GP" // Guadeloupe -"GU" // Guam -"GT" // Guatemala -"GN" // Guinea -"GW" // GuineaBissau -"GY" // Guyana -"HT" // Haiti -"HM" // HeardAndMcDonaldIslands -"HN" // Honduras -"HK" // HongKong -"HU" // Hungary -"IS" // Iceland -"IN" // India -"ID" // Indonesia -"IR" // Iran -"IQ" // Iraq -"IE" // Ireland -"IL" // Israel -"IT" // Italy -"JM" // Jamaica -"JP" // Japan -"JO" // Jordan -"KZ" // Kazakhstan -"KE" // Kenya -"KI" // Kiribati -"KP" // DemocraticRepublicOfKorea -"KR" // RepublicOfKorea -"KW" // Kuwait -"KG" // Kyrgyzstan -"LA" // Lao -"LV" // Latvia -"LB" // Lebanon -"LS" // Lesotho -"LR" // Liberia -"LY" // LibyanArabJamahiriya -"LI" // Liechtenstein -"LT" // Lithuania -"LU" // Luxembourg -"MO" // Macau -"MK" // Macedonia -"MG" // Madagascar -"MW" // Malawi -"MY" // Malaysia -"MV" // Maldives -"ML" // Mali -"MT" // Malta -"MH" // MarshallIslands -"MQ" // Martinique -"MR" // Mauritania -"MU" // Mauritius -"YT" // Mayotte -"MX" // Mexico -"FM" // Micronesia -"MD" // Moldova -"MC" // Monaco -"MN" // Mongolia -"MS" // Montserrat -"MA" // Morocco -"MZ" // Mozambique -"MM" // Myanmar -"NA" // Namibia -"NR" // Nauru -"NP" // Nepal -"NL" // Netherlands -"AN" // NetherlandsAntilles -"NC" // NewCaledonia -"NZ" // NewZealand -"NI" // Nicaragua -"NE" // Niger -"NG" // Nigeria -"NU" // Niue -"NF" // NorfolkIsland -"MP" // NorthernMarianaIslands -"NO" // Norway -"OM" // Oman -"PK" // Pakistan -"PW" // Palau -"PS" // PalestinianTerritory -"PA" // Panama -"PG" // PapuaNewGuinea -"PY" // Paraguay -"PE" // Peru -"PH" // Philippines -"PN" // Pitcairn -"PL" // Poland -"PT" // Portugal -"PR" // PuertoRico -"QA" // Qatar -"RE" // Reunion -"RO" // Romania -"RU" // RussianFederation -"RW" // Rwanda -"KN" // SaintKittsAndNevis -"LC" // StLucia -"VC" // StVincentAndTheGrenadines -"WS" // Samoa -"SM" // SanMarino -"ST" // SaoTomeAndPrincipe -"SA" // SaudiArabia -"SN" // Senegal -"SC" // Seychelles -"SL" // SierraLeone -"SG" // Singapore -"SK" // Slovakia -"SI" // Slovenia -"SB" // SolomonIslands -"SO" // Somalia -"ZA" // SouthAfrica -"GS" // SouthGeorgiaAndTheSouthSandwichIslands -"ES" // Spain -"LK" // SriLanka -"SH" // StHelena -"PM" // StPierreAndMiquelon -"SD" // Sudan -"SR" // Suriname -"SJ" // SvalbardAndJanMayenIslands -"SZ" // Swaziland -"SE" // Sweden -"CH" // Switzerland -"SY" // SyrianArabRepublic -"TW" // Taiwan -"TJ" // Tajikistan -"TZ" // Tanzania -"TH" // Thailand -"TG" // Togo -"TK" // Tokelau -"TO" // Tonga -"TT" // TrinidadAndTobago -"TN" // Tunisia -"TR" // Turkey -"TM" // Turkmenistan -"TC" // TurksAndCaicosIslands -"TV" // Tuvalu -"UG" // Uganda -"UA" // Ukraine -"AE" // UnitedArabEmirates -"GB" // UnitedKingdom -"US" // UnitedStates -"UM" // UnitedStatesMinorOutlyingIslands -"UY" // Uruguay -"UZ" // Uzbekistan -"VU" // Vanuatu -"VA" // VaticanCityState -"VE" // Venezuela -"VN" // VietNam -"VG" // BritishVirginIslands -"VI" // USVirginIslands -"WF" // WallisAndFutunaIslands -"EH" // WesternSahara -"YE" // Yemen -"YU" // Yugoslavia -"ZM" // Zambia -"ZW" // Zimbabwe -; - -static TQLocale::Language codeToLanguage(const TQString &code) -{ - if (code.length() != 2) - return TQLocale::C; - - ushort uc1 = code.unicode()[0].unicode(); - ushort uc2 = code.unicode()[1].unicode(); - - const char *c = language_code_list; - for (; *c != 0; c += 2) { - if (uc1 == (unsigned char)c[0] && uc2 == (unsigned char)c[1]) - return (TQLocale::Language) ((c - language_code_list)/2); - } - - return TQLocale::C; -} - -static TQLocale::Country codeToCountry(const TQString &code) -{ - if (code.length() != 2) - return TQLocale::AnyCountry; - - ushort uc1 = code.unicode()[0].unicode(); - ushort uc2 = code.unicode()[1].unicode(); - - const char *c = country_code_list; - for (; *c != 0; c += 2) { - if (uc1 == (unsigned char)c[0] && uc2 == (unsigned char)c[1]) - return (TQLocale::Country) ((c - country_code_list)/2); - } - - return TQLocale::AnyCountry; -} - -static TQString languageToCode(TQLocale::Language language) -{ - if (language == TQLocale::C) - return "C"; - - TQString code; - code.setLength(2); - const char *c = language_code_list + 2*(uint)language; - code[0] = c[0]; - code[1] = c[1]; - return code; -} - -static TQString countryToCode(TQLocale::Country country) -{ - if (country == TQLocale::AnyCountry) - return TQString::null; - - TQString code; - code.setLength(2); - const char *c = country_code_list + 2*(uint)country; - code[0] = c[0]; - code[1] = c[1]; - return code; -} - -const TQLocalePrivate *TQLocale::default_d = 0; - -TQString TQLocalePrivate::infinity() const -{ - return TQString::fromLatin1("inf"); -} - -TQString TQLocalePrivate::nan() const -{ - return TQString::fromLatin1("nan"); -} - -#if defined(Q_OS_WIN) -/* Win95 doesn't have a function to return the ISO lang/country name of the user's locale. - Instead it can return a "Windows code". This maps windows codes to ISO country names. */ - -struct WindowsToISOListElt { - int windows_code; - char iso_name[6]; -}; - -static const WindowsToISOListElt windows_to_iso_list[] = { - { 0x0401, "ar_SA" }, - { 0x0402, "bg\0 " }, - { 0x0403, "ca\0 " }, - { 0x0404, "zh_TW" }, - { 0x0405, "cs\0 " }, - { 0x0406, "da\0 " }, - { 0x0407, "de\0 " }, - { 0x0408, "el\0 " }, - { 0x0409, "en_US" }, - { 0x040a, "es\0 " }, - { 0x040b, "fi\0 " }, - { 0x040c, "fr\0 " }, - { 0x040d, "he\0 " }, - { 0x040e, "hu\0 " }, - { 0x040f, "is\0 " }, - { 0x0410, "it\0 " }, - { 0x0411, "ja\0 " }, - { 0x0412, "ko\0 " }, - { 0x0413, "nl\0 " }, - { 0x0414, "no\0 " }, - { 0x0415, "pl\0 " }, - { 0x0416, "pt_BR" }, - { 0x0418, "ro\0 " }, - { 0x0419, "ru\0 " }, - { 0x041a, "hr\0 " }, - { 0x041c, "sq\0 " }, - { 0x041d, "sv\0 " }, - { 0x041e, "th\0 " }, - { 0x041f, "tr\0 " }, - { 0x0420, "ur\0 " }, - { 0x0421, "in\0 " }, - { 0x0422, "uk\0 " }, - { 0x0423, "be\0 " }, - { 0x0425, "et\0 " }, - { 0x0426, "lv\0 " }, - { 0x0427, "lt\0 " }, - { 0x0429, "fa\0 " }, - { 0x042a, "vi\0 " }, - { 0x042d, "eu\0 " }, - { 0x042f, "mk\0 " }, - { 0x0436, "af\0 " }, - { 0x0438, "fo\0 " }, - { 0x0439, "hi\0 " }, - { 0x043e, "ms\0 " }, - { 0x0458, "mt\0 " }, - { 0x0801, "ar_IQ" }, - { 0x0804, "zh_CN" }, - { 0x0807, "de_CH" }, - { 0x0809, "en_GB" }, - { 0x080a, "es_MX" }, - { 0x080c, "fr_BE" }, - { 0x0810, "it_CH" }, - { 0x0812, "ko\0 " }, - { 0x0813, "nl_BE" }, - { 0x0814, "no\0 " }, - { 0x0816, "pt\0 " }, - { 0x081a, "sr\0 " }, - { 0x081d, "sv_FI" }, - { 0x0c01, "ar_EG" }, - { 0x0c04, "zh_HK" }, - { 0x0c07, "de_AT" }, - { 0x0c09, "en_AU" }, - { 0x0c0a, "es\0 " }, - { 0x0c0c, "fr_CA" }, - { 0x0c1a, "sr\0 " }, - { 0x1001, "ar_LY" }, - { 0x1004, "zh_SG" }, - { 0x1007, "de_LU" }, - { 0x1009, "en_CA" }, - { 0x100a, "es_GT" }, - { 0x100c, "fr_CH" }, - { 0x1401, "ar_DZ" }, - { 0x1407, "de_LI" }, - { 0x1409, "en_NZ" }, - { 0x140a, "es_CR" }, - { 0x140c, "fr_LU" }, - { 0x1801, "ar_MA" }, - { 0x1809, "en_IE" }, - { 0x180a, "es_PA" }, - { 0x1c01, "ar_TN" }, - { 0x1c09, "en_ZA" }, - { 0x1c0a, "es_DO" }, - { 0x2001, "ar_OM" }, - { 0x2009, "en_JM" }, - { 0x200a, "es_VE" }, - { 0x2401, "ar_YE" }, - { 0x2409, "en\0 " }, - { 0x240a, "es_CO" }, - { 0x2801, "ar_SY" }, - { 0x2809, "en_BZ" }, - { 0x280a, "es_PE" }, - { 0x2c01, "ar_JO" }, - { 0x2c09, "en_TT" }, - { 0x2c0a, "es_AR" }, - { 0x3001, "ar_LB" }, - { 0x300a, "es_EC" }, - { 0x3401, "ar_KW" }, - { 0x340a, "es_CL" }, - { 0x3801, "ar_AE" }, - { 0x380a, "es_UY" }, - { 0x3c01, "ar_BH" }, - { 0x3c0a, "es_PY" }, - { 0x4001, "ar_QA" }, - { 0x400a, "es_BO" }, - { 0x440a, "es_SV" }, - { 0x480a, "es_HN" }, - { 0x4c0a, "es_NI" }, - { 0x500a, "es_PR" } -}; - -static const int windows_to_iso_count - = sizeof(windows_to_iso_list)/sizeof(WindowsToISOListElt); - -static const char *winLangCodeToIsoName(int code) -{ - int cmp = code - windows_to_iso_list[0].windows_code; - if (cmp < 0) - return 0; - - if (cmp == 0) - return windows_to_iso_list[0].iso_name; - - int begin = 0; - int end = windows_to_iso_count; - - while (end - begin > 1) { - uint mid = (begin + end)/2; - - const WindowsToISOListElt *elt = windows_to_iso_list + mid; - int cmp = code - elt->windows_code; - if (cmp < 0) - end = mid; - else if (cmp > 0) - begin = mid; - else - return elt->iso_name; - } - - return 0; - -} -#endif // Q_OS_WIN - -const char* TQLocalePrivate::systemLocaleName() -{ - static TQCString lang; - lang = getenv( "LANG" ); - -#if defined( Q_OS_MAC ) - if ( !lang.isEmpty() ) - return lang; - - char mac_ret[255]; - if(!LocaleRefGetPartString(NULL, kLocaleLanguageMask | kLocaleRegionMask, 255, mac_ret)) - lang = mac_ret; -#endif - -#if defined(TQ_WS_WIN) - if ( !lang.isEmpty() ) { - long id = 0; - bool ok = false; - id = qstrtoll(lang.data(), 0, 0, &ok); - if ( !ok || id == 0 || id < INT_MIN || id > INT_MAX ) - return lang; - else - return winLangCodeToIsoName( (int)id ); - } - - if (qWinVersion() == TQt::WV_95) { - lang = winLangCodeToIsoName(GetUserDefaultLangID()); - } else { - QT_WA( { - wchar_t out[256]; - TQString language; - TQString sublanguage; - if ( GetLocaleInfoW( LOCALE_USER_DEFAULT, LOCALE_SISO639LANGNAME , out, 255 ) ) - language = TQString::fromUcs2( (ushort*)out ); - if ( GetLocaleInfoW( LOCALE_USER_DEFAULT, LOCALE_SISO3166CTRYNAME, out, 255 ) ) - sublanguage = TQString::fromUcs2( (ushort*)out ).lower(); - lang = language; - if ( sublanguage != language && !sublanguage.isEmpty() ) - lang += "_" + sublanguage.upper(); - } , { - char out[256]; - TQString language; - TQString sublanguage; - if ( GetLocaleInfoA( LOCALE_USER_DEFAULT, LOCALE_SISO639LANGNAME, out, 255 ) ) - language = TQString::fromLocal8Bit( out ); - if ( GetLocaleInfoA( LOCALE_USER_DEFAULT, LOCALE_SISO3166CTRYNAME, out, 255 ) ) - sublanguage = TQString::fromLocal8Bit( out ).lower(); - lang = language; - if ( sublanguage != language && !sublanguage.isEmpty() ) - lang += "_" + sublanguage.upper(); - } ); - } -#endif - if ( lang.isEmpty() ) - lang = "C"; - - return lang; -} - -static const TQLocalePrivate *findLocale(TQLocale::Language language, - TQLocale::Country country) -{ - unsigned language_id = (unsigned)language; - unsigned country_id = (unsigned)country; - - uint idx = locale_index[language_id]; - - const TQLocalePrivate *d = locale_data + idx; - - if (idx == 0) // default language has no associated country - return d; - - if (country == TQLocale::AnyCountry) - return d; - - Q_ASSERT(d->languageId() == language_id); - - while (d->languageId() == language_id - && d->countryId() != country_id) - ++d; - - if (d->countryId() == country_id - && d->languageId() == language_id) - return d; - - return locale_data + idx; -} - -/*! - \class TQLocale - \brief The TQLocale class converts between numbers and their - string representations in various languages. - - \reentrant - \ingroup text - - It is initialized with a country/language pair in its constructor - and offers number-to-string and string-to-number conversion - functions simmilar to those in TQString. - - \code - TQLocale egyptian(TQLocale::Arabic, TQLocale::Egypt); - TQString s1 = egyptian.toString(1.571429E+07, 'e'); - TQString s2 = egyptian.toString(10); - - double d = egyptian.toDouble(s1); - int s2 = egyptian.toInt(s2); - \endcode - - TQLocale supports the concept of a default locale, which is - determined from the system's locale settings at application - startup. The default locale can be changed by calling the - static member setDefault(). The default locale has the - following effects: - - \list - \i If a TQLocale object is constructed with the default constructor, - it will use the default locale's settings. - \i TQString::toDouble() interprets the string according to the default - locale. If this fails, it falls back on the "C" locale. - \i TQString::arg() uses the default locale to format a number when - its position specifier in the format string contains an 'L', - e.g. "%L1". - \endlist - - \code - TQLocale::setDefault(TQLocale(TQLocale::Hebrew, TQLocale::Israel)); - TQLocale hebrew; // Constructs a default TQLocale - TQString s1 = hebrew.toString(15714.3, 'e'); - - bool ok; - double d; - - TQLocale::setDefault(TQLocale::C); - d = TQString( "1234,56" ).toDouble(&ok); // ok == false - d = TQString( "1234.56" ).toDouble(&ok); // ok == true, d == 1234.56 - - TQLocale::setDefault(TQLocale::German); - d = TQString( "1234,56" ).toDouble(&ok); // ok == true, d == 1234.56 - d = TQString( "1234.56" ).toDouble(&ok); // ok == true, d == 1234.56 - - TQLocale::setDefault(TQLocale(TQLocale::English, TQLocale::UnitedStates)); - str = TQString( "%1 %L2 %L3" ) - .arg( 12345 ) - .arg( 12345 ) - .arg( 12345, 0, 16 ); - // str == "12345 12,345 3039" - \endcode - - When a language/country pair is specified in the constructor, one - of three things can happen: - - \list - \i If the language/country pair is found in the database, it is used. - \i If the language is found but the country is not, or if the country - is \c AnyCountry, the language is used with the most - appropriate available country (for example, Germany for German), - \i If neither the language nor the country are found, TQLocale - defaults to the default locale (see setDefault()). - \endlist - - The "C" locale is identical to English/UnitedStates. - - Use language() and country() to determine the actual language and - country values used. - - An alternative method for constructing a TQLocale object is by - specifying the locale name. - - \code - TQLocale korean("ko"); - TQLocale swiss("de_CH"); - \endcode - - This constructor converts the locale name to a language/country - pair; it does not use the system locale database. - - All the methods in TQLocale, with the exception of setDefault(), - are reentrant. - - \sa TQString::toDouble() TQString::arg() - - The double-to-string and string-to-double conversion functions are - covered by the following licenses: - - \legalese - - Copyright (c) 1991 by AT&T. - - Permission to use, copy, modify, and distribute this software for any - purpose without fee is hereby granted, provided that this entire notice - is included in all copies of any software which is or includes a copy - or modification of this software and in all copies of the supporting - documentation for such software. - - THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED - WARRANTY. IN PARTICULAR, NEITHER THE AUTHOR NOR AT&T MAKES ANY - REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY - OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. - - This product includes software developed by the University of - California, Berkeley and its contributors. -*/ - -/*! - \enum TQLocale::Language - - This enumerated type is used to specify a language. - - \value C Identical to English/UnitedStates - \value Abkhazian - \value Afan - \value Afar - \value Afrikaans - \value Albanian - \value Amharic - \value Arabic - \value Armenian - \value Assamese - \value Aymara - \value Azerbaijani - \value Bashkir - \value Basque - \value Bengali - \value Bhutani - \value Bihari - \value Bislama - \value Breton - \value Bulgarian - \value Burmese - \value Byelorussian - \value Cambodian - \value Catalan - \value Chinese - \value Corsican - \value Croatian - \value Czech - \value Danish - \value Dutch - \value English - \value Esperanto - \value Estonian - \value Faroese - \value FijiLanguage - \value Finnish - \value French - \value Frisian - \value Gaelic - \value Galician - \value Georgian - \value German - \value Greek - \value Greenlandic - \value Guarani - \value Gujarati - \value Hausa - \value Hebrew - \value Hindi - \value Hungarian - \value Icelandic - \value Indonesian - \value Interlingua - \value Interlingue - \value Inuktitut - \value Inupiak - \value Irish - \value Italian - \value Japanese - \value Javanese - \value Kannada - \value Kashmiri - \value Kazakh - \value Kinyarwanda - \value Kirghiz - \value Korean - \value Kurdish - \value Kurundi - \value Laothian - \value Latin - \value Latvian - \value Lingala - \value Lithuanian - \value Macedonian - \value Malagasy - \value Malay - \value Malayalam - \value Maltese - \value Maori - \value Marathi - \value Moldavian - \value Mongolian - \value NauruLanguage - \value Nepali - \value Norwegian - \value Occitan - \value Oriya - \value Pashto - \value Persian - \value Polish - \value Portuguese - \value Punjabi - \value Quechua - \value RhaetoRomance - \value Romanian - \value Russian - \value Samoan - \value Sangho - \value Sanskrit - \value Serbian - \value SerboCroatian - \value Sesotho - \value Setswana - \value Shona - \value Sindhi - \value Singhalese - \value Siswati - \value Slovak - \value Slovenian - \value Somali - \value Spanish - \value Sundanese - \value Swahili - \value Swedish - \value Tagalog - \value Tajik - \value Tamil - \value Tatar - \value Telugu - \value Thai - \value Tibetan - \value Tigrinya - \value TongaLanguage - \value Tsonga - \value Turkish - \value Turkmen - \value Twi - \value Uigur - \value Ukrainian - \value Urdu - \value Uzbek - \value Vietnamese - \value Volapuk - \value Welsh - \value Wolof - \value Xhosa - \value Yiddish - \value Yoruba - \value Zhuang - \value Zulu -*/ - -/*! - \enum TQLocale::Country - - This enumerated type is used to specify a country. - - \value AnyCountry - \value Afghanistan - \value Albania - \value Algeria - \value AmericanSamoa - \value Andorra - \value Angola - \value Anguilla - \value Antarctica - \value AntiguaAndBarbuda - \value Argentina - \value Armenia - \value Aruba - \value Australia - \value Austria - \value Azerbaijan - \value Bahamas - \value Bahrain - \value Bangladesh - \value Barbados - \value Belarus - \value Belgium - \value Belize - \value Benin - \value Bermuda - \value Bhutan - \value Bolivia - \value BosniaAndHerzegowina - \value Botswana - \value BouvetIsland - \value Brazil - \value BritishIndianOceanTerritory - \value BruneiDarussalam - \value Bulgaria - \value BurkinaFaso - \value Burundi - \value Cambodia - \value Cameroon - \value Canada - \value CapeVerde - \value CaymanIslands - \value CentralAfricanRepublic - \value Chad - \value Chile - \value China - \value ChristmasIsland - \value CocosIslands - \value Colombia - \value Comoros - \value DemocraticRepublicOfCongo - \value PeoplesRepublicOfCongo - \value CookIslands - \value CostaRica - \value IvoryCoast - \value Croatia - \value Cuba - \value Cyprus - \value CzechRepublic - \value Denmark - \value Djibouti - \value Dominica - \value DominicanRepublic - \value EastTimor - \value Ecuador - \value Egypt - \value ElSalvador - \value EquatorialGuinea - \value Eritrea - \value Estonia - \value Ethiopia - \value FalklandIslands - \value FaroeIslands - \value FijiCountry - \value Finland - \value France - \value MetropolitanFrance - \value FrenchGuiana - \value FrenchPolynesia - \value FrenchSouthernTerritories - \value Gabon - \value Gambia - \value Georgia - \value Germany - \value Ghana - \value Gibraltar - \value Greece - \value Greenland - \value Grenada - \value Guadeloupe - \value Guam - \value Guatemala - \value Guinea - \value GuineaBissau - \value Guyana - \value Haiti - \value HeardAndMcDonaldIslands - \value Honduras - \value HongKong - \value Hungary - \value Iceland - \value India - \value Indonesia - \value Iran - \value Iraq - \value Ireland - \value Israel - \value Italy - \value Jamaica - \value Japan - \value Jordan - \value Kazakhstan - \value Kenya - \value Kiribati - \value DemocraticRepublicOfKorea - \value RepublicOfKorea - \value Kuwait - \value Kyrgyzstan - \value Lao - \value Latvia - \value Lebanon - \value Lesotho - \value Liberia - \value LibyanArabJamahiriya - \value Liechtenstein - \value Lithuania - \value Luxembourg - \value Macau - \value Macedonia - \value Madagascar - \value Malawi - \value Malaysia - \value Maldives - \value Mali - \value Malta - \value MarshallIslands - \value Martinique - \value Mauritania - \value Mauritius - \value Mayotte - \value Mexico - \value Micronesia - \value Moldova - \value Monaco - \value Mongolia - \value Montserrat - \value Morocco - \value Mozambique - \value Myanmar - \value Namibia - \value NauruCountry - \value Nepal - \value Netherlands - \value NetherlandsAntilles - \value NewCaledonia - \value NewZealand - \value Nicaragua - \value Niger - \value Nigeria - \value Niue - \value NorfolkIsland - \value NorthernMarianaIslands - \value Norway - \value Oman - \value Pakistan - \value Palau - \value PalestinianTerritory - \value Panama - \value PapuaNewGuinea - \value Paraguay - \value Peru - \value Philippines - \value Pitcairn - \value Poland - \value Portugal - \value PuertoRico - \value Qatar - \value Reunion - \value Romania - \value RussianFederation - \value Rwanda - \value SaintKittsAndNevis - \value StLucia - \value StVincentAndTheGrenadines - \value Samoa - \value SanMarino - \value SaoTomeAndPrincipe - \value SaudiArabia - \value Senegal - \value Seychelles - \value SierraLeone - \value Singapore - \value Slovakia - \value Slovenia - \value SolomonIslands - \value Somalia - \value SouthAfrica - \value SouthGeorgiaAndTheSouthSandwichIslands - \value Spain - \value SriLanka - \value StHelena - \value StPierreAndMiquelon - \value Sudan - \value Suriname - \value SvalbardAndJanMayenIslands - \value Swaziland - \value Sweden - \value Switzerland - \value SyrianArabRepublic - \value Taiwan - \value Tajikistan - \value Tanzania - \value Thailand - \value Togo - \value Tokelau - \value TongaCountry - \value TrinidadAndTobago - \value Tunisia - \value Turkey - \value Turkmenistan - \value TurksAndCaicosIslands - \value Tuvalu - \value Uganda - \value Ukraine - \value UnitedArabEmirates - \value UnitedKingdom - \value UnitedStates - \value UnitedStatesMinorOutlyingIslands - \value Uruguay - \value Uzbekistan - \value Vanuatu - \value VaticanCityState - \value Venezuela - \value VietNam - \value BritishVirginIslands - \value USVirginIslands - \value WallisAndFutunaIslands - \value WesternSahara - \value Yemen - \value Yugoslavia - \value Zambia - \value Zimbabwe -*/ - -/*! - Constructs a TQLocale object with the specified \a name, - which has the format - "language[_country][.codeset][@modifier]" or "C", where: - - \list - \i language is a lowercase, two-letter, ISO 639 language code, - \i territory is an uppercase, two-letter, ISO 3166 country code, - \i and codeset and modifier are ignored. - \endlist - - If the string violates the locale format, or language is not - a valid ISO 369 code, the "C" locale is used instead. If country - is not present, or is not a valid ISO 3166 code, the most - appropriate country is chosen for the specified language. - - The language and country codes are converted to their respective - \c Language and \c Country enums. After this conversion is - performed the constructor behaves exactly like TQLocale(Country, - Language). - - This constructor is much slower than TQLocale(Country, Language). - - \sa name() -*/ - -TQLocale::TQLocale(const TQString &name) -{ - Language lang = C; - Country cntry = AnyCountry; - - uint l = name.length(); - - do { - if (l < 2) - break; - - const TQChar *uc = name.unicode(); - if (l > 2 - && uc[2] != '_' - && uc[2] != '.' - && uc[2] != '@') - break; - - lang = codeToLanguage(name.mid(0, 2)); - if (lang == C) - break; - - if (l == 2 || uc[2] == '.' || uc[2] == '@') - break; - - // we have uc[2] == '_' - if (l < 5) - break; - - if (l > 5 && uc[5] != '.' && uc[5] != '@') - break; - - cntry = codeToCountry(name.mid(3, 2)); - } while (FALSE); - - d = findLocale(lang, cntry); -} - -/*! - Constructs a TQLocale object initialized with the default locale. - - \sa setDefault() -*/ - -TQLocale::TQLocale() -{ - if (default_d == 0) - default_d = system().d; - - d = default_d; -} - -/*! - Constructs a TQLocale object with the specified \a language and \a - country. - - \list - \i If the language/country pair is found in the database, it is used. - \i If the language is found but the country is not, or if the country - is \c AnyCountry, the language is used with the most - appropriate available country (for example, Germany for German), - \i If neither the language nor the country are found, TQLocale - defaults to the default locale (see setDefault()). - \endlist - - The language and country that are actually used can be queried - using language() and country(). - - \sa setDefault() language() country() -*/ - -TQLocale::TQLocale(Language language, Country country) -{ - d = findLocale(language, country); - - // If not found, should default to system - if (d->languageId() == TQLocale::C && language != TQLocale::C) { - if (default_d == 0) - default_d = system().d; - - d = default_d; - } -} - -/*! - Constructs a TQLocale object as a copy of \a other. -*/ - -TQLocale::TQLocale(const TQLocale &other) -{ - d = other.d; -} - -/*! - Assigns \a other to this TQLocale object and returns a reference - to this TQLocale object. -*/ - -TQLocale &TQLocale::operator=(const TQLocale &other) -{ - d = other.d; - return *this; -} - -/*! - \nonreentrant - - Sets the global default locale to \a locale. These - values are used when a TQLocale object is constructed with - no arguments. If this function is not called, the system's - locale is used. - - \warning In a multithreaded application, the default locale - should be set at application startup, before any non-GUI threads - are created. - - \sa system() c() -*/ - -void TQLocale::setDefault(const TQLocale &locale) -{ - default_d = locale.d; -} - -/*! - Returns the language of this locale. - - \sa TQLocale() -*/ -TQLocale::Language TQLocale::language() const -{ - return (Language)d->languageId(); -} - -/*! - Returns the country of this locale. - - \sa TQLocale() -*/ -TQLocale::Country TQLocale::country() const -{ - return (Country)d->countryId(); -} - -/*! - Returns the language and country of this locale as a - string of the form "language_country", where - language is a lowercase, two-letter ISO 639 language code, - and country is an uppercase, two-letter ISO 3166 country code. - - \sa TQLocale() -*/ - -TQString TQLocale::name() const -{ - Language l = language(); - - TQString result = languageToCode(l); - - if (l == C) - return result; - - Country c = country(); - if (c == AnyCountry) - return result; - - result.append('_'); - result.append(countryToCode(c)); - - return result; -} - -/*! - Returns a TQString containing the name of \a language. -*/ - -TQString TQLocale::languageToString(Language language) -{ - if ((uint)language > (uint)TQLocale::LastLanguage) - return "Unknown"; - return language_name_list + language_name_index[(uint)language]; -} - -/*! - Returns a TQString containing the name of \a country. -*/ - -TQString TQLocale::countryToString(Country country) -{ - if ((uint)country > (uint)TQLocale::LastCountry) - return "Unknown"; - return country_name_list + country_name_index[(uint)country]; -} - -/*! - Returns the short int represented by the localized string \a s, or - 0 if the conversion failed. - - If \a ok is not 0, reports failure by setting - *ok to false and success by setting *ok to true. - - This function ignores leading and trailing whitespace. - - \sa toString() -*/ - -short TQLocale::toShort(const TQString &s, bool *ok) const -{ - TQ_LLONG i = toLongLong(s, ok); - if (i < SHRT_MIN || i > SHRT_MAX) { - if (ok != 0) - *ok = FALSE; - return 0; - } - return (short) i; -} - -/*! - Returns the unsigned short int represented by the localized string - \a s, or 0 if the conversion failed. - - If \a ok is not 0, reports failure by setting - *ok to false and success by setting *ok to true. - - This function ignores leading and trailing whitespace. - - \sa toString() -*/ - -ushort TQLocale::toUShort(const TQString &s, bool *ok) const -{ - TQ_ULLONG i = toULongLong(s, ok); - if (i > USHRT_MAX) { - if (ok != 0) - *ok = FALSE; - return 0; - } - return (ushort) i; -} - -/*! - Returns the int represented by the localized string \a s, or 0 if - the conversion failed. - - If \a ok is not 0, reports failure by setting *ok to false and - success by setting *ok to true. - - This function ignores leading and trailing whitespace. - - \sa toString() -*/ - -int TQLocale::toInt(const TQString &s, bool *ok) const -{ - TQ_LLONG i = toLongLong(s, ok); - if (i < INT_MIN || i > INT_MAX) { - if (ok != 0) - *ok = FALSE; - return 0; - } - return (int) i; -} - -/*! - Returns the unsigned int represented by the localized string \a s, - or 0 if the conversion failed. - - If \a ok is not 0, reports failure by setting - *ok to false and success by setting *ok to true. - - This function ignores leading and trailing whitespace. - - \sa toString() -*/ - -uint TQLocale::toUInt(const TQString &s, bool *ok) const -{ - TQ_ULLONG i = toULongLong(s, ok); - if (i > UINT_MAX) { - if (ok != 0) - *ok = FALSE; - return 0; - } - return (uint) i; -} - -/*! - Returns the long int represented by the localized string \a s, or - 0 if the conversion failed. - - If \a ok is not 0, reports failure by setting - *ok to false and success by setting *ok to true. - - This function ignores leading and trailing whitespace. - - \sa toString() -*/ - -TQ_LONG TQLocale::toLong(const TQString &s, bool *ok) const -{ - TQ_LLONG i = toLongLong(s, ok); - if (i < LONG_MIN || i > LONG_MAX) { - if (ok != 0) - *ok = FALSE; - return 0; - } - return (TQ_LONG) i; -} - -/*! - Returns the unsigned long int represented by the localized string - \a s, or 0 if the conversion failed. - - If \a ok is not 0, reports failure by setting - *ok to false and success by setting *ok to true. - - This function ignores leading and trailing whitespace. - - \sa toString() -*/ - -TQ_ULONG TQLocale::toULong(const TQString &s, bool *ok) const -{ - TQ_ULLONG i = toULongLong(s, ok); - if (i > ULONG_MAX) { - if (ok != 0) - *ok = FALSE; - return 0; - } - return (TQ_ULONG) i; -} - -/*! - Returns the long long int represented by the localized string \a - s, or 0 if the conversion failed. - - If \a ok is not 0, reports failure by setting - *ok to false and success by setting *ok to true. - - This function ignores leading and trailing whitespace. - - \sa toString() -*/ - - -TQ_LLONG TQLocale::toLongLong(const TQString &s, bool *ok) const -{ - return d->stringToLongLong(s, 0, ok, TQLocalePrivate::ParseGroupSeparators); -} - -/*! - Returns the unsigned long long int represented by the localized - string \a s, or 0 if the conversion failed. - - If \a ok is not 0, reports failure by setting - *ok to false and success by setting *ok to true. - - This function ignores leading and trailing whitespace. - - \sa toString() -*/ - - -TQ_ULLONG TQLocale::toULongLong(const TQString &s, bool *ok) const -{ - return d->stringToUnsLongLong(s, 0, ok, TQLocalePrivate::ParseGroupSeparators); -} - -/*! - Returns the float represented by the localized string \a s, or 0.0 - if the conversion failed. - - If \a ok is not 0, reports failure by setting - *ok to false and success by setting *ok to true. - - This function ignores leading and trailing whitespace. - - \sa toString() -*/ - -#define QT_MAX_FLOAT 3.4028234663852886e+38 - -float TQLocale::toFloat(const TQString &s, bool *ok) const -{ - bool myOk; - double d = toDouble(s, &myOk); - if (!myOk || d > QT_MAX_FLOAT || d < -QT_MAX_FLOAT) { - if (ok != 0) - *ok = FALSE; - return 0.0; - } - if (ok != 0) - *ok = TRUE; - return (float) d; -} - -/*! - Returns the double represented by the localized string \a s, or - 0.0 if the conversion failed. - - If \a ok is not 0, reports failure by setting - *ok to false and success by setting *ok to true. - - Unlike TQString::toDouble(), this function does not fall back to - the "C" locale if the string cannot be interpreted in this - locale. - - \code - bool ok; - double d; - - TQLocale c(TQLocale::C); - d = c.toDouble( "1234.56", &ok ); // ok == true, d == 1234.56 - d = c.toDouble( "1,234.56", &ok ); // ok == true, d == 1234.56 - d = c.toDouble( "1234,56", &ok ); // ok == false - - TQLocale german(TQLocale::German); - d = german.toDouble( "1234,56", &ok ); // ok == true, d == 1234.56 - d = german.toDouble( "1.234,56", &ok ); // ok == true, d == 1234.56 - d = german.toDouble( "1234.56", &ok ); // ok == false - - d = german.toDouble( "1.234", &ok ); // ok == true, d == 1234.0 - \endcode - - Notice that the last conversion returns 1234.0, because '.' is the - thousands group separator in the German locale. - - This function ignores leading and trailing whitespace. - - \sa toString() TQString::toDouble() -*/ - -double TQLocale::toDouble(const TQString &s, bool *ok) const -{ - return d->stringToDouble(s, ok, TQLocalePrivate::ParseGroupSeparators); -} - -/*! - Returns a localized string representation of \a i. - - \sa toLongLong() -*/ - -TQString TQLocale::toString(TQ_LLONG i) const -{ - return d->longLongToString(i, -1, 10, -1, TQLocalePrivate::ThousandsGroup); -} - -/*! - \overload - - \sa toULongLong() -*/ - -TQString TQLocale::toString(TQ_ULLONG i) const -{ - return d->unsLongLongToString(i, -1, 10, -1, TQLocalePrivate::ThousandsGroup); -} - -static bool qIsUpper(char c) -{ - return c >= 'A' && c <= 'Z'; -} - -static char qToLower(char c) -{ - if (c >= 'A' && c <= 'Z') - return c - 'A' + 'a'; - else - return c; -} - -/*! - \overload - - \a f and \a prec have the same meaning as in TQString::number(double, char, int). - - \sa toDouble() -*/ - -TQString TQLocale::toString(double i, char f, int prec) const -{ - TQLocalePrivate::DoubleForm form = TQLocalePrivate::DFDecimal; - uint flags = 0; - - if (qIsUpper(f)) - flags = TQLocalePrivate::CapitalEorX; - f = qToLower(f); - - switch (f) { - case 'f': - form = TQLocalePrivate::DFDecimal; - break; - case 'e': - form = TQLocalePrivate::DFExponent; - break; - case 'g': - form = TQLocalePrivate::DFSignificantDigits; - break; - default: - break; - } - - flags |= TQLocalePrivate::ThousandsGroup; - return d->doubleToString(i, prec, form, -1, flags); -} - -/*! - \fn TQLocale TQLocale::c() - - Returns a TQLocale object initialized to the "C" locale. - - \sa system() -*/ - -/*! - Returns a TQLocale object initialized to the system locale. -*/ - -TQLocale TQLocale::system() -{ -#ifdef Q_OS_UNIX - const char *s = getenv("LC_NUMERIC"); - if (s == 0) - s = getenv("LC_ALL"); - if (s != 0) - return TQLocale(s); -#endif - return TQLocale(TQLocalePrivate::systemLocaleName()); -} - -/*! -\fn TQString TQLocale::toString(short i) const - -\overload - -\sa toShort() -*/ - -/*! -\fn TQString TQLocale::toString(ushort i) const - -\overload - -\sa toUShort() -*/ - -/*! -\fn TQString TQLocale::toString(int i) const - -\overload - -\sa toInt() -*/ - -/*! -\fn TQString TQLocale::toString(uint i) const - -\overload - -\sa toUInt() -*/ - -/*! -\fn TQString TQLocale::toString(TQ_LONG i) const - -\overload - -\sa toLong() -*/ - -/*! -\fn TQString TQLocale::toString(TQ_ULONG i) const - -\overload - -\sa toULong() -*/ - -/*! -\fn TQString TQLocale::toString(float i, char f = 'g', int prec = 6) const - -\overload - -\a f and \a prec have the same meaning as in TQString::number(double, char, int). - -\sa toDouble() -*/ - - -bool TQLocalePrivate::isDigit(TQChar d) const -{ - return zero().unicode() <= d.unicode() - && zero().unicode() + 10 > d.unicode(); -} - -static char digitToCLocale(TQChar zero, TQChar d) -{ - if (zero.unicode() <= d.unicode() - && zero.unicode() + 10 > d.unicode()) - return '0' + d.unicode() - zero.unicode(); - - tqWarning("TQLocalePrivate::digitToCLocale(): bad digit: row=%d, cell=%d", d.row(), d.cell()); - return TQChar(0); -} - -static TQString qulltoa(TQ_ULLONG l, int base, const TQLocalePrivate &locale) -{ - TQChar buff[65]; // length of MAX_ULLONG in base 2 - TQChar *p = buff + 65; - - if (base != 10 || locale.zero().unicode() == '0') { - while (l != 0) { - int c = l % base; - - --p; - - if (c < 10) - *p = '0' + c; - else - *p = c - 10 + 'a'; - - l /= base; - } - } - else { - while (l != 0) { - int c = l % base; - - *(--p) = locale.zero().unicode() + c; - - l /= base; - } - } - - return TQString(p, 65 - (p - buff)); -} - -static TQString qlltoa(TQ_LLONG l, int base, const TQLocalePrivate &locale) -{ - return qulltoa(l < 0 ? -l : l, base, locale); -} - -enum PrecisionMode { - PMDecimalDigits = 0x01, - PMSignificantDigits = 0x02, - PMChopTrailingZeros = 0x03 -}; - -static TQString &decimalForm(TQString &digits, int decpt, uint precision, - PrecisionMode pm, - bool always_show_decpt, - bool thousands_group, - const TQLocalePrivate &locale) -{ - if (decpt < 0) { - for (int i = 0; i < -decpt; ++i) - digits.prepend(locale.zero()); - decpt = 0; - } - else if ((uint)decpt > digits.length()) { - for (uint i = digits.length(); i < (uint)decpt; ++i) - digits.append(locale.zero()); - } - - if (pm == PMDecimalDigits) { - uint decimal_digits = digits.length() - decpt; - for (uint i = decimal_digits; i < precision; ++i) - digits.append(locale.zero()); - } - else if (pm == PMSignificantDigits) { - for (uint i = digits.length(); i < precision; ++i) - digits.append(locale.zero()); - } - else { // pm == PMChopTrailingZeros - } - - if (always_show_decpt || (uint)decpt < digits.length()) - digits.insert(decpt, locale.decimal()); - - if (thousands_group) { - for (int i = decpt - 3; i > 0; i -= 3) - digits.insert(i, locale.group()); - } - - if (decpt == 0) - digits.prepend(locale.zero()); - - return digits; -} - -static TQString &exponentForm(TQString &digits, int decpt, uint precision, - PrecisionMode pm, - bool always_show_decpt, - const TQLocalePrivate &locale) -{ - int exp = decpt - 1; - - if (pm == PMDecimalDigits) { - for (uint i = digits.length(); i < precision + 1; ++i) - digits.append(locale.zero()); - } - else if (pm == PMSignificantDigits) { - for (uint i = digits.length(); i < precision; ++i) - digits.append(locale.zero()); - } - else { // pm == PMChopTrailingZeros - } - - if (always_show_decpt || digits.length() > 1) - digits.insert(1, locale.decimal()); - - digits.append(locale.exponential()); - digits.append(locale.longLongToString(exp, 2, 10, - -1, TQLocalePrivate::AlwaysShowSign)); - - return digits; -} - -static bool isZero(double d) -{ - uchar *ch = (uchar *)&d; - if (ByteOrder == BigEndian) { - return !(ch[0] & 0x7F || ch[1] || ch[2] || ch[3] || ch[4] || ch[5] || ch[6] || ch[7]); - } else { - return !(ch[7] & 0x7F || ch[6] || ch[5] || ch[4] || ch[3] || ch[2] || ch[1] || ch[0]); - } -} - -TQString TQLocalePrivate::doubleToString(double d, - int precision, - DoubleForm form, - int width, - unsigned flags) const -{ - if (precision == -1) - precision = 6; - if (width == -1) - width = 0; - - bool negative = FALSE; - bool special_number = FALSE; // nan, +/-inf - TQString num_str; - -#ifdef Q_OS_WIN - // Detect special numbers (nan, +/-inf) - if (qIsInf(d)) { - num_str = infinity(); - special_number = TRUE; - negative = d < 0; - } else if (qIsNan(d)) { - num_str = nan(); - special_number = TRUE; - } -#else - // Comparing directly to INFINITY gives weird results on some systems. - double tmp_infinity = INFINITY; - - // Detect special numbers (nan, +/-inf) - if (d == tmp_infinity || d == -tmp_infinity) { - num_str = infinity(); - special_number = TRUE; - negative = d < 0; - } else if (qIsNan(d)) { - num_str = nan(); - special_number = TRUE; - } -#endif - - // Handle normal numbers - if (!special_number) { - int decpt, sign; - TQString digits; - -#ifdef QT_QLOCALE_USES_FCVT -#ifdef TQT_THREAD_SUPPORT - static bool dummy_for_mutex; - TQMutex *fcvt_mutex = tqt_global_mutexpool ? tqt_global_mutexpool->get( &dummy_for_mutex ) : 0; -# define FCVT_LOCK if (fcvt_mutex) fcvt_mutex->lock() -# define FCVT_UNLOCK if (fcvt_mutex) fcvt_mutex->unlock() -#else -# define FCVT_LOCK -# define FCVT_UNLOCK -#endif - if (form == DFDecimal) { - FCVT_LOCK; - digits = fcvt(d, precision, &decpt, &sign); - FCVT_UNLOCK; - } else { - int pr = precision; - if (form == DFExponent) - ++pr; - else if (form == DFSignificantDigits && pr == 0) - pr = 1; - FCVT_LOCK; - digits = ecvt(d, pr, &decpt, &sign); - FCVT_UNLOCK; - - // Chop trailing zeros - if (digits.length() > 0) { - int last_nonzero_idx = digits.length() - 1; - while (last_nonzero_idx > 0 - && digits.unicode()[last_nonzero_idx] == '0') - --last_nonzero_idx; - digits.truncate(last_nonzero_idx + 1); - } - - } - -#else - int mode; - if (form == DFDecimal) - mode = 3; - else - mode = 2; - - /* This next bit is a bit quirky. In DFExponent form, the precision - is the number of digits after decpt. So that would suggest using - mode=3 for qdtoa. But qdtoa behaves strangely when mode=3 and - precision=0. So we get around this by using mode=2 and reasoning - that we want precision+1 significant digits, since the decimal - point in this mode is always after the first digit. */ - int pr = precision; - if (form == DFExponent) - ++pr; - - char *rve = 0; - char *buff = 0; - digits = qdtoa(d, mode, pr, &decpt, &sign, &rve, &buff); - if (buff != 0) - free(buff); -#endif // QT_QLOCALE_USES_FCVT - - if (zero().unicode() != '0') { - for (uint i = 0; i < digits.length(); ++i) - digits.ref(i).unicode() += zero().unicode() - '0'; - } - - bool always_show_decpt = flags & Alternate; - switch (form) { - case DFExponent: { - num_str = exponentForm(digits, decpt, precision, PMDecimalDigits, - always_show_decpt, *this); - break; - } - case DFDecimal: { - num_str = decimalForm(digits, decpt, precision, PMDecimalDigits, - always_show_decpt, flags & ThousandsGroup, - *this); - break; - } - case DFSignificantDigits: { - PrecisionMode mode = (flags & Alternate) ? - PMSignificantDigits : PMChopTrailingZeros; - - if (decpt != (int)digits.length() && (decpt <= -4 || decpt > (int)precision)) - num_str = exponentForm(digits, decpt, precision, mode, - always_show_decpt, *this); - else - num_str = decimalForm(digits, decpt, precision, mode, - always_show_decpt, flags & ThousandsGroup, - *this); - break; - } - } - - negative = sign != 0 && !isZero(d); - } - - // pad with zeros. LeftAdjusted overrides this flag). Also, we don't - // pad special numbers - if (flags & TQLocalePrivate::ZeroPadded - && !(flags & TQLocalePrivate::LeftAdjusted) - && !special_number) { - int num_pad_chars = width - (int)num_str.length(); - // leave space for the sign - if (negative - || flags & TQLocalePrivate::AlwaysShowSign - || flags & TQLocalePrivate::BlankBeforePositive) - --num_pad_chars; - - for (int i = 0; i < num_pad_chars; ++i) - num_str.prepend(zero()); - } - - // add sign - if (negative) - num_str.prepend(minus()); - else if (flags & TQLocalePrivate::AlwaysShowSign) - num_str.prepend(plus()); - else if (flags & TQLocalePrivate::BlankBeforePositive) - num_str.prepend(' '); - - if (flags & TQLocalePrivate::CapitalEorX) - num_str = num_str.upper(); - - return num_str; -} - -TQString TQLocalePrivate::longLongToString(TQ_LLONG l, int precision, - int base, int width, - unsigned flags) const -{ - bool precision_not_specified = FALSE; - if (precision == -1) { - precision_not_specified = TRUE; - precision = 1; - } - - bool negative = l < 0; - if (base != 10) { - // these are not suported by sprintf for octal and hex - flags &= ~AlwaysShowSign; - flags &= ~BlankBeforePositive; - negative = FALSE; // neither are negative numbers - } - - TQString num_str; - if (base == 10) - num_str = qlltoa(l, base, *this); - else - num_str = qulltoa(l, base, *this); - - uint cnt_thousand_sep = 0; - if (flags & ThousandsGroup && base == 10) { - for (int i = (int)num_str.length() - 3; i > 0; i -= 3) { - num_str.insert(i, group()); - ++cnt_thousand_sep; - } - } - - for (int i = num_str.length()/* - cnt_thousand_sep*/; i < precision; ++i) - num_str.prepend(base == 10 ? zero() : TQChar('0')); - - if (flags & Alternate - && base == 8 - && (num_str.isEmpty() - || num_str[0].unicode() != '0')) - num_str.prepend('0'); - - // LeftAdjusted overrides this flag ZeroPadded. sprintf only padds - // when precision is not specified in the format string - bool zero_padded = flags & ZeroPadded - && !(flags & LeftAdjusted) - && precision_not_specified; - - if (zero_padded) { - int num_pad_chars = width - (int)num_str.length(); - - // leave space for the sign - if (negative - || flags & AlwaysShowSign - || flags & BlankBeforePositive) - --num_pad_chars; - - // leave space for optional '0x' in hex form - if (base == 16 - && flags & Alternate - && l != 0) - num_pad_chars -= 2; - - for (int i = 0; i < num_pad_chars; ++i) - num_str.prepend(base == 10 ? zero() : TQChar('0')); - } - - if (base == 16 - && flags & Alternate - && l != 0) - num_str.prepend("0x"); - - // add sign - if (negative) - num_str.prepend(minus()); - else if (flags & AlwaysShowSign) - num_str.prepend(base == 10 ? plus() : TQChar('+')); - else if (flags & BlankBeforePositive) - num_str.prepend(' '); - - if (flags & CapitalEorX) - num_str = num_str.upper(); - - return num_str; -} - -TQString TQLocalePrivate::unsLongLongToString(TQ_ULLONG l, int precision, - int base, int width, - unsigned flags) const -{ - bool precision_not_specified = FALSE; - if (precision == -1) { - precision_not_specified = TRUE; - precision = 1; - } - - TQString num_str = qulltoa(l, base, *this); - - uint cnt_thousand_sep = 0; - if (flags & ThousandsGroup && base == 10) { - for (int i = (int)num_str.length() - 3; i > 0; i -=3) { - num_str.insert(i, group()); - ++cnt_thousand_sep; - } - } - - for (int i = num_str.length()/* - cnt_thousand_sep*/; i < precision; ++i) - num_str.prepend(base == 10 ? zero() : TQChar('0')); - - if (flags & Alternate - && base == 8 - && (num_str.isEmpty() - || num_str[0].unicode() != '0')) - num_str.prepend('0'); - - // LeftAdjusted overrides this flag ZeroPadded. sprintf only padds - // when precision is not specified in the format string - bool zero_padded = flags & ZeroPadded - && !(flags & LeftAdjusted) - && precision_not_specified; - - if (zero_padded) { - int num_pad_chars = width - (int)num_str.length(); - - // leave space for optional '0x' in hex form - if (base == 16 - && flags & Alternate - && l != 0) - num_pad_chars -= 2; - - for (int i = 0; i < num_pad_chars; ++i) - num_str.prepend(base == 10 ? zero() : TQChar('0')); - } - - if (base == 16 - && flags & Alternate - && l != 0) - num_str.prepend("0x"); - - if (flags & CapitalEorX) - num_str = num_str.upper(); - - return num_str; -} - -static inline bool isLatin1Digit(const TQChar &c) -{ - return c.unicode() >= '0' && c.unicode() <= '9'; -} - -// Removes thousand-group separators, ie. the ',' in "1,234,567.89e-5" -bool TQLocalePrivate::removeGroupSeparators(TQString &num_str) const -{ - int group_cnt = 0; // counts number of group chars - int decpt_idx = -1; - - // Find the decimal point and check if there are any group chars - uint i = 0; - for (; i < num_str.length(); ++i) { - TQChar c = num_str.unicode()[i]; - - if (c.unicode() == ',') { - // check that there are digits before and after the separator - if (i == 0 || !isLatin1Digit(num_str.unicode()[i - 1])) - return FALSE; - if (i == num_str.length() + 1 || !isLatin1Digit(num_str.unicode()[i + 1])) - return FALSE; - ++group_cnt; - } - else if (c.unicode() == '.') { - // Fail if more than one decimal points - if (decpt_idx != -1) - return FALSE; - decpt_idx = i; - } else if (c.unicode() == 'e' || c.unicode() == 'E') { - // an 'e' or 'E' - if we have not encountered a decimal - // point, this is where it "is". - if (decpt_idx == -1) - decpt_idx = i; - } - } - - // If no group chars, we're done - if (group_cnt == 0) - return TRUE; - - // No decimal point means that it "is" at the end of the string - if (decpt_idx == -1) - decpt_idx = num_str.length(); - - i = 0; - while (i < num_str.length() && group_cnt > 0) { - TQChar c = num_str.unicode()[i]; - - if (c.unicode() == ',') { - // Don't allow group chars after the decimal point - if ((int)i > decpt_idx) - return FALSE; - - // Check that it is placed correctly relative to the decpt - if ((decpt_idx - i) % 4 != 0) - return FALSE; - - // Remove it - num_str.remove(i, 1); - - --group_cnt; - --decpt_idx; // adjust decpt_idx - } else { - // Check that we are not missing a separator - if ((int)i < decpt_idx && (decpt_idx - i) % 4 == 0) - return FALSE; - ++i; - } - } - - return TRUE; -} - -static void stripWhiteSpaceInPlace(TQString &s) -{ - uint i = 0; - while (i < s.length() && s.unicode()[i].isSpace()) - ++i; - if (i > 0) - s.remove(0, i); - - i = s.length(); - - if (i == 0) - return; - --i; - while (i > 0 && s.unicode()[i].isSpace()) - --i; - if (i + 1 < s.length()) - s.truncate(i + 1); -} - -/* - Converts a number in locale to its representation in the C locale. - Only has to guarantee that a string that is a correct representation of - a number will be converted. If junk is passed in, junk will be passed - out and the error will be detected during the actual conversion to a - number. We can't detect junk here, since we don't even know the base - of the number. -*/ -bool TQLocalePrivate::numberToCLocale(TQString &l_num, - GroupSeparatorMode group_sep_mode) const -{ - stripWhiteSpaceInPlace(l_num); - - if (l_num.isEmpty()) - return FALSE; - - for (uint idx = 0; idx < l_num.length(); ++idx) { - TQChar &c = l_num.ref(idx); - - if (isDigit(c)) - c = digitToCLocale(zero(), c); - else if (c == plus()) - c = '+'; - else if (c == minus()) - c = '-'; - else if (c == decimal()) - c = '.'; - else if (c == group()) - c = ','; - // In several languages group() is the char 0xA0, which looks like a space. - // People use a regular space instead of it and complain it doesn't work. - else if (group().unicode() == 0xA0 && c.unicode() == ' ') - c = ','; - else if (c == exponential() || c == exponential().upper()) - c = 'e'; - else if (c == list()) - c = ';'; - else if (c == percent()) - c = '%'; - else if (c.unicode() >= 'A' && c.unicode() <= 'Z') - c = c.lower(); - else if (c.unicode() >= 'a' && c.unicode() <= 'z') - ; // do nothing - else - return FALSE; - } - - if (group_sep_mode == ParseGroupSeparators - && !removeGroupSeparators(l_num)) - return FALSE; - - return TRUE; -} - -double TQLocalePrivate::stringToDouble(TQString num, - bool *ok, - GroupSeparatorMode group_sep_mode) const -{ - if (!numberToCLocale(num, group_sep_mode)) { - if (ok != 0) - *ok = FALSE; - return 0.0; - } - - if (ok != 0) - *ok = TRUE; - - if (num == "nan") - return NAN; - - if (num == "+inf" - || num == "inf") - return INFINITY; - - if (num == "-inf") - return -INFINITY; - - bool _ok; - const char *num_buff = num.latin1(); - -#ifdef QT_QLOCALE_USES_FCVT - char *endptr; - double d = strtod(num_buff, &endptr); - _ok = TRUE; -#else - const char *endptr; - double d = qstrtod(num_buff, &endptr, &_ok); -#endif - - if (!_ok || *endptr != '\0') { - if (ok != 0) - *ok = FALSE; - return 0.0; - } - else - return d; -} - -TQ_LLONG TQLocalePrivate::stringToLongLong(TQString num, int base, - bool *ok, - GroupSeparatorMode group_sep_mode) const -{ - if (!numberToCLocale(num, group_sep_mode)) { - if (ok != 0) - *ok = FALSE; - return 0; - } - - bool _ok; - const char *endptr; - const char *num_buff = num.latin1(); - TQ_LLONG l = qstrtoll(num_buff, &endptr, base, &_ok); - - if (!_ok || *endptr != '\0') { - if (ok != 0) - *ok = FALSE; - return 0; - } - - if (ok != 0) - *ok = TRUE; - return l; -} - -TQ_ULLONG TQLocalePrivate::stringToUnsLongLong(TQString num, int base, - bool *ok, - GroupSeparatorMode group_sep_mode) const -{ - if (!numberToCLocale(num, group_sep_mode)) { - if (ok != 0) - *ok = FALSE; - return 0; - } - - bool _ok; - const char *endptr; - const char *num_buff = num.latin1(); - TQ_ULLONG l = qstrtoull(num_buff, &endptr, base, &_ok); - - if (!_ok || *endptr != '\0') { - if (ok != 0) - *ok = FALSE; - return 0; - } - - if (ok != 0) - *ok = TRUE; - return l; -} - -/*- - * Copyright (c) 1992, 1993 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -// static char sccsid[] = "@(#)strtouq.c 8.1 (Berkeley) 6/4/93"; -// "$FreeBSD: src/lib/libc/stdlib/strtoull.c,v 1.5.2.1 2001/03/02 09:45:20 obrien Exp $"; - -/* - * Convert a string to an TQ_ULLONG integer. - * - * Ignores `locale' stuff. Assumes that the upper and lower case - * alphabets and digits are each contiguous. - */ -static TQ_ULLONG qstrtoull(const char *nptr, const char **endptr, int base, bool *ok) -{ - const char *s = nptr; - TQ_ULLONG acc; - unsigned char c; - TQ_ULLONG qbase, cutoff; - int neg, any, cutlim; - - if (ok != 0) - *ok = TRUE; - - /* - * See strtoq for comments as to the logic used. - */ - s = nptr; - do { - c = *s++; - } while (isspace(c)); - if (c == '-') { - if (ok != 0) - *ok = FALSE; - if (endptr != 0) - *endptr = s - 1; - return 0; - } else { - neg = 0; - if (c == '+') - c = *s++; - } - if ((base == 0 || base == 16) && - c == '0' && (*s == 'x' || *s == 'X')) { - c = s[1]; - s += 2; - base = 16; - } - if (base == 0) - base = c == '0' ? 8 : 10; - qbase = (unsigned)base; - cutoff = (TQ_ULLONG)ULLONG_MAX / qbase; - cutlim = (TQ_ULLONG)ULLONG_MAX % qbase; - for (acc = 0, any = 0;; c = *s++) { - if (!isascii(c)) - break; - if (isdigit(c)) - c -= '0'; - else if (isalpha(c)) - c -= isupper(c) ? 'A' - 10 : 'a' - 10; - else - break; - if (c >= base) - break; - if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim)) - any = -1; - else { - any = 1; - acc *= qbase; - acc += c; - } - } - if (any < 0) { - acc = ULLONG_MAX; - if (ok != 0) - *ok = FALSE; - } - else if (neg) - acc = (~acc) + 1; - if (endptr != 0) - *endptr = (char *)(any ? s - 1 : nptr); - return (acc); -} - - -// "$FreeBSD: src/lib/libc/stdlib/strtoll.c,v 1.5.2.1 2001/03/02 09:45:20 obrien Exp $"; - - -/* - * Convert a string to a TQ_LLONG integer. - * - * Ignores `locale' stuff. Assumes that the upper and lower case - * alphabets and digits are each contiguous. - */ -static TQ_LLONG qstrtoll(const char *nptr, const char **endptr, int base, bool *ok) -{ - const char *s; - TQ_ULLONG acc; - unsigned char c; - TQ_ULLONG qbase, cutoff; - int neg, any, cutlim; - - if (ok != 0) - *ok = TRUE; - - /* - * Skip white space and pick up leading +/- sign if any. - * If base is 0, allow 0x for hex and 0 for octal, else - * assume decimal; if base is already 16, allow 0x. - */ - s = nptr; - do { - c = *s++; - } while (isspace(c)); - if (c == '-') { - neg = 1; - c = *s++; - } else { - neg = 0; - if (c == '+') - c = *s++; - } - if ((base == 0 || base == 16) && - c == '0' && (*s == 'x' || *s == 'X')) { - c = s[1]; - s += 2; - base = 16; - } - if (base == 0) - base = c == '0' ? 8 : 10; - - /* - * Compute the cutoff value between legal numbers and illegal - * numbers. That is the largest legal value, divided by the - * base. An input number that is greater than this value, if - * followed by a legal input character, is too big. One that - * is equal to this value may be valid or not; the limit - * between valid and invalid numbers is then based on the last - * digit. For instance, if the range for quads is - * [-9223372036854775808..9223372036854775807] and the input base - * is 10, cutoff will be set to 922337203685477580 and cutlim to - * either 7 (neg==0) or 8 (neg==1), meaning that if we have - * accumulated a value > 922337203685477580, or equal but the - * next digit is > 7 (or 8), the number is too big, and we will - * return a range error. - * - * Set any if any `digits' consumed; make it negative to indicate - * overflow. - */ - qbase = (unsigned)base; - cutoff = neg ? (TQ_ULLONG)-(LLONG_MIN + LLONG_MAX) + LLONG_MAX - : LLONG_MAX; - cutlim = cutoff % qbase; - cutoff /= qbase; - for (acc = 0, any = 0;; c = *s++) { - if (!isascii(c)) - break; - if (isdigit(c)) - c -= '0'; - else if (isalpha(c)) - c -= isupper(c) ? 'A' - 10 : 'a' - 10; - else - break; - if (c >= base) - break; - if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim)) - any = -1; - else { - any = 1; - acc *= qbase; - acc += c; - } - } - if (any < 0) { - acc = neg ? LLONG_MIN : LLONG_MAX; - if (ok != 0) - *ok = FALSE; - } else if (neg) { - acc = (~acc) + 1; - } - if (endptr != 0) - *endptr = (char *)(any ? s - 1 : nptr); - return (acc); -} - -#ifndef QT_QLOCALE_USES_FCVT - -/* From: NetBSD: strtod.c,v 1.26 1998/02/03 18:44:21 perry Exp */ -/* $FreeBSD: src/lib/libc/stdlib/netbsd_strtod.c,v 1.2.2.2 2001/03/02 17:14:15 tegge Exp $ */ - -/* Please send bug reports to - David M. Gay - AT&T Bell Laboratories, Room 2C-463 - 600 Mountain Avenue - Murray Hill, NJ 07974-2070 - U.S.A. - dmg@research.att.com or research!dmg - */ - -/* strtod for IEEE-, VAX-, and IBM-arithmetic machines. - * - * This strtod returns a nearest machine number to the input decimal - * string (or sets errno to ERANGE). With IEEE arithmetic, ties are - * broken by the IEEE round-even rule. Otherwise ties are broken by - * biased rounding (add half and chop). - * - * Inspired loosely by William D. Clinger's paper "How to Read Floating - * Point Numbers Accurately" [Proc. ACM SIGPLAN '90, pp. 92-101]. - * - * Modifications: - * - * 1. We only require IEEE, IBM, or VAX double-precision - * arithmetic (not IEEE double-extended). - * 2. We get by with floating-point arithmetic in a case that - * Clinger missed -- when we're computing d * 10^n - * for a small integer d and the integer n is not too - * much larger than 22 (the maximum integer k for which - * we can represent 10^k exactly), we may be able to - * compute (d*10^k) * 10^(e-k) with just one roundoff. - * 3. Rather than a bit-at-a-time adjustment of the binary - * result in the hard case, we use floating-point - * arithmetic to determine the adjustment to within - * one bit; only in really hard cases do we need to - * compute a second residual. - * 4. Because of 3., we don't need a large table of powers of 10 - * for ten-to-e (just some small tables, e.g. of 10^k - * for 0 <= k <= 22). - */ - -/* - * #define IEEE_LITTLE_ENDIAN for IEEE-arithmetic machines where the least - * significant byte has the lowest address. - * #define IEEE_BIG_ENDIAN for IEEE-arithmetic machines where the most - * significant byte has the lowest address. - * #define Long int on machines with 32-bit ints and 64-bit longs. - * #define Sudden_Underflow for IEEE-format machines without gradual - * underflow (i.e., that flush to zero on underflow). - * #define IBM for IBM mainframe-style floating-point arithmetic. - * #define VAX for VAX-style floating-point arithmetic. - * #define Unsigned_Shifts if >> does treats its left operand as unsigned. - * #define No_leftright to omit left-right logic in fast floating-point - * computation of dtoa. - * #define Check_FLT_ROUNDS if FLT_ROUNDS can assume the values 2 or 3. - * #define RND_PRODQUOT to use rnd_prod and rnd_quot (assembly routines - * that use extended-precision instructions to compute rounded - * products and quotients) with IBM. - * #define ROUND_BIASED for IEEE-format with biased rounding. - * #define Inaccurate_Divide for IEEE-format with correctly rounded - * products but inaccurate quotients, e.g., for Intel i860. - * #define Just_16 to store 16 bits per 32-bit Long when doing high-precision - * integer arithmetic. Whether this speeds things up or slows things - * down depends on the machine and the number being converted. - * #define KR_headers for old-style C function headers. - * #define Bad_float_h if your system lacks a float.h or if it does not - * define some or all of DBL_DIG, DBL_MAX_10_EXP, DBL_MAX_EXP, - * FLT_RADIX, FLT_ROUNDS, and DBL_MAX. - * #define MALLOC your_malloc, where your_malloc(n) acts like malloc(n) - * if memory is available and otherwise does something you deem - * appropriate. If MALLOC is undefined, malloc will be invoked - * directly -- and assumed always to succeed. - */ - -#if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: strtod.c,v 1.26 1998/02/03 18:44:21 perry Exp $"); -#endif /* LIBC_SCCS and not lint */ - -/* -#if defined(__m68k__) || defined(__sparc__) || defined(__i386__) || \ - defined(__mips__) || defined(__ns32k__) || defined(__alpha__) || \ - defined(__powerpc__) || defined(Q_OS_WIN) || defined(Q_OS_DARWIN) || defined(Q_OS_MACX) || \ - defined(mips) || defined(Q_OS_AIX) || defined(Q_OS_SOLARIS) -# define IEEE_BIG_OR_LITTLE_ENDIAN 1 -#endif -*/ - -// *All* of our architectures have IEEE arithmetic, don't they? -#define IEEE_BIG_OR_LITTLE_ENDIAN 1 - -#ifdef __arm32__ -/* - * Although the CPU is little endian the FP has different - * byte and word endianness. The byte order is still little endian - * but the word order is big endian. - */ -#define IEEE_BIG_OR_LITTLE_ENDIAN -#endif - -#ifdef vax -#define VAX -#endif - -#define Long TQ_INT32 -#define ULong TQ_UINT32 - -#define MALLOC malloc -#define CONST const - -#ifdef BSD_QDTOA_DEBUG -#include -#define Bug(x) {fprintf(stderr, "%s\n", x); exit(1);} -#endif - -#ifdef Unsigned_Shifts -#define Sign_Extend(a,b) if (b < 0) a |= 0xffff0000; -#else -#define Sign_Extend(a,b) /*no-op*/ -#endif - -#if (defined(IEEE_BIG_OR_LITTLE_ENDIAN) + defined(VAX) + defined(IBM)) != 1 -#error Exactly one of IEEE_BIG_OR_LITTLE_ENDIAN, VAX, or IBM should be defined. -#endif - -inline ULong getWord0(const NEEDS_VOLATILE double x) -{ - const NEEDS_VOLATILE uchar *ptr = reinterpret_cast(&x); - if (ByteOrder == BigEndian) { - return (ptr[0]<<24) + (ptr[1]<<16) + (ptr[2]<<8) + ptr[3]; - } else { - return (ptr[7]<<24) + (ptr[6]<<16) + (ptr[5]<<8) + ptr[4]; - } -} - -inline void setWord0(NEEDS_VOLATILE double *x, ULong l) -{ - NEEDS_VOLATILE uchar *ptr = reinterpret_cast(x); - if (ByteOrder == BigEndian) { - ptr[0] = (uchar)(l>>24); - ptr[1] = (uchar)(l>>16); - ptr[2] = (uchar)(l>>8); - ptr[3] = (uchar)l; - } else { - ptr[7] = (uchar)(l>>24); - ptr[6] = (uchar)(l>>16); - ptr[5] = (uchar)(l>>8); - ptr[4] = (uchar)l; - } -} - -inline ULong getWord1(const NEEDS_VOLATILE double x) -{ - const NEEDS_VOLATILE uchar *ptr = reinterpret_cast(&x); - if (ByteOrder == BigEndian) { - return (ptr[4]<<24) + (ptr[5]<<16) + (ptr[6]<<8) + ptr[7]; - } else { - return (ptr[3]<<24) + (ptr[2]<<16) + (ptr[1]<<8) + ptr[0]; - } -} -inline void setWord1(NEEDS_VOLATILE double *x, ULong l) -{ - NEEDS_VOLATILE uchar *ptr = reinterpret_cast(x); - if (ByteOrder == BigEndian) { - ptr[4] = (uchar)(l>>24); - ptr[5] = (uchar)(l>>16); - ptr[6] = (uchar)(l>>8); - ptr[7] = (uchar)l; - } else { - ptr[3] = (uchar)(l>>24); - ptr[2] = (uchar)(l>>16); - ptr[1] = (uchar)(l>>8); - ptr[0] = (uchar)l; - } -} - -static inline void Storeinc(ULong *&a, const ULong &b, const ULong &c) -{ - - *a = (((unsigned short)b) << 16) | ((unsigned short)c); - ++a; -} - -/* #define P DBL_MANT_DIG */ -/* Ten_pmax = floor(P*log(2)/log(5)) */ -/* Bletch = (highest power of 2 < DBL_MAX_10_EXP) / 16 */ -/* Quick_max = floor((P-1)*log(FLT_RADIX)/log(10) - 1) */ -/* Int_max = floor(P*log(FLT_RADIX)/log(10) - 1) */ - -#if defined(IEEE_BIG_OR_LITTLE_ENDIAN) -#define Exp_shift 20 -#define Exp_shift1 20 -#define Exp_msk1 0x100000 -#define Exp_msk11 0x100000 -#define Exp_mask 0x7ff00000 -#define P 53 -#define Bias 1023 -#define IEEE_Arith -#define Emin (-1022) -#define Exp_1 0x3ff00000 -#define Exp_11 0x3ff00000 -#define Ebits 11 -#define Frac_mask 0xfffff -#define Frac_mask1 0xfffff -#define Ten_pmax 22 -#define Bletch 0x10 -#define Bndry_mask 0xfffff -#define Bndry_mask1 0xfffff -#define LSB 1 -#define Sign_bit 0x80000000 -#define Log2P 1 -#define Tiny0 0 -#define Tiny1 1 -#define Quick_max 14 -#define Int_max 14 -#define Infinite(x) (getWord0(x) == 0x7ff00000) /* sufficient test for here */ -#else -#undef Sudden_Underflow -#define Sudden_Underflow -#ifdef IBM -#define Exp_shift 24 -#define Exp_shift1 24 -#define Exp_msk1 0x1000000 -#define Exp_msk11 0x1000000 -#define Exp_mask 0x7f000000 -#define P 14 -#define Bias 65 -#define Exp_1 0x41000000 -#define Exp_11 0x41000000 -#define Ebits 8 /* exponent has 7 bits, but 8 is the right value in b2d */ -#define Frac_mask 0xffffff -#define Frac_mask1 0xffffff -#define Bletch 4 -#define Ten_pmax 22 -#define Bndry_mask 0xefffff -#define Bndry_mask1 0xffffff -#define LSB 1 -#define Sign_bit 0x80000000 -#define Log2P 4 -#define Tiny0 0x100000 -#define Tiny1 0 -#define Quick_max 14 -#define Int_max 15 -#else /* VAX */ -#define Exp_shift 23 -#define Exp_shift1 7 -#define Exp_msk1 0x80 -#define Exp_msk11 0x800000 -#define Exp_mask 0x7f80 -#define P 56 -#define Bias 129 -#define Exp_1 0x40800000 -#define Exp_11 0x4080 -#define Ebits 8 -#define Frac_mask 0x7fffff -#define Frac_mask1 0xffff007f -#define Ten_pmax 24 -#define Bletch 2 -#define Bndry_mask 0xffff007f -#define Bndry_mask1 0xffff007f -#define LSB 0x10000 -#define Sign_bit 0x8000 -#define Log2P 1 -#define Tiny0 0x80 -#define Tiny1 0 -#define Quick_max 15 -#define Int_max 15 -#endif -#endif - -#ifndef IEEE_Arith -#define ROUND_BIASED -#endif - -#ifdef RND_PRODQUOT -#define rounded_product(a,b) a = rnd_prod(a, b) -#define rounded_quotient(a,b) a = rnd_quot(a, b) -extern double rnd_prod(double, double), rnd_quot(double, double); -#else -#define rounded_product(a,b) a *= b -#define rounded_quotient(a,b) a /= b -#endif - -#define Big0 (Frac_mask1 | Exp_msk1*(DBL_MAX_EXP+Bias-1)) -#define Big1 0xffffffff - -#ifndef Just_16 -/* When Pack_32 is not defined, we store 16 bits per 32-bit Long. - * This makes some inner loops simpler and sometimes saves work - * during multiplications, but it often seems to make things slightly - * slower. Hence the default is now to store 32 bits per Long. - */ -#ifndef Pack_32 -#define Pack_32 -#endif -#endif - -#define Kmax 15 - -struct -Bigint { - struct Bigint *next; - int k, maxwds, sign, wds; - ULong x[1]; -}; - - typedef struct Bigint Bigint; - -static Bigint *Balloc(int k) -{ - int x; - Bigint *rv; - - x = 1 << k; - rv = (Bigint *)MALLOC(sizeof(Bigint) + (x-1)*sizeof(Long)); - rv->k = k; - rv->maxwds = x; - rv->sign = rv->wds = 0; - return rv; -} - -static void Bfree(Bigint *v) -{ - free(v); -} - -#define Bcopy(x,y) memcpy((char *)&x->sign, (char *)&y->sign, \ -y->wds*sizeof(Long) + 2*sizeof(int)) - -/* multiply by m and add a */ -static Bigint *multadd(Bigint *b, int m, int a) -{ - int i, wds; - ULong *x, y; -#ifdef Pack_32 - ULong xi, z; -#endif - Bigint *b1; - - wds = b->wds; - x = b->x; - i = 0; - do { -#ifdef Pack_32 - xi = *x; - y = (xi & 0xffff) * m + a; - z = (xi >> 16) * m + (y >> 16); - a = (int)(z >> 16); - *x++ = (z << 16) + (y & 0xffff); -#else - y = *x * m + a; - a = (int)(y >> 16); - *x++ = y & 0xffff; -#endif - } - while(++i < wds); - if (a) { - if (wds >= b->maxwds) { - b1 = Balloc(b->k+1); - Bcopy(b1, b); - Bfree(b); - b = b1; - } - b->x[wds++] = a; - b->wds = wds; - } - return b; -} - -static Bigint *s2b(CONST char *s, int nd0, int nd, ULong y9) -{ - Bigint *b; - int i, k; - Long x, y; - - x = (nd + 8) / 9; - for(k = 0, y = 1; x > y; y <<= 1, k++) ; -#ifdef Pack_32 - b = Balloc(k); - b->x[0] = y9; - b->wds = 1; -#else - b = Balloc(k+1); - b->x[0] = y9 & 0xffff; - b->wds = (b->x[1] = y9 >> 16) ? 2 : 1; -#endif - - i = 9; - if (9 < nd0) { - s += 9; - do b = multadd(b, 10, *s++ - '0'); - while(++i < nd0); - s++; - } - else - s += 10; - for(; i < nd; i++) - b = multadd(b, 10, *s++ - '0'); - return b; -} - -static int hi0bits(ULong x) -{ - int k = 0; - - if (!(x & 0xffff0000)) { - k = 16; - x <<= 16; - } - if (!(x & 0xff000000)) { - k += 8; - x <<= 8; - } - if (!(x & 0xf0000000)) { - k += 4; - x <<= 4; - } - if (!(x & 0xc0000000)) { - k += 2; - x <<= 2; - } - if (!(x & 0x80000000)) { - k++; - if (!(x & 0x40000000)) - return 32; - } - return k; -} - -static int lo0bits(ULong *y) -{ - int k; - ULong x = *y; - - if (x & 7) { - if (x & 1) - return 0; - if (x & 2) { - *y = x >> 1; - return 1; - } - *y = x >> 2; - return 2; - } - k = 0; - if (!(x & 0xffff)) { - k = 16; - x >>= 16; - } - if (!(x & 0xff)) { - k += 8; - x >>= 8; - } - if (!(x & 0xf)) { - k += 4; - x >>= 4; - } - if (!(x & 0x3)) { - k += 2; - x >>= 2; - } - if (!(x & 1)) { - k++; - x >>= 1; - if (!x & 1) - return 32; - } - *y = x; - return k; -} - -static Bigint *i2b(int i) -{ - Bigint *b; - - b = Balloc(1); - b->x[0] = i; - b->wds = 1; - return b; -} - -static Bigint *mult(Bigint *a, Bigint *b) -{ - Bigint *c; - int k, wa, wb, wc; - ULong carry, y, z; - ULong *x, *xa, *xae, *xb, *xbe, *xc, *xc0; -#ifdef Pack_32 - ULong z2; -#endif - - if (a->wds < b->wds) { - c = a; - a = b; - b = c; - } - k = a->k; - wa = a->wds; - wb = b->wds; - wc = wa + wb; - if (wc > a->maxwds) - k++; - c = Balloc(k); - for(x = c->x, xa = x + wc; x < xa; x++) - *x = 0; - xa = a->x; - xae = xa + wa; - xb = b->x; - xbe = xb + wb; - xc0 = c->x; -#ifdef Pack_32 - for(; xb < xbe; xb++, xc0++) { - if ((y = *xb & 0xffff) != 0) { - x = xa; - xc = xc0; - carry = 0; - do { - z = (*x & 0xffff) * y + (*xc & 0xffff) + carry; - carry = z >> 16; - z2 = (*x++ >> 16) * y + (*xc >> 16) + carry; - carry = z2 >> 16; - Storeinc(xc, z2, z); - } - while(x < xae); - *xc = carry; - } - if ((y = *xb >> 16) != 0) { - x = xa; - xc = xc0; - carry = 0; - z2 = *xc; - do { - z = (*x & 0xffff) * y + (*xc >> 16) + carry; - carry = z >> 16; - Storeinc(xc, z, z2); - z2 = (*x++ >> 16) * y + (*xc & 0xffff) + carry; - carry = z2 >> 16; - } - while(x < xae); - *xc = z2; - } - } -#else - for(; xb < xbe; xc0++) { - if (y = *xb++) { - x = xa; - xc = xc0; - carry = 0; - do { - z = *x++ * y + *xc + carry; - carry = z >> 16; - *xc++ = z & 0xffff; - } - while(x < xae); - *xc = carry; - } - } -#endif - for(xc0 = c->x, xc = xc0 + wc; wc > 0 && !*--xc; --wc) ; - c->wds = wc; - return c; -} - -static Bigint *p5s; - -static Bigint *pow5mult(Bigint *b, int k) -{ - Bigint *b1, *p5, *p51; - int i; - static const int p05[3] = { 5, 25, 125 }; - - if ((i = k & 3) != 0) - b = multadd(b, p05[i-1], 0); - - if (!(k >>= 2)) - return b; - if (!(p5 = p5s)) { - /* first time */ - p5 = p5s = i2b(625); - p5->next = 0; - } - for(;;) { - if (k & 1) { - b1 = mult(b, p5); - Bfree(b); - b = b1; - } - if (!(k >>= 1)) - break; - if (!(p51 = p5->next)) { - p51 = p5->next = mult(p5,p5); - p51->next = 0; - } - p5 = p51; - } - return b; -} - -static Bigint *lshift(Bigint *b, int k) -{ - int i, k1, n, n1; - Bigint *b1; - ULong *x, *x1, *xe, z; - -#ifdef Pack_32 - n = k >> 5; -#else - n = k >> 4; -#endif - k1 = b->k; - n1 = n + b->wds + 1; - for(i = b->maxwds; n1 > i; i <<= 1) - k1++; - b1 = Balloc(k1); - x1 = b1->x; - for(i = 0; i < n; i++) - *x1++ = 0; - x = b->x; - xe = x + b->wds; -#ifdef Pack_32 - if (k &= 0x1f) { - k1 = 32 - k; - z = 0; - do { - *x1++ = *x << k | z; - z = *x++ >> k1; - } - while(x < xe); - if ((*x1 = z) != 0) - ++n1; - } -#else - if (k &= 0xf) { - k1 = 16 - k; - z = 0; - do { - *x1++ = *x << k & 0xffff | z; - z = *x++ >> k1; - } - while(x < xe); - if (*x1 = z) - ++n1; - } -#endif - else do - *x1++ = *x++; - while(x < xe); - b1->wds = n1 - 1; - Bfree(b); - return b1; -} - -static int cmp(Bigint *a, Bigint *b) -{ - ULong *xa, *xa0, *xb, *xb0; - int i, j; - - i = a->wds; - j = b->wds; -#ifdef BSD_QDTOA_DEBUG - if (i > 1 && !a->x[i-1]) - Bug("cmp called with a->x[a->wds-1] == 0"); - if (j > 1 && !b->x[j-1]) - Bug("cmp called with b->x[b->wds-1] == 0"); -#endif - if (i -= j) - return i; - xa0 = a->x; - xa = xa0 + j; - xb0 = b->x; - xb = xb0 + j; - for(;;) { - if (*--xa != *--xb) - return *xa < *xb ? -1 : 1; - if (xa <= xa0) - break; - } - return 0; -} - -static Bigint *diff(Bigint *a, Bigint *b) -{ - Bigint *c; - int i, wa, wb; - Long borrow, y; /* We need signed shifts here. */ - ULong *xa, *xae, *xb, *xbe, *xc; -#ifdef Pack_32 - Long z; -#endif - - i = cmp(a,b); - if (!i) { - c = Balloc(0); - c->wds = 1; - c->x[0] = 0; - return c; - } - if (i < 0) { - c = a; - a = b; - b = c; - i = 1; - } - else - i = 0; - c = Balloc(a->k); - c->sign = i; - wa = a->wds; - xa = a->x; - xae = xa + wa; - wb = b->wds; - xb = b->x; - xbe = xb + wb; - xc = c->x; - borrow = 0; -#ifdef Pack_32 - do { - y = (*xa & 0xffff) - (*xb & 0xffff) + borrow; - borrow = y >> 16; - Sign_Extend(borrow, y); - z = (*xa++ >> 16) - (*xb++ >> 16) + borrow; - borrow = z >> 16; - Sign_Extend(borrow, z); - Storeinc(xc, z, y); - } - while(xb < xbe); - while(xa < xae) { - y = (*xa & 0xffff) + borrow; - borrow = y >> 16; - Sign_Extend(borrow, y); - z = (*xa++ >> 16) + borrow; - borrow = z >> 16; - Sign_Extend(borrow, z); - Storeinc(xc, z, y); - } -#else - do { - y = *xa++ - *xb++ + borrow; - borrow = y >> 16; - Sign_Extend(borrow, y); - *xc++ = y & 0xffff; - } - while(xb < xbe); - while(xa < xae) { - y = *xa++ + borrow; - borrow = y >> 16; - Sign_Extend(borrow, y); - *xc++ = y & 0xffff; - } -#endif - while(!*--xc) - wa--; - c->wds = wa; - return c; -} - -static double ulp(double x) -{ - Long L; - double a; - - L = (getWord0(x) & Exp_mask) - (P-1)*Exp_msk1; -#ifndef Sudden_Underflow - if (L > 0) { -#endif -#ifdef IBM - L |= Exp_msk1 >> 4; -#endif - setWord0(&a, L); - setWord1(&a, 0); -#ifndef Sudden_Underflow - } - else { - L = -L >> Exp_shift; - if (L < Exp_shift) { - setWord0(&a, 0x80000 >> L); - setWord1(&a, 0); - } - else { - setWord0(&a, 0); - L -= Exp_shift; - setWord1(&a, L >= 31 ? 1U : 1U << (31 - L)); - } - } -#endif - return a; -} - -static double b2d(Bigint *a, int *e) -{ - ULong *xa, *xa0, w, y, z; - int k; - double d; - - xa0 = a->x; - xa = xa0 + a->wds; - y = *--xa; -#ifdef BSD_QDTOA_DEBUG - if (!y) Bug("zero y in b2d"); -#endif - k = hi0bits(y); - *e = 32 - k; -#ifdef Pack_32 - if (k < Ebits) { - setWord0(&d, Exp_1 | y >> (Ebits - k)); - w = xa > xa0 ? *--xa : 0; - setWord1(&d, y << ((32-Ebits) + k) | w >> (Ebits - k)); - goto ret_d; - } - z = xa > xa0 ? *--xa : 0; - if (k -= Ebits) { - setWord0(&d, Exp_1 | y << k | z >> (32 - k)); - y = xa > xa0 ? *--xa : 0; - setWord1(&d, z << k | y >> (32 - k)); - } - else { - setWord0(&d, Exp_1 | y); - setWord1(&d, z); - } -#else - if (k < Ebits + 16) { - z = xa > xa0 ? *--xa : 0; - setWord0(&d, Exp_1 | y << k - Ebits | z >> Ebits + 16 - k); - w = xa > xa0 ? *--xa : 0; - y = xa > xa0 ? *--xa : 0; - setWord1(&d, z << k + 16 - Ebits | w << k - Ebits | y >> 16 + Ebits - k); - goto ret_d; - } - z = xa > xa0 ? *--xa : 0; - w = xa > xa0 ? *--xa : 0; - k -= Ebits + 16; - setWord0(&d, Exp_1 | y << k + 16 | z << k | w >> 16 - k); - y = xa > xa0 ? *--xa : 0; - setWord1(&d, w << k + 16 | y << k); -#endif - ret_d: - return d; -} - -static Bigint *d2b(double d, int *e, int *bits) -{ - Bigint *b; - int de, i, k; - ULong *x, y, z; - -#ifdef Pack_32 - b = Balloc(1); -#else - b = Balloc(2); -#endif - x = b->x; - - z = getWord0(d) & Frac_mask; - setWord0(&d, getWord0(d) & 0x7fffffff); /* clear sign bit, which we ignore */ -#ifdef Sudden_Underflow - de = (int)(getWord0(d) >> Exp_shift); -#ifndef IBM - z |= Exp_msk11; -#endif -#else - if ((de = (int)(getWord0(d) >> Exp_shift)) != 0) - z |= Exp_msk1; -#endif -#ifdef Pack_32 - if ((y = getWord1(d)) != 0) { - if ((k = lo0bits(&y)) != 0) { - x[0] = y | z << (32 - k); - z >>= k; - } - else - x[0] = y; - i = b->wds = (x[1] = z) ? 2 : 1; - } - else { -#ifdef BSD_QDTOA_DEBUG - if (!z) - Bug("Zero passed to d2b"); -#endif - k = lo0bits(&z); - x[0] = z; - i = b->wds = 1; - k += 32; - } -#else - if (y = getWord1(d)) { - if (k = lo0bits(&y)) - if (k >= 16) { - x[0] = y | z << 32 - k & 0xffff; - x[1] = z >> k - 16 & 0xffff; - x[2] = z >> k; - i = 2; - } - else { - x[0] = y & 0xffff; - x[1] = y >> 16 | z << 16 - k & 0xffff; - x[2] = z >> k & 0xffff; - x[3] = z >> k+16; - i = 3; - } - else { - x[0] = y & 0xffff; - x[1] = y >> 16; - x[2] = z & 0xffff; - x[3] = z >> 16; - i = 3; - } - } - else { -#ifdef BSD_QDTOA_DEBUG - if (!z) - Bug("Zero passed to d2b"); -#endif - k = lo0bits(&z); - if (k >= 16) { - x[0] = z; - i = 0; - } - else { - x[0] = z & 0xffff; - x[1] = z >> 16; - i = 1; - } - k += 32; - } - while(!x[i]) - --i; - b->wds = i + 1; -#endif -#ifndef Sudden_Underflow - if (de) { -#endif -#ifdef IBM - *e = (de - Bias - (P-1) << 2) + k; - *bits = 4*P + 8 - k - hi0bits(getWord0(d) & Frac_mask); -#else - *e = de - Bias - (P-1) + k; - *bits = P - k; -#endif -#ifndef Sudden_Underflow - } - else { - *e = de - Bias - (P-1) + 1 + k; -#ifdef Pack_32 - *bits = 32*i - hi0bits(x[i-1]); -#else - *bits = (i+2)*16 - hi0bits(x[i]); -#endif - } -#endif - return b; -} - -static double ratio(Bigint *a, Bigint *b) -{ - double da, db; - int k, ka, kb; - - da = b2d(a, &ka); - db = b2d(b, &kb); -#ifdef Pack_32 - k = ka - kb + 32*(a->wds - b->wds); -#else - k = ka - kb + 16*(a->wds - b->wds); -#endif -#ifdef IBM - if (k > 0) { - setWord0(&da, getWord0(da) + (k >> 2)*Exp_msk1); - if (k &= 3) - da *= 1 << k; - } - else { - k = -k; - setWord0(&db, getWord0(db) + (k >> 2)*Exp_msk1); - if (k &= 3) - db *= 1 << k; - } -#else - if (k > 0) - setWord0(&da, getWord0(da) + k*Exp_msk1); - else { - k = -k; - setWord0(&db, getWord0(db) + k*Exp_msk1); - } -#endif - return da / db; -} - -static CONST double tens[] = { - 1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, - 1e10, 1e11, 1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19, - 1e20, 1e21, 1e22 -#ifdef VAX - , 1e23, 1e24 -#endif -}; - -#ifdef IEEE_Arith -static CONST double bigtens[] = { 1e16, 1e32, 1e64, 1e128, 1e256 }; -static CONST double tinytens[] = { 1e-16, 1e-32, 1e-64, 1e-128, 1e-256 }; -#define n_bigtens 5 -#else -#ifdef IBM -static CONST double bigtens[] = { 1e16, 1e32, 1e64 }; -static CONST double tinytens[] = { 1e-16, 1e-32, 1e-64 }; -#define n_bigtens 3 -#else -static CONST double bigtens[] = { 1e16, 1e32 }; -static CONST double tinytens[] = { 1e-16, 1e-32 }; -#define n_bigtens 2 -#endif -#endif - -/* - The pre-release gcc3.3 shipped with SuSE 8.2 has a bug which causes - the comparison 1e-100 == 0.0 to return true. As a workaround, we - compare it to a global variable containing 0.0, which produces - correct assembler output. - - ### consider detecting the broken compilers and using the static - ### double for these, and use a #define for all working compilers -*/ -static double g_double_zero = 0.0; - -static double qstrtod(CONST char *s00, CONST char **se, bool *ok) -{ - int bb2, bb5, bbe, bd2, bd5, bbbits, bs2, c, dsign, - e, e1, esign, i, j, k, nd, nd0, nf, nz, nz0, sign; - CONST char *s, *s0, *s1; - double aadj, aadj1, adj, rv, rv0; - Long L; - ULong y, z; - Bigint *bb1, *bd0; - Bigint *bb = NULL, *bd = NULL, *bs = NULL, *delta = NULL;/* pacify gcc */ - - /* - #ifndef KR_headers - CONST char decimal_point = localeconv()->decimal_point[0]; - #else - CONST char decimal_point = '.'; - #endif */ - if (ok != 0) - *ok = TRUE; - - CONST char decimal_point = '.'; - - sign = nz0 = nz = 0; - rv = 0.; - - - for(s = s00; isspace((unsigned char) *s); s++) - ; - - if (*s == '-') { - sign = 1; - s++; - } else if (*s == '+') { - s++; - } - - if (*s == '\0') { - s = s00; - goto ret; - } - - if (*s == '0') { - nz0 = 1; - while(*++s == '0') ; - if (!*s) - goto ret; - } - s0 = s; - y = z = 0; - for(nd = nf = 0; (c = *s) >= '0' && c <= '9'; nd++, s++) - if (nd < 9) - y = 10*y + c - '0'; - else if (nd < 16) - z = 10*z + c - '0'; - nd0 = nd; - if (c == decimal_point) { - c = *++s; - if (!nd) { - for(; c == '0'; c = *++s) - nz++; - if (c > '0' && c <= '9') { - s0 = s; - nf += nz; - nz = 0; - goto have_dig; - } - goto dig_done; - } - for(; c >= '0' && c <= '9'; c = *++s) { - have_dig: - nz++; - if (c -= '0') { - nf += nz; - for(i = 1; i < nz; i++) - if (nd++ < 9) - y *= 10; - else if (nd <= DBL_DIG + 1) - z *= 10; - if (nd++ < 9) - y = 10*y + c; - else if (nd <= DBL_DIG + 1) - z = 10*z + c; - nz = 0; - } - } - } - dig_done: - e = 0; - if (c == 'e' || c == 'E') { - if (!nd && !nz && !nz0) { - s = s00; - goto ret; - } - s00 = s; - esign = 0; - switch(c = *++s) { - case '-': - esign = 1; - case '+': - c = *++s; - } - if (c >= '0' && c <= '9') { - while(c == '0') - c = *++s; - if (c > '0' && c <= '9') { - L = c - '0'; - s1 = s; - while((c = *++s) >= '0' && c <= '9') - L = 10*L + c - '0'; - if (s - s1 > 8 || L > 19999) - /* Avoid confusion from exponents - * so large that e might overflow. - */ - e = 19999; /* safe for 16 bit ints */ - else - e = (int)L; - if (esign) - e = -e; - } - else - e = 0; - } - else - s = s00; - } - if (!nd) { - if (!nz && !nz0) - s = s00; - goto ret; - } - e1 = e -= nf; - - /* Now we have nd0 digits, starting at s0, followed by a - * decimal point, followed by nd-nd0 digits. The number we're - * after is the integer represented by those digits times - * 10**e */ - - if (!nd0) - nd0 = nd; - k = nd < DBL_DIG + 1 ? nd : DBL_DIG + 1; - rv = y; - if (k > 9) - rv = tens[k - 9] * rv + z; - bd0 = 0; - if (nd <= DBL_DIG -#ifndef RND_PRODQUOT - && FLT_ROUNDS == 1 -#endif - ) { - if (!e) - goto ret; - if (e > 0) { - if (e <= Ten_pmax) { -#ifdef VAX - goto vax_ovfl_check; -#else - /* rv = */ rounded_product(rv, tens[e]); - goto ret; -#endif - } - i = DBL_DIG - nd; - if (e <= Ten_pmax + i) { - /* A fancier test would sometimes let us do - * this for larger i values. - */ - e -= i; - rv *= tens[i]; -#ifdef VAX - /* VAX exponent range is so narrow we must - * worry about overflow here... - */ - vax_ovfl_check: - setWord0(&rv, getWord0(rv) - P*Exp_msk1); - /* rv = */ rounded_product(rv, tens[e]); - if ((getWord0(rv) & Exp_mask) - > Exp_msk1*(DBL_MAX_EXP+Bias-1-P)) - goto ovfl; - setWord0(&rv, getWord0(rv) + P*Exp_msk1); -#else - /* rv = */ rounded_product(rv, tens[e]); -#endif - goto ret; - } - } -#ifndef Inaccurate_Divide - else if (e >= -Ten_pmax) { - /* rv = */ rounded_quotient(rv, tens[-e]); - goto ret; - } -#endif - } - e1 += nd - k; - - /* Get starting approximation = rv * 10**e1 */ - - if (e1 > 0) { - if ((i = e1 & 15) != 0) - rv *= tens[i]; - if (e1 &= ~15) { - if (e1 > DBL_MAX_10_EXP) { - ovfl: - // errno = ERANGE; - if (ok != 0) - *ok = FALSE; -#ifdef __STDC__ - rv = HUGE_VAL; -#else - /* Can't trust HUGE_VAL */ -#ifdef IEEE_Arith - setWord0(&rv, Exp_mask); - setWord1(&rv, 0); -#else - setWord0(&rv, Big0); - setWord1(&rv, Big1); -#endif -#endif - if (bd0) - goto retfree; - goto ret; - } - if (e1 >>= 4) { - for(j = 0; e1 > 1; j++, e1 >>= 1) - if (e1 & 1) - rv *= bigtens[j]; - /* The last multiplication could overflow. */ - setWord0(&rv, getWord0(rv) - P*Exp_msk1); - rv *= bigtens[j]; - if ((z = getWord0(rv) & Exp_mask) - > Exp_msk1*(DBL_MAX_EXP+Bias-P)) - goto ovfl; - if (z > Exp_msk1*(DBL_MAX_EXP+Bias-1-P)) { - /* set to largest number */ - /* (Can't trust DBL_MAX) */ - setWord0(&rv, Big0); - setWord1(&rv, Big1); - } - else - setWord0(&rv, getWord0(rv) + P*Exp_msk1); - } - - } - } - else if (e1 < 0) { - e1 = -e1; - if ((i = e1 & 15) != 0) - rv /= tens[i]; - if (e1 &= ~15) { - e1 >>= 4; - if (e1 >= 1 << n_bigtens) - goto undfl; - for(j = 0; e1 > 1; j++, e1 >>= 1) - if (e1 & 1) - rv *= tinytens[j]; - /* The last multiplication could underflow. */ - rv0 = rv; - rv *= tinytens[j]; - if (rv == g_double_zero) - { - rv = 2.*rv0; - rv *= tinytens[j]; - if (rv == g_double_zero) - { - undfl: - rv = 0.; - // errno = ERANGE; - if (ok != 0) - *ok = FALSE; - if (bd0) - goto retfree; - goto ret; - } - setWord0(&rv, Tiny0); - setWord1(&rv, Tiny1); - /* The refinement below will clean - * this approximation up. - */ - } - } - } - - /* Now the hard part -- adjusting rv to the correct value.*/ - - /* Put digits into bd: true value = bd * 10^e */ - - bd0 = s2b(s0, nd0, nd, y); - - for(;;) { - bd = Balloc(bd0->k); - Bcopy(bd, bd0); - bb = d2b(rv, &bbe, &bbbits); /* rv = bb * 2^bbe */ - bs = i2b(1); - - if (e >= 0) { - bb2 = bb5 = 0; - bd2 = bd5 = e; - } - else { - bb2 = bb5 = -e; - bd2 = bd5 = 0; - } - if (bbe >= 0) - bb2 += bbe; - else - bd2 -= bbe; - bs2 = bb2; -#ifdef Sudden_Underflow -#ifdef IBM - j = 1 + 4*P - 3 - bbbits + ((bbe + bbbits - 1) & 3); -#else - j = P + 1 - bbbits; -#endif -#else - i = bbe + bbbits - 1; /* logb(rv) */ - if (i < Emin) /* denormal */ - j = bbe + (P-Emin); - else - j = P + 1 - bbbits; -#endif - bb2 += j; - bd2 += j; - i = bb2 < bd2 ? bb2 : bd2; - if (i > bs2) - i = bs2; - if (i > 0) { - bb2 -= i; - bd2 -= i; - bs2 -= i; - } - if (bb5 > 0) { - bs = pow5mult(bs, bb5); - bb1 = mult(bs, bb); - Bfree(bb); - bb = bb1; - } - if (bb2 > 0) - bb = lshift(bb, bb2); - if (bd5 > 0) - bd = pow5mult(bd, bd5); - if (bd2 > 0) - bd = lshift(bd, bd2); - if (bs2 > 0) - bs = lshift(bs, bs2); - delta = diff(bb, bd); - dsign = delta->sign; - delta->sign = 0; - i = cmp(delta, bs); - if (i < 0) { - /* Error is less than half an ulp -- check for - * special case of mantissa a power of two. - */ - if (dsign || getWord1(rv) || getWord0(rv) & Bndry_mask) - break; - delta = lshift(delta,Log2P); - if (cmp(delta, bs) > 0) - goto drop_down; - break; - } - if (i == 0) { - /* exactly half-way between */ - if (dsign) { - if ((getWord0(rv) & Bndry_mask1) == Bndry_mask1 - && getWord1(rv) == 0xffffffff) { - /*boundary case -- increment exponent*/ - setWord0(&rv, (getWord0(rv) & Exp_mask) - + Exp_msk1 -#ifdef IBM - | Exp_msk1 >> 4 -#endif - ); - setWord1(&rv, 0); - break; - } - } - else if (!(getWord0(rv) & Bndry_mask) && !getWord1(rv)) { - drop_down: - /* boundary case -- decrement exponent */ -#ifdef Sudden_Underflow - L = getWord0(rv) & Exp_mask; -#ifdef IBM - if (L < Exp_msk1) -#else - if (L <= Exp_msk1) -#endif - goto undfl; - L -= Exp_msk1; -#else - L = (getWord0(rv) & Exp_mask) - Exp_msk1; -#endif - setWord0(&rv, L | Bndry_mask1); - setWord1(&rv, 0xffffffff); -#ifdef IBM - goto cont; -#else - break; -#endif - } -#ifndef ROUND_BIASED - if (!(getWord1(rv) & LSB)) - break; -#endif - if (dsign) - rv += ulp(rv); -#ifndef ROUND_BIASED - else { - rv -= ulp(rv); -#ifndef Sudden_Underflow - if (rv == g_double_zero) - goto undfl; -#endif - } -#endif - break; - } - if ((aadj = ratio(delta, bs)) <= 2.) { - if (dsign) - aadj = aadj1 = 1.; - else if (getWord1(rv) || getWord0(rv) & Bndry_mask) { -#ifndef Sudden_Underflow - if (getWord1(rv) == Tiny1 && !getWord0(rv)) - goto undfl; -#endif - aadj = 1.; - aadj1 = -1.; - } - else { - /* special case -- power of FLT_RADIX to be */ - /* rounded down... */ - - if (aadj < 2./FLT_RADIX) - aadj = 1./FLT_RADIX; - else - aadj *= 0.5; - aadj1 = -aadj; - } - } - else { - aadj *= 0.5; - aadj1 = dsign ? aadj : -aadj; -#ifdef Check_FLT_ROUNDS - switch(FLT_ROUNDS) { - case 2: /* towards +infinity */ - aadj1 -= 0.5; - break; - case 0: /* towards 0 */ - case 3: /* towards -infinity */ - aadj1 += 0.5; - } -#else - if (FLT_ROUNDS == 0) - aadj1 += 0.5; -#endif - } - y = getWord0(rv) & Exp_mask; - - /* Check for overflow */ - - if (y == Exp_msk1*(DBL_MAX_EXP+Bias-1)) { - rv0 = rv; - setWord0(&rv, getWord0(rv) - P*Exp_msk1); - adj = aadj1 * ulp(rv); - rv += adj; - if ((getWord0(rv) & Exp_mask) >= - Exp_msk1*(DBL_MAX_EXP+Bias-P)) { - if (getWord0(rv0) == Big0 && getWord1(rv0) == Big1) - goto ovfl; - setWord0(&rv, Big0); - setWord1(&rv, Big1); - goto cont; - } - else - setWord0(&rv, getWord0(rv) + P*Exp_msk1); - } - else { -#ifdef Sudden_Underflow - if ((getWord0(rv) & Exp_mask) <= P*Exp_msk1) { - rv0 = rv; - setWord0(&rv, getWord0(rv) + P*Exp_msk1); - adj = aadj1 * ulp(rv); - rv += adj; -#ifdef IBM - if ((getWord0(rv) & Exp_mask) < P*Exp_msk1) -#else - if ((getWord0(rv) & Exp_mask) <= P*Exp_msk1) -#endif - { - if (getWord0(rv0) == Tiny0 - && getWord1(rv0) == Tiny1) - goto undfl; - setWord0(&rv, Tiny0); - setWord1(&rv, Tiny1); - goto cont; - } - else - setWord0(&rv, getWord0(rv) - P*Exp_msk1); - } - else { - adj = aadj1 * ulp(rv); - rv += adj; - } -#else - /* Compute adj so that the IEEE rounding rules will - * correctly round rv + adj in some half-way cases. - * If rv * ulp(rv) is denormalized (i.e., - * y <= (P-1)*Exp_msk1), we must adjust aadj to avoid - * trouble from bits lost to denormalization; - * example: 1.2e-307 . - */ - if (y <= (P-1)*Exp_msk1 && aadj >= 1.) { - aadj1 = (double)(int)(aadj + 0.5); - if (!dsign) - aadj1 = -aadj1; - } - adj = aadj1 * ulp(rv); - rv += adj; -#endif - } - z = getWord0(rv) & Exp_mask; - if (y == z) { - /* Can we stop now? */ - L = (Long) aadj; - aadj -= L; - /* The tolerances below are conservative. */ - if (dsign || getWord1(rv) || getWord0(rv) & Bndry_mask) { - if (aadj < .4999999 || aadj > .5000001) - break; - } - else if (aadj < .4999999/FLT_RADIX) - break; - } - cont: - Bfree(bb); - Bfree(bd); - Bfree(bs); - Bfree(delta); - } - retfree: - Bfree(bb); - Bfree(bd); - Bfree(bs); - Bfree(bd0); - Bfree(delta); - ret: - if (se) - *se = (char *)s; - return sign ? -rv : rv; -} - -static int quorem(Bigint *b, Bigint *S) -{ - int n; - Long borrow, y; - ULong carry, q, ys; - ULong *bx, *bxe, *sx, *sxe; -#ifdef Pack_32 - Long z; - ULong si, zs; -#endif - - n = S->wds; -#ifdef BSD_QDTOA_DEBUG - /*debug*/ if (b->wds > n) - /*debug*/ Bug("oversize b in quorem"); -#endif - if (b->wds < n) - return 0; - sx = S->x; - sxe = sx + --n; - bx = b->x; - bxe = bx + n; - q = *bxe / (*sxe + 1); /* ensure q <= true quotient */ -#ifdef BSD_QDTOA_DEBUG - /*debug*/ if (q > 9) - /*debug*/ Bug("oversized quotient in quorem"); -#endif - if (q) { - borrow = 0; - carry = 0; - do { -#ifdef Pack_32 - si = *sx++; - ys = (si & 0xffff) * q + carry; - zs = (si >> 16) * q + (ys >> 16); - carry = zs >> 16; - y = (*bx & 0xffff) - (ys & 0xffff) + borrow; - borrow = y >> 16; - Sign_Extend(borrow, y); - z = (*bx >> 16) - (zs & 0xffff) + borrow; - borrow = z >> 16; - Sign_Extend(borrow, z); - Storeinc(bx, z, y); -#else - ys = *sx++ * q + carry; - carry = ys >> 16; - y = *bx - (ys & 0xffff) + borrow; - borrow = y >> 16; - Sign_Extend(borrow, y); - *bx++ = y & 0xffff; -#endif - } - while(sx <= sxe); - if (!*bxe) { - bx = b->x; - while(--bxe > bx && !*bxe) - --n; - b->wds = n; - } - } - if (cmp(b, S) >= 0) { - q++; - borrow = 0; - carry = 0; - bx = b->x; - sx = S->x; - do { -#ifdef Pack_32 - si = *sx++; - ys = (si & 0xffff) + carry; - zs = (si >> 16) + (ys >> 16); - carry = zs >> 16; - y = (*bx & 0xffff) - (ys & 0xffff) + borrow; - borrow = y >> 16; - Sign_Extend(borrow, y); - z = (*bx >> 16) - (zs & 0xffff) + borrow; - borrow = z >> 16; - Sign_Extend(borrow, z); - Storeinc(bx, z, y); -#else - ys = *sx++ + carry; - carry = ys >> 16; - y = *bx - (ys & 0xffff) + borrow; - borrow = y >> 16; - Sign_Extend(borrow, y); - *bx++ = y & 0xffff; -#endif - } - while(sx <= sxe); - bx = b->x; - bxe = bx + n; - if (!*bxe) { - while(--bxe > bx && !*bxe) - --n; - b->wds = n; - } - } - return q; -} - -/* dtoa for IEEE arithmetic (dmg): convert double to ASCII string. - * - * Inspired by "How to Print Floating-Point Numbers Accurately" by - * Guy L. Steele, Jr. and Jon L. White [Proc. ACM SIGPLAN '90, pp. 92-101]. - * - * Modifications: - * 1. Rather than iterating, we use a simple numeric overestimate - * to determine k = floor(log10(d)). We scale relevant - * quantities using O(log2(k)) rather than O(k) multiplications. - * 2. For some modes > 2 (corresponding to ecvt and fcvt), we don't - * try to generate digits strictly left to right. Instead, we - * compute with fewer bits and propagate the carry if necessary - * when rounding the final digit up. This is often faster. - * 3. Under the assumption that input will be rounded nearest, - * mode 0 renders 1e23 as 1e23 rather than 9.999999999999999e22. - * That is, we allow equality in stopping tests when the - * round-nearest rule will give the same floating-point value - * as would satisfaction of the stopping test with strict - * inequality. - * 4. We remove common factors of powers of 2 from relevant - * quantities. - * 5. When converting floating-point integers less than 1e16, - * we use floating-point arithmetic rather than resorting - * to multiple-precision integers. - * 6. When asked to produce fewer than 15 digits, we first try - * to get by with floating-point arithmetic; we resort to - * multiple-precision integer arithmetic only if we cannot - * guarantee that the floating-point calculation has given - * the correctly rounded result. For k requested digits and - * "uniformly" distributed input, the probability is - * something like 10^(k-15) that we must resort to the Long - * calculation. - */ - - -/* This actually sometimes returns a pointer to a string literal - cast to a char*. Do NOT try to modify the return value. */ - -static char *qdtoa ( double d, int mode, int ndigits, int *decpt, int *sign, char **rve, char **resultp) -{ - // Some values of the floating-point control word can cause _qdtoa to crash with an underflow. - // We set a safe value here. -#ifdef Q_OS_WIN -#ifndef Q_CC_BOR - unsigned int oldbits = _control87(0, 0); -#ifndef _M_X64 //x64 does not support precition control - _control87(0x9001F, 0xFFFFF); -#else - _control87(0x9001F, _MCW_DN|_MCW_EM|_MCW_RC); -#endif //_M_X64 -#endif -#endif - -#ifdef Q_OS_LINUX - fenv_t envp; - feholdexcept(&envp); -#endif - - char *s = _qdtoa(d, mode, ndigits, decpt, sign, rve, resultp); - -#ifdef Q_OS_WIN -#ifndef Q_CC_BOR - _clear87(); -#ifndef _M_X64 - _control87(oldbits, 0xFFFFF); -#else - _control87(oldbits, _MCW_DN|_MCW_EM|_MCW_RC); -#endif //_M_X64 -#endif -#endif - -#ifdef Q_OS_LINUX - fesetenv(&envp); -#endif - - return s; -} - -static char *_qdtoa( NEEDS_VOLATILE double d, int mode, int ndigits, int *decpt, int *sign, char **rve, char **resultp) -{ - /* - Arguments ndigits, decpt, sign are similar to those - of ecvt and fcvt; trailing zeros are suppressed from - the returned string. If not null, *rve is set to point - to the end of the return value. If d is +-Infinity or NaN, - then *decpt is set to 9999. - - mode: - 0 ==> shortest string that yields d when read in - and rounded to nearest. - 1 ==> like 0, but with Steele & White stopping rule; - e.g. with IEEE P754 arithmetic , mode 0 gives - 1e23 whereas mode 1 gives 9.999999999999999e22. - 2 ==> max(1,ndigits) significant digits. This gives a - return value similar to that of ecvt, except - that trailing zeros are suppressed. - 3 ==> through ndigits past the decimal point. This - gives a return value similar to that from fcvt, - except that trailing zeros are suppressed, and - ndigits can be negative. - 4-9 should give the same return values as 2-3, i.e., - 4 <= mode <= 9 ==> same return as mode - 2 + (mode & 1). These modes are mainly for - debugging; often they run slower but sometimes - faster than modes 2-3. - 4,5,8,9 ==> left-to-right digit generation. - 6-9 ==> don't try fast floating-point estimate - (if applicable). - - Values of mode other than 0-9 are treated as mode 0. - - Sufficient space is allocated to the return value - to hold the suppressed trailing zeros. - */ - - int bbits, b2, b5, be, dig, i, ieps, ilim0, - j, j1, k, k0, k_check, leftright, m2, m5, s2, s5, - try_quick; - int ilim = 0, ilim1 = 0, spec_case = 0; /* pacify gcc */ - Long L; -#ifndef Sudden_Underflow - int denorm; - ULong x; -#endif - Bigint *b, *b1, *delta, *mhi, *S; - Bigint *mlo = NULL; /* pacify gcc */ - double d2; - double ds, eps; - char *s, *s0; - - if (getWord0(d) & Sign_bit) { - /* set sign for everything, including 0's and NaNs */ - *sign = 1; - setWord0(&d, getWord0(d) & ~Sign_bit); /* clear sign bit */ - } - else - *sign = 0; - -#if defined(IEEE_Arith) + defined(VAX) -#ifdef IEEE_Arith - if ((getWord0(d) & Exp_mask) == Exp_mask) -#else - if (getWord0(d) == 0x8000) -#endif - { - /* Infinity or NaN */ - *decpt = 9999; - s = -#ifdef IEEE_Arith - !getWord1(d) && !(getWord0(d) & 0xfffff) ? (char*)"Infinity" : -#endif - (char*)"NaN"; - if (rve) - *rve = -#ifdef IEEE_Arith - s[3] ? s + 8 : -#endif - s + 3; - return s; - } -#endif -#ifdef IBM - d += 0; /* normalize */ -#endif - if (d == g_double_zero) - { - *decpt = 1; - s = (char*) "0"; - if (rve) - *rve = s + 1; - return s; - } - - b = d2b(d, &be, &bbits); -#ifdef Sudden_Underflow - i = (int)(getWord0(d) >> Exp_shift1 & (Exp_mask>>Exp_shift1)); -#else - if ((i = (int)(getWord0(d) >> Exp_shift1 & (Exp_mask>>Exp_shift1))) != 0) { -#endif - d2 = d; - setWord0(&d2, getWord0(d2) & Frac_mask1); - setWord0(&d2, getWord0(d2) | Exp_11); -#ifdef IBM - if (j = 11 - hi0bits(getWord0(d2) & Frac_mask)) - d2 /= 1 << j; -#endif - - /* log(x) ~=~ log(1.5) + (x-1.5)/1.5 - * log10(x) = log(x) / log(10) - * ~=~ log(1.5)/log(10) + (x-1.5)/(1.5*log(10)) - * log10(d) = (i-Bias)*log(2)/log(10) + log10(d2) - * - * This suggests computing an approximation k to log10(d) by - * - * k = (i - Bias)*0.301029995663981 - * + ( (d2-1.5)*0.289529654602168 + 0.176091259055681 ); - * - * We want k to be too large rather than too small. - * The error in the first-order Taylor series approximation - * is in our favor, so we just round up the constant enough - * to compensate for any error in the multiplication of - * (i - Bias) by 0.301029995663981; since |i - Bias| <= 1077, - * and 1077 * 0.30103 * 2^-52 ~=~ 7.2e-14, - * adding 1e-13 to the constant term more than suffices. - * Hence we adjust the constant term to 0.1760912590558. - * (We could get a more accurate k by invoking log10, - * but this is probably not worthwhile.) - */ - - i -= Bias; -#ifdef IBM - i <<= 2; - i += j; -#endif -#ifndef Sudden_Underflow - denorm = 0; - } - else { - /* d is denormalized */ - - i = bbits + be + (Bias + (P-1) - 1); - x = i > 32 ? getWord0(d) << (64 - i) | getWord1(d) >> (i - 32) - : getWord1(d) << (32 - i); - d2 = x; - setWord0(&d2, getWord0(d2) - 31*Exp_msk1); /* adjust exponent */ - i -= (Bias + (P-1) - 1) + 1; - denorm = 1; - } -#endif - ds = (d2-1.5)*0.289529654602168 + 0.1760912590558 + i*0.301029995663981; - k = (int)ds; - if (ds < 0. && ds != k) - k--; /* want k = floor(ds) */ - k_check = 1; - if (k >= 0 && k <= Ten_pmax) { - if (d < tens[k]) - k--; - k_check = 0; - } - j = bbits - i - 1; - if (j >= 0) { - b2 = 0; - s2 = j; - } - else { - b2 = -j; - s2 = 0; - } - if (k >= 0) { - b5 = 0; - s5 = k; - s2 += k; - } - else { - b2 -= k; - b5 = -k; - s5 = 0; - } - if (mode < 0 || mode > 9) - mode = 0; - try_quick = 1; - if (mode > 5) { - mode -= 4; - try_quick = 0; - } - leftright = 1; - switch(mode) { - case 0: - case 1: - ilim = ilim1 = -1; - i = 18; - ndigits = 0; - break; - case 2: - leftright = 0; - /* no break */ - case 4: - if (ndigits <= 0) - ndigits = 1; - ilim = ilim1 = i = ndigits; - break; - case 3: - leftright = 0; - /* no break */ - case 5: - i = ndigits + k + 1; - ilim = i; - ilim1 = i - 1; - if (i <= 0) - i = 1; - } - *resultp = (char *) malloc(i + 1); - s = s0 = *resultp; - - if (ilim >= 0 && ilim <= Quick_max && try_quick) { - - /* Try to get by with floating-point arithmetic. */ - - i = 0; - d2 = d; - k0 = k; - ilim0 = ilim; - ieps = 2; /* conservative */ - if (k > 0) { - ds = tens[k&0xf]; - j = k >> 4; - if (j & Bletch) { - /* prevent overflows */ - j &= Bletch - 1; - d /= bigtens[n_bigtens-1]; - ieps++; - } - for(; j; j >>= 1, i++) - if (j & 1) { - ieps++; - ds *= bigtens[i]; - } - d /= ds; - } - else if ((j1 = -k) != 0) { - d *= tens[j1 & 0xf]; - for(j = j1 >> 4; j; j >>= 1, i++) - if (j & 1) { - ieps++; - d *= bigtens[i]; - } - } - if (k_check && d < 1. && ilim > 0) { - if (ilim1 <= 0) - goto fast_failed; - ilim = ilim1; - k--; - d *= 10.; - ieps++; - } - eps = ieps*d + 7.; - setWord0(&eps, getWord0(eps) - (P-1)*Exp_msk1); - if (ilim == 0) { - S = mhi = 0; - d -= 5.; - if (d > eps) - goto one_digit; - if (d < -eps) - goto no_digits; - goto fast_failed; - } -#ifndef No_leftright - if (leftright) { - /* Use Steele & White method of only - * generating digits needed. - */ - eps = 0.5/tens[ilim-1] - eps; - for(i = 0;;) { - L = (Long)d; - d -= L; - *s++ = '0' + (int)L; - if (d < eps) - goto ret1; - if (1. - d < eps) - goto bump_up; - if (++i >= ilim) - break; - eps *= 10.; - d *= 10.; - } - } - else { -#endif - /* Generate ilim digits, then fix them up. */ - eps *= tens[ilim-1]; - for(i = 1;; i++, d *= 10.) { - L = (Long)d; - d -= L; - *s++ = '0' + (int)L; - if (i == ilim) { - if (d > 0.5 + eps) - goto bump_up; - else if (d < 0.5 - eps) { - while(*--s == '0'); - s++; - goto ret1; - } - break; - } - } -#ifndef No_leftright - } -#endif - fast_failed: - s = s0; - d = d2; - k = k0; - ilim = ilim0; - } - - /* Do we have a "small" integer? */ - - if (be >= 0 && k <= Int_max) { - /* Yes. */ - ds = tens[k]; - if (ndigits < 0 && ilim <= 0) { - S = mhi = 0; - if (ilim < 0 || d <= 5*ds) - goto no_digits; - goto one_digit; - } - for(i = 1;; i++) { - L = (Long)(d / ds); - d -= L*ds; -#ifdef Check_FLT_ROUNDS - /* If FLT_ROUNDS == 2, L will usually be high by 1 */ - if (d < 0) { - L--; - d += ds; - } -#endif - *s++ = '0' + (int)L; - if (i == ilim) { - d += d; - if (d > ds || (d == ds && L & 1)) { - bump_up: - while(*--s == '9') - if (s == s0) { - k++; - *s = '0'; - break; - } - ++*s++; - } - break; - } - if ((d *= 10.) == g_double_zero) - break; - } - goto ret1; - } - - m2 = b2; - m5 = b5; - mhi = mlo = 0; - if (leftright) { - if (mode < 2) { - i = -#ifndef Sudden_Underflow - denorm ? be + (Bias + (P-1) - 1 + 1) : -#endif -#ifdef IBM - 1 + 4*P - 3 - bbits + ((bbits + be - 1) & 3); -#else - 1 + P - bbits; -#endif - } - else { - j = ilim - 1; - if (m5 >= j) - m5 -= j; - else { - s5 += j -= m5; - b5 += j; - m5 = 0; - } - if ((i = ilim) < 0) { - m2 -= i; - i = 0; - } - } - b2 += i; - s2 += i; - mhi = i2b(1); - } - if (m2 > 0 && s2 > 0) { - i = m2 < s2 ? m2 : s2; - b2 -= i; - m2 -= i; - s2 -= i; - } - if (b5 > 0) { - if (leftright) { - if (m5 > 0) { - mhi = pow5mult(mhi, m5); - b1 = mult(mhi, b); - Bfree(b); - b = b1; - } - if ((j = b5 - m5) != 0) - b = pow5mult(b, j); - } - else - b = pow5mult(b, b5); - } - S = i2b(1); - if (s5 > 0) - S = pow5mult(S, s5); - - /* Check for special case that d is a normalized power of 2. */ - - if (mode < 2) { - if (!getWord1(d) && !(getWord0(d) & Bndry_mask) -#ifndef Sudden_Underflow - && getWord0(d) & Exp_mask -#endif - ) { - /* The special case */ - b2 += Log2P; - s2 += Log2P; - spec_case = 1; - } - else - spec_case = 0; - } - - /* Arrange for convenient computation of quotients: - * shift left if necessary so divisor has 4 leading 0 bits. - * - * Perhaps we should just compute leading 28 bits of S once - * and for all and pass them and a shift to quorem, so it - * can do shifts and ors to compute the numerator for q. - */ -#ifdef Pack_32 - if ((i = ((s5 ? 32 - hi0bits(S->x[S->wds-1]) : 1) + s2) & 0x1f) != 0) - i = 32 - i; -#else - if (i = ((s5 ? 32 - hi0bits(S->x[S->wds-1]) : 1) + s2) & 0xf) - i = 16 - i; -#endif - if (i > 4) { - i -= 4; - b2 += i; - m2 += i; - s2 += i; - } - else if (i < 4) { - i += 28; - b2 += i; - m2 += i; - s2 += i; - } - if (b2 > 0) - b = lshift(b, b2); - if (s2 > 0) - S = lshift(S, s2); - if (k_check) { - if (cmp(b,S) < 0) { - k--; - b = multadd(b, 10, 0); /* we botched the k estimate */ - if (leftright) - mhi = multadd(mhi, 10, 0); - ilim = ilim1; - } - } - if (ilim <= 0 && mode > 2) { - if (ilim < 0 || cmp(b,S = multadd(S,5,0)) <= 0) { - /* no digits, fcvt style */ - no_digits: - k = -1 - ndigits; - goto ret; - } - one_digit: - *s++ = '1'; - k++; - goto ret; - } - if (leftright) { - if (m2 > 0) - mhi = lshift(mhi, m2); - - /* Compute mlo -- check for special case - * that d is a normalized power of 2. - */ - - mlo = mhi; - if (spec_case) { - mhi = Balloc(mhi->k); - Bcopy(mhi, mlo); - mhi = lshift(mhi, Log2P); - } - - for(i = 1;;i++) { - dig = quorem(b,S) + '0'; - /* Do we yet have the shortest decimal string - * that will round to d? - */ - j = cmp(b, mlo); - delta = diff(S, mhi); - j1 = delta->sign ? 1 : cmp(b, delta); - Bfree(delta); -#ifndef ROUND_BIASED - if (j1 == 0 && !mode && !(getWord1(d) & 1)) { - if (dig == '9') - goto round_9_up; - if (j > 0) - dig++; - *s++ = dig; - goto ret; - } -#endif - if (j < 0 || (j == 0 && !mode -#ifndef ROUND_BIASED - && !(getWord1(d) & 1) -#endif - )) { - if (j1 > 0) { - b = lshift(b, 1); - j1 = cmp(b, S); - if ((j1 > 0 || (j1 == 0 && dig & 1)) - && dig++ == '9') - goto round_9_up; - } - *s++ = dig; - goto ret; - } - if (j1 > 0) { - if (dig == '9') { /* possible if i == 1 */ - round_9_up: - *s++ = '9'; - goto roundoff; - } - *s++ = dig + 1; - goto ret; - } - *s++ = dig; - if (i == ilim) - break; - b = multadd(b, 10, 0); - if (mlo == mhi) - mlo = mhi = multadd(mhi, 10, 0); - else { - mlo = multadd(mlo, 10, 0); - mhi = multadd(mhi, 10, 0); - } - } - } - else - for(i = 1;; i++) { - *s++ = dig = quorem(b,S) + '0'; - if (i >= ilim) - break; - b = multadd(b, 10, 0); - } - - /* Round off last digit */ - - b = lshift(b, 1); - j = cmp(b, S); - if (j > 0 || (j == 0 && dig & 1)) { - roundoff: - while(*--s == '9') - if (s == s0) { - k++; - *s++ = '1'; - goto ret; - } - ++*s++; - } - else { - while(*--s == '0'); - s++; - } - ret: - Bfree(S); - if (mhi) { - if (mlo && mlo != mhi) - Bfree(mlo); - Bfree(mhi); - } - ret1: - Bfree(b); - if (s == s0) { /* don't return empty string */ - *s++ = '0'; - k = 0; - } - *s = 0; - *decpt = k + 1; - if (rve) - *rve = s; - return s0; -} - -#endif // QT_QLOCALE_USES_FCVT diff --git a/src/tools/qlocale_p.h b/src/tools/qlocale_p.h deleted file mode 100644 index 8d562d22c..000000000 --- a/src/tools/qlocale_p.h +++ /dev/null @@ -1,131 +0,0 @@ -/**************************************************************************** -** -** Declaration of the TQLocalePrivate class -** -** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. -** -** This file is part of the widgets module of the TQt GUI Toolkit. -** -** This file may be used under the terms of the GNU General -** Public License versions 2.0 or 3.0 as published by the Free -** Software Foundation and appearing in the files LICENSE.GPL2 -** and LICENSE.GPL3 included in the packaging of this file. -** Alternatively you may (at your option) use any later version -** of the GNU General Public License if such license has been -** publicly approved by Trolltech ASA (or its successors, if any) -** and the KDE Free TQt Foundation. -** -** Please review the following information to ensure GNU General -** Public Licensing requirements will be met: -** http://trolltech.com/products/qt/licenses/licensing/opensource/. -** If you are unsure which license is appropriate for your use, please -** review the following information: -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview -** or contact the sales department at sales@trolltech.com. -** -** This file may be used under the terms of the Q Public License as -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL -** included in the packaging of this file. Licensees holding valid TQt -** Commercial licenses may use this file in accordance with the TQt -** Commercial License Agreement provided with the Software. -** -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted -** herein. -** -**********************************************************************/ - -#ifndef TQLOCALE_P_H -#define TQLOCALE_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the TQt API. It exists for the convenience -// of internal files. This header file may change from version to version -// without notice, or even be removed. -// -// We mean it. -// -// - -#include - -struct TQLocalePrivate -{ -public: - const TQChar &decimal() const { return (TQChar&)m_decimal; } - const TQChar &group() const { return (TQChar&)m_group; } - const TQChar &list() const { return (TQChar&)m_list; } - const TQChar &percent() const { return (TQChar&)m_percent; } - const TQChar &zero() const { return (TQChar&)m_zero; } - TQChar plus() const { return TQChar('+'); } - const TQChar &minus() const { return (TQChar&)m_minus; } - const TQChar &exponential() const { return (TQChar&)m_exponential; } - TQString infinity() const; - TQString nan() const; - - TQ_UINT32 languageId() const { return m_language_id; } - TQ_UINT32 countryId() const { return m_country_id; } - - bool isDigit(TQChar d) const; - - enum GroupSeparatorMode { - FailOnGroupSeparators, - ParseGroupSeparators - }; - - enum DoubleForm { - DFExponent = 0, // %e or %E - DFDecimal, // %f or %F - DFSignificantDigits, // %g or %G - _DFMax = DFSignificantDigits - }; - - enum Flags { - NoFlags = 0, - - // These correspond to the options in a printf format string - Alternate = 0x01, - ZeroPadded = 0x02, - LeftAdjusted = 0x04, - BlankBeforePositive = 0x08, - AlwaysShowSign = 0x10, - ThousandsGroup = 0x20, - CapitalEorX = 0x40 // %x, %e, %f, %g vs. %X, %E, %F, %G - }; - - TQString doubleToString(double d, - int precision = -1, - DoubleForm form = DFSignificantDigits, - int width = -1, - unsigned flags = NoFlags) const; - TQString longLongToString(TQ_LLONG l, int precision = -1, - int base = 10, - int width = -1, - unsigned flags = NoFlags) const; - TQString unsLongLongToString(TQ_ULLONG l, int precision = -1, - int base = 10, - int width = -1, - unsigned flags = NoFlags) const; - double stringToDouble(TQString num, bool *ok, GroupSeparatorMode group_sep_mode) const; - TQ_LLONG stringToLongLong(TQString num, int base, bool *ok, GroupSeparatorMode group_sep_mode) const; - TQ_ULLONG stringToUnsLongLong(TQString num, int base, bool *ok, GroupSeparatorMode group_sep_mode) const; - bool removeGroupSeparators(TQString &num_str) const; - bool numberToCLocale(TQString &locale_num, GroupSeparatorMode group_sep_mode) const; - - TQ_UINT32 m_language_id, m_country_id; - - TQ_UINT16 m_decimal, m_group, m_list, m_percent, - m_zero, m_minus, m_exponential; - - static const TQString m_infinity; - static const TQString m_nan; - static const TQChar m_plus; - - static const char *systemLocaleName(); -}; - -#endif diff --git a/src/tools/qt_tools.pri b/src/tools/qt_tools.pri index c4cced519..5eb816580 100644 --- a/src/tools/qt_tools.pri +++ b/src/tools/qt_tools.pri @@ -34,8 +34,8 @@ tools { $$TOOLS_H/tqiodevice.h \ $$TOOLS_H/ntqlibrary.h \ $$TOOLS_P/qlibrary_p.h \ - $$TOOLS_H/ntqlocale.h \ - $$TOOLS_P/qlocale_p.h \ + $$TOOLS_H/tqlocale.h \ + $$TOOLS_P/tqlocale_p.h \ $$TOOLS_H/tqptrlist.h \ $$TOOLS_H/tqmap.h \ $$TOOLS_H/tqmutex.h \ @@ -126,7 +126,7 @@ tools { $$TOOLS_CPP/qgvector.cpp \ $$TOOLS_CPP/tqiodevice.cpp \ $$TOOLS_CPP/qlibrary.cpp \ - $$TOOLS_CPP/qlocale.cpp \ + $$TOOLS_CPP/tqlocale.cpp \ $$TOOLS_CPP/tqmap.cpp \ $$TOOLS_CPP/tqmutexpool.cpp \ $$TOOLS_CPP/tqptrcollection.cpp \ @@ -143,7 +143,7 @@ tools { irix-cc* { CXXFLAGS_PRELINK = $$QMAKE_CXXFLAGS CXXFLAGS_PRELINK -= -O2 - QMAKE_PRE_LINK = $(CXX) -c $$CXXFLAGS_PRELINK -O1 $(INCPATH) -o $(OBJECTS_DIR)/qlocale.o tools/qlocale.cpp + QMAKE_PRE_LINK = $(CXX) -c $$CXXFLAGS_PRELINK -O1 $(INCPATH) -o $(OBJECTS_DIR)/tqlocale.o tools/tqlocale.cpp } } diff --git a/src/tools/tqlocale.cpp b/src/tools/tqlocale.cpp new file mode 100644 index 000000000..57ddcfb3f --- /dev/null +++ b/src/tools/tqlocale.cpp @@ -0,0 +1,6322 @@ +/**************************************************************************** +** +** Implementation of the TQLocale class +** +** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. +** +** This file is part of the tools module of the TQt GUI Toolkit. +** +** This file may be used under the terms of the GNU General +** Public License versions 2.0 or 3.0 as published by the Free +** Software Foundation and appearing in the files LICENSE.GPL2 +** and LICENSE.GPL3 included in the packaging of this file. +** Alternatively you may (at your option) use any later version +** of the GNU General Public License if such license has been +** publicly approved by Trolltech ASA (or its successors, if any) +** and the KDE Free TQt Foundation. +** +** Please review the following information to ensure GNU General +** Public Licensing requirements will be met: +** http://trolltech.com/products/qt/licenses/licensing/opensource/. +** If you are unsure which license is appropriate for your use, please +** review the following information: +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview +** or contact the sales department at sales@trolltech.com. +** +** This file may be used under the terms of the Q Public License as +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL +** included in the packaging of this file. Licensees holding valid TQt +** Commercial licenses may use this file in accordance with the TQt +** Commercial License Agreement provided with the Software. +** +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted +** herein. +** +**********************************************************************/ + +#include +#include +#include +#include +#include +#include + +#include "tqlocale.h" +#include "tqlocale_p.h" +#include "ntqnamespace.h" + +#ifdef QT_QLOCALE_USES_FCVT +# include +# include +#endif + +#if defined (Q_OS_WIN) +# include +# undef NAN // we want to use our fallback on Windows +# undef INFINITY +#endif + +#ifdef Q_OS_LINUX +# include +#endif + +#if defined( Q_OS_MAC ) +# include +#endif + +#if defined (Q_OS_SOLARIS) +# include +#endif + +#if defined (Q_OS_OSF) && (defined(__DECC) || defined(__DECCXX)) +# define INFINITY DBL_INFINITY +# define NAN DBL_QNAN +#endif + +#if (defined(Q_CC_GNU) && defined(Q_OS_WIN)) || __GNUC__ == 4 || defined(QT_QLOCALE_NEEDS_VOLATILE) +# define NEEDS_VOLATILE volatile +#else +# define NEEDS_VOLATILE +#endif + +enum { + LittleEndian, + BigEndian + +#ifdef TQ_BYTE_ORDER +# if TQ_BYTE_ORDER == TQ_BIG_ENDIAN + , ByteOrder = BigEndian +# elif TQ_BYTE_ORDER == TQ_LITTLE_ENDIAN + , ByteOrder = LittleEndian +# else +# error "undefined byte order" +# endif +}; +#else +}; +static const unsigned int one = 1; +static const bool ByteOrder = ((*((unsigned char *) &one) == 0) ? BigEndian : LittleEndian); +#endif + +#if !defined(INFINITY) +static const unsigned char be_inf_bytes[] = { 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 }; +static const unsigned char le_inf_bytes[] = { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f }; +static inline double inf() +{ + return (ByteOrder == BigEndian ? + *((const double *) be_inf_bytes) : + *((const double *) le_inf_bytes)); +} +# define INFINITY (::inf()) +#endif + +#if !defined(NAN) +static const unsigned char be_nan_bytes[] = { 0x7f, 0xf8, 0, 0, 0, 0, 0, 0 }; +static const unsigned char le_nan_bytes[] = { 0, 0, 0, 0, 0, 0, 0xf8, 0x7f }; +static inline double nan() +{ + return (ByteOrder == BigEndian ? + *((const double *) be_nan_bytes) : + *((const double *) le_nan_bytes)); +} +# define NAN (::nan()) +#endif + +// We can't rely on -NAN, since all operations on a NAN should return a NAN. +static double be_neg_nan; +static double le_neg_nan; +static const unsigned char be_neg_nan_bytes[] = { 0xff, 0xf8, 0, 0, 0, 0, 0, 0 }; +static const unsigned char le_neg_nan_bytes[] = { 0, 0, 0, 0, 0, 0, 0xf8, 0xff }; +static bool neg_nan_init = false; + +static inline double negNan() +{ + if (!neg_nan_init) + { + memcpy(&be_neg_nan,be_neg_nan_bytes,sizeof(be_neg_nan_bytes)); + memcpy(&le_neg_nan,le_neg_nan_bytes,sizeof(le_neg_nan_bytes)); + neg_nan_init = true; + } + return (ByteOrder == BigEndian ? + be_neg_nan : + le_neg_nan); + +} + +// Sizes as defined by the ISO C99 standard - fallback +#ifndef LLONG_MAX +# define LLONG_MAX TQ_INT64_C(9223372036854775807) +#endif +#ifndef LLONG_MIN +# define LLONG_MIN (-LLONG_MAX - TQ_INT64_C(1)) +#endif +#ifndef ULLONG_MAX +# define ULLONG_MAX TQ_UINT64_C(0xffffffffffffffff) +#endif + +#ifndef QT_QLOCALE_USES_FCVT +static char *qdtoa(double d, int mode, int ndigits, int *decpt, + int *sign, char **rve, char **digits_str); +static char *_qdtoa(double d, int mode, int ndigits, int *decpt, + int *sign, char **rve, char **digits_str); +static double qstrtod(const char *s00, char const **se, bool *ok); +#endif +static TQ_LLONG qstrtoll(const char *nptr, const char **endptr, int base, bool *ok); +static TQ_ULLONG qstrtoull(const char *nptr, const char **endptr, int base, bool *ok); + +static inline bool compareBits(double d1, double d2) +{ + return memcmp((const char*)&d1, (const char*)&d2, sizeof(double)) == 0; +} + +static inline bool qIsInf(double d) +{ + return compareBits(d, INFINITY) || compareBits(d, -INFINITY); +} + +static inline bool qIsNan(double d) +{ + return compareBits(d, NAN) || compareBits(d, negNan()); +} + +static const uint locale_index[] = { + 0, // unused + 0, // C + 0, // Abkhazian + 0, // Afan + 0, // Afar + 1, // Afrikaans + 2, // Albanian + 0, // Amharic + 3, // Arabic + 19, // Armenian + 0, // Assamese + 0, // Aymara + 20, // Azerbaijani + 0, // Bashkir + 21, // Basque + 22, // Bengali + 0, // Bhutani + 0, // Bihari + 0, // Bislama + 0, // Breton + 23, // Bulgarian + 0, // Burmese + 24, // Byelorussian + 0, // Cambodian + 25, // Catalan + 26, // Chinese + 0, // Corsican + 31, // Croatian + 32, // Czech + 33, // Danish + 34, // Dutch + 36, // English + 0, // Esperanto + 48, // Estonian + 49, // Faroese + 0, // Fiji + 50, // Finnish + 51, // French + 0, // Frisian + 0, // Gaelic + 57, // Galician + 58, // Georgian + 59, // German + 64, // Greek + 0, // Greenlandic + 0, // Guarani + 65, // Gujarati + 0, // Hausa + 66, // Hebrew + 67, // Hindi + 68, // Hungarian + 69, // Icelandic + 70, // Indonesian + 0, // Interlingua + 0, // Interlingue + 0, // Inuktitut + 0, // Inupiak + 0, // Irish + 71, // Italian + 73, // Japanese + 0, // Javanese + 74, // Kannada + 0, // Kashmiri + 75, // Kazakh + 0, // Kinyarwanda + 76, // Kirghiz + 77, // Korean + 0, // Kurdish + 0, // Kurundi + 0, // Laothian + 0, // Latin + 78, // Latvian + 0, // Lingala + 79, // Lithuanian + 80, // Macedonian + 0, // Malagasy + 81, // Malay + 0, // Malayalam + 0, // Maltese + 0, // Maori + 83, // Marathi + 0, // Moldavian + 84, // Mongolian + 0, // Nauru + 0, // Nepali + 85, // Norwegian + 0, // Occitan + 0, // Oriya + 0, // Pashto + 86, // Persian + 87, // Polish + 88, // Portuguese + 90, // Punjabi + 0, // Quechua + 0, // RhaetoRomance + 91, // Romanian + 92, // Russian + 0, // Samoan + 0, // Sangho + 93, // Sanskrit + 0, // Serbian + 0, // SerboCroatian + 0, // Sesotho + 0, // Setswana + 0, // Shona + 0, // Sindhi + 0, // Singhalese + 0, // Siswati + 94, // Slovak + 95, // Slovenian + 0, // Somali + 96, // Spanish + 0, // Sundanese + 115, // Swahili + 116, // Swedish + 0, // Tagalog + 0, // Tajik + 118, // Tamil + 0, // Tatar + 119, // Telugu + 120, // Thai + 0, // Tibetan + 0, // Tigrinya + 0, // Tonga + 0, // Tsonga + 121, // Turkish + 0, // Turkmen + 0, // Twi + 0, // Uigur + 122, // Ukrainian + 123, // Urdu + 124, // Uzbek + 125, // Vietnamese + 0, // Volapuk + 0, // Welsh + 0, // Wolof + 0, // Xhosa + 0, // Yiddish + 0, // Yoruba + 0, // Zhuang + 0, // Zulu + 0 // trailing 0 +}; + +static const TQLocalePrivate locale_data[] = { +// lang terr dec group list prcnt zero minus exp + { 1, 0, 46, 44, 59, 37, 48, 45, 101 }, // C/AnyCountry + { 5, 195, 46, 44, 44, 37, 48, 45, 101 }, // Afrikaans/SouthAfrica + { 6, 2, 44, 46, 59, 37, 48, 45, 101 }, // Albanian/Albania + { 8, 186, 46, 44, 59, 37, 1632, 45, 101 }, // Arabic/SaudiArabia + { 8, 3, 46, 44, 59, 37, 48, 45, 101 }, // Arabic/Algeria + { 8, 17, 46, 44, 59, 37, 1632, 45, 101 }, // Arabic/Bahrain + { 8, 64, 46, 44, 59, 37, 1632, 45, 101 }, // Arabic/Egypt + { 8, 103, 46, 44, 59, 37, 1632, 45, 101 }, // Arabic/Iraq + { 8, 109, 46, 44, 59, 37, 1632, 45, 101 }, // Arabic/Jordan + { 8, 115, 46, 44, 59, 37, 1632, 45, 101 }, // Arabic/Kuwait + { 8, 119, 46, 44, 59, 37, 1632, 45, 101 }, // Arabic/Lebanon + { 8, 122, 46, 44, 59, 37, 48, 45, 101 }, // Arabic/LibyanArabJamahiriya + { 8, 145, 46, 44, 59, 37, 48, 45, 101 }, // Arabic/Morocco + { 8, 162, 46, 44, 59, 37, 1632, 45, 101 }, // Arabic/Oman + { 8, 175, 46, 44, 59, 37, 1632, 45, 101 }, // Arabic/Qatar + { 8, 207, 46, 44, 59, 37, 1632, 45, 101 }, // Arabic/SyrianArabRepublic + { 8, 216, 46, 44, 59, 37, 48, 45, 101 }, // Arabic/Tunisia + { 8, 223, 46, 44, 59, 37, 1632, 45, 101 }, // Arabic/UnitedArabEmirates + { 8, 237, 46, 44, 59, 37, 1632, 45, 101 }, // Arabic/Yemen + { 9, 11, 46, 44, 44, 37, 48, 45, 101 }, // Armenian/Armenia + { 12, 15, 44, 160, 59, 37, 48, 45, 101 }, // Azerbaijani/Azerbaijan + { 14, 197, 44, 46, 59, 37, 48, 45, 101 }, // Basque/Spain + { 15, 100, 46, 44, 59, 37, 48, 45, 101 }, // Bengali/India + { 20, 33, 44, 160, 59, 37, 48, 45, 101 }, // Bulgarian/Bulgaria + { 22, 20, 44, 160, 59, 37, 48, 45, 101 }, // Byelorussian/Belarus + { 24, 197, 44, 46, 59, 37, 48, 45, 101 }, // Catalan/Spain + { 25, 44, 46, 44, 44, 37, 48, 45, 101 }, // Chinese/China + { 25, 97, 46, 44, 44, 37, 48, 45, 101 }, // Chinese/HongKong + { 25, 126, 46, 44, 44, 37, 48, 45, 101 }, // Chinese/Macau + { 25, 190, 46, 44, 44, 37, 48, 45, 101 }, // Chinese/Singapore + { 25, 208, 46, 44, 44, 37, 48, 45, 101 }, // Chinese/Taiwan + { 27, 54, 44, 46, 59, 37, 48, 45, 101 }, // Croatian/Croatia + { 28, 57, 44, 160, 59, 37, 48, 45, 101 }, // Czech/CzechRepublic + { 29, 58, 44, 46, 59, 37, 48, 45, 101 }, // Danish/Denmark + { 30, 151, 44, 46, 59, 37, 48, 45, 101 }, // Dutch/Netherlands + { 30, 21, 44, 46, 59, 37, 48, 45, 101 }, // Dutch/Belgium + { 31, 225, 46, 44, 44, 37, 48, 45, 101 }, // English/UnitedStates + { 31, 13, 46, 44, 44, 37, 48, 45, 101 }, // English/Australia + { 31, 22, 46, 44, 59, 37, 48, 45, 101 }, // English/Belize + { 31, 38, 46, 44, 44, 37, 48, 45, 101 }, // English/Canada + { 31, 104, 46, 44, 44, 37, 48, 45, 101 }, // English/Ireland + { 31, 107, 46, 44, 44, 37, 48, 45, 101 }, // English/Jamaica + { 31, 154, 46, 44, 44, 37, 48, 45, 101 }, // English/NewZealand + { 31, 170, 46, 44, 44, 37, 48, 45, 101 }, // English/Philippines + { 31, 195, 46, 44, 44, 37, 48, 45, 101 }, // English/SouthAfrica + { 31, 215, 46, 44, 59, 37, 48, 45, 101 }, // English/TrinidadAndTobago + { 31, 224, 46, 44, 44, 37, 48, 45, 101 }, // English/UnitedKingdom + { 31, 240, 46, 44, 44, 37, 48, 45, 101 }, // English/Zimbabwe + { 33, 68, 44, 160, 59, 37, 48, 45, 101 }, // Estonian/Estonia + { 34, 71, 44, 46, 59, 37, 48, 45, 101 }, // Faroese/FaroeIslands + { 36, 73, 44, 160, 59, 37, 48, 45, 101 }, // Finnish/Finland + { 37, 74, 44, 160, 59, 37, 48, 45, 101 }, // French/France + { 37, 21, 44, 46, 59, 37, 48, 45, 101 }, // French/Belgium + { 37, 38, 44, 160, 59, 37, 48, 45, 101 }, // French/Canada + { 37, 125, 44, 160, 59, 37, 48, 45, 101 }, // French/Luxembourg + { 37, 142, 44, 160, 59, 37, 48, 45, 101 }, // French/Monaco + { 37, 206, 46, 39, 59, 37, 48, 45, 101 }, // French/Switzerland + { 40, 197, 44, 46, 44, 37, 48, 45, 101 }, // Galician/Spain + { 41, 81, 44, 160, 59, 37, 48, 45, 101 }, // Georgian/Georgia + { 42, 82, 44, 46, 59, 37, 48, 45, 101 }, // German/Germany + { 42, 14, 44, 46, 59, 37, 48, 45, 101 }, // German/Austria + { 42, 123, 46, 39, 59, 37, 48, 45, 101 }, // German/Liechtenstein + { 42, 125, 44, 46, 59, 37, 48, 45, 101 }, // German/Luxembourg + { 42, 206, 46, 39, 59, 37, 48, 45, 101 }, // German/Switzerland + { 43, 85, 44, 46, 59, 37, 48, 45, 101 }, // Greek/Greece + { 46, 100, 46, 44, 44, 37, 2790, 45, 101 }, // Gujarati/India + { 48, 105, 46, 44, 44, 37, 48, 45, 101 }, // Hebrew/Israel + { 49, 100, 46, 44, 44, 37, 48, 45, 101 }, // Hindi/India + { 50, 98, 44, 160, 59, 37, 48, 45, 101 }, // Hungarian/Hungary + { 51, 99, 44, 46, 59, 37, 48, 45, 101 }, // Icelandic/Iceland + { 52, 101, 44, 46, 59, 37, 48, 45, 101 }, // Indonesian/Indonesia + { 58, 106, 44, 46, 59, 37, 48, 45, 101 }, // Italian/Italy + { 58, 206, 46, 39, 59, 37, 48, 45, 101 }, // Italian/Switzerland + { 59, 108, 46, 44, 44, 37, 48, 45, 101 }, // Japanese/Japan + { 61, 100, 46, 44, 44, 37, 3302, 45, 101 }, // Kannada/India + { 63, 110, 44, 160, 59, 37, 48, 45, 101 }, // Kazakh/Kazakhstan + { 65, 116, 44, 160, 59, 37, 48, 45, 101 }, // Kirghiz/Kyrgyzstan + { 66, 114, 46, 44, 44, 37, 48, 45, 101 }, // Korean/RepublicOfKorea + { 71, 118, 44, 160, 59, 37, 48, 45, 101 }, // Latvian/Latvia + { 73, 124, 44, 46, 59, 37, 48, 45, 101 }, // Lithuanian/Lithuania + { 74, 127, 44, 46, 59, 37, 48, 45, 101 }, // Macedonian/Macedonia + { 76, 130, 44, 46, 59, 37, 48, 45, 101 }, // Malay/Malaysia + { 76, 32, 44, 46, 59, 37, 48, 45, 101 }, // Malay/BruneiDarussalam + { 80, 100, 46, 44, 44, 37, 2406, 45, 101 }, // Marathi/India + { 82, 143, 44, 160, 59, 37, 48, 45, 101 }, // Mongolian/Mongolia + { 85, 161, 44, 160, 59, 37, 48, 45, 101 }, // Norwegian/Norway + { 89, 102, 46, 44, 59, 37, 1776, 45, 101 }, // Persian/Iran + { 90, 172, 44, 160, 59, 37, 48, 45, 101 }, // Polish/Poland + { 91, 173, 44, 46, 59, 37, 48, 45, 101 }, // Portuguese/Portugal + { 91, 30, 44, 46, 59, 37, 48, 45, 101 }, // Portuguese/Brazil + { 92, 100, 46, 44, 44, 37, 2662, 45, 101 }, // Punjabi/India + { 95, 177, 44, 46, 59, 37, 48, 45, 101 }, // Romanian/Romania + { 96, 178, 44, 160, 59, 37, 48, 45, 101 }, // Russian/RussianFederation + { 99, 100, 46, 44, 44, 37, 2406, 45, 101 }, // Sanskrit/India + { 108, 191, 44, 160, 59, 37, 48, 45, 101 }, // Slovak/Slovakia + { 109, 192, 44, 46, 59, 37, 48, 45, 101 }, // Slovenian/Slovenia + { 111, 197, 44, 46, 59, 37, 48, 45, 101 }, // Spanish/Spain + { 111, 10, 44, 46, 44, 37, 48, 45, 101 }, // Spanish/Argentina + { 111, 26, 44, 46, 44, 37, 48, 45, 101 }, // Spanish/Bolivia + { 111, 43, 44, 46, 44, 37, 48, 45, 101 }, // Spanish/Chile + { 111, 47, 44, 46, 44, 37, 48, 45, 101 }, // Spanish/Colombia + { 111, 52, 44, 46, 44, 37, 48, 45, 101 }, // Spanish/CostaRica + { 111, 61, 46, 44, 44, 37, 48, 45, 101 }, // Spanish/DominicanRepublic + { 111, 63, 44, 46, 44, 37, 48, 45, 101 }, // Spanish/Ecuador + { 111, 65, 46, 44, 44, 37, 48, 45, 101 }, // Spanish/ElSalvador + { 111, 90, 46, 44, 44, 37, 48, 45, 101 }, // Spanish/Guatemala + { 111, 96, 46, 44, 44, 37, 48, 45, 101 }, // Spanish/Honduras + { 111, 139, 46, 44, 44, 37, 48, 45, 101 }, // Spanish/Mexico + { 111, 155, 46, 44, 44, 37, 48, 45, 101 }, // Spanish/Nicaragua + { 111, 166, 46, 44, 44, 37, 48, 45, 101 }, // Spanish/Panama + { 111, 168, 44, 46, 44, 37, 48, 45, 101 }, // Spanish/Paraguay + { 111, 169, 46, 44, 44, 37, 48, 45, 101 }, // Spanish/Peru + { 111, 174, 46, 44, 44, 37, 48, 45, 101 }, // Spanish/PuertoRico + { 111, 227, 44, 46, 44, 37, 48, 45, 101 }, // Spanish/Uruguay + { 111, 231, 44, 46, 44, 37, 48, 45, 101 }, // Spanish/Venezuela + { 113, 111, 46, 44, 44, 37, 48, 45, 101 }, // Swahili/Kenya + { 114, 205, 44, 160, 59, 37, 48, 45, 101 }, // Swedish/Sweden + { 114, 73, 44, 160, 59, 37, 48, 45, 101 }, // Swedish/Finland + { 117, 100, 46, 44, 44, 37, 48, 45, 101 }, // Tamil/India + { 119, 100, 46, 44, 44, 37, 3174, 45, 101 }, // Telugu/India + { 120, 211, 46, 44, 44, 37, 3664, 45, 101 }, // Thai/Thailand + { 125, 217, 44, 46, 59, 37, 48, 45, 101 }, // Turkish/Turkey + { 129, 222, 44, 160, 59, 37, 48, 45, 101 }, // Ukrainian/Ukraine + { 130, 163, 46, 44, 59, 37, 1776, 45, 101 }, // Urdu/Pakistan + { 131, 228, 44, 160, 59, 37, 48, 45, 101 }, // Uzbek/Uzbekistan + { 132, 232, 44, 46, 44, 37, 48, 45, 101 }, // Vietnamese/VietNam + { 0, 0, 0, 0, 0, 0, 0, 0, 0 } // trailing 0s +}; + +static const char language_name_list[] = +"Default\0" +"C\0" +"Abkhazian\0" +"Afan\0" +"Afar\0" +"Afrikaans\0" +"Albanian\0" +"Amharic\0" +"Arabic\0" +"Armenian\0" +"Assamese\0" +"Aymara\0" +"Azerbaijani\0" +"Bashkir\0" +"Basque\0" +"Bengali\0" +"Bhutani\0" +"Bihari\0" +"Bislama\0" +"Breton\0" +"Bulgarian\0" +"Burmese\0" +"Byelorussian\0" +"Cambodian\0" +"Catalan\0" +"Chinese\0" +"Corsican\0" +"Croatian\0" +"Czech\0" +"Danish\0" +"Dutch\0" +"English\0" +"Esperanto\0" +"Estonian\0" +"Faroese\0" +"Fiji\0" +"Finnish\0" +"French\0" +"Frisian\0" +"Gaelic\0" +"Galician\0" +"Georgian\0" +"German\0" +"Greek\0" +"Greenlandic\0" +"Guarani\0" +"Gujarati\0" +"Hausa\0" +"Hebrew\0" +"Hindi\0" +"Hungarian\0" +"Icelandic\0" +"Indonesian\0" +"Interlingua\0" +"Interlingue\0" +"Inuktitut\0" +"Inupiak\0" +"Irish\0" +"Italian\0" +"Japanese\0" +"Javanese\0" +"Kannada\0" +"Kashmiri\0" +"Kazakh\0" +"Kinyarwanda\0" +"Kirghiz\0" +"Korean\0" +"Kurdish\0" +"Kurundi\0" +"Laothian\0" +"Latin\0" +"Latvian\0" +"Lingala\0" +"Lithuanian\0" +"Macedonian\0" +"Malagasy\0" +"Malay\0" +"Malayalam\0" +"Maltese\0" +"Maori\0" +"Marathi\0" +"Moldavian\0" +"Mongolian\0" +"Nauru\0" +"Nepali\0" +"Norwegian\0" +"Occitan\0" +"Oriya\0" +"Pashto\0" +"Persian\0" +"Polish\0" +"Portuguese\0" +"Punjabi\0" +"Quechua\0" +"RhaetoRomance\0" +"Romanian\0" +"Russian\0" +"Samoan\0" +"Sangho\0" +"Sanskrit\0" +"Serbian\0" +"SerboCroatian\0" +"Sesotho\0" +"Setswana\0" +"Shona\0" +"Sindhi\0" +"Singhalese\0" +"Siswati\0" +"Slovak\0" +"Slovenian\0" +"Somali\0" +"Spanish\0" +"Sundanese\0" +"Swahili\0" +"Swedish\0" +"Tagalog\0" +"Tajik\0" +"Tamil\0" +"Tatar\0" +"Telugu\0" +"Thai\0" +"Tibetan\0" +"Tigrinya\0" +"Tonga\0" +"Tsonga\0" +"Turkish\0" +"Turkmen\0" +"Twi\0" +"Uigur\0" +"Ukrainian\0" +"Urdu\0" +"Uzbek\0" +"Vietnamese\0" +"Volapuk\0" +"Welsh\0" +"Wolof\0" +"Xhosa\0" +"Yiddish\0" +"Yoruba\0" +"Zhuang\0" +"Zulu\0"; + +static const uint language_name_index[] = { + 0,// Unused + 8,// C + 10,// Abkhazian + 20,// Afan + 25,// Afar + 30,// Afrikaans + 40,// Albanian + 49,// Amharic + 57,// Arabic + 64,// Armenian + 73,// Assamese + 82,// Aymara + 89,// Azerbaijani + 101,// Bashkir + 109,// Basque + 116,// Bengali + 124,// Bhutani + 132,// Bihari + 139,// Bislama + 147,// Breton + 154,// Bulgarian + 164,// Burmese + 172,// Byelorussian + 185,// Cambodian + 195,// Catalan + 203,// Chinese + 211,// Corsican + 220,// Croatian + 229,// Czech + 235,// Danish + 242,// Dutch + 248,// English + 256,// Esperanto + 266,// Estonian + 275,// Faroese + 283,// Fiji + 288,// Finnish + 296,// French + 303,// Frisian + 311,// Gaelic + 318,// Galician + 327,// Georgian + 336,// German + 343,// Greek + 349,// Greenlandic + 361,// Guarani + 369,// Gujarati + 378,// Hausa + 384,// Hebrew + 391,// Hindi + 397,// Hungarian + 407,// Icelandic + 417,// Indonesian + 428,// Interlingua + 440,// Interlingue + 452,// Inuktitut + 462,// Inupiak + 470,// Irish + 476,// Italian + 484,// Japanese + 493,// Javanese + 502,// Kannada + 510,// Kashmiri + 519,// Kazakh + 526,// Kinyarwanda + 538,// Kirghiz + 546,// Korean + 553,// Kurdish + 561,// Kurundi + 569,// Laothian + 578,// Latin + 584,// Latvian + 592,// Lingala + 600,// Lithuanian + 611,// Macedonian + 622,// Malagasy + 631,// Malay + 637,// Malayalam + 647,// Maltese + 655,// Maori + 661,// Marathi + 669,// Moldavian + 679,// Mongolian + 689,// Nauru + 695,// Nepali + 702,// Norwegian + 712,// Occitan + 720,// Oriya + 726,// Pashto + 733,// Persian + 741,// Polish + 748,// Portuguese + 759,// Punjabi + 767,// Quechua + 775,// RhaetoRomance + 789,// Romanian + 798,// Russian + 806,// Samoan + 813,// Sangho + 820,// Sanskrit + 829,// Serbian + 837,// SerboCroatian + 851,// Sesotho + 859,// Setswana + 868,// Shona + 874,// Sindhi + 881,// Singhalese + 892,// Siswati + 900,// Slovak + 907,// Slovenian + 917,// Somali + 924,// Spanish + 932,// Sundanese + 942,// Swahili + 950,// Swedish + 958,// Tagalog + 966,// Tajik + 972,// Tamil + 978,// Tatar + 984,// Telugu + 991,// Thai + 996,// Tibetan + 1004,// Tigrinya + 1013,// Tonga + 1019,// Tsonga + 1026,// Turkish + 1034,// Turkmen + 1042,// Twi + 1046,// Uigur + 1052,// Ukrainian + 1062,// Urdu + 1067,// Uzbek + 1073,// Vietnamese + 1084,// Volapuk + 1092,// Welsh + 1098,// Wolof + 1104,// Xhosa + 1110,// Yiddish + 1118,// Yoruba + 1125,// Zhuang + 1132// Zulu +}; + +static const char country_name_list[] = +"Default\0" +"Afghanistan\0" +"Albania\0" +"Algeria\0" +"AmericanSamoa\0" +"Andorra\0" +"Angola\0" +"Anguilla\0" +"Antarctica\0" +"AntiguaAndBarbuda\0" +"Argentina\0" +"Armenia\0" +"Aruba\0" +"Australia\0" +"Austria\0" +"Azerbaijan\0" +"Bahamas\0" +"Bahrain\0" +"Bangladesh\0" +"Barbados\0" +"Belarus\0" +"Belgium\0" +"Belize\0" +"Benin\0" +"Bermuda\0" +"Bhutan\0" +"Bolivia\0" +"BosniaAndHerzegowina\0" +"Botswana\0" +"BouvetIsland\0" +"Brazil\0" +"BritishIndianOceanTerritory\0" +"BruneiDarussalam\0" +"Bulgaria\0" +"BurkinaFaso\0" +"Burundi\0" +"Cambodia\0" +"Cameroon\0" +"Canada\0" +"CapeVerde\0" +"CaymanIslands\0" +"CentralAfricanRepublic\0" +"Chad\0" +"Chile\0" +"China\0" +"ChristmasIsland\0" +"CocosIslands\0" +"Colombia\0" +"Comoros\0" +"DemocraticRepublicOfCongo\0" +"PeoplesRepublicOfCongo\0" +"CookIslands\0" +"CostaRica\0" +"IvoryCoast\0" +"Croatia\0" +"Cuba\0" +"Cyprus\0" +"CzechRepublic\0" +"Denmark\0" +"Djibouti\0" +"Dominica\0" +"DominicanRepublic\0" +"EastTimor\0" +"Ecuador\0" +"Egypt\0" +"ElSalvador\0" +"EquatorialGuinea\0" +"Eritrea\0" +"Estonia\0" +"Ethiopia\0" +"FalklandIslands\0" +"FaroeIslands\0" +"Fiji\0" +"Finland\0" +"France\0" +"MetropolitanFrance\0" +"FrenchGuiana\0" +"FrenchPolynesia\0" +"FrenchSouthernTerritories\0" +"Gabon\0" +"Gambia\0" +"Georgia\0" +"Germany\0" +"Ghana\0" +"Gibraltar\0" +"Greece\0" +"Greenland\0" +"Grenada\0" +"Guadeloupe\0" +"Guam\0" +"Guatemala\0" +"Guinea\0" +"GuineaBissau\0" +"Guyana\0" +"Haiti\0" +"HeardAndMcDonaldIslands\0" +"Honduras\0" +"HongKong\0" +"Hungary\0" +"Iceland\0" +"India\0" +"Indonesia\0" +"Iran\0" +"Iraq\0" +"Ireland\0" +"Israel\0" +"Italy\0" +"Jamaica\0" +"Japan\0" +"Jordan\0" +"Kazakhstan\0" +"Kenya\0" +"Kiribati\0" +"DemocraticRepublicOfKorea\0" +"RepublicOfKorea\0" +"Kuwait\0" +"Kyrgyzstan\0" +"Lao\0" +"Latvia\0" +"Lebanon\0" +"Lesotho\0" +"Liberia\0" +"LibyanArabJamahiriya\0" +"Liechtenstein\0" +"Lithuania\0" +"Luxembourg\0" +"Macau\0" +"Macedonia\0" +"Madagascar\0" +"Malawi\0" +"Malaysia\0" +"Maldives\0" +"Mali\0" +"Malta\0" +"MarshallIslands\0" +"Martinique\0" +"Mauritania\0" +"Mauritius\0" +"Mayotte\0" +"Mexico\0" +"Micronesia\0" +"Moldova\0" +"Monaco\0" +"Mongolia\0" +"Montserrat\0" +"Morocco\0" +"Mozambique\0" +"Myanmar\0" +"Namibia\0" +"Nauru\0" +"Nepal\0" +"Netherlands\0" +"NetherlandsAntilles\0" +"NewCaledonia\0" +"NewZealand\0" +"Nicaragua\0" +"Niger\0" +"Nigeria\0" +"Niue\0" +"NorfolkIsland\0" +"NorthernMarianaIslands\0" +"Norway\0" +"Oman\0" +"Pakistan\0" +"Palau\0" +"PalestinianTerritory\0" +"Panama\0" +"PapuaNewGuinea\0" +"Paraguay\0" +"Peru\0" +"Philippines\0" +"Pitcairn\0" +"Poland\0" +"Portugal\0" +"PuertoRico\0" +"Qatar\0" +"Reunion\0" +"Romania\0" +"RussianFederation\0" +"Rwanda\0" +"SaintKittsAndNevis\0" +"StLucia\0" +"StVincentAndTheGrenadines\0" +"Samoa\0" +"SanMarino\0" +"SaoTomeAndPrincipe\0" +"SaudiArabia\0" +"Senegal\0" +"Seychelles\0" +"SierraLeone\0" +"Singapore\0" +"Slovakia\0" +"Slovenia\0" +"SolomonIslands\0" +"Somalia\0" +"SouthAfrica\0" +"SouthGeorgiaAndTheSouthSandwichIslands\0" +"Spain\0" +"SriLanka\0" +"StHelena\0" +"StPierreAndMiquelon\0" +"Sudan\0" +"Suriname\0" +"SvalbardAndJanMayenIslands\0" +"Swaziland\0" +"Sweden\0" +"Switzerland\0" +"SyrianArabRepublic\0" +"Taiwan\0" +"Tajikistan\0" +"Tanzania\0" +"Thailand\0" +"Togo\0" +"Tokelau\0" +"Tonga\0" +"TrinidadAndTobago\0" +"Tunisia\0" +"Turkey\0" +"Turkmenistan\0" +"TurksAndCaicosIslands\0" +"Tuvalu\0" +"Uganda\0" +"Ukraine\0" +"UnitedArabEmirates\0" +"UnitedKingdom\0" +"UnitedStates\0" +"UnitedStatesMinorOutlyingIslands\0" +"Uruguay\0" +"Uzbekistan\0" +"Vanuatu\0" +"VaticanCityState\0" +"Venezuela\0" +"VietNam\0" +"BritishVirginIslands\0" +"USVirginIslands\0" +"WallisAndFutunaIslands\0" +"WesternSahara\0" +"Yemen\0" +"Yugoslavia\0" +"Zambia\0" +"Zimbabwe\0"; + +static const uint country_name_index[] = { + 0,// AnyCountry + 8,// Afghanistan + 20,// Albania + 28,// Algeria + 36,// AmericanSamoa + 50,// Andorra + 58,// Angola + 65,// Anguilla + 74,// Antarctica + 85,// AntiguaAndBarbuda + 103,// Argentina + 113,// Armenia + 121,// Aruba + 127,// Australia + 137,// Austria + 145,// Azerbaijan + 156,// Bahamas + 164,// Bahrain + 172,// Bangladesh + 183,// Barbados + 192,// Belarus + 200,// Belgium + 208,// Belize + 215,// Benin + 221,// Bermuda + 229,// Bhutan + 236,// Bolivia + 244,// BosniaAndHerzegowina + 265,// Botswana + 274,// BouvetIsland + 287,// Brazil + 294,// BritishIndianOceanTerritory + 322,// BruneiDarussalam + 339,// Bulgaria + 348,// BurkinaFaso + 360,// Burundi + 368,// Cambodia + 377,// Cameroon + 386,// Canada + 393,// CapeVerde + 403,// CaymanIslands + 417,// CentralAfricanRepublic + 440,// Chad + 445,// Chile + 451,// China + 457,// ChristmasIsland + 473,// CocosIslands + 486,// Colombia + 495,// Comoros + 503,// DemocraticRepublicOfCongo + 529,// PeoplesRepublicOfCongo + 552,// CookIslands + 564,// CostaRica + 574,// IvoryCoast + 585,// Croatia + 593,// Cuba + 598,// Cyprus + 605,// CzechRepublic + 619,// Denmark + 627,// Djibouti + 636,// Dominica + 645,// DominicanRepublic + 663,// EastTimor + 673,// Ecuador + 681,// Egypt + 687,// ElSalvador + 698,// EquatorialGuinea + 715,// Eritrea + 723,// Estonia + 731,// Ethiopia + 740,// FalklandIslands + 756,// FaroeIslands + 769,// Fiji + 774,// Finland + 782,// France + 789,// MetropolitanFrance + 808,// FrenchGuiana + 821,// FrenchPolynesia + 837,// FrenchSouthernTerritories + 863,// Gabon + 869,// Gambia + 876,// Georgia + 884,// Germany + 892,// Ghana + 898,// Gibraltar + 908,// Greece + 915,// Greenland + 925,// Grenada + 933,// Guadeloupe + 944,// Guam + 949,// Guatemala + 959,// Guinea + 966,// GuineaBissau + 979,// Guyana + 986,// Haiti + 992,// HeardAndMcDonaldIslands + 1016,// Honduras + 1025,// HongKong + 1034,// Hungary + 1042,// Iceland + 1050,// India + 1056,// Indonesia + 1066,// Iran + 1071,// Iraq + 1076,// Ireland + 1084,// Israel + 1091,// Italy + 1097,// Jamaica + 1105,// Japan + 1111,// Jordan + 1118,// Kazakhstan + 1129,// Kenya + 1135,// Kiribati + 1144,// DemocraticRepublicOfKorea + 1170,// RepublicOfKorea + 1186,// Kuwait + 1193,// Kyrgyzstan + 1204,// Lao + 1208,// Latvia + 1215,// Lebanon + 1223,// Lesotho + 1231,// Liberia + 1239,// LibyanArabJamahiriya + 1260,// Liechtenstein + 1274,// Lithuania + 1284,// Luxembourg + 1295,// Macau + 1301,// Macedonia + 1311,// Madagascar + 1322,// Malawi + 1329,// Malaysia + 1338,// Maldives + 1347,// Mali + 1352,// Malta + 1358,// MarshallIslands + 1374,// Martinique + 1385,// Mauritania + 1396,// Mauritius + 1406,// Mayotte + 1414,// Mexico + 1421,// Micronesia + 1432,// Moldova + 1440,// Monaco + 1447,// Mongolia + 1456,// Montserrat + 1467,// Morocco + 1475,// Mozambique + 1486,// Myanmar + 1494,// Namibia + 1502,// Nauru + 1508,// Nepal + 1514,// Netherlands + 1526,// NetherlandsAntilles + 1546,// NewCaledonia + 1559,// NewZealand + 1570,// Nicaragua + 1580,// Niger + 1586,// Nigeria + 1594,// Niue + 1599,// NorfolkIsland + 1613,// NorthernMarianaIslands + 1636,// Norway + 1643,// Oman + 1648,// Pakistan + 1657,// Palau + 1663,// PalestinianTerritory + 1684,// Panama + 1691,// PapuaNewGuinea + 1706,// Paraguay + 1715,// Peru + 1720,// Philippines + 1732,// Pitcairn + 1741,// Poland + 1748,// Portugal + 1757,// PuertoRico + 1768,// Qatar + 1774,// Reunion + 1782,// Romania + 1790,// RussianFederation + 1808,// Rwanda + 1815,// SaintKittsAndNevis + 1834,// StLucia + 1842,// StVincentAndTheGrenadines + 1868,// Samoa + 1874,// SanMarino + 1884,// SaoTomeAndPrincipe + 1903,// SaudiArabia + 1915,// Senegal + 1923,// Seychelles + 1934,// SierraLeone + 1946,// Singapore + 1956,// Slovakia + 1965,// Slovenia + 1974,// SolomonIslands + 1989,// Somalia + 1997,// SouthAfrica + 2009,// SouthGeorgiaAndTheSouthSandwichIslands + 2048,// Spain + 2054,// SriLanka + 2063,// StHelena + 2072,// StPierreAndMiquelon + 2092,// Sudan + 2098,// Suriname + 2107,// SvalbardAndJanMayenIslands + 2134,// Swaziland + 2144,// Sweden + 2151,// Switzerland + 2163,// SyrianArabRepublic + 2182,// Taiwan + 2189,// Tajikistan + 2200,// Tanzania + 2209,// Thailand + 2218,// Togo + 2223,// Tokelau + 2231,// Tonga + 2237,// TrinidadAndTobago + 2255,// Tunisia + 2263,// Turkey + 2270,// Turkmenistan + 2283,// TurksAndCaicosIslands + 2305,// Tuvalu + 2312,// Uganda + 2319,// Ukraine + 2327,// UnitedArabEmirates + 2346,// UnitedKingdom + 2360,// UnitedStates + 2373,// UnitedStatesMinorOutlyingIslands + 2406,// Uruguay + 2414,// Uzbekistan + 2425,// Vanuatu + 2433,// VaticanCityState + 2450,// Venezuela + 2460,// VietNam + 2468,// BritishVirginIslands + 2489,// USVirginIslands + 2505,// WallisAndFutunaIslands + 2528,// WesternSahara + 2542,// Yemen + 2548,// Yugoslavia + 2559,// Zambia + 2566// Zimbabwe +}; + +static const char language_code_list[] = +" " // Unused +" " // C +"ab" // Abkhazian +"om" // Afan +"aa" // Afar +"af" // Afrikaans +"sq" // Albanian +"am" // Amharic +"ar" // Arabic +"hy" // Armenian +"as" // Assamese +"ay" // Aymara +"az" // Azerbaijani +"ba" // Bashkir +"eu" // Basque +"bn" // Bengali +"dz" // Bhutani +"bh" // Bihari +"bi" // Bislama +"br" // Breton +"bg" // Bulgarian +"my" // Burmese +"be" // Byelorussian +"km" // Cambodian +"ca" // Catalan +"zh" // Chinese +"co" // Corsican +"hr" // Croatian +"cs" // Czech +"da" // Danish +"nl" // Dutch +"en" // English +"eo" // Esperanto +"et" // Estonian +"fo" // Faroese +"fj" // Fiji +"fi" // Finnish +"fr" // French +"fy" // Frisian +"gd" // Gaelic +"gl" // Galician +"ka" // Georgian +"de" // German +"el" // Greek +"kl" // Greenlandic +"gn" // Guarani +"gu" // Gujarati +"ha" // Hausa +"he" // Hebrew +"hi" // Hindi +"hu" // Hungarian +"is" // Icelandic +"id" // Indonesian +"ia" // Interlingua +"ie" // Interlingue +"iu" // Inuktitut +"ik" // Inupiak +"ga" // Irish +"it" // Italian +"ja" // Japanese +"jv" // Javanese +"kn" // Kannada +"ks" // Kashmiri +"kk" // Kazakh +"rw" // Kinyarwanda +"ky" // Kirghiz +"ko" // Korean +"ku" // Kurdish +"rn" // Kurundi +"lo" // Laothian +"la" // Latin +"lv" // Latvian +"ln" // Lingala +"lt" // Lithuanian +"mk" // Macedonian +"mg" // Malagasy +"ms" // Malay +"ml" // Malayalam +"mt" // Maltese +"mi" // Maori +"mr" // Marathi +"mo" // Moldavian +"mn" // Mongolian +"na" // Nauru +"ne" // Nepali +"no" // Norwegian +"oc" // Occitan +"or" // Oriya +"ps" // Pashto +"fa" // Persian +"pl" // Polish +"pt" // Portuguese +"pa" // Punjabi +"qu" // Quechua +"rm" // RhaetoRomance +"ro" // Romanian +"ru" // Russian +"sm" // Samoan +"sg" // Sangho +"sa" // Sanskrit +"sr" // Serbian +"sh" // SerboCroatian +"st" // Sesotho +"tn" // Setswana +"sn" // Shona +"sd" // Sindhi +"si" // Singhalese +"ss" // Siswati +"sk" // Slovak +"sl" // Slovenian +"so" // Somali +"es" // Spanish +"su" // Sundanese +"sw" // Swahili +"sv" // Swedish +"tl" // Tagalog +"tg" // Tajik +"ta" // Tamil +"tt" // Tatar +"te" // Telugu +"th" // Thai +"bo" // Tibetan +"ti" // Tigrinya +"to" // Tonga +"ts" // Tsonga +"tr" // Turkish +"tk" // Turkmen +"tw" // Twi +"ug" // Uigur +"uk" // Ukrainian +"ur" // Urdu +"uz" // Uzbek +"vi" // Vietnamese +"vo" // Volapuk +"cy" // Welsh +"wo" // Wolof +"xh" // Xhosa +"yi" // Yiddish +"yo" // Yoruba +"za" // Zhuang +"zu" // Zulu +; + +static const char country_code_list[] = +" " // AnyLanguage +"AF" // Afghanistan +"AL" // Albania +"DZ" // Algeria +"AS" // AmericanSamoa +"AD" // Andorra +"AO" // Angola +"AI" // Anguilla +"AQ" // Antarctica +"AG" // AntiguaAndBarbuda +"AR" // Argentina +"AM" // Armenia +"AW" // Aruba +"AU" // Australia +"AT" // Austria +"AZ" // Azerbaijan +"BS" // Bahamas +"BH" // Bahrain +"BD" // Bangladesh +"BB" // Barbados +"BY" // Belarus +"BE" // Belgium +"BZ" // Belize +"BJ" // Benin +"BM" // Bermuda +"BT" // Bhutan +"BO" // Bolivia +"BA" // BosniaAndHerzegowina +"BW" // Botswana +"BV" // BouvetIsland +"BR" // Brazil +"IO" // BritishIndianOceanTerritory +"BN" // BruneiDarussalam +"BG" // Bulgaria +"BF" // BurkinaFaso +"BI" // Burundi +"KH" // Cambodia +"CM" // Cameroon +"CA" // Canada +"CV" // CapeVerde +"KY" // CaymanIslands +"CF" // CentralAfricanRepublic +"TD" // Chad +"CL" // Chile +"CN" // China +"CX" // ChristmasIsland +"CC" // CocosIslands +"CO" // Colombia +"KM" // Comoros +"CD" // DemocraticRepublicOfCongo +"CG" // PeoplesRepublicOfCongo +"CK" // CookIslands +"CR" // CostaRica +"CI" // IvoryCoast +"HR" // Croatia +"CU" // Cuba +"CY" // Cyprus +"CZ" // CzechRepublic +"DK" // Denmark +"DJ" // Djibouti +"DM" // Dominica +"DO" // DominicanRepublic +"TL" // EastTimor +"EC" // Ecuador +"EG" // Egypt +"SV" // ElSalvador +"GQ" // EquatorialGuinea +"ER" // Eritrea +"EE" // Estonia +"ET" // Ethiopia +"FK" // FalklandIslands +"FO" // FaroeIslands +"FJ" // Fiji +"FI" // Finland +"FR" // France +"FX" // MetropolitanFrance +"GF" // FrenchGuiana +"PF" // FrenchPolynesia +"TF" // FrenchSouthernTerritories +"GA" // Gabon +"GM" // Gambia +"GE" // Georgia +"DE" // Germany +"GH" // Ghana +"GI" // Gibraltar +"GR" // Greece +"GL" // Greenland +"GD" // Grenada +"GP" // Guadeloupe +"GU" // Guam +"GT" // Guatemala +"GN" // Guinea +"GW" // GuineaBissau +"GY" // Guyana +"HT" // Haiti +"HM" // HeardAndMcDonaldIslands +"HN" // Honduras +"HK" // HongKong +"HU" // Hungary +"IS" // Iceland +"IN" // India +"ID" // Indonesia +"IR" // Iran +"IQ" // Iraq +"IE" // Ireland +"IL" // Israel +"IT" // Italy +"JM" // Jamaica +"JP" // Japan +"JO" // Jordan +"KZ" // Kazakhstan +"KE" // Kenya +"KI" // Kiribati +"KP" // DemocraticRepublicOfKorea +"KR" // RepublicOfKorea +"KW" // Kuwait +"KG" // Kyrgyzstan +"LA" // Lao +"LV" // Latvia +"LB" // Lebanon +"LS" // Lesotho +"LR" // Liberia +"LY" // LibyanArabJamahiriya +"LI" // Liechtenstein +"LT" // Lithuania +"LU" // Luxembourg +"MO" // Macau +"MK" // Macedonia +"MG" // Madagascar +"MW" // Malawi +"MY" // Malaysia +"MV" // Maldives +"ML" // Mali +"MT" // Malta +"MH" // MarshallIslands +"MQ" // Martinique +"MR" // Mauritania +"MU" // Mauritius +"YT" // Mayotte +"MX" // Mexico +"FM" // Micronesia +"MD" // Moldova +"MC" // Monaco +"MN" // Mongolia +"MS" // Montserrat +"MA" // Morocco +"MZ" // Mozambique +"MM" // Myanmar +"NA" // Namibia +"NR" // Nauru +"NP" // Nepal +"NL" // Netherlands +"AN" // NetherlandsAntilles +"NC" // NewCaledonia +"NZ" // NewZealand +"NI" // Nicaragua +"NE" // Niger +"NG" // Nigeria +"NU" // Niue +"NF" // NorfolkIsland +"MP" // NorthernMarianaIslands +"NO" // Norway +"OM" // Oman +"PK" // Pakistan +"PW" // Palau +"PS" // PalestinianTerritory +"PA" // Panama +"PG" // PapuaNewGuinea +"PY" // Paraguay +"PE" // Peru +"PH" // Philippines +"PN" // Pitcairn +"PL" // Poland +"PT" // Portugal +"PR" // PuertoRico +"QA" // Qatar +"RE" // Reunion +"RO" // Romania +"RU" // RussianFederation +"RW" // Rwanda +"KN" // SaintKittsAndNevis +"LC" // StLucia +"VC" // StVincentAndTheGrenadines +"WS" // Samoa +"SM" // SanMarino +"ST" // SaoTomeAndPrincipe +"SA" // SaudiArabia +"SN" // Senegal +"SC" // Seychelles +"SL" // SierraLeone +"SG" // Singapore +"SK" // Slovakia +"SI" // Slovenia +"SB" // SolomonIslands +"SO" // Somalia +"ZA" // SouthAfrica +"GS" // SouthGeorgiaAndTheSouthSandwichIslands +"ES" // Spain +"LK" // SriLanka +"SH" // StHelena +"PM" // StPierreAndMiquelon +"SD" // Sudan +"SR" // Suriname +"SJ" // SvalbardAndJanMayenIslands +"SZ" // Swaziland +"SE" // Sweden +"CH" // Switzerland +"SY" // SyrianArabRepublic +"TW" // Taiwan +"TJ" // Tajikistan +"TZ" // Tanzania +"TH" // Thailand +"TG" // Togo +"TK" // Tokelau +"TO" // Tonga +"TT" // TrinidadAndTobago +"TN" // Tunisia +"TR" // Turkey +"TM" // Turkmenistan +"TC" // TurksAndCaicosIslands +"TV" // Tuvalu +"UG" // Uganda +"UA" // Ukraine +"AE" // UnitedArabEmirates +"GB" // UnitedKingdom +"US" // UnitedStates +"UM" // UnitedStatesMinorOutlyingIslands +"UY" // Uruguay +"UZ" // Uzbekistan +"VU" // Vanuatu +"VA" // VaticanCityState +"VE" // Venezuela +"VN" // VietNam +"VG" // BritishVirginIslands +"VI" // USVirginIslands +"WF" // WallisAndFutunaIslands +"EH" // WesternSahara +"YE" // Yemen +"YU" // Yugoslavia +"ZM" // Zambia +"ZW" // Zimbabwe +; + +static TQLocale::Language codeToLanguage(const TQString &code) +{ + if (code.length() != 2) + return TQLocale::C; + + ushort uc1 = code.unicode()[0].unicode(); + ushort uc2 = code.unicode()[1].unicode(); + + const char *c = language_code_list; + for (; *c != 0; c += 2) { + if (uc1 == (unsigned char)c[0] && uc2 == (unsigned char)c[1]) + return (TQLocale::Language) ((c - language_code_list)/2); + } + + return TQLocale::C; +} + +static TQLocale::Country codeToCountry(const TQString &code) +{ + if (code.length() != 2) + return TQLocale::AnyCountry; + + ushort uc1 = code.unicode()[0].unicode(); + ushort uc2 = code.unicode()[1].unicode(); + + const char *c = country_code_list; + for (; *c != 0; c += 2) { + if (uc1 == (unsigned char)c[0] && uc2 == (unsigned char)c[1]) + return (TQLocale::Country) ((c - country_code_list)/2); + } + + return TQLocale::AnyCountry; +} + +static TQString languageToCode(TQLocale::Language language) +{ + if (language == TQLocale::C) + return "C"; + + TQString code; + code.setLength(2); + const char *c = language_code_list + 2*(uint)language; + code[0] = c[0]; + code[1] = c[1]; + return code; +} + +static TQString countryToCode(TQLocale::Country country) +{ + if (country == TQLocale::AnyCountry) + return TQString::null; + + TQString code; + code.setLength(2); + const char *c = country_code_list + 2*(uint)country; + code[0] = c[0]; + code[1] = c[1]; + return code; +} + +const TQLocalePrivate *TQLocale::default_d = 0; + +TQString TQLocalePrivate::infinity() const +{ + return TQString::fromLatin1("inf"); +} + +TQString TQLocalePrivate::nan() const +{ + return TQString::fromLatin1("nan"); +} + +#if defined(Q_OS_WIN) +/* Win95 doesn't have a function to return the ISO lang/country name of the user's locale. + Instead it can return a "Windows code". This maps windows codes to ISO country names. */ + +struct WindowsToISOListElt { + int windows_code; + char iso_name[6]; +}; + +static const WindowsToISOListElt windows_to_iso_list[] = { + { 0x0401, "ar_SA" }, + { 0x0402, "bg\0 " }, + { 0x0403, "ca\0 " }, + { 0x0404, "zh_TW" }, + { 0x0405, "cs\0 " }, + { 0x0406, "da\0 " }, + { 0x0407, "de\0 " }, + { 0x0408, "el\0 " }, + { 0x0409, "en_US" }, + { 0x040a, "es\0 " }, + { 0x040b, "fi\0 " }, + { 0x040c, "fr\0 " }, + { 0x040d, "he\0 " }, + { 0x040e, "hu\0 " }, + { 0x040f, "is\0 " }, + { 0x0410, "it\0 " }, + { 0x0411, "ja\0 " }, + { 0x0412, "ko\0 " }, + { 0x0413, "nl\0 " }, + { 0x0414, "no\0 " }, + { 0x0415, "pl\0 " }, + { 0x0416, "pt_BR" }, + { 0x0418, "ro\0 " }, + { 0x0419, "ru\0 " }, + { 0x041a, "hr\0 " }, + { 0x041c, "sq\0 " }, + { 0x041d, "sv\0 " }, + { 0x041e, "th\0 " }, + { 0x041f, "tr\0 " }, + { 0x0420, "ur\0 " }, + { 0x0421, "in\0 " }, + { 0x0422, "uk\0 " }, + { 0x0423, "be\0 " }, + { 0x0425, "et\0 " }, + { 0x0426, "lv\0 " }, + { 0x0427, "lt\0 " }, + { 0x0429, "fa\0 " }, + { 0x042a, "vi\0 " }, + { 0x042d, "eu\0 " }, + { 0x042f, "mk\0 " }, + { 0x0436, "af\0 " }, + { 0x0438, "fo\0 " }, + { 0x0439, "hi\0 " }, + { 0x043e, "ms\0 " }, + { 0x0458, "mt\0 " }, + { 0x0801, "ar_IQ" }, + { 0x0804, "zh_CN" }, + { 0x0807, "de_CH" }, + { 0x0809, "en_GB" }, + { 0x080a, "es_MX" }, + { 0x080c, "fr_BE" }, + { 0x0810, "it_CH" }, + { 0x0812, "ko\0 " }, + { 0x0813, "nl_BE" }, + { 0x0814, "no\0 " }, + { 0x0816, "pt\0 " }, + { 0x081a, "sr\0 " }, + { 0x081d, "sv_FI" }, + { 0x0c01, "ar_EG" }, + { 0x0c04, "zh_HK" }, + { 0x0c07, "de_AT" }, + { 0x0c09, "en_AU" }, + { 0x0c0a, "es\0 " }, + { 0x0c0c, "fr_CA" }, + { 0x0c1a, "sr\0 " }, + { 0x1001, "ar_LY" }, + { 0x1004, "zh_SG" }, + { 0x1007, "de_LU" }, + { 0x1009, "en_CA" }, + { 0x100a, "es_GT" }, + { 0x100c, "fr_CH" }, + { 0x1401, "ar_DZ" }, + { 0x1407, "de_LI" }, + { 0x1409, "en_NZ" }, + { 0x140a, "es_CR" }, + { 0x140c, "fr_LU" }, + { 0x1801, "ar_MA" }, + { 0x1809, "en_IE" }, + { 0x180a, "es_PA" }, + { 0x1c01, "ar_TN" }, + { 0x1c09, "en_ZA" }, + { 0x1c0a, "es_DO" }, + { 0x2001, "ar_OM" }, + { 0x2009, "en_JM" }, + { 0x200a, "es_VE" }, + { 0x2401, "ar_YE" }, + { 0x2409, "en\0 " }, + { 0x240a, "es_CO" }, + { 0x2801, "ar_SY" }, + { 0x2809, "en_BZ" }, + { 0x280a, "es_PE" }, + { 0x2c01, "ar_JO" }, + { 0x2c09, "en_TT" }, + { 0x2c0a, "es_AR" }, + { 0x3001, "ar_LB" }, + { 0x300a, "es_EC" }, + { 0x3401, "ar_KW" }, + { 0x340a, "es_CL" }, + { 0x3801, "ar_AE" }, + { 0x380a, "es_UY" }, + { 0x3c01, "ar_BH" }, + { 0x3c0a, "es_PY" }, + { 0x4001, "ar_QA" }, + { 0x400a, "es_BO" }, + { 0x440a, "es_SV" }, + { 0x480a, "es_HN" }, + { 0x4c0a, "es_NI" }, + { 0x500a, "es_PR" } +}; + +static const int windows_to_iso_count + = sizeof(windows_to_iso_list)/sizeof(WindowsToISOListElt); + +static const char *winLangCodeToIsoName(int code) +{ + int cmp = code - windows_to_iso_list[0].windows_code; + if (cmp < 0) + return 0; + + if (cmp == 0) + return windows_to_iso_list[0].iso_name; + + int begin = 0; + int end = windows_to_iso_count; + + while (end - begin > 1) { + uint mid = (begin + end)/2; + + const WindowsToISOListElt *elt = windows_to_iso_list + mid; + int cmp = code - elt->windows_code; + if (cmp < 0) + end = mid; + else if (cmp > 0) + begin = mid; + else + return elt->iso_name; + } + + return 0; + +} +#endif // Q_OS_WIN + +const char* TQLocalePrivate::systemLocaleName() +{ + static TQCString lang; + lang = getenv( "LANG" ); + +#if defined( Q_OS_MAC ) + if ( !lang.isEmpty() ) + return lang; + + char mac_ret[255]; + if(!LocaleRefGetPartString(NULL, kLocaleLanguageMask | kLocaleRegionMask, 255, mac_ret)) + lang = mac_ret; +#endif + +#if defined(TQ_WS_WIN) + if ( !lang.isEmpty() ) { + long id = 0; + bool ok = false; + id = qstrtoll(lang.data(), 0, 0, &ok); + if ( !ok || id == 0 || id < INT_MIN || id > INT_MAX ) + return lang; + else + return winLangCodeToIsoName( (int)id ); + } + + if (qWinVersion() == TQt::WV_95) { + lang = winLangCodeToIsoName(GetUserDefaultLangID()); + } else { + QT_WA( { + wchar_t out[256]; + TQString language; + TQString sublanguage; + if ( GetLocaleInfoW( LOCALE_USER_DEFAULT, LOCALE_SISO639LANGNAME , out, 255 ) ) + language = TQString::fromUcs2( (ushort*)out ); + if ( GetLocaleInfoW( LOCALE_USER_DEFAULT, LOCALE_SISO3166CTRYNAME, out, 255 ) ) + sublanguage = TQString::fromUcs2( (ushort*)out ).lower(); + lang = language; + if ( sublanguage != language && !sublanguage.isEmpty() ) + lang += "_" + sublanguage.upper(); + } , { + char out[256]; + TQString language; + TQString sublanguage; + if ( GetLocaleInfoA( LOCALE_USER_DEFAULT, LOCALE_SISO639LANGNAME, out, 255 ) ) + language = TQString::fromLocal8Bit( out ); + if ( GetLocaleInfoA( LOCALE_USER_DEFAULT, LOCALE_SISO3166CTRYNAME, out, 255 ) ) + sublanguage = TQString::fromLocal8Bit( out ).lower(); + lang = language; + if ( sublanguage != language && !sublanguage.isEmpty() ) + lang += "_" + sublanguage.upper(); + } ); + } +#endif + if ( lang.isEmpty() ) + lang = "C"; + + return lang; +} + +static const TQLocalePrivate *findLocale(TQLocale::Language language, + TQLocale::Country country) +{ + unsigned language_id = (unsigned)language; + unsigned country_id = (unsigned)country; + + uint idx = locale_index[language_id]; + + const TQLocalePrivate *d = locale_data + idx; + + if (idx == 0) // default language has no associated country + return d; + + if (country == TQLocale::AnyCountry) + return d; + + Q_ASSERT(d->languageId() == language_id); + + while (d->languageId() == language_id + && d->countryId() != country_id) + ++d; + + if (d->countryId() == country_id + && d->languageId() == language_id) + return d; + + return locale_data + idx; +} + +/*! + \class TQLocale + \brief The TQLocale class converts between numbers and their + string representations in various languages. + + \reentrant + \ingroup text + + It is initialized with a country/language pair in its constructor + and offers number-to-string and string-to-number conversion + functions simmilar to those in TQString. + + \code + TQLocale egyptian(TQLocale::Arabic, TQLocale::Egypt); + TQString s1 = egyptian.toString(1.571429E+07, 'e'); + TQString s2 = egyptian.toString(10); + + double d = egyptian.toDouble(s1); + int s2 = egyptian.toInt(s2); + \endcode + + TQLocale supports the concept of a default locale, which is + determined from the system's locale settings at application + startup. The default locale can be changed by calling the + static member setDefault(). The default locale has the + following effects: + + \list + \i If a TQLocale object is constructed with the default constructor, + it will use the default locale's settings. + \i TQString::toDouble() interprets the string according to the default + locale. If this fails, it falls back on the "C" locale. + \i TQString::arg() uses the default locale to format a number when + its position specifier in the format string contains an 'L', + e.g. "%L1". + \endlist + + \code + TQLocale::setDefault(TQLocale(TQLocale::Hebrew, TQLocale::Israel)); + TQLocale hebrew; // Constructs a default TQLocale + TQString s1 = hebrew.toString(15714.3, 'e'); + + bool ok; + double d; + + TQLocale::setDefault(TQLocale::C); + d = TQString( "1234,56" ).toDouble(&ok); // ok == false + d = TQString( "1234.56" ).toDouble(&ok); // ok == true, d == 1234.56 + + TQLocale::setDefault(TQLocale::German); + d = TQString( "1234,56" ).toDouble(&ok); // ok == true, d == 1234.56 + d = TQString( "1234.56" ).toDouble(&ok); // ok == true, d == 1234.56 + + TQLocale::setDefault(TQLocale(TQLocale::English, TQLocale::UnitedStates)); + str = TQString( "%1 %L2 %L3" ) + .arg( 12345 ) + .arg( 12345 ) + .arg( 12345, 0, 16 ); + // str == "12345 12,345 3039" + \endcode + + When a language/country pair is specified in the constructor, one + of three things can happen: + + \list + \i If the language/country pair is found in the database, it is used. + \i If the language is found but the country is not, or if the country + is \c AnyCountry, the language is used with the most + appropriate available country (for example, Germany for German), + \i If neither the language nor the country are found, TQLocale + defaults to the default locale (see setDefault()). + \endlist + + The "C" locale is identical to English/UnitedStates. + + Use language() and country() to determine the actual language and + country values used. + + An alternative method for constructing a TQLocale object is by + specifying the locale name. + + \code + TQLocale korean("ko"); + TQLocale swiss("de_CH"); + \endcode + + This constructor converts the locale name to a language/country + pair; it does not use the system locale database. + + All the methods in TQLocale, with the exception of setDefault(), + are reentrant. + + \sa TQString::toDouble() TQString::arg() + + The double-to-string and string-to-double conversion functions are + covered by the following licenses: + + \legalese + + Copyright (c) 1991 by AT&T. + + Permission to use, copy, modify, and distribute this software for any + purpose without fee is hereby granted, provided that this entire notice + is included in all copies of any software which is or includes a copy + or modification of this software and in all copies of the supporting + documentation for such software. + + THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED + WARRANTY. IN PARTICULAR, NEITHER THE AUTHOR NOR AT&T MAKES ANY + REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY + OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. + + This product includes software developed by the University of + California, Berkeley and its contributors. +*/ + +/*! + \enum TQLocale::Language + + This enumerated type is used to specify a language. + + \value C Identical to English/UnitedStates + \value Abkhazian + \value Afan + \value Afar + \value Afrikaans + \value Albanian + \value Amharic + \value Arabic + \value Armenian + \value Assamese + \value Aymara + \value Azerbaijani + \value Bashkir + \value Basque + \value Bengali + \value Bhutani + \value Bihari + \value Bislama + \value Breton + \value Bulgarian + \value Burmese + \value Byelorussian + \value Cambodian + \value Catalan + \value Chinese + \value Corsican + \value Croatian + \value Czech + \value Danish + \value Dutch + \value English + \value Esperanto + \value Estonian + \value Faroese + \value FijiLanguage + \value Finnish + \value French + \value Frisian + \value Gaelic + \value Galician + \value Georgian + \value German + \value Greek + \value Greenlandic + \value Guarani + \value Gujarati + \value Hausa + \value Hebrew + \value Hindi + \value Hungarian + \value Icelandic + \value Indonesian + \value Interlingua + \value Interlingue + \value Inuktitut + \value Inupiak + \value Irish + \value Italian + \value Japanese + \value Javanese + \value Kannada + \value Kashmiri + \value Kazakh + \value Kinyarwanda + \value Kirghiz + \value Korean + \value Kurdish + \value Kurundi + \value Laothian + \value Latin + \value Latvian + \value Lingala + \value Lithuanian + \value Macedonian + \value Malagasy + \value Malay + \value Malayalam + \value Maltese + \value Maori + \value Marathi + \value Moldavian + \value Mongolian + \value NauruLanguage + \value Nepali + \value Norwegian + \value Occitan + \value Oriya + \value Pashto + \value Persian + \value Polish + \value Portuguese + \value Punjabi + \value Quechua + \value RhaetoRomance + \value Romanian + \value Russian + \value Samoan + \value Sangho + \value Sanskrit + \value Serbian + \value SerboCroatian + \value Sesotho + \value Setswana + \value Shona + \value Sindhi + \value Singhalese + \value Siswati + \value Slovak + \value Slovenian + \value Somali + \value Spanish + \value Sundanese + \value Swahili + \value Swedish + \value Tagalog + \value Tajik + \value Tamil + \value Tatar + \value Telugu + \value Thai + \value Tibetan + \value Tigrinya + \value TongaLanguage + \value Tsonga + \value Turkish + \value Turkmen + \value Twi + \value Uigur + \value Ukrainian + \value Urdu + \value Uzbek + \value Vietnamese + \value Volapuk + \value Welsh + \value Wolof + \value Xhosa + \value Yiddish + \value Yoruba + \value Zhuang + \value Zulu +*/ + +/*! + \enum TQLocale::Country + + This enumerated type is used to specify a country. + + \value AnyCountry + \value Afghanistan + \value Albania + \value Algeria + \value AmericanSamoa + \value Andorra + \value Angola + \value Anguilla + \value Antarctica + \value AntiguaAndBarbuda + \value Argentina + \value Armenia + \value Aruba + \value Australia + \value Austria + \value Azerbaijan + \value Bahamas + \value Bahrain + \value Bangladesh + \value Barbados + \value Belarus + \value Belgium + \value Belize + \value Benin + \value Bermuda + \value Bhutan + \value Bolivia + \value BosniaAndHerzegowina + \value Botswana + \value BouvetIsland + \value Brazil + \value BritishIndianOceanTerritory + \value BruneiDarussalam + \value Bulgaria + \value BurkinaFaso + \value Burundi + \value Cambodia + \value Cameroon + \value Canada + \value CapeVerde + \value CaymanIslands + \value CentralAfricanRepublic + \value Chad + \value Chile + \value China + \value ChristmasIsland + \value CocosIslands + \value Colombia + \value Comoros + \value DemocraticRepublicOfCongo + \value PeoplesRepublicOfCongo + \value CookIslands + \value CostaRica + \value IvoryCoast + \value Croatia + \value Cuba + \value Cyprus + \value CzechRepublic + \value Denmark + \value Djibouti + \value Dominica + \value DominicanRepublic + \value EastTimor + \value Ecuador + \value Egypt + \value ElSalvador + \value EquatorialGuinea + \value Eritrea + \value Estonia + \value Ethiopia + \value FalklandIslands + \value FaroeIslands + \value FijiCountry + \value Finland + \value France + \value MetropolitanFrance + \value FrenchGuiana + \value FrenchPolynesia + \value FrenchSouthernTerritories + \value Gabon + \value Gambia + \value Georgia + \value Germany + \value Ghana + \value Gibraltar + \value Greece + \value Greenland + \value Grenada + \value Guadeloupe + \value Guam + \value Guatemala + \value Guinea + \value GuineaBissau + \value Guyana + \value Haiti + \value HeardAndMcDonaldIslands + \value Honduras + \value HongKong + \value Hungary + \value Iceland + \value India + \value Indonesia + \value Iran + \value Iraq + \value Ireland + \value Israel + \value Italy + \value Jamaica + \value Japan + \value Jordan + \value Kazakhstan + \value Kenya + \value Kiribati + \value DemocraticRepublicOfKorea + \value RepublicOfKorea + \value Kuwait + \value Kyrgyzstan + \value Lao + \value Latvia + \value Lebanon + \value Lesotho + \value Liberia + \value LibyanArabJamahiriya + \value Liechtenstein + \value Lithuania + \value Luxembourg + \value Macau + \value Macedonia + \value Madagascar + \value Malawi + \value Malaysia + \value Maldives + \value Mali + \value Malta + \value MarshallIslands + \value Martinique + \value Mauritania + \value Mauritius + \value Mayotte + \value Mexico + \value Micronesia + \value Moldova + \value Monaco + \value Mongolia + \value Montserrat + \value Morocco + \value Mozambique + \value Myanmar + \value Namibia + \value NauruCountry + \value Nepal + \value Netherlands + \value NetherlandsAntilles + \value NewCaledonia + \value NewZealand + \value Nicaragua + \value Niger + \value Nigeria + \value Niue + \value NorfolkIsland + \value NorthernMarianaIslands + \value Norway + \value Oman + \value Pakistan + \value Palau + \value PalestinianTerritory + \value Panama + \value PapuaNewGuinea + \value Paraguay + \value Peru + \value Philippines + \value Pitcairn + \value Poland + \value Portugal + \value PuertoRico + \value Qatar + \value Reunion + \value Romania + \value RussianFederation + \value Rwanda + \value SaintKittsAndNevis + \value StLucia + \value StVincentAndTheGrenadines + \value Samoa + \value SanMarino + \value SaoTomeAndPrincipe + \value SaudiArabia + \value Senegal + \value Seychelles + \value SierraLeone + \value Singapore + \value Slovakia + \value Slovenia + \value SolomonIslands + \value Somalia + \value SouthAfrica + \value SouthGeorgiaAndTheSouthSandwichIslands + \value Spain + \value SriLanka + \value StHelena + \value StPierreAndMiquelon + \value Sudan + \value Suriname + \value SvalbardAndJanMayenIslands + \value Swaziland + \value Sweden + \value Switzerland + \value SyrianArabRepublic + \value Taiwan + \value Tajikistan + \value Tanzania + \value Thailand + \value Togo + \value Tokelau + \value TongaCountry + \value TrinidadAndTobago + \value Tunisia + \value Turkey + \value Turkmenistan + \value TurksAndCaicosIslands + \value Tuvalu + \value Uganda + \value Ukraine + \value UnitedArabEmirates + \value UnitedKingdom + \value UnitedStates + \value UnitedStatesMinorOutlyingIslands + \value Uruguay + \value Uzbekistan + \value Vanuatu + \value VaticanCityState + \value Venezuela + \value VietNam + \value BritishVirginIslands + \value USVirginIslands + \value WallisAndFutunaIslands + \value WesternSahara + \value Yemen + \value Yugoslavia + \value Zambia + \value Zimbabwe +*/ + +/*! + Constructs a TQLocale object with the specified \a name, + which has the format + "language[_country][.codeset][@modifier]" or "C", where: + + \list + \i language is a lowercase, two-letter, ISO 639 language code, + \i territory is an uppercase, two-letter, ISO 3166 country code, + \i and codeset and modifier are ignored. + \endlist + + If the string violates the locale format, or language is not + a valid ISO 369 code, the "C" locale is used instead. If country + is not present, or is not a valid ISO 3166 code, the most + appropriate country is chosen for the specified language. + + The language and country codes are converted to their respective + \c Language and \c Country enums. After this conversion is + performed the constructor behaves exactly like TQLocale(Country, + Language). + + This constructor is much slower than TQLocale(Country, Language). + + \sa name() +*/ + +TQLocale::TQLocale(const TQString &name) +{ + Language lang = C; + Country cntry = AnyCountry; + + uint l = name.length(); + + do { + if (l < 2) + break; + + const TQChar *uc = name.unicode(); + if (l > 2 + && uc[2] != '_' + && uc[2] != '.' + && uc[2] != '@') + break; + + lang = codeToLanguage(name.mid(0, 2)); + if (lang == C) + break; + + if (l == 2 || uc[2] == '.' || uc[2] == '@') + break; + + // we have uc[2] == '_' + if (l < 5) + break; + + if (l > 5 && uc[5] != '.' && uc[5] != '@') + break; + + cntry = codeToCountry(name.mid(3, 2)); + } while (FALSE); + + d = findLocale(lang, cntry); +} + +/*! + Constructs a TQLocale object initialized with the default locale. + + \sa setDefault() +*/ + +TQLocale::TQLocale() +{ + if (default_d == 0) + default_d = system().d; + + d = default_d; +} + +/*! + Constructs a TQLocale object with the specified \a language and \a + country. + + \list + \i If the language/country pair is found in the database, it is used. + \i If the language is found but the country is not, or if the country + is \c AnyCountry, the language is used with the most + appropriate available country (for example, Germany for German), + \i If neither the language nor the country are found, TQLocale + defaults to the default locale (see setDefault()). + \endlist + + The language and country that are actually used can be queried + using language() and country(). + + \sa setDefault() language() country() +*/ + +TQLocale::TQLocale(Language language, Country country) +{ + d = findLocale(language, country); + + // If not found, should default to system + if (d->languageId() == TQLocale::C && language != TQLocale::C) { + if (default_d == 0) + default_d = system().d; + + d = default_d; + } +} + +/*! + Constructs a TQLocale object as a copy of \a other. +*/ + +TQLocale::TQLocale(const TQLocale &other) +{ + d = other.d; +} + +/*! + Assigns \a other to this TQLocale object and returns a reference + to this TQLocale object. +*/ + +TQLocale &TQLocale::operator=(const TQLocale &other) +{ + d = other.d; + return *this; +} + +/*! + \nonreentrant + + Sets the global default locale to \a locale. These + values are used when a TQLocale object is constructed with + no arguments. If this function is not called, the system's + locale is used. + + \warning In a multithreaded application, the default locale + should be set at application startup, before any non-GUI threads + are created. + + \sa system() c() +*/ + +void TQLocale::setDefault(const TQLocale &locale) +{ + default_d = locale.d; +} + +/*! + Returns the language of this locale. + + \sa TQLocale() +*/ +TQLocale::Language TQLocale::language() const +{ + return (Language)d->languageId(); +} + +/*! + Returns the country of this locale. + + \sa TQLocale() +*/ +TQLocale::Country TQLocale::country() const +{ + return (Country)d->countryId(); +} + +/*! + Returns the language and country of this locale as a + string of the form "language_country", where + language is a lowercase, two-letter ISO 639 language code, + and country is an uppercase, two-letter ISO 3166 country code. + + \sa TQLocale() +*/ + +TQString TQLocale::name() const +{ + Language l = language(); + + TQString result = languageToCode(l); + + if (l == C) + return result; + + Country c = country(); + if (c == AnyCountry) + return result; + + result.append('_'); + result.append(countryToCode(c)); + + return result; +} + +/*! + Returns a TQString containing the name of \a language. +*/ + +TQString TQLocale::languageToString(Language language) +{ + if ((uint)language > (uint)TQLocale::LastLanguage) + return "Unknown"; + return language_name_list + language_name_index[(uint)language]; +} + +/*! + Returns a TQString containing the name of \a country. +*/ + +TQString TQLocale::countryToString(Country country) +{ + if ((uint)country > (uint)TQLocale::LastCountry) + return "Unknown"; + return country_name_list + country_name_index[(uint)country]; +} + +/*! + Returns the short int represented by the localized string \a s, or + 0 if the conversion failed. + + If \a ok is not 0, reports failure by setting + *ok to false and success by setting *ok to true. + + This function ignores leading and trailing whitespace. + + \sa toString() +*/ + +short TQLocale::toShort(const TQString &s, bool *ok) const +{ + TQ_LLONG i = toLongLong(s, ok); + if (i < SHRT_MIN || i > SHRT_MAX) { + if (ok != 0) + *ok = FALSE; + return 0; + } + return (short) i; +} + +/*! + Returns the unsigned short int represented by the localized string + \a s, or 0 if the conversion failed. + + If \a ok is not 0, reports failure by setting + *ok to false and success by setting *ok to true. + + This function ignores leading and trailing whitespace. + + \sa toString() +*/ + +ushort TQLocale::toUShort(const TQString &s, bool *ok) const +{ + TQ_ULLONG i = toULongLong(s, ok); + if (i > USHRT_MAX) { + if (ok != 0) + *ok = FALSE; + return 0; + } + return (ushort) i; +} + +/*! + Returns the int represented by the localized string \a s, or 0 if + the conversion failed. + + If \a ok is not 0, reports failure by setting *ok to false and + success by setting *ok to true. + + This function ignores leading and trailing whitespace. + + \sa toString() +*/ + +int TQLocale::toInt(const TQString &s, bool *ok) const +{ + TQ_LLONG i = toLongLong(s, ok); + if (i < INT_MIN || i > INT_MAX) { + if (ok != 0) + *ok = FALSE; + return 0; + } + return (int) i; +} + +/*! + Returns the unsigned int represented by the localized string \a s, + or 0 if the conversion failed. + + If \a ok is not 0, reports failure by setting + *ok to false and success by setting *ok to true. + + This function ignores leading and trailing whitespace. + + \sa toString() +*/ + +uint TQLocale::toUInt(const TQString &s, bool *ok) const +{ + TQ_ULLONG i = toULongLong(s, ok); + if (i > UINT_MAX) { + if (ok != 0) + *ok = FALSE; + return 0; + } + return (uint) i; +} + +/*! + Returns the long int represented by the localized string \a s, or + 0 if the conversion failed. + + If \a ok is not 0, reports failure by setting + *ok to false and success by setting *ok to true. + + This function ignores leading and trailing whitespace. + + \sa toString() +*/ + +TQ_LONG TQLocale::toLong(const TQString &s, bool *ok) const +{ + TQ_LLONG i = toLongLong(s, ok); + if (i < LONG_MIN || i > LONG_MAX) { + if (ok != 0) + *ok = FALSE; + return 0; + } + return (TQ_LONG) i; +} + +/*! + Returns the unsigned long int represented by the localized string + \a s, or 0 if the conversion failed. + + If \a ok is not 0, reports failure by setting + *ok to false and success by setting *ok to true. + + This function ignores leading and trailing whitespace. + + \sa toString() +*/ + +TQ_ULONG TQLocale::toULong(const TQString &s, bool *ok) const +{ + TQ_ULLONG i = toULongLong(s, ok); + if (i > ULONG_MAX) { + if (ok != 0) + *ok = FALSE; + return 0; + } + return (TQ_ULONG) i; +} + +/*! + Returns the long long int represented by the localized string \a + s, or 0 if the conversion failed. + + If \a ok is not 0, reports failure by setting + *ok to false and success by setting *ok to true. + + This function ignores leading and trailing whitespace. + + \sa toString() +*/ + + +TQ_LLONG TQLocale::toLongLong(const TQString &s, bool *ok) const +{ + return d->stringToLongLong(s, 0, ok, TQLocalePrivate::ParseGroupSeparators); +} + +/*! + Returns the unsigned long long int represented by the localized + string \a s, or 0 if the conversion failed. + + If \a ok is not 0, reports failure by setting + *ok to false and success by setting *ok to true. + + This function ignores leading and trailing whitespace. + + \sa toString() +*/ + + +TQ_ULLONG TQLocale::toULongLong(const TQString &s, bool *ok) const +{ + return d->stringToUnsLongLong(s, 0, ok, TQLocalePrivate::ParseGroupSeparators); +} + +/*! + Returns the float represented by the localized string \a s, or 0.0 + if the conversion failed. + + If \a ok is not 0, reports failure by setting + *ok to false and success by setting *ok to true. + + This function ignores leading and trailing whitespace. + + \sa toString() +*/ + +#define QT_MAX_FLOAT 3.4028234663852886e+38 + +float TQLocale::toFloat(const TQString &s, bool *ok) const +{ + bool myOk; + double d = toDouble(s, &myOk); + if (!myOk || d > QT_MAX_FLOAT || d < -QT_MAX_FLOAT) { + if (ok != 0) + *ok = FALSE; + return 0.0; + } + if (ok != 0) + *ok = TRUE; + return (float) d; +} + +/*! + Returns the double represented by the localized string \a s, or + 0.0 if the conversion failed. + + If \a ok is not 0, reports failure by setting + *ok to false and success by setting *ok to true. + + Unlike TQString::toDouble(), this function does not fall back to + the "C" locale if the string cannot be interpreted in this + locale. + + \code + bool ok; + double d; + + TQLocale c(TQLocale::C); + d = c.toDouble( "1234.56", &ok ); // ok == true, d == 1234.56 + d = c.toDouble( "1,234.56", &ok ); // ok == true, d == 1234.56 + d = c.toDouble( "1234,56", &ok ); // ok == false + + TQLocale german(TQLocale::German); + d = german.toDouble( "1234,56", &ok ); // ok == true, d == 1234.56 + d = german.toDouble( "1.234,56", &ok ); // ok == true, d == 1234.56 + d = german.toDouble( "1234.56", &ok ); // ok == false + + d = german.toDouble( "1.234", &ok ); // ok == true, d == 1234.0 + \endcode + + Notice that the last conversion returns 1234.0, because '.' is the + thousands group separator in the German locale. + + This function ignores leading and trailing whitespace. + + \sa toString() TQString::toDouble() +*/ + +double TQLocale::toDouble(const TQString &s, bool *ok) const +{ + return d->stringToDouble(s, ok, TQLocalePrivate::ParseGroupSeparators); +} + +/*! + Returns a localized string representation of \a i. + + \sa toLongLong() +*/ + +TQString TQLocale::toString(TQ_LLONG i) const +{ + return d->longLongToString(i, -1, 10, -1, TQLocalePrivate::ThousandsGroup); +} + +/*! + \overload + + \sa toULongLong() +*/ + +TQString TQLocale::toString(TQ_ULLONG i) const +{ + return d->unsLongLongToString(i, -1, 10, -1, TQLocalePrivate::ThousandsGroup); +} + +static bool qIsUpper(char c) +{ + return c >= 'A' && c <= 'Z'; +} + +static char qToLower(char c) +{ + if (c >= 'A' && c <= 'Z') + return c - 'A' + 'a'; + else + return c; +} + +/*! + \overload + + \a f and \a prec have the same meaning as in TQString::number(double, char, int). + + \sa toDouble() +*/ + +TQString TQLocale::toString(double i, char f, int prec) const +{ + TQLocalePrivate::DoubleForm form = TQLocalePrivate::DFDecimal; + uint flags = 0; + + if (qIsUpper(f)) + flags = TQLocalePrivate::CapitalEorX; + f = qToLower(f); + + switch (f) { + case 'f': + form = TQLocalePrivate::DFDecimal; + break; + case 'e': + form = TQLocalePrivate::DFExponent; + break; + case 'g': + form = TQLocalePrivate::DFSignificantDigits; + break; + default: + break; + } + + flags |= TQLocalePrivate::ThousandsGroup; + return d->doubleToString(i, prec, form, -1, flags); +} + +/*! + \fn TQLocale TQLocale::c() + + Returns a TQLocale object initialized to the "C" locale. + + \sa system() +*/ + +/*! + Returns a TQLocale object initialized to the system locale. +*/ + +TQLocale TQLocale::system() +{ +#ifdef Q_OS_UNIX + const char *s = getenv("LC_NUMERIC"); + if (s == 0) + s = getenv("LC_ALL"); + if (s != 0) + return TQLocale(s); +#endif + return TQLocale(TQLocalePrivate::systemLocaleName()); +} + +/*! +\fn TQString TQLocale::toString(short i) const + +\overload + +\sa toShort() +*/ + +/*! +\fn TQString TQLocale::toString(ushort i) const + +\overload + +\sa toUShort() +*/ + +/*! +\fn TQString TQLocale::toString(int i) const + +\overload + +\sa toInt() +*/ + +/*! +\fn TQString TQLocale::toString(uint i) const + +\overload + +\sa toUInt() +*/ + +/*! +\fn TQString TQLocale::toString(TQ_LONG i) const + +\overload + +\sa toLong() +*/ + +/*! +\fn TQString TQLocale::toString(TQ_ULONG i) const + +\overload + +\sa toULong() +*/ + +/*! +\fn TQString TQLocale::toString(float i, char f = 'g', int prec = 6) const + +\overload + +\a f and \a prec have the same meaning as in TQString::number(double, char, int). + +\sa toDouble() +*/ + + +bool TQLocalePrivate::isDigit(TQChar d) const +{ + return zero().unicode() <= d.unicode() + && zero().unicode() + 10 > d.unicode(); +} + +static char digitToCLocale(TQChar zero, TQChar d) +{ + if (zero.unicode() <= d.unicode() + && zero.unicode() + 10 > d.unicode()) + return '0' + d.unicode() - zero.unicode(); + + tqWarning("TQLocalePrivate::digitToCLocale(): bad digit: row=%d, cell=%d", d.row(), d.cell()); + return TQChar(0); +} + +static TQString qulltoa(TQ_ULLONG l, int base, const TQLocalePrivate &locale) +{ + TQChar buff[65]; // length of MAX_ULLONG in base 2 + TQChar *p = buff + 65; + + if (base != 10 || locale.zero().unicode() == '0') { + while (l != 0) { + int c = l % base; + + --p; + + if (c < 10) + *p = '0' + c; + else + *p = c - 10 + 'a'; + + l /= base; + } + } + else { + while (l != 0) { + int c = l % base; + + *(--p) = locale.zero().unicode() + c; + + l /= base; + } + } + + return TQString(p, 65 - (p - buff)); +} + +static TQString qlltoa(TQ_LLONG l, int base, const TQLocalePrivate &locale) +{ + return qulltoa(l < 0 ? -l : l, base, locale); +} + +enum PrecisionMode { + PMDecimalDigits = 0x01, + PMSignificantDigits = 0x02, + PMChopTrailingZeros = 0x03 +}; + +static TQString &decimalForm(TQString &digits, int decpt, uint precision, + PrecisionMode pm, + bool always_show_decpt, + bool thousands_group, + const TQLocalePrivate &locale) +{ + if (decpt < 0) { + for (int i = 0; i < -decpt; ++i) + digits.prepend(locale.zero()); + decpt = 0; + } + else if ((uint)decpt > digits.length()) { + for (uint i = digits.length(); i < (uint)decpt; ++i) + digits.append(locale.zero()); + } + + if (pm == PMDecimalDigits) { + uint decimal_digits = digits.length() - decpt; + for (uint i = decimal_digits; i < precision; ++i) + digits.append(locale.zero()); + } + else if (pm == PMSignificantDigits) { + for (uint i = digits.length(); i < precision; ++i) + digits.append(locale.zero()); + } + else { // pm == PMChopTrailingZeros + } + + if (always_show_decpt || (uint)decpt < digits.length()) + digits.insert(decpt, locale.decimal()); + + if (thousands_group) { + for (int i = decpt - 3; i > 0; i -= 3) + digits.insert(i, locale.group()); + } + + if (decpt == 0) + digits.prepend(locale.zero()); + + return digits; +} + +static TQString &exponentForm(TQString &digits, int decpt, uint precision, + PrecisionMode pm, + bool always_show_decpt, + const TQLocalePrivate &locale) +{ + int exp = decpt - 1; + + if (pm == PMDecimalDigits) { + for (uint i = digits.length(); i < precision + 1; ++i) + digits.append(locale.zero()); + } + else if (pm == PMSignificantDigits) { + for (uint i = digits.length(); i < precision; ++i) + digits.append(locale.zero()); + } + else { // pm == PMChopTrailingZeros + } + + if (always_show_decpt || digits.length() > 1) + digits.insert(1, locale.decimal()); + + digits.append(locale.exponential()); + digits.append(locale.longLongToString(exp, 2, 10, + -1, TQLocalePrivate::AlwaysShowSign)); + + return digits; +} + +static bool isZero(double d) +{ + uchar *ch = (uchar *)&d; + if (ByteOrder == BigEndian) { + return !(ch[0] & 0x7F || ch[1] || ch[2] || ch[3] || ch[4] || ch[5] || ch[6] || ch[7]); + } else { + return !(ch[7] & 0x7F || ch[6] || ch[5] || ch[4] || ch[3] || ch[2] || ch[1] || ch[0]); + } +} + +TQString TQLocalePrivate::doubleToString(double d, + int precision, + DoubleForm form, + int width, + unsigned flags) const +{ + if (precision == -1) + precision = 6; + if (width == -1) + width = 0; + + bool negative = FALSE; + bool special_number = FALSE; // nan, +/-inf + TQString num_str; + +#ifdef Q_OS_WIN + // Detect special numbers (nan, +/-inf) + if (qIsInf(d)) { + num_str = infinity(); + special_number = TRUE; + negative = d < 0; + } else if (qIsNan(d)) { + num_str = nan(); + special_number = TRUE; + } +#else + // Comparing directly to INFINITY gives weird results on some systems. + double tmp_infinity = INFINITY; + + // Detect special numbers (nan, +/-inf) + if (d == tmp_infinity || d == -tmp_infinity) { + num_str = infinity(); + special_number = TRUE; + negative = d < 0; + } else if (qIsNan(d)) { + num_str = nan(); + special_number = TRUE; + } +#endif + + // Handle normal numbers + if (!special_number) { + int decpt, sign; + TQString digits; + +#ifdef QT_QLOCALE_USES_FCVT +#ifdef TQT_THREAD_SUPPORT + static bool dummy_for_mutex; + TQMutex *fcvt_mutex = tqt_global_mutexpool ? tqt_global_mutexpool->get( &dummy_for_mutex ) : 0; +# define FCVT_LOCK if (fcvt_mutex) fcvt_mutex->lock() +# define FCVT_UNLOCK if (fcvt_mutex) fcvt_mutex->unlock() +#else +# define FCVT_LOCK +# define FCVT_UNLOCK +#endif + if (form == DFDecimal) { + FCVT_LOCK; + digits = fcvt(d, precision, &decpt, &sign); + FCVT_UNLOCK; + } else { + int pr = precision; + if (form == DFExponent) + ++pr; + else if (form == DFSignificantDigits && pr == 0) + pr = 1; + FCVT_LOCK; + digits = ecvt(d, pr, &decpt, &sign); + FCVT_UNLOCK; + + // Chop trailing zeros + if (digits.length() > 0) { + int last_nonzero_idx = digits.length() - 1; + while (last_nonzero_idx > 0 + && digits.unicode()[last_nonzero_idx] == '0') + --last_nonzero_idx; + digits.truncate(last_nonzero_idx + 1); + } + + } + +#else + int mode; + if (form == DFDecimal) + mode = 3; + else + mode = 2; + + /* This next bit is a bit quirky. In DFExponent form, the precision + is the number of digits after decpt. So that would suggest using + mode=3 for qdtoa. But qdtoa behaves strangely when mode=3 and + precision=0. So we get around this by using mode=2 and reasoning + that we want precision+1 significant digits, since the decimal + point in this mode is always after the first digit. */ + int pr = precision; + if (form == DFExponent) + ++pr; + + char *rve = 0; + char *buff = 0; + digits = qdtoa(d, mode, pr, &decpt, &sign, &rve, &buff); + if (buff != 0) + free(buff); +#endif // QT_QLOCALE_USES_FCVT + + if (zero().unicode() != '0') { + for (uint i = 0; i < digits.length(); ++i) + digits.ref(i).unicode() += zero().unicode() - '0'; + } + + bool always_show_decpt = flags & Alternate; + switch (form) { + case DFExponent: { + num_str = exponentForm(digits, decpt, precision, PMDecimalDigits, + always_show_decpt, *this); + break; + } + case DFDecimal: { + num_str = decimalForm(digits, decpt, precision, PMDecimalDigits, + always_show_decpt, flags & ThousandsGroup, + *this); + break; + } + case DFSignificantDigits: { + PrecisionMode mode = (flags & Alternate) ? + PMSignificantDigits : PMChopTrailingZeros; + + if (decpt != (int)digits.length() && (decpt <= -4 || decpt > (int)precision)) + num_str = exponentForm(digits, decpt, precision, mode, + always_show_decpt, *this); + else + num_str = decimalForm(digits, decpt, precision, mode, + always_show_decpt, flags & ThousandsGroup, + *this); + break; + } + } + + negative = sign != 0 && !isZero(d); + } + + // pad with zeros. LeftAdjusted overrides this flag). Also, we don't + // pad special numbers + if (flags & TQLocalePrivate::ZeroPadded + && !(flags & TQLocalePrivate::LeftAdjusted) + && !special_number) { + int num_pad_chars = width - (int)num_str.length(); + // leave space for the sign + if (negative + || flags & TQLocalePrivate::AlwaysShowSign + || flags & TQLocalePrivate::BlankBeforePositive) + --num_pad_chars; + + for (int i = 0; i < num_pad_chars; ++i) + num_str.prepend(zero()); + } + + // add sign + if (negative) + num_str.prepend(minus()); + else if (flags & TQLocalePrivate::AlwaysShowSign) + num_str.prepend(plus()); + else if (flags & TQLocalePrivate::BlankBeforePositive) + num_str.prepend(' '); + + if (flags & TQLocalePrivate::CapitalEorX) + num_str = num_str.upper(); + + return num_str; +} + +TQString TQLocalePrivate::longLongToString(TQ_LLONG l, int precision, + int base, int width, + unsigned flags) const +{ + bool precision_not_specified = FALSE; + if (precision == -1) { + precision_not_specified = TRUE; + precision = 1; + } + + bool negative = l < 0; + if (base != 10) { + // these are not suported by sprintf for octal and hex + flags &= ~AlwaysShowSign; + flags &= ~BlankBeforePositive; + negative = FALSE; // neither are negative numbers + } + + TQString num_str; + if (base == 10) + num_str = qlltoa(l, base, *this); + else + num_str = qulltoa(l, base, *this); + + uint cnt_thousand_sep = 0; + if (flags & ThousandsGroup && base == 10) { + for (int i = (int)num_str.length() - 3; i > 0; i -= 3) { + num_str.insert(i, group()); + ++cnt_thousand_sep; + } + } + + for (int i = num_str.length()/* - cnt_thousand_sep*/; i < precision; ++i) + num_str.prepend(base == 10 ? zero() : TQChar('0')); + + if (flags & Alternate + && base == 8 + && (num_str.isEmpty() + || num_str[0].unicode() != '0')) + num_str.prepend('0'); + + // LeftAdjusted overrides this flag ZeroPadded. sprintf only padds + // when precision is not specified in the format string + bool zero_padded = flags & ZeroPadded + && !(flags & LeftAdjusted) + && precision_not_specified; + + if (zero_padded) { + int num_pad_chars = width - (int)num_str.length(); + + // leave space for the sign + if (negative + || flags & AlwaysShowSign + || flags & BlankBeforePositive) + --num_pad_chars; + + // leave space for optional '0x' in hex form + if (base == 16 + && flags & Alternate + && l != 0) + num_pad_chars -= 2; + + for (int i = 0; i < num_pad_chars; ++i) + num_str.prepend(base == 10 ? zero() : TQChar('0')); + } + + if (base == 16 + && flags & Alternate + && l != 0) + num_str.prepend("0x"); + + // add sign + if (negative) + num_str.prepend(minus()); + else if (flags & AlwaysShowSign) + num_str.prepend(base == 10 ? plus() : TQChar('+')); + else if (flags & BlankBeforePositive) + num_str.prepend(' '); + + if (flags & CapitalEorX) + num_str = num_str.upper(); + + return num_str; +} + +TQString TQLocalePrivate::unsLongLongToString(TQ_ULLONG l, int precision, + int base, int width, + unsigned flags) const +{ + bool precision_not_specified = FALSE; + if (precision == -1) { + precision_not_specified = TRUE; + precision = 1; + } + + TQString num_str = qulltoa(l, base, *this); + + uint cnt_thousand_sep = 0; + if (flags & ThousandsGroup && base == 10) { + for (int i = (int)num_str.length() - 3; i > 0; i -=3) { + num_str.insert(i, group()); + ++cnt_thousand_sep; + } + } + + for (int i = num_str.length()/* - cnt_thousand_sep*/; i < precision; ++i) + num_str.prepend(base == 10 ? zero() : TQChar('0')); + + if (flags & Alternate + && base == 8 + && (num_str.isEmpty() + || num_str[0].unicode() != '0')) + num_str.prepend('0'); + + // LeftAdjusted overrides this flag ZeroPadded. sprintf only padds + // when precision is not specified in the format string + bool zero_padded = flags & ZeroPadded + && !(flags & LeftAdjusted) + && precision_not_specified; + + if (zero_padded) { + int num_pad_chars = width - (int)num_str.length(); + + // leave space for optional '0x' in hex form + if (base == 16 + && flags & Alternate + && l != 0) + num_pad_chars -= 2; + + for (int i = 0; i < num_pad_chars; ++i) + num_str.prepend(base == 10 ? zero() : TQChar('0')); + } + + if (base == 16 + && flags & Alternate + && l != 0) + num_str.prepend("0x"); + + if (flags & CapitalEorX) + num_str = num_str.upper(); + + return num_str; +} + +static inline bool isLatin1Digit(const TQChar &c) +{ + return c.unicode() >= '0' && c.unicode() <= '9'; +} + +// Removes thousand-group separators, ie. the ',' in "1,234,567.89e-5" +bool TQLocalePrivate::removeGroupSeparators(TQString &num_str) const +{ + int group_cnt = 0; // counts number of group chars + int decpt_idx = -1; + + // Find the decimal point and check if there are any group chars + uint i = 0; + for (; i < num_str.length(); ++i) { + TQChar c = num_str.unicode()[i]; + + if (c.unicode() == ',') { + // check that there are digits before and after the separator + if (i == 0 || !isLatin1Digit(num_str.unicode()[i - 1])) + return FALSE; + if (i == num_str.length() + 1 || !isLatin1Digit(num_str.unicode()[i + 1])) + return FALSE; + ++group_cnt; + } + else if (c.unicode() == '.') { + // Fail if more than one decimal points + if (decpt_idx != -1) + return FALSE; + decpt_idx = i; + } else if (c.unicode() == 'e' || c.unicode() == 'E') { + // an 'e' or 'E' - if we have not encountered a decimal + // point, this is where it "is". + if (decpt_idx == -1) + decpt_idx = i; + } + } + + // If no group chars, we're done + if (group_cnt == 0) + return TRUE; + + // No decimal point means that it "is" at the end of the string + if (decpt_idx == -1) + decpt_idx = num_str.length(); + + i = 0; + while (i < num_str.length() && group_cnt > 0) { + TQChar c = num_str.unicode()[i]; + + if (c.unicode() == ',') { + // Don't allow group chars after the decimal point + if ((int)i > decpt_idx) + return FALSE; + + // Check that it is placed correctly relative to the decpt + if ((decpt_idx - i) % 4 != 0) + return FALSE; + + // Remove it + num_str.remove(i, 1); + + --group_cnt; + --decpt_idx; // adjust decpt_idx + } else { + // Check that we are not missing a separator + if ((int)i < decpt_idx && (decpt_idx - i) % 4 == 0) + return FALSE; + ++i; + } + } + + return TRUE; +} + +static void stripWhiteSpaceInPlace(TQString &s) +{ + uint i = 0; + while (i < s.length() && s.unicode()[i].isSpace()) + ++i; + if (i > 0) + s.remove(0, i); + + i = s.length(); + + if (i == 0) + return; + --i; + while (i > 0 && s.unicode()[i].isSpace()) + --i; + if (i + 1 < s.length()) + s.truncate(i + 1); +} + +/* + Converts a number in locale to its representation in the C locale. + Only has to guarantee that a string that is a correct representation of + a number will be converted. If junk is passed in, junk will be passed + out and the error will be detected during the actual conversion to a + number. We can't detect junk here, since we don't even know the base + of the number. +*/ +bool TQLocalePrivate::numberToCLocale(TQString &l_num, + GroupSeparatorMode group_sep_mode) const +{ + stripWhiteSpaceInPlace(l_num); + + if (l_num.isEmpty()) + return FALSE; + + for (uint idx = 0; idx < l_num.length(); ++idx) { + TQChar &c = l_num.ref(idx); + + if (isDigit(c)) + c = digitToCLocale(zero(), c); + else if (c == plus()) + c = '+'; + else if (c == minus()) + c = '-'; + else if (c == decimal()) + c = '.'; + else if (c == group()) + c = ','; + // In several languages group() is the char 0xA0, which looks like a space. + // People use a regular space instead of it and complain it doesn't work. + else if (group().unicode() == 0xA0 && c.unicode() == ' ') + c = ','; + else if (c == exponential() || c == exponential().upper()) + c = 'e'; + else if (c == list()) + c = ';'; + else if (c == percent()) + c = '%'; + else if (c.unicode() >= 'A' && c.unicode() <= 'Z') + c = c.lower(); + else if (c.unicode() >= 'a' && c.unicode() <= 'z') + ; // do nothing + else + return FALSE; + } + + if (group_sep_mode == ParseGroupSeparators + && !removeGroupSeparators(l_num)) + return FALSE; + + return TRUE; +} + +double TQLocalePrivate::stringToDouble(TQString num, + bool *ok, + GroupSeparatorMode group_sep_mode) const +{ + if (!numberToCLocale(num, group_sep_mode)) { + if (ok != 0) + *ok = FALSE; + return 0.0; + } + + if (ok != 0) + *ok = TRUE; + + if (num == "nan") + return NAN; + + if (num == "+inf" + || num == "inf") + return INFINITY; + + if (num == "-inf") + return -INFINITY; + + bool _ok; + const char *num_buff = num.latin1(); + +#ifdef QT_QLOCALE_USES_FCVT + char *endptr; + double d = strtod(num_buff, &endptr); + _ok = TRUE; +#else + const char *endptr; + double d = qstrtod(num_buff, &endptr, &_ok); +#endif + + if (!_ok || *endptr != '\0') { + if (ok != 0) + *ok = FALSE; + return 0.0; + } + else + return d; +} + +TQ_LLONG TQLocalePrivate::stringToLongLong(TQString num, int base, + bool *ok, + GroupSeparatorMode group_sep_mode) const +{ + if (!numberToCLocale(num, group_sep_mode)) { + if (ok != 0) + *ok = FALSE; + return 0; + } + + bool _ok; + const char *endptr; + const char *num_buff = num.latin1(); + TQ_LLONG l = qstrtoll(num_buff, &endptr, base, &_ok); + + if (!_ok || *endptr != '\0') { + if (ok != 0) + *ok = FALSE; + return 0; + } + + if (ok != 0) + *ok = TRUE; + return l; +} + +TQ_ULLONG TQLocalePrivate::stringToUnsLongLong(TQString num, int base, + bool *ok, + GroupSeparatorMode group_sep_mode) const +{ + if (!numberToCLocale(num, group_sep_mode)) { + if (ok != 0) + *ok = FALSE; + return 0; + } + + bool _ok; + const char *endptr; + const char *num_buff = num.latin1(); + TQ_ULLONG l = qstrtoull(num_buff, &endptr, base, &_ok); + + if (!_ok || *endptr != '\0') { + if (ok != 0) + *ok = FALSE; + return 0; + } + + if (ok != 0) + *ok = TRUE; + return l; +} + +/*- + * Copyright (c) 1992, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +// static char sccsid[] = "@(#)strtouq.c 8.1 (Berkeley) 6/4/93"; +// "$FreeBSD: src/lib/libc/stdlib/strtoull.c,v 1.5.2.1 2001/03/02 09:45:20 obrien Exp $"; + +/* + * Convert a string to an TQ_ULLONG integer. + * + * Ignores `locale' stuff. Assumes that the upper and lower case + * alphabets and digits are each contiguous. + */ +static TQ_ULLONG qstrtoull(const char *nptr, const char **endptr, int base, bool *ok) +{ + const char *s = nptr; + TQ_ULLONG acc; + unsigned char c; + TQ_ULLONG qbase, cutoff; + int neg, any, cutlim; + + if (ok != 0) + *ok = TRUE; + + /* + * See strtoq for comments as to the logic used. + */ + s = nptr; + do { + c = *s++; + } while (isspace(c)); + if (c == '-') { + if (ok != 0) + *ok = FALSE; + if (endptr != 0) + *endptr = s - 1; + return 0; + } else { + neg = 0; + if (c == '+') + c = *s++; + } + if ((base == 0 || base == 16) && + c == '0' && (*s == 'x' || *s == 'X')) { + c = s[1]; + s += 2; + base = 16; + } + if (base == 0) + base = c == '0' ? 8 : 10; + qbase = (unsigned)base; + cutoff = (TQ_ULLONG)ULLONG_MAX / qbase; + cutlim = (TQ_ULLONG)ULLONG_MAX % qbase; + for (acc = 0, any = 0;; c = *s++) { + if (!isascii(c)) + break; + if (isdigit(c)) + c -= '0'; + else if (isalpha(c)) + c -= isupper(c) ? 'A' - 10 : 'a' - 10; + else + break; + if (c >= base) + break; + if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim)) + any = -1; + else { + any = 1; + acc *= qbase; + acc += c; + } + } + if (any < 0) { + acc = ULLONG_MAX; + if (ok != 0) + *ok = FALSE; + } + else if (neg) + acc = (~acc) + 1; + if (endptr != 0) + *endptr = (char *)(any ? s - 1 : nptr); + return (acc); +} + + +// "$FreeBSD: src/lib/libc/stdlib/strtoll.c,v 1.5.2.1 2001/03/02 09:45:20 obrien Exp $"; + + +/* + * Convert a string to a TQ_LLONG integer. + * + * Ignores `locale' stuff. Assumes that the upper and lower case + * alphabets and digits are each contiguous. + */ +static TQ_LLONG qstrtoll(const char *nptr, const char **endptr, int base, bool *ok) +{ + const char *s; + TQ_ULLONG acc; + unsigned char c; + TQ_ULLONG qbase, cutoff; + int neg, any, cutlim; + + if (ok != 0) + *ok = TRUE; + + /* + * Skip white space and pick up leading +/- sign if any. + * If base is 0, allow 0x for hex and 0 for octal, else + * assume decimal; if base is already 16, allow 0x. + */ + s = nptr; + do { + c = *s++; + } while (isspace(c)); + if (c == '-') { + neg = 1; + c = *s++; + } else { + neg = 0; + if (c == '+') + c = *s++; + } + if ((base == 0 || base == 16) && + c == '0' && (*s == 'x' || *s == 'X')) { + c = s[1]; + s += 2; + base = 16; + } + if (base == 0) + base = c == '0' ? 8 : 10; + + /* + * Compute the cutoff value between legal numbers and illegal + * numbers. That is the largest legal value, divided by the + * base. An input number that is greater than this value, if + * followed by a legal input character, is too big. One that + * is equal to this value may be valid or not; the limit + * between valid and invalid numbers is then based on the last + * digit. For instance, if the range for quads is + * [-9223372036854775808..9223372036854775807] and the input base + * is 10, cutoff will be set to 922337203685477580 and cutlim to + * either 7 (neg==0) or 8 (neg==1), meaning that if we have + * accumulated a value > 922337203685477580, or equal but the + * next digit is > 7 (or 8), the number is too big, and we will + * return a range error. + * + * Set any if any `digits' consumed; make it negative to indicate + * overflow. + */ + qbase = (unsigned)base; + cutoff = neg ? (TQ_ULLONG)-(LLONG_MIN + LLONG_MAX) + LLONG_MAX + : LLONG_MAX; + cutlim = cutoff % qbase; + cutoff /= qbase; + for (acc = 0, any = 0;; c = *s++) { + if (!isascii(c)) + break; + if (isdigit(c)) + c -= '0'; + else if (isalpha(c)) + c -= isupper(c) ? 'A' - 10 : 'a' - 10; + else + break; + if (c >= base) + break; + if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim)) + any = -1; + else { + any = 1; + acc *= qbase; + acc += c; + } + } + if (any < 0) { + acc = neg ? LLONG_MIN : LLONG_MAX; + if (ok != 0) + *ok = FALSE; + } else if (neg) { + acc = (~acc) + 1; + } + if (endptr != 0) + *endptr = (char *)(any ? s - 1 : nptr); + return (acc); +} + +#ifndef QT_QLOCALE_USES_FCVT + +/* From: NetBSD: strtod.c,v 1.26 1998/02/03 18:44:21 perry Exp */ +/* $FreeBSD: src/lib/libc/stdlib/netbsd_strtod.c,v 1.2.2.2 2001/03/02 17:14:15 tegge Exp $ */ + +/* Please send bug reports to + David M. Gay + AT&T Bell Laboratories, Room 2C-463 + 600 Mountain Avenue + Murray Hill, NJ 07974-2070 + U.S.A. + dmg@research.att.com or research!dmg + */ + +/* strtod for IEEE-, VAX-, and IBM-arithmetic machines. + * + * This strtod returns a nearest machine number to the input decimal + * string (or sets errno to ERANGE). With IEEE arithmetic, ties are + * broken by the IEEE round-even rule. Otherwise ties are broken by + * biased rounding (add half and chop). + * + * Inspired loosely by William D. Clinger's paper "How to Read Floating + * Point Numbers Accurately" [Proc. ACM SIGPLAN '90, pp. 92-101]. + * + * Modifications: + * + * 1. We only require IEEE, IBM, or VAX double-precision + * arithmetic (not IEEE double-extended). + * 2. We get by with floating-point arithmetic in a case that + * Clinger missed -- when we're computing d * 10^n + * for a small integer d and the integer n is not too + * much larger than 22 (the maximum integer k for which + * we can represent 10^k exactly), we may be able to + * compute (d*10^k) * 10^(e-k) with just one roundoff. + * 3. Rather than a bit-at-a-time adjustment of the binary + * result in the hard case, we use floating-point + * arithmetic to determine the adjustment to within + * one bit; only in really hard cases do we need to + * compute a second residual. + * 4. Because of 3., we don't need a large table of powers of 10 + * for ten-to-e (just some small tables, e.g. of 10^k + * for 0 <= k <= 22). + */ + +/* + * #define IEEE_LITTLE_ENDIAN for IEEE-arithmetic machines where the least + * significant byte has the lowest address. + * #define IEEE_BIG_ENDIAN for IEEE-arithmetic machines where the most + * significant byte has the lowest address. + * #define Long int on machines with 32-bit ints and 64-bit longs. + * #define Sudden_Underflow for IEEE-format machines without gradual + * underflow (i.e., that flush to zero on underflow). + * #define IBM for IBM mainframe-style floating-point arithmetic. + * #define VAX for VAX-style floating-point arithmetic. + * #define Unsigned_Shifts if >> does treats its left operand as unsigned. + * #define No_leftright to omit left-right logic in fast floating-point + * computation of dtoa. + * #define Check_FLT_ROUNDS if FLT_ROUNDS can assume the values 2 or 3. + * #define RND_PRODQUOT to use rnd_prod and rnd_quot (assembly routines + * that use extended-precision instructions to compute rounded + * products and quotients) with IBM. + * #define ROUND_BIASED for IEEE-format with biased rounding. + * #define Inaccurate_Divide for IEEE-format with correctly rounded + * products but inaccurate quotients, e.g., for Intel i860. + * #define Just_16 to store 16 bits per 32-bit Long when doing high-precision + * integer arithmetic. Whether this speeds things up or slows things + * down depends on the machine and the number being converted. + * #define KR_headers for old-style C function headers. + * #define Bad_float_h if your system lacks a float.h or if it does not + * define some or all of DBL_DIG, DBL_MAX_10_EXP, DBL_MAX_EXP, + * FLT_RADIX, FLT_ROUNDS, and DBL_MAX. + * #define MALLOC your_malloc, where your_malloc(n) acts like malloc(n) + * if memory is available and otherwise does something you deem + * appropriate. If MALLOC is undefined, malloc will be invoked + * directly -- and assumed always to succeed. + */ + +#if defined(LIBC_SCCS) && !defined(lint) +__RCSID("$NetBSD: strtod.c,v 1.26 1998/02/03 18:44:21 perry Exp $"); +#endif /* LIBC_SCCS and not lint */ + +/* +#if defined(__m68k__) || defined(__sparc__) || defined(__i386__) || \ + defined(__mips__) || defined(__ns32k__) || defined(__alpha__) || \ + defined(__powerpc__) || defined(Q_OS_WIN) || defined(Q_OS_DARWIN) || defined(Q_OS_MACX) || \ + defined(mips) || defined(Q_OS_AIX) || defined(Q_OS_SOLARIS) +# define IEEE_BIG_OR_LITTLE_ENDIAN 1 +#endif +*/ + +// *All* of our architectures have IEEE arithmetic, don't they? +#define IEEE_BIG_OR_LITTLE_ENDIAN 1 + +#ifdef __arm32__ +/* + * Although the CPU is little endian the FP has different + * byte and word endianness. The byte order is still little endian + * but the word order is big endian. + */ +#define IEEE_BIG_OR_LITTLE_ENDIAN +#endif + +#ifdef vax +#define VAX +#endif + +#define Long TQ_INT32 +#define ULong TQ_UINT32 + +#define MALLOC malloc +#define CONST const + +#ifdef BSD_QDTOA_DEBUG +#include +#define Bug(x) {fprintf(stderr, "%s\n", x); exit(1);} +#endif + +#ifdef Unsigned_Shifts +#define Sign_Extend(a,b) if (b < 0) a |= 0xffff0000; +#else +#define Sign_Extend(a,b) /*no-op*/ +#endif + +#if (defined(IEEE_BIG_OR_LITTLE_ENDIAN) + defined(VAX) + defined(IBM)) != 1 +#error Exactly one of IEEE_BIG_OR_LITTLE_ENDIAN, VAX, or IBM should be defined. +#endif + +inline ULong getWord0(const NEEDS_VOLATILE double x) +{ + const NEEDS_VOLATILE uchar *ptr = reinterpret_cast(&x); + if (ByteOrder == BigEndian) { + return (ptr[0]<<24) + (ptr[1]<<16) + (ptr[2]<<8) + ptr[3]; + } else { + return (ptr[7]<<24) + (ptr[6]<<16) + (ptr[5]<<8) + ptr[4]; + } +} + +inline void setWord0(NEEDS_VOLATILE double *x, ULong l) +{ + NEEDS_VOLATILE uchar *ptr = reinterpret_cast(x); + if (ByteOrder == BigEndian) { + ptr[0] = (uchar)(l>>24); + ptr[1] = (uchar)(l>>16); + ptr[2] = (uchar)(l>>8); + ptr[3] = (uchar)l; + } else { + ptr[7] = (uchar)(l>>24); + ptr[6] = (uchar)(l>>16); + ptr[5] = (uchar)(l>>8); + ptr[4] = (uchar)l; + } +} + +inline ULong getWord1(const NEEDS_VOLATILE double x) +{ + const NEEDS_VOLATILE uchar *ptr = reinterpret_cast(&x); + if (ByteOrder == BigEndian) { + return (ptr[4]<<24) + (ptr[5]<<16) + (ptr[6]<<8) + ptr[7]; + } else { + return (ptr[3]<<24) + (ptr[2]<<16) + (ptr[1]<<8) + ptr[0]; + } +} +inline void setWord1(NEEDS_VOLATILE double *x, ULong l) +{ + NEEDS_VOLATILE uchar *ptr = reinterpret_cast(x); + if (ByteOrder == BigEndian) { + ptr[4] = (uchar)(l>>24); + ptr[5] = (uchar)(l>>16); + ptr[6] = (uchar)(l>>8); + ptr[7] = (uchar)l; + } else { + ptr[3] = (uchar)(l>>24); + ptr[2] = (uchar)(l>>16); + ptr[1] = (uchar)(l>>8); + ptr[0] = (uchar)l; + } +} + +static inline void Storeinc(ULong *&a, const ULong &b, const ULong &c) +{ + + *a = (((unsigned short)b) << 16) | ((unsigned short)c); + ++a; +} + +/* #define P DBL_MANT_DIG */ +/* Ten_pmax = floor(P*log(2)/log(5)) */ +/* Bletch = (highest power of 2 < DBL_MAX_10_EXP) / 16 */ +/* Quick_max = floor((P-1)*log(FLT_RADIX)/log(10) - 1) */ +/* Int_max = floor(P*log(FLT_RADIX)/log(10) - 1) */ + +#if defined(IEEE_BIG_OR_LITTLE_ENDIAN) +#define Exp_shift 20 +#define Exp_shift1 20 +#define Exp_msk1 0x100000 +#define Exp_msk11 0x100000 +#define Exp_mask 0x7ff00000 +#define P 53 +#define Bias 1023 +#define IEEE_Arith +#define Emin (-1022) +#define Exp_1 0x3ff00000 +#define Exp_11 0x3ff00000 +#define Ebits 11 +#define Frac_mask 0xfffff +#define Frac_mask1 0xfffff +#define Ten_pmax 22 +#define Bletch 0x10 +#define Bndry_mask 0xfffff +#define Bndry_mask1 0xfffff +#define LSB 1 +#define Sign_bit 0x80000000 +#define Log2P 1 +#define Tiny0 0 +#define Tiny1 1 +#define Quick_max 14 +#define Int_max 14 +#define Infinite(x) (getWord0(x) == 0x7ff00000) /* sufficient test for here */ +#else +#undef Sudden_Underflow +#define Sudden_Underflow +#ifdef IBM +#define Exp_shift 24 +#define Exp_shift1 24 +#define Exp_msk1 0x1000000 +#define Exp_msk11 0x1000000 +#define Exp_mask 0x7f000000 +#define P 14 +#define Bias 65 +#define Exp_1 0x41000000 +#define Exp_11 0x41000000 +#define Ebits 8 /* exponent has 7 bits, but 8 is the right value in b2d */ +#define Frac_mask 0xffffff +#define Frac_mask1 0xffffff +#define Bletch 4 +#define Ten_pmax 22 +#define Bndry_mask 0xefffff +#define Bndry_mask1 0xffffff +#define LSB 1 +#define Sign_bit 0x80000000 +#define Log2P 4 +#define Tiny0 0x100000 +#define Tiny1 0 +#define Quick_max 14 +#define Int_max 15 +#else /* VAX */ +#define Exp_shift 23 +#define Exp_shift1 7 +#define Exp_msk1 0x80 +#define Exp_msk11 0x800000 +#define Exp_mask 0x7f80 +#define P 56 +#define Bias 129 +#define Exp_1 0x40800000 +#define Exp_11 0x4080 +#define Ebits 8 +#define Frac_mask 0x7fffff +#define Frac_mask1 0xffff007f +#define Ten_pmax 24 +#define Bletch 2 +#define Bndry_mask 0xffff007f +#define Bndry_mask1 0xffff007f +#define LSB 0x10000 +#define Sign_bit 0x8000 +#define Log2P 1 +#define Tiny0 0x80 +#define Tiny1 0 +#define Quick_max 15 +#define Int_max 15 +#endif +#endif + +#ifndef IEEE_Arith +#define ROUND_BIASED +#endif + +#ifdef RND_PRODQUOT +#define rounded_product(a,b) a = rnd_prod(a, b) +#define rounded_quotient(a,b) a = rnd_quot(a, b) +extern double rnd_prod(double, double), rnd_quot(double, double); +#else +#define rounded_product(a,b) a *= b +#define rounded_quotient(a,b) a /= b +#endif + +#define Big0 (Frac_mask1 | Exp_msk1*(DBL_MAX_EXP+Bias-1)) +#define Big1 0xffffffff + +#ifndef Just_16 +/* When Pack_32 is not defined, we store 16 bits per 32-bit Long. + * This makes some inner loops simpler and sometimes saves work + * during multiplications, but it often seems to make things slightly + * slower. Hence the default is now to store 32 bits per Long. + */ +#ifndef Pack_32 +#define Pack_32 +#endif +#endif + +#define Kmax 15 + +struct +Bigint { + struct Bigint *next; + int k, maxwds, sign, wds; + ULong x[1]; +}; + + typedef struct Bigint Bigint; + +static Bigint *Balloc(int k) +{ + int x; + Bigint *rv; + + x = 1 << k; + rv = (Bigint *)MALLOC(sizeof(Bigint) + (x-1)*sizeof(Long)); + rv->k = k; + rv->maxwds = x; + rv->sign = rv->wds = 0; + return rv; +} + +static void Bfree(Bigint *v) +{ + free(v); +} + +#define Bcopy(x,y) memcpy((char *)&x->sign, (char *)&y->sign, \ +y->wds*sizeof(Long) + 2*sizeof(int)) + +/* multiply by m and add a */ +static Bigint *multadd(Bigint *b, int m, int a) +{ + int i, wds; + ULong *x, y; +#ifdef Pack_32 + ULong xi, z; +#endif + Bigint *b1; + + wds = b->wds; + x = b->x; + i = 0; + do { +#ifdef Pack_32 + xi = *x; + y = (xi & 0xffff) * m + a; + z = (xi >> 16) * m + (y >> 16); + a = (int)(z >> 16); + *x++ = (z << 16) + (y & 0xffff); +#else + y = *x * m + a; + a = (int)(y >> 16); + *x++ = y & 0xffff; +#endif + } + while(++i < wds); + if (a) { + if (wds >= b->maxwds) { + b1 = Balloc(b->k+1); + Bcopy(b1, b); + Bfree(b); + b = b1; + } + b->x[wds++] = a; + b->wds = wds; + } + return b; +} + +static Bigint *s2b(CONST char *s, int nd0, int nd, ULong y9) +{ + Bigint *b; + int i, k; + Long x, y; + + x = (nd + 8) / 9; + for(k = 0, y = 1; x > y; y <<= 1, k++) ; +#ifdef Pack_32 + b = Balloc(k); + b->x[0] = y9; + b->wds = 1; +#else + b = Balloc(k+1); + b->x[0] = y9 & 0xffff; + b->wds = (b->x[1] = y9 >> 16) ? 2 : 1; +#endif + + i = 9; + if (9 < nd0) { + s += 9; + do b = multadd(b, 10, *s++ - '0'); + while(++i < nd0); + s++; + } + else + s += 10; + for(; i < nd; i++) + b = multadd(b, 10, *s++ - '0'); + return b; +} + +static int hi0bits(ULong x) +{ + int k = 0; + + if (!(x & 0xffff0000)) { + k = 16; + x <<= 16; + } + if (!(x & 0xff000000)) { + k += 8; + x <<= 8; + } + if (!(x & 0xf0000000)) { + k += 4; + x <<= 4; + } + if (!(x & 0xc0000000)) { + k += 2; + x <<= 2; + } + if (!(x & 0x80000000)) { + k++; + if (!(x & 0x40000000)) + return 32; + } + return k; +} + +static int lo0bits(ULong *y) +{ + int k; + ULong x = *y; + + if (x & 7) { + if (x & 1) + return 0; + if (x & 2) { + *y = x >> 1; + return 1; + } + *y = x >> 2; + return 2; + } + k = 0; + if (!(x & 0xffff)) { + k = 16; + x >>= 16; + } + if (!(x & 0xff)) { + k += 8; + x >>= 8; + } + if (!(x & 0xf)) { + k += 4; + x >>= 4; + } + if (!(x & 0x3)) { + k += 2; + x >>= 2; + } + if (!(x & 1)) { + k++; + x >>= 1; + if (!x & 1) + return 32; + } + *y = x; + return k; +} + +static Bigint *i2b(int i) +{ + Bigint *b; + + b = Balloc(1); + b->x[0] = i; + b->wds = 1; + return b; +} + +static Bigint *mult(Bigint *a, Bigint *b) +{ + Bigint *c; + int k, wa, wb, wc; + ULong carry, y, z; + ULong *x, *xa, *xae, *xb, *xbe, *xc, *xc0; +#ifdef Pack_32 + ULong z2; +#endif + + if (a->wds < b->wds) { + c = a; + a = b; + b = c; + } + k = a->k; + wa = a->wds; + wb = b->wds; + wc = wa + wb; + if (wc > a->maxwds) + k++; + c = Balloc(k); + for(x = c->x, xa = x + wc; x < xa; x++) + *x = 0; + xa = a->x; + xae = xa + wa; + xb = b->x; + xbe = xb + wb; + xc0 = c->x; +#ifdef Pack_32 + for(; xb < xbe; xb++, xc0++) { + if ((y = *xb & 0xffff) != 0) { + x = xa; + xc = xc0; + carry = 0; + do { + z = (*x & 0xffff) * y + (*xc & 0xffff) + carry; + carry = z >> 16; + z2 = (*x++ >> 16) * y + (*xc >> 16) + carry; + carry = z2 >> 16; + Storeinc(xc, z2, z); + } + while(x < xae); + *xc = carry; + } + if ((y = *xb >> 16) != 0) { + x = xa; + xc = xc0; + carry = 0; + z2 = *xc; + do { + z = (*x & 0xffff) * y + (*xc >> 16) + carry; + carry = z >> 16; + Storeinc(xc, z, z2); + z2 = (*x++ >> 16) * y + (*xc & 0xffff) + carry; + carry = z2 >> 16; + } + while(x < xae); + *xc = z2; + } + } +#else + for(; xb < xbe; xc0++) { + if (y = *xb++) { + x = xa; + xc = xc0; + carry = 0; + do { + z = *x++ * y + *xc + carry; + carry = z >> 16; + *xc++ = z & 0xffff; + } + while(x < xae); + *xc = carry; + } + } +#endif + for(xc0 = c->x, xc = xc0 + wc; wc > 0 && !*--xc; --wc) ; + c->wds = wc; + return c; +} + +static Bigint *p5s; + +static Bigint *pow5mult(Bigint *b, int k) +{ + Bigint *b1, *p5, *p51; + int i; + static const int p05[3] = { 5, 25, 125 }; + + if ((i = k & 3) != 0) + b = multadd(b, p05[i-1], 0); + + if (!(k >>= 2)) + return b; + if (!(p5 = p5s)) { + /* first time */ + p5 = p5s = i2b(625); + p5->next = 0; + } + for(;;) { + if (k & 1) { + b1 = mult(b, p5); + Bfree(b); + b = b1; + } + if (!(k >>= 1)) + break; + if (!(p51 = p5->next)) { + p51 = p5->next = mult(p5,p5); + p51->next = 0; + } + p5 = p51; + } + return b; +} + +static Bigint *lshift(Bigint *b, int k) +{ + int i, k1, n, n1; + Bigint *b1; + ULong *x, *x1, *xe, z; + +#ifdef Pack_32 + n = k >> 5; +#else + n = k >> 4; +#endif + k1 = b->k; + n1 = n + b->wds + 1; + for(i = b->maxwds; n1 > i; i <<= 1) + k1++; + b1 = Balloc(k1); + x1 = b1->x; + for(i = 0; i < n; i++) + *x1++ = 0; + x = b->x; + xe = x + b->wds; +#ifdef Pack_32 + if (k &= 0x1f) { + k1 = 32 - k; + z = 0; + do { + *x1++ = *x << k | z; + z = *x++ >> k1; + } + while(x < xe); + if ((*x1 = z) != 0) + ++n1; + } +#else + if (k &= 0xf) { + k1 = 16 - k; + z = 0; + do { + *x1++ = *x << k & 0xffff | z; + z = *x++ >> k1; + } + while(x < xe); + if (*x1 = z) + ++n1; + } +#endif + else do + *x1++ = *x++; + while(x < xe); + b1->wds = n1 - 1; + Bfree(b); + return b1; +} + +static int cmp(Bigint *a, Bigint *b) +{ + ULong *xa, *xa0, *xb, *xb0; + int i, j; + + i = a->wds; + j = b->wds; +#ifdef BSD_QDTOA_DEBUG + if (i > 1 && !a->x[i-1]) + Bug("cmp called with a->x[a->wds-1] == 0"); + if (j > 1 && !b->x[j-1]) + Bug("cmp called with b->x[b->wds-1] == 0"); +#endif + if (i -= j) + return i; + xa0 = a->x; + xa = xa0 + j; + xb0 = b->x; + xb = xb0 + j; + for(;;) { + if (*--xa != *--xb) + return *xa < *xb ? -1 : 1; + if (xa <= xa0) + break; + } + return 0; +} + +static Bigint *diff(Bigint *a, Bigint *b) +{ + Bigint *c; + int i, wa, wb; + Long borrow, y; /* We need signed shifts here. */ + ULong *xa, *xae, *xb, *xbe, *xc; +#ifdef Pack_32 + Long z; +#endif + + i = cmp(a,b); + if (!i) { + c = Balloc(0); + c->wds = 1; + c->x[0] = 0; + return c; + } + if (i < 0) { + c = a; + a = b; + b = c; + i = 1; + } + else + i = 0; + c = Balloc(a->k); + c->sign = i; + wa = a->wds; + xa = a->x; + xae = xa + wa; + wb = b->wds; + xb = b->x; + xbe = xb + wb; + xc = c->x; + borrow = 0; +#ifdef Pack_32 + do { + y = (*xa & 0xffff) - (*xb & 0xffff) + borrow; + borrow = y >> 16; + Sign_Extend(borrow, y); + z = (*xa++ >> 16) - (*xb++ >> 16) + borrow; + borrow = z >> 16; + Sign_Extend(borrow, z); + Storeinc(xc, z, y); + } + while(xb < xbe); + while(xa < xae) { + y = (*xa & 0xffff) + borrow; + borrow = y >> 16; + Sign_Extend(borrow, y); + z = (*xa++ >> 16) + borrow; + borrow = z >> 16; + Sign_Extend(borrow, z); + Storeinc(xc, z, y); + } +#else + do { + y = *xa++ - *xb++ + borrow; + borrow = y >> 16; + Sign_Extend(borrow, y); + *xc++ = y & 0xffff; + } + while(xb < xbe); + while(xa < xae) { + y = *xa++ + borrow; + borrow = y >> 16; + Sign_Extend(borrow, y); + *xc++ = y & 0xffff; + } +#endif + while(!*--xc) + wa--; + c->wds = wa; + return c; +} + +static double ulp(double x) +{ + Long L; + double a; + + L = (getWord0(x) & Exp_mask) - (P-1)*Exp_msk1; +#ifndef Sudden_Underflow + if (L > 0) { +#endif +#ifdef IBM + L |= Exp_msk1 >> 4; +#endif + setWord0(&a, L); + setWord1(&a, 0); +#ifndef Sudden_Underflow + } + else { + L = -L >> Exp_shift; + if (L < Exp_shift) { + setWord0(&a, 0x80000 >> L); + setWord1(&a, 0); + } + else { + setWord0(&a, 0); + L -= Exp_shift; + setWord1(&a, L >= 31 ? 1U : 1U << (31 - L)); + } + } +#endif + return a; +} + +static double b2d(Bigint *a, int *e) +{ + ULong *xa, *xa0, w, y, z; + int k; + double d; + + xa0 = a->x; + xa = xa0 + a->wds; + y = *--xa; +#ifdef BSD_QDTOA_DEBUG + if (!y) Bug("zero y in b2d"); +#endif + k = hi0bits(y); + *e = 32 - k; +#ifdef Pack_32 + if (k < Ebits) { + setWord0(&d, Exp_1 | y >> (Ebits - k)); + w = xa > xa0 ? *--xa : 0; + setWord1(&d, y << ((32-Ebits) + k) | w >> (Ebits - k)); + goto ret_d; + } + z = xa > xa0 ? *--xa : 0; + if (k -= Ebits) { + setWord0(&d, Exp_1 | y << k | z >> (32 - k)); + y = xa > xa0 ? *--xa : 0; + setWord1(&d, z << k | y >> (32 - k)); + } + else { + setWord0(&d, Exp_1 | y); + setWord1(&d, z); + } +#else + if (k < Ebits + 16) { + z = xa > xa0 ? *--xa : 0; + setWord0(&d, Exp_1 | y << k - Ebits | z >> Ebits + 16 - k); + w = xa > xa0 ? *--xa : 0; + y = xa > xa0 ? *--xa : 0; + setWord1(&d, z << k + 16 - Ebits | w << k - Ebits | y >> 16 + Ebits - k); + goto ret_d; + } + z = xa > xa0 ? *--xa : 0; + w = xa > xa0 ? *--xa : 0; + k -= Ebits + 16; + setWord0(&d, Exp_1 | y << k + 16 | z << k | w >> 16 - k); + y = xa > xa0 ? *--xa : 0; + setWord1(&d, w << k + 16 | y << k); +#endif + ret_d: + return d; +} + +static Bigint *d2b(double d, int *e, int *bits) +{ + Bigint *b; + int de, i, k; + ULong *x, y, z; + +#ifdef Pack_32 + b = Balloc(1); +#else + b = Balloc(2); +#endif + x = b->x; + + z = getWord0(d) & Frac_mask; + setWord0(&d, getWord0(d) & 0x7fffffff); /* clear sign bit, which we ignore */ +#ifdef Sudden_Underflow + de = (int)(getWord0(d) >> Exp_shift); +#ifndef IBM + z |= Exp_msk11; +#endif +#else + if ((de = (int)(getWord0(d) >> Exp_shift)) != 0) + z |= Exp_msk1; +#endif +#ifdef Pack_32 + if ((y = getWord1(d)) != 0) { + if ((k = lo0bits(&y)) != 0) { + x[0] = y | z << (32 - k); + z >>= k; + } + else + x[0] = y; + i = b->wds = (x[1] = z) ? 2 : 1; + } + else { +#ifdef BSD_QDTOA_DEBUG + if (!z) + Bug("Zero passed to d2b"); +#endif + k = lo0bits(&z); + x[0] = z; + i = b->wds = 1; + k += 32; + } +#else + if (y = getWord1(d)) { + if (k = lo0bits(&y)) + if (k >= 16) { + x[0] = y | z << 32 - k & 0xffff; + x[1] = z >> k - 16 & 0xffff; + x[2] = z >> k; + i = 2; + } + else { + x[0] = y & 0xffff; + x[1] = y >> 16 | z << 16 - k & 0xffff; + x[2] = z >> k & 0xffff; + x[3] = z >> k+16; + i = 3; + } + else { + x[0] = y & 0xffff; + x[1] = y >> 16; + x[2] = z & 0xffff; + x[3] = z >> 16; + i = 3; + } + } + else { +#ifdef BSD_QDTOA_DEBUG + if (!z) + Bug("Zero passed to d2b"); +#endif + k = lo0bits(&z); + if (k >= 16) { + x[0] = z; + i = 0; + } + else { + x[0] = z & 0xffff; + x[1] = z >> 16; + i = 1; + } + k += 32; + } + while(!x[i]) + --i; + b->wds = i + 1; +#endif +#ifndef Sudden_Underflow + if (de) { +#endif +#ifdef IBM + *e = (de - Bias - (P-1) << 2) + k; + *bits = 4*P + 8 - k - hi0bits(getWord0(d) & Frac_mask); +#else + *e = de - Bias - (P-1) + k; + *bits = P - k; +#endif +#ifndef Sudden_Underflow + } + else { + *e = de - Bias - (P-1) + 1 + k; +#ifdef Pack_32 + *bits = 32*i - hi0bits(x[i-1]); +#else + *bits = (i+2)*16 - hi0bits(x[i]); +#endif + } +#endif + return b; +} + +static double ratio(Bigint *a, Bigint *b) +{ + double da, db; + int k, ka, kb; + + da = b2d(a, &ka); + db = b2d(b, &kb); +#ifdef Pack_32 + k = ka - kb + 32*(a->wds - b->wds); +#else + k = ka - kb + 16*(a->wds - b->wds); +#endif +#ifdef IBM + if (k > 0) { + setWord0(&da, getWord0(da) + (k >> 2)*Exp_msk1); + if (k &= 3) + da *= 1 << k; + } + else { + k = -k; + setWord0(&db, getWord0(db) + (k >> 2)*Exp_msk1); + if (k &= 3) + db *= 1 << k; + } +#else + if (k > 0) + setWord0(&da, getWord0(da) + k*Exp_msk1); + else { + k = -k; + setWord0(&db, getWord0(db) + k*Exp_msk1); + } +#endif + return da / db; +} + +static CONST double tens[] = { + 1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, + 1e10, 1e11, 1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19, + 1e20, 1e21, 1e22 +#ifdef VAX + , 1e23, 1e24 +#endif +}; + +#ifdef IEEE_Arith +static CONST double bigtens[] = { 1e16, 1e32, 1e64, 1e128, 1e256 }; +static CONST double tinytens[] = { 1e-16, 1e-32, 1e-64, 1e-128, 1e-256 }; +#define n_bigtens 5 +#else +#ifdef IBM +static CONST double bigtens[] = { 1e16, 1e32, 1e64 }; +static CONST double tinytens[] = { 1e-16, 1e-32, 1e-64 }; +#define n_bigtens 3 +#else +static CONST double bigtens[] = { 1e16, 1e32 }; +static CONST double tinytens[] = { 1e-16, 1e-32 }; +#define n_bigtens 2 +#endif +#endif + +/* + The pre-release gcc3.3 shipped with SuSE 8.2 has a bug which causes + the comparison 1e-100 == 0.0 to return true. As a workaround, we + compare it to a global variable containing 0.0, which produces + correct assembler output. + + ### consider detecting the broken compilers and using the static + ### double for these, and use a #define for all working compilers +*/ +static double g_double_zero = 0.0; + +static double qstrtod(CONST char *s00, CONST char **se, bool *ok) +{ + int bb2, bb5, bbe, bd2, bd5, bbbits, bs2, c, dsign, + e, e1, esign, i, j, k, nd, nd0, nf, nz, nz0, sign; + CONST char *s, *s0, *s1; + double aadj, aadj1, adj, rv, rv0; + Long L; + ULong y, z; + Bigint *bb1, *bd0; + Bigint *bb = NULL, *bd = NULL, *bs = NULL, *delta = NULL;/* pacify gcc */ + + /* + #ifndef KR_headers + CONST char decimal_point = localeconv()->decimal_point[0]; + #else + CONST char decimal_point = '.'; + #endif */ + if (ok != 0) + *ok = TRUE; + + CONST char decimal_point = '.'; + + sign = nz0 = nz = 0; + rv = 0.; + + + for(s = s00; isspace((unsigned char) *s); s++) + ; + + if (*s == '-') { + sign = 1; + s++; + } else if (*s == '+') { + s++; + } + + if (*s == '\0') { + s = s00; + goto ret; + } + + if (*s == '0') { + nz0 = 1; + while(*++s == '0') ; + if (!*s) + goto ret; + } + s0 = s; + y = z = 0; + for(nd = nf = 0; (c = *s) >= '0' && c <= '9'; nd++, s++) + if (nd < 9) + y = 10*y + c - '0'; + else if (nd < 16) + z = 10*z + c - '0'; + nd0 = nd; + if (c == decimal_point) { + c = *++s; + if (!nd) { + for(; c == '0'; c = *++s) + nz++; + if (c > '0' && c <= '9') { + s0 = s; + nf += nz; + nz = 0; + goto have_dig; + } + goto dig_done; + } + for(; c >= '0' && c <= '9'; c = *++s) { + have_dig: + nz++; + if (c -= '0') { + nf += nz; + for(i = 1; i < nz; i++) + if (nd++ < 9) + y *= 10; + else if (nd <= DBL_DIG + 1) + z *= 10; + if (nd++ < 9) + y = 10*y + c; + else if (nd <= DBL_DIG + 1) + z = 10*z + c; + nz = 0; + } + } + } + dig_done: + e = 0; + if (c == 'e' || c == 'E') { + if (!nd && !nz && !nz0) { + s = s00; + goto ret; + } + s00 = s; + esign = 0; + switch(c = *++s) { + case '-': + esign = 1; + case '+': + c = *++s; + } + if (c >= '0' && c <= '9') { + while(c == '0') + c = *++s; + if (c > '0' && c <= '9') { + L = c - '0'; + s1 = s; + while((c = *++s) >= '0' && c <= '9') + L = 10*L + c - '0'; + if (s - s1 > 8 || L > 19999) + /* Avoid confusion from exponents + * so large that e might overflow. + */ + e = 19999; /* safe for 16 bit ints */ + else + e = (int)L; + if (esign) + e = -e; + } + else + e = 0; + } + else + s = s00; + } + if (!nd) { + if (!nz && !nz0) + s = s00; + goto ret; + } + e1 = e -= nf; + + /* Now we have nd0 digits, starting at s0, followed by a + * decimal point, followed by nd-nd0 digits. The number we're + * after is the integer represented by those digits times + * 10**e */ + + if (!nd0) + nd0 = nd; + k = nd < DBL_DIG + 1 ? nd : DBL_DIG + 1; + rv = y; + if (k > 9) + rv = tens[k - 9] * rv + z; + bd0 = 0; + if (nd <= DBL_DIG +#ifndef RND_PRODQUOT + && FLT_ROUNDS == 1 +#endif + ) { + if (!e) + goto ret; + if (e > 0) { + if (e <= Ten_pmax) { +#ifdef VAX + goto vax_ovfl_check; +#else + /* rv = */ rounded_product(rv, tens[e]); + goto ret; +#endif + } + i = DBL_DIG - nd; + if (e <= Ten_pmax + i) { + /* A fancier test would sometimes let us do + * this for larger i values. + */ + e -= i; + rv *= tens[i]; +#ifdef VAX + /* VAX exponent range is so narrow we must + * worry about overflow here... + */ + vax_ovfl_check: + setWord0(&rv, getWord0(rv) - P*Exp_msk1); + /* rv = */ rounded_product(rv, tens[e]); + if ((getWord0(rv) & Exp_mask) + > Exp_msk1*(DBL_MAX_EXP+Bias-1-P)) + goto ovfl; + setWord0(&rv, getWord0(rv) + P*Exp_msk1); +#else + /* rv = */ rounded_product(rv, tens[e]); +#endif + goto ret; + } + } +#ifndef Inaccurate_Divide + else if (e >= -Ten_pmax) { + /* rv = */ rounded_quotient(rv, tens[-e]); + goto ret; + } +#endif + } + e1 += nd - k; + + /* Get starting approximation = rv * 10**e1 */ + + if (e1 > 0) { + if ((i = e1 & 15) != 0) + rv *= tens[i]; + if (e1 &= ~15) { + if (e1 > DBL_MAX_10_EXP) { + ovfl: + // errno = ERANGE; + if (ok != 0) + *ok = FALSE; +#ifdef __STDC__ + rv = HUGE_VAL; +#else + /* Can't trust HUGE_VAL */ +#ifdef IEEE_Arith + setWord0(&rv, Exp_mask); + setWord1(&rv, 0); +#else + setWord0(&rv, Big0); + setWord1(&rv, Big1); +#endif +#endif + if (bd0) + goto retfree; + goto ret; + } + if (e1 >>= 4) { + for(j = 0; e1 > 1; j++, e1 >>= 1) + if (e1 & 1) + rv *= bigtens[j]; + /* The last multiplication could overflow. */ + setWord0(&rv, getWord0(rv) - P*Exp_msk1); + rv *= bigtens[j]; + if ((z = getWord0(rv) & Exp_mask) + > Exp_msk1*(DBL_MAX_EXP+Bias-P)) + goto ovfl; + if (z > Exp_msk1*(DBL_MAX_EXP+Bias-1-P)) { + /* set to largest number */ + /* (Can't trust DBL_MAX) */ + setWord0(&rv, Big0); + setWord1(&rv, Big1); + } + else + setWord0(&rv, getWord0(rv) + P*Exp_msk1); + } + + } + } + else if (e1 < 0) { + e1 = -e1; + if ((i = e1 & 15) != 0) + rv /= tens[i]; + if (e1 &= ~15) { + e1 >>= 4; + if (e1 >= 1 << n_bigtens) + goto undfl; + for(j = 0; e1 > 1; j++, e1 >>= 1) + if (e1 & 1) + rv *= tinytens[j]; + /* The last multiplication could underflow. */ + rv0 = rv; + rv *= tinytens[j]; + if (rv == g_double_zero) + { + rv = 2.*rv0; + rv *= tinytens[j]; + if (rv == g_double_zero) + { + undfl: + rv = 0.; + // errno = ERANGE; + if (ok != 0) + *ok = FALSE; + if (bd0) + goto retfree; + goto ret; + } + setWord0(&rv, Tiny0); + setWord1(&rv, Tiny1); + /* The refinement below will clean + * this approximation up. + */ + } + } + } + + /* Now the hard part -- adjusting rv to the correct value.*/ + + /* Put digits into bd: true value = bd * 10^e */ + + bd0 = s2b(s0, nd0, nd, y); + + for(;;) { + bd = Balloc(bd0->k); + Bcopy(bd, bd0); + bb = d2b(rv, &bbe, &bbbits); /* rv = bb * 2^bbe */ + bs = i2b(1); + + if (e >= 0) { + bb2 = bb5 = 0; + bd2 = bd5 = e; + } + else { + bb2 = bb5 = -e; + bd2 = bd5 = 0; + } + if (bbe >= 0) + bb2 += bbe; + else + bd2 -= bbe; + bs2 = bb2; +#ifdef Sudden_Underflow +#ifdef IBM + j = 1 + 4*P - 3 - bbbits + ((bbe + bbbits - 1) & 3); +#else + j = P + 1 - bbbits; +#endif +#else + i = bbe + bbbits - 1; /* logb(rv) */ + if (i < Emin) /* denormal */ + j = bbe + (P-Emin); + else + j = P + 1 - bbbits; +#endif + bb2 += j; + bd2 += j; + i = bb2 < bd2 ? bb2 : bd2; + if (i > bs2) + i = bs2; + if (i > 0) { + bb2 -= i; + bd2 -= i; + bs2 -= i; + } + if (bb5 > 0) { + bs = pow5mult(bs, bb5); + bb1 = mult(bs, bb); + Bfree(bb); + bb = bb1; + } + if (bb2 > 0) + bb = lshift(bb, bb2); + if (bd5 > 0) + bd = pow5mult(bd, bd5); + if (bd2 > 0) + bd = lshift(bd, bd2); + if (bs2 > 0) + bs = lshift(bs, bs2); + delta = diff(bb, bd); + dsign = delta->sign; + delta->sign = 0; + i = cmp(delta, bs); + if (i < 0) { + /* Error is less than half an ulp -- check for + * special case of mantissa a power of two. + */ + if (dsign || getWord1(rv) || getWord0(rv) & Bndry_mask) + break; + delta = lshift(delta,Log2P); + if (cmp(delta, bs) > 0) + goto drop_down; + break; + } + if (i == 0) { + /* exactly half-way between */ + if (dsign) { + if ((getWord0(rv) & Bndry_mask1) == Bndry_mask1 + && getWord1(rv) == 0xffffffff) { + /*boundary case -- increment exponent*/ + setWord0(&rv, (getWord0(rv) & Exp_mask) + + Exp_msk1 +#ifdef IBM + | Exp_msk1 >> 4 +#endif + ); + setWord1(&rv, 0); + break; + } + } + else if (!(getWord0(rv) & Bndry_mask) && !getWord1(rv)) { + drop_down: + /* boundary case -- decrement exponent */ +#ifdef Sudden_Underflow + L = getWord0(rv) & Exp_mask; +#ifdef IBM + if (L < Exp_msk1) +#else + if (L <= Exp_msk1) +#endif + goto undfl; + L -= Exp_msk1; +#else + L = (getWord0(rv) & Exp_mask) - Exp_msk1; +#endif + setWord0(&rv, L | Bndry_mask1); + setWord1(&rv, 0xffffffff); +#ifdef IBM + goto cont; +#else + break; +#endif + } +#ifndef ROUND_BIASED + if (!(getWord1(rv) & LSB)) + break; +#endif + if (dsign) + rv += ulp(rv); +#ifndef ROUND_BIASED + else { + rv -= ulp(rv); +#ifndef Sudden_Underflow + if (rv == g_double_zero) + goto undfl; +#endif + } +#endif + break; + } + if ((aadj = ratio(delta, bs)) <= 2.) { + if (dsign) + aadj = aadj1 = 1.; + else if (getWord1(rv) || getWord0(rv) & Bndry_mask) { +#ifndef Sudden_Underflow + if (getWord1(rv) == Tiny1 && !getWord0(rv)) + goto undfl; +#endif + aadj = 1.; + aadj1 = -1.; + } + else { + /* special case -- power of FLT_RADIX to be */ + /* rounded down... */ + + if (aadj < 2./FLT_RADIX) + aadj = 1./FLT_RADIX; + else + aadj *= 0.5; + aadj1 = -aadj; + } + } + else { + aadj *= 0.5; + aadj1 = dsign ? aadj : -aadj; +#ifdef Check_FLT_ROUNDS + switch(FLT_ROUNDS) { + case 2: /* towards +infinity */ + aadj1 -= 0.5; + break; + case 0: /* towards 0 */ + case 3: /* towards -infinity */ + aadj1 += 0.5; + } +#else + if (FLT_ROUNDS == 0) + aadj1 += 0.5; +#endif + } + y = getWord0(rv) & Exp_mask; + + /* Check for overflow */ + + if (y == Exp_msk1*(DBL_MAX_EXP+Bias-1)) { + rv0 = rv; + setWord0(&rv, getWord0(rv) - P*Exp_msk1); + adj = aadj1 * ulp(rv); + rv += adj; + if ((getWord0(rv) & Exp_mask) >= + Exp_msk1*(DBL_MAX_EXP+Bias-P)) { + if (getWord0(rv0) == Big0 && getWord1(rv0) == Big1) + goto ovfl; + setWord0(&rv, Big0); + setWord1(&rv, Big1); + goto cont; + } + else + setWord0(&rv, getWord0(rv) + P*Exp_msk1); + } + else { +#ifdef Sudden_Underflow + if ((getWord0(rv) & Exp_mask) <= P*Exp_msk1) { + rv0 = rv; + setWord0(&rv, getWord0(rv) + P*Exp_msk1); + adj = aadj1 * ulp(rv); + rv += adj; +#ifdef IBM + if ((getWord0(rv) & Exp_mask) < P*Exp_msk1) +#else + if ((getWord0(rv) & Exp_mask) <= P*Exp_msk1) +#endif + { + if (getWord0(rv0) == Tiny0 + && getWord1(rv0) == Tiny1) + goto undfl; + setWord0(&rv, Tiny0); + setWord1(&rv, Tiny1); + goto cont; + } + else + setWord0(&rv, getWord0(rv) - P*Exp_msk1); + } + else { + adj = aadj1 * ulp(rv); + rv += adj; + } +#else + /* Compute adj so that the IEEE rounding rules will + * correctly round rv + adj in some half-way cases. + * If rv * ulp(rv) is denormalized (i.e., + * y <= (P-1)*Exp_msk1), we must adjust aadj to avoid + * trouble from bits lost to denormalization; + * example: 1.2e-307 . + */ + if (y <= (P-1)*Exp_msk1 && aadj >= 1.) { + aadj1 = (double)(int)(aadj + 0.5); + if (!dsign) + aadj1 = -aadj1; + } + adj = aadj1 * ulp(rv); + rv += adj; +#endif + } + z = getWord0(rv) & Exp_mask; + if (y == z) { + /* Can we stop now? */ + L = (Long) aadj; + aadj -= L; + /* The tolerances below are conservative. */ + if (dsign || getWord1(rv) || getWord0(rv) & Bndry_mask) { + if (aadj < .4999999 || aadj > .5000001) + break; + } + else if (aadj < .4999999/FLT_RADIX) + break; + } + cont: + Bfree(bb); + Bfree(bd); + Bfree(bs); + Bfree(delta); + } + retfree: + Bfree(bb); + Bfree(bd); + Bfree(bs); + Bfree(bd0); + Bfree(delta); + ret: + if (se) + *se = (char *)s; + return sign ? -rv : rv; +} + +static int quorem(Bigint *b, Bigint *S) +{ + int n; + Long borrow, y; + ULong carry, q, ys; + ULong *bx, *bxe, *sx, *sxe; +#ifdef Pack_32 + Long z; + ULong si, zs; +#endif + + n = S->wds; +#ifdef BSD_QDTOA_DEBUG + /*debug*/ if (b->wds > n) + /*debug*/ Bug("oversize b in quorem"); +#endif + if (b->wds < n) + return 0; + sx = S->x; + sxe = sx + --n; + bx = b->x; + bxe = bx + n; + q = *bxe / (*sxe + 1); /* ensure q <= true quotient */ +#ifdef BSD_QDTOA_DEBUG + /*debug*/ if (q > 9) + /*debug*/ Bug("oversized quotient in quorem"); +#endif + if (q) { + borrow = 0; + carry = 0; + do { +#ifdef Pack_32 + si = *sx++; + ys = (si & 0xffff) * q + carry; + zs = (si >> 16) * q + (ys >> 16); + carry = zs >> 16; + y = (*bx & 0xffff) - (ys & 0xffff) + borrow; + borrow = y >> 16; + Sign_Extend(borrow, y); + z = (*bx >> 16) - (zs & 0xffff) + borrow; + borrow = z >> 16; + Sign_Extend(borrow, z); + Storeinc(bx, z, y); +#else + ys = *sx++ * q + carry; + carry = ys >> 16; + y = *bx - (ys & 0xffff) + borrow; + borrow = y >> 16; + Sign_Extend(borrow, y); + *bx++ = y & 0xffff; +#endif + } + while(sx <= sxe); + if (!*bxe) { + bx = b->x; + while(--bxe > bx && !*bxe) + --n; + b->wds = n; + } + } + if (cmp(b, S) >= 0) { + q++; + borrow = 0; + carry = 0; + bx = b->x; + sx = S->x; + do { +#ifdef Pack_32 + si = *sx++; + ys = (si & 0xffff) + carry; + zs = (si >> 16) + (ys >> 16); + carry = zs >> 16; + y = (*bx & 0xffff) - (ys & 0xffff) + borrow; + borrow = y >> 16; + Sign_Extend(borrow, y); + z = (*bx >> 16) - (zs & 0xffff) + borrow; + borrow = z >> 16; + Sign_Extend(borrow, z); + Storeinc(bx, z, y); +#else + ys = *sx++ + carry; + carry = ys >> 16; + y = *bx - (ys & 0xffff) + borrow; + borrow = y >> 16; + Sign_Extend(borrow, y); + *bx++ = y & 0xffff; +#endif + } + while(sx <= sxe); + bx = b->x; + bxe = bx + n; + if (!*bxe) { + while(--bxe > bx && !*bxe) + --n; + b->wds = n; + } + } + return q; +} + +/* dtoa for IEEE arithmetic (dmg): convert double to ASCII string. + * + * Inspired by "How to Print Floating-Point Numbers Accurately" by + * Guy L. Steele, Jr. and Jon L. White [Proc. ACM SIGPLAN '90, pp. 92-101]. + * + * Modifications: + * 1. Rather than iterating, we use a simple numeric overestimate + * to determine k = floor(log10(d)). We scale relevant + * quantities using O(log2(k)) rather than O(k) multiplications. + * 2. For some modes > 2 (corresponding to ecvt and fcvt), we don't + * try to generate digits strictly left to right. Instead, we + * compute with fewer bits and propagate the carry if necessary + * when rounding the final digit up. This is often faster. + * 3. Under the assumption that input will be rounded nearest, + * mode 0 renders 1e23 as 1e23 rather than 9.999999999999999e22. + * That is, we allow equality in stopping tests when the + * round-nearest rule will give the same floating-point value + * as would satisfaction of the stopping test with strict + * inequality. + * 4. We remove common factors of powers of 2 from relevant + * quantities. + * 5. When converting floating-point integers less than 1e16, + * we use floating-point arithmetic rather than resorting + * to multiple-precision integers. + * 6. When asked to produce fewer than 15 digits, we first try + * to get by with floating-point arithmetic; we resort to + * multiple-precision integer arithmetic only if we cannot + * guarantee that the floating-point calculation has given + * the correctly rounded result. For k requested digits and + * "uniformly" distributed input, the probability is + * something like 10^(k-15) that we must resort to the Long + * calculation. + */ + + +/* This actually sometimes returns a pointer to a string literal + cast to a char*. Do NOT try to modify the return value. */ + +static char *qdtoa ( double d, int mode, int ndigits, int *decpt, int *sign, char **rve, char **resultp) +{ + // Some values of the floating-point control word can cause _qdtoa to crash with an underflow. + // We set a safe value here. +#ifdef Q_OS_WIN +#ifndef Q_CC_BOR + unsigned int oldbits = _control87(0, 0); +#ifndef _M_X64 //x64 does not support precition control + _control87(0x9001F, 0xFFFFF); +#else + _control87(0x9001F, _MCW_DN|_MCW_EM|_MCW_RC); +#endif //_M_X64 +#endif +#endif + +#ifdef Q_OS_LINUX + fenv_t envp; + feholdexcept(&envp); +#endif + + char *s = _qdtoa(d, mode, ndigits, decpt, sign, rve, resultp); + +#ifdef Q_OS_WIN +#ifndef Q_CC_BOR + _clear87(); +#ifndef _M_X64 + _control87(oldbits, 0xFFFFF); +#else + _control87(oldbits, _MCW_DN|_MCW_EM|_MCW_RC); +#endif //_M_X64 +#endif +#endif + +#ifdef Q_OS_LINUX + fesetenv(&envp); +#endif + + return s; +} + +static char *_qdtoa( NEEDS_VOLATILE double d, int mode, int ndigits, int *decpt, int *sign, char **rve, char **resultp) +{ + /* + Arguments ndigits, decpt, sign are similar to those + of ecvt and fcvt; trailing zeros are suppressed from + the returned string. If not null, *rve is set to point + to the end of the return value. If d is +-Infinity or NaN, + then *decpt is set to 9999. + + mode: + 0 ==> shortest string that yields d when read in + and rounded to nearest. + 1 ==> like 0, but with Steele & White stopping rule; + e.g. with IEEE P754 arithmetic , mode 0 gives + 1e23 whereas mode 1 gives 9.999999999999999e22. + 2 ==> max(1,ndigits) significant digits. This gives a + return value similar to that of ecvt, except + that trailing zeros are suppressed. + 3 ==> through ndigits past the decimal point. This + gives a return value similar to that from fcvt, + except that trailing zeros are suppressed, and + ndigits can be negative. + 4-9 should give the same return values as 2-3, i.e., + 4 <= mode <= 9 ==> same return as mode + 2 + (mode & 1). These modes are mainly for + debugging; often they run slower but sometimes + faster than modes 2-3. + 4,5,8,9 ==> left-to-right digit generation. + 6-9 ==> don't try fast floating-point estimate + (if applicable). + + Values of mode other than 0-9 are treated as mode 0. + + Sufficient space is allocated to the return value + to hold the suppressed trailing zeros. + */ + + int bbits, b2, b5, be, dig, i, ieps, ilim0, + j, j1, k, k0, k_check, leftright, m2, m5, s2, s5, + try_quick; + int ilim = 0, ilim1 = 0, spec_case = 0; /* pacify gcc */ + Long L; +#ifndef Sudden_Underflow + int denorm; + ULong x; +#endif + Bigint *b, *b1, *delta, *mhi, *S; + Bigint *mlo = NULL; /* pacify gcc */ + double d2; + double ds, eps; + char *s, *s0; + + if (getWord0(d) & Sign_bit) { + /* set sign for everything, including 0's and NaNs */ + *sign = 1; + setWord0(&d, getWord0(d) & ~Sign_bit); /* clear sign bit */ + } + else + *sign = 0; + +#if defined(IEEE_Arith) + defined(VAX) +#ifdef IEEE_Arith + if ((getWord0(d) & Exp_mask) == Exp_mask) +#else + if (getWord0(d) == 0x8000) +#endif + { + /* Infinity or NaN */ + *decpt = 9999; + s = +#ifdef IEEE_Arith + !getWord1(d) && !(getWord0(d) & 0xfffff) ? (char*)"Infinity" : +#endif + (char*)"NaN"; + if (rve) + *rve = +#ifdef IEEE_Arith + s[3] ? s + 8 : +#endif + s + 3; + return s; + } +#endif +#ifdef IBM + d += 0; /* normalize */ +#endif + if (d == g_double_zero) + { + *decpt = 1; + s = (char*) "0"; + if (rve) + *rve = s + 1; + return s; + } + + b = d2b(d, &be, &bbits); +#ifdef Sudden_Underflow + i = (int)(getWord0(d) >> Exp_shift1 & (Exp_mask>>Exp_shift1)); +#else + if ((i = (int)(getWord0(d) >> Exp_shift1 & (Exp_mask>>Exp_shift1))) != 0) { +#endif + d2 = d; + setWord0(&d2, getWord0(d2) & Frac_mask1); + setWord0(&d2, getWord0(d2) | Exp_11); +#ifdef IBM + if (j = 11 - hi0bits(getWord0(d2) & Frac_mask)) + d2 /= 1 << j; +#endif + + /* log(x) ~=~ log(1.5) + (x-1.5)/1.5 + * log10(x) = log(x) / log(10) + * ~=~ log(1.5)/log(10) + (x-1.5)/(1.5*log(10)) + * log10(d) = (i-Bias)*log(2)/log(10) + log10(d2) + * + * This suggests computing an approximation k to log10(d) by + * + * k = (i - Bias)*0.301029995663981 + * + ( (d2-1.5)*0.289529654602168 + 0.176091259055681 ); + * + * We want k to be too large rather than too small. + * The error in the first-order Taylor series approximation + * is in our favor, so we just round up the constant enough + * to compensate for any error in the multiplication of + * (i - Bias) by 0.301029995663981; since |i - Bias| <= 1077, + * and 1077 * 0.30103 * 2^-52 ~=~ 7.2e-14, + * adding 1e-13 to the constant term more than suffices. + * Hence we adjust the constant term to 0.1760912590558. + * (We could get a more accurate k by invoking log10, + * but this is probably not worthwhile.) + */ + + i -= Bias; +#ifdef IBM + i <<= 2; + i += j; +#endif +#ifndef Sudden_Underflow + denorm = 0; + } + else { + /* d is denormalized */ + + i = bbits + be + (Bias + (P-1) - 1); + x = i > 32 ? getWord0(d) << (64 - i) | getWord1(d) >> (i - 32) + : getWord1(d) << (32 - i); + d2 = x; + setWord0(&d2, getWord0(d2) - 31*Exp_msk1); /* adjust exponent */ + i -= (Bias + (P-1) - 1) + 1; + denorm = 1; + } +#endif + ds = (d2-1.5)*0.289529654602168 + 0.1760912590558 + i*0.301029995663981; + k = (int)ds; + if (ds < 0. && ds != k) + k--; /* want k = floor(ds) */ + k_check = 1; + if (k >= 0 && k <= Ten_pmax) { + if (d < tens[k]) + k--; + k_check = 0; + } + j = bbits - i - 1; + if (j >= 0) { + b2 = 0; + s2 = j; + } + else { + b2 = -j; + s2 = 0; + } + if (k >= 0) { + b5 = 0; + s5 = k; + s2 += k; + } + else { + b2 -= k; + b5 = -k; + s5 = 0; + } + if (mode < 0 || mode > 9) + mode = 0; + try_quick = 1; + if (mode > 5) { + mode -= 4; + try_quick = 0; + } + leftright = 1; + switch(mode) { + case 0: + case 1: + ilim = ilim1 = -1; + i = 18; + ndigits = 0; + break; + case 2: + leftright = 0; + /* no break */ + case 4: + if (ndigits <= 0) + ndigits = 1; + ilim = ilim1 = i = ndigits; + break; + case 3: + leftright = 0; + /* no break */ + case 5: + i = ndigits + k + 1; + ilim = i; + ilim1 = i - 1; + if (i <= 0) + i = 1; + } + *resultp = (char *) malloc(i + 1); + s = s0 = *resultp; + + if (ilim >= 0 && ilim <= Quick_max && try_quick) { + + /* Try to get by with floating-point arithmetic. */ + + i = 0; + d2 = d; + k0 = k; + ilim0 = ilim; + ieps = 2; /* conservative */ + if (k > 0) { + ds = tens[k&0xf]; + j = k >> 4; + if (j & Bletch) { + /* prevent overflows */ + j &= Bletch - 1; + d /= bigtens[n_bigtens-1]; + ieps++; + } + for(; j; j >>= 1, i++) + if (j & 1) { + ieps++; + ds *= bigtens[i]; + } + d /= ds; + } + else if ((j1 = -k) != 0) { + d *= tens[j1 & 0xf]; + for(j = j1 >> 4; j; j >>= 1, i++) + if (j & 1) { + ieps++; + d *= bigtens[i]; + } + } + if (k_check && d < 1. && ilim > 0) { + if (ilim1 <= 0) + goto fast_failed; + ilim = ilim1; + k--; + d *= 10.; + ieps++; + } + eps = ieps*d + 7.; + setWord0(&eps, getWord0(eps) - (P-1)*Exp_msk1); + if (ilim == 0) { + S = mhi = 0; + d -= 5.; + if (d > eps) + goto one_digit; + if (d < -eps) + goto no_digits; + goto fast_failed; + } +#ifndef No_leftright + if (leftright) { + /* Use Steele & White method of only + * generating digits needed. + */ + eps = 0.5/tens[ilim-1] - eps; + for(i = 0;;) { + L = (Long)d; + d -= L; + *s++ = '0' + (int)L; + if (d < eps) + goto ret1; + if (1. - d < eps) + goto bump_up; + if (++i >= ilim) + break; + eps *= 10.; + d *= 10.; + } + } + else { +#endif + /* Generate ilim digits, then fix them up. */ + eps *= tens[ilim-1]; + for(i = 1;; i++, d *= 10.) { + L = (Long)d; + d -= L; + *s++ = '0' + (int)L; + if (i == ilim) { + if (d > 0.5 + eps) + goto bump_up; + else if (d < 0.5 - eps) { + while(*--s == '0'); + s++; + goto ret1; + } + break; + } + } +#ifndef No_leftright + } +#endif + fast_failed: + s = s0; + d = d2; + k = k0; + ilim = ilim0; + } + + /* Do we have a "small" integer? */ + + if (be >= 0 && k <= Int_max) { + /* Yes. */ + ds = tens[k]; + if (ndigits < 0 && ilim <= 0) { + S = mhi = 0; + if (ilim < 0 || d <= 5*ds) + goto no_digits; + goto one_digit; + } + for(i = 1;; i++) { + L = (Long)(d / ds); + d -= L*ds; +#ifdef Check_FLT_ROUNDS + /* If FLT_ROUNDS == 2, L will usually be high by 1 */ + if (d < 0) { + L--; + d += ds; + } +#endif + *s++ = '0' + (int)L; + if (i == ilim) { + d += d; + if (d > ds || (d == ds && L & 1)) { + bump_up: + while(*--s == '9') + if (s == s0) { + k++; + *s = '0'; + break; + } + ++*s++; + } + break; + } + if ((d *= 10.) == g_double_zero) + break; + } + goto ret1; + } + + m2 = b2; + m5 = b5; + mhi = mlo = 0; + if (leftright) { + if (mode < 2) { + i = +#ifndef Sudden_Underflow + denorm ? be + (Bias + (P-1) - 1 + 1) : +#endif +#ifdef IBM + 1 + 4*P - 3 - bbits + ((bbits + be - 1) & 3); +#else + 1 + P - bbits; +#endif + } + else { + j = ilim - 1; + if (m5 >= j) + m5 -= j; + else { + s5 += j -= m5; + b5 += j; + m5 = 0; + } + if ((i = ilim) < 0) { + m2 -= i; + i = 0; + } + } + b2 += i; + s2 += i; + mhi = i2b(1); + } + if (m2 > 0 && s2 > 0) { + i = m2 < s2 ? m2 : s2; + b2 -= i; + m2 -= i; + s2 -= i; + } + if (b5 > 0) { + if (leftright) { + if (m5 > 0) { + mhi = pow5mult(mhi, m5); + b1 = mult(mhi, b); + Bfree(b); + b = b1; + } + if ((j = b5 - m5) != 0) + b = pow5mult(b, j); + } + else + b = pow5mult(b, b5); + } + S = i2b(1); + if (s5 > 0) + S = pow5mult(S, s5); + + /* Check for special case that d is a normalized power of 2. */ + + if (mode < 2) { + if (!getWord1(d) && !(getWord0(d) & Bndry_mask) +#ifndef Sudden_Underflow + && getWord0(d) & Exp_mask +#endif + ) { + /* The special case */ + b2 += Log2P; + s2 += Log2P; + spec_case = 1; + } + else + spec_case = 0; + } + + /* Arrange for convenient computation of quotients: + * shift left if necessary so divisor has 4 leading 0 bits. + * + * Perhaps we should just compute leading 28 bits of S once + * and for all and pass them and a shift to quorem, so it + * can do shifts and ors to compute the numerator for q. + */ +#ifdef Pack_32 + if ((i = ((s5 ? 32 - hi0bits(S->x[S->wds-1]) : 1) + s2) & 0x1f) != 0) + i = 32 - i; +#else + if (i = ((s5 ? 32 - hi0bits(S->x[S->wds-1]) : 1) + s2) & 0xf) + i = 16 - i; +#endif + if (i > 4) { + i -= 4; + b2 += i; + m2 += i; + s2 += i; + } + else if (i < 4) { + i += 28; + b2 += i; + m2 += i; + s2 += i; + } + if (b2 > 0) + b = lshift(b, b2); + if (s2 > 0) + S = lshift(S, s2); + if (k_check) { + if (cmp(b,S) < 0) { + k--; + b = multadd(b, 10, 0); /* we botched the k estimate */ + if (leftright) + mhi = multadd(mhi, 10, 0); + ilim = ilim1; + } + } + if (ilim <= 0 && mode > 2) { + if (ilim < 0 || cmp(b,S = multadd(S,5,0)) <= 0) { + /* no digits, fcvt style */ + no_digits: + k = -1 - ndigits; + goto ret; + } + one_digit: + *s++ = '1'; + k++; + goto ret; + } + if (leftright) { + if (m2 > 0) + mhi = lshift(mhi, m2); + + /* Compute mlo -- check for special case + * that d is a normalized power of 2. + */ + + mlo = mhi; + if (spec_case) { + mhi = Balloc(mhi->k); + Bcopy(mhi, mlo); + mhi = lshift(mhi, Log2P); + } + + for(i = 1;;i++) { + dig = quorem(b,S) + '0'; + /* Do we yet have the shortest decimal string + * that will round to d? + */ + j = cmp(b, mlo); + delta = diff(S, mhi); + j1 = delta->sign ? 1 : cmp(b, delta); + Bfree(delta); +#ifndef ROUND_BIASED + if (j1 == 0 && !mode && !(getWord1(d) & 1)) { + if (dig == '9') + goto round_9_up; + if (j > 0) + dig++; + *s++ = dig; + goto ret; + } +#endif + if (j < 0 || (j == 0 && !mode +#ifndef ROUND_BIASED + && !(getWord1(d) & 1) +#endif + )) { + if (j1 > 0) { + b = lshift(b, 1); + j1 = cmp(b, S); + if ((j1 > 0 || (j1 == 0 && dig & 1)) + && dig++ == '9') + goto round_9_up; + } + *s++ = dig; + goto ret; + } + if (j1 > 0) { + if (dig == '9') { /* possible if i == 1 */ + round_9_up: + *s++ = '9'; + goto roundoff; + } + *s++ = dig + 1; + goto ret; + } + *s++ = dig; + if (i == ilim) + break; + b = multadd(b, 10, 0); + if (mlo == mhi) + mlo = mhi = multadd(mhi, 10, 0); + else { + mlo = multadd(mlo, 10, 0); + mhi = multadd(mhi, 10, 0); + } + } + } + else + for(i = 1;; i++) { + *s++ = dig = quorem(b,S) + '0'; + if (i >= ilim) + break; + b = multadd(b, 10, 0); + } + + /* Round off last digit */ + + b = lshift(b, 1); + j = cmp(b, S); + if (j > 0 || (j == 0 && dig & 1)) { + roundoff: + while(*--s == '9') + if (s == s0) { + k++; + *s++ = '1'; + goto ret; + } + ++*s++; + } + else { + while(*--s == '0'); + s++; + } + ret: + Bfree(S); + if (mhi) { + if (mlo && mlo != mhi) + Bfree(mlo); + Bfree(mhi); + } + ret1: + Bfree(b); + if (s == s0) { /* don't return empty string */ + *s++ = '0'; + k = 0; + } + *s = 0; + *decpt = k + 1; + if (rve) + *rve = s; + return s0; +} + +#endif // QT_QLOCALE_USES_FCVT diff --git a/src/tools/tqlocale.h b/src/tools/tqlocale.h new file mode 100644 index 000000000..d3a578d1c --- /dev/null +++ b/src/tools/tqlocale.h @@ -0,0 +1,494 @@ +/**************************************************************************** +** +** Declaration of the TQLocale class +** +** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. +** +** This file is part of the tools module of the TQt GUI Toolkit. +** +** This file may be used under the terms of the GNU General +** Public License versions 2.0 or 3.0 as published by the Free +** Software Foundation and appearing in the files LICENSE.GPL2 +** and LICENSE.GPL3 included in the packaging of this file. +** Alternatively you may (at your option) use any later version +** of the GNU General Public License if such license has been +** publicly approved by Trolltech ASA (or its successors, if any) +** and the KDE Free TQt Foundation. +** +** Please review the following information to ensure GNU General +** Public Licensing requirements will be met: +** http://trolltech.com/products/qt/licenses/licensing/opensource/. +** If you are unsure which license is appropriate for your use, please +** review the following information: +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview +** or contact the sales department at sales@trolltech.com. +** +** This file may be used under the terms of the Q Public License as +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL +** included in the packaging of this file. Licensees holding valid TQt +** Commercial licenses may use this file in accordance with the TQt +** Commercial License Agreement provided with the Software. +** +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted +** herein. +** +**********************************************************************/ + +#ifndef TQLOCALE_H +#define TQLOCALE_H + +#include "tqstring.h" + +struct TQLocalePrivate; + +class TQ_EXPORT TQLocale +{ + friend class TQString; + +public: + enum Language { + C = 1, + Abkhazian = 2, + Afan = 3, + Afar = 4, + Afrikaans = 5, + Albanian = 6, + Amharic = 7, + Arabic = 8, + Armenian = 9, + Assamese = 10, + Aymara = 11, + Azerbaijani = 12, + Bashkir = 13, + Basque = 14, + Bengali = 15, + Bhutani = 16, + Bihari = 17, + Bislama = 18, + Breton = 19, + Bulgarian = 20, + Burmese = 21, + Byelorussian = 22, + Cambodian = 23, + Catalan = 24, + Chinese = 25, + Corsican = 26, + Croatian = 27, + Czech = 28, + Danish = 29, + Dutch = 30, + English = 31, + Esperanto = 32, + Estonian = 33, + Faroese = 34, + FijiLanguage = 35, + Finnish = 36, + French = 37, + Frisian = 38, + Gaelic = 39, + Galician = 40, + Georgian = 41, + German = 42, + Greek = 43, + Greenlandic = 44, + Guarani = 45, + Gujarati = 46, + Hausa = 47, + Hebrew = 48, + Hindi = 49, + Hungarian = 50, + Icelandic = 51, + Indonesian = 52, + Interlingua = 53, + Interlingue = 54, + Inuktitut = 55, + Inupiak = 56, + Irish = 57, + Italian = 58, + Japanese = 59, + Javanese = 60, + Kannada = 61, + Kashmiri = 62, + Kazakh = 63, + Kinyarwanda = 64, + Kirghiz = 65, + Korean = 66, + Kurdish = 67, + Kurundi = 68, + Laothian = 69, + Latin = 70, + Latvian = 71, + Lingala = 72, + Lithuanian = 73, + Macedonian = 74, + Malagasy = 75, + Malay = 76, + Malayalam = 77, + Maltese = 78, + Maori = 79, + Marathi = 80, + Moldavian = 81, + Mongolian = 82, + NauruLanguage = 83, + Nepali = 84, + Norwegian = 85, + Occitan = 86, + Oriya = 87, + Pashto = 88, + Persian = 89, + Polish = 90, + Portuguese = 91, + Punjabi = 92, + Quechua = 93, + RhaetoRomance = 94, + Romanian = 95, + Russian = 96, + Samoan = 97, + Sangho = 98, + Sanskrit = 99, + Serbian = 100, + SerboCroatian = 101, + Sesotho = 102, + Setswana = 103, + Shona = 104, + Sindhi = 105, + Singhalese = 106, + Siswati = 107, + Slovak = 108, + Slovenian = 109, + Somali = 110, + Spanish = 111, + Sundanese = 112, + Swahili = 113, + Swedish = 114, + Tagalog = 115, + Tajik = 116, + Tamil = 117, + Tatar = 118, + Telugu = 119, + Thai = 120, + Tibetan = 121, + Tigrinya = 122, + TongaLanguage = 123, + Tsonga = 124, + Turkish = 125, + Turkmen = 126, + Twi = 127, + Uigur = 128, + Ukrainian = 129, + Urdu = 130, + Uzbek = 131, + Vietnamese = 132, + Volapuk = 133, + Welsh = 134, + Wolof = 135, + Xhosa = 136, + Yiddish = 137, + Yoruba = 138, + Zhuang = 139, + Zulu = 140, + LastLanguage = Zulu + }; + + enum Country { + AnyCountry = 0, + Afghanistan = 1, + Albania = 2, + Algeria = 3, + AmericanSamoa = 4, + Andorra = 5, + Angola = 6, + Anguilla = 7, + Antarctica = 8, + AntiguaAndBarbuda = 9, + Argentina = 10, + Armenia = 11, + Aruba = 12, + Australia = 13, + Austria = 14, + Azerbaijan = 15, + Bahamas = 16, + Bahrain = 17, + Bangladesh = 18, + Barbados = 19, + Belarus = 20, + Belgium = 21, + Belize = 22, + Benin = 23, + Bermuda = 24, + Bhutan = 25, + Bolivia = 26, + BosniaAndHerzegowina = 27, + Botswana = 28, + BouvetIsland = 29, + Brazil = 30, + BritishIndianOceanTerritory = 31, + BruneiDarussalam = 32, + Bulgaria = 33, + BurkinaFaso = 34, + Burundi = 35, + Cambodia = 36, + Cameroon = 37, + Canada = 38, + CapeVerde = 39, + CaymanIslands = 40, + CentralAfricanRepublic = 41, + Chad = 42, + Chile = 43, + China = 44, + ChristmasIsland = 45, + CocosIslands = 46, + Colombia = 47, + Comoros = 48, + DemocraticRepublicOfCongo = 49, + PeoplesRepublicOfCongo = 50, + CookIslands = 51, + CostaRica = 52, + IvoryCoast = 53, + Croatia = 54, + Cuba = 55, + Cyprus = 56, + CzechRepublic = 57, + Denmark = 58, + Djibouti = 59, + Dominica = 60, + DominicanRepublic = 61, + EastTimor = 62, + Ecuador = 63, + Egypt = 64, + ElSalvador = 65, + EquatorialGuinea = 66, + Eritrea = 67, + Estonia = 68, + Ethiopia = 69, + FalklandIslands = 70, + FaroeIslands = 71, + FijiCountry = 72, + Finland = 73, + France = 74, + MetropolitanFrance = 75, + FrenchGuiana = 76, + FrenchPolynesia = 77, + FrenchSouthernTerritories = 78, + Gabon = 79, + Gambia = 80, + Georgia = 81, + Germany = 82, + Ghana = 83, + Gibraltar = 84, + Greece = 85, + Greenland = 86, + Grenada = 87, + Guadeloupe = 88, + Guam = 89, + Guatemala = 90, + Guinea = 91, + GuineaBissau = 92, + Guyana = 93, + Haiti = 94, + HeardAndMcDonaldIslands = 95, + Honduras = 96, + HongKong = 97, + Hungary = 98, + Iceland = 99, + India = 100, + Indonesia = 101, + Iran = 102, + Iraq = 103, + Ireland = 104, + Israel = 105, + Italy = 106, + Jamaica = 107, + Japan = 108, + Jordan = 109, + Kazakhstan = 110, + Kenya = 111, + Kiribati = 112, + DemocraticRepublicOfKorea = 113, + RepublicOfKorea = 114, + Kuwait = 115, + Kyrgyzstan = 116, + Lao = 117, + Latvia = 118, + Lebanon = 119, + Lesotho = 120, + Liberia = 121, + LibyanArabJamahiriya = 122, + Liechtenstein = 123, + Lithuania = 124, + Luxembourg = 125, + Macau = 126, + Macedonia = 127, + Madagascar = 128, + Malawi = 129, + Malaysia = 130, + Maldives = 131, + Mali = 132, + Malta = 133, + MarshallIslands = 134, + Martinique = 135, + Mauritania = 136, + Mauritius = 137, + Mayotte = 138, + Mexico = 139, + Micronesia = 140, + Moldova = 141, + Monaco = 142, + Mongolia = 143, + Montserrat = 144, + Morocco = 145, + Mozambique = 146, + Myanmar = 147, + Namibia = 148, + NauruCountry = 149, + Nepal = 150, + Netherlands = 151, + NetherlandsAntilles = 152, + NewCaledonia = 153, + NewZealand = 154, + Nicaragua = 155, + Niger = 156, + Nigeria = 157, + Niue = 158, + NorfolkIsland = 159, + NorthernMarianaIslands = 160, + Norway = 161, + Oman = 162, + Pakistan = 163, + Palau = 164, + PalestinianTerritory = 165, + Panama = 166, + PapuaNewGuinea = 167, + Paraguay = 168, + Peru = 169, + Philippines = 170, + Pitcairn = 171, + Poland = 172, + Portugal = 173, + PuertoRico = 174, + Qatar = 175, + Reunion = 176, + Romania = 177, + RussianFederation = 178, + Rwanda = 179, + SaintKittsAndNevis = 180, + StLucia = 181, + StVincentAndTheGrenadines = 182, + Samoa = 183, + SanMarino = 184, + SaoTomeAndPrincipe = 185, + SaudiArabia = 186, + Senegal = 187, + Seychelles = 188, + SierraLeone = 189, + Singapore = 190, + Slovakia = 191, + Slovenia = 192, + SolomonIslands = 193, + Somalia = 194, + SouthAfrica = 195, + SouthGeorgiaAndTheSouthSandwichIslands = 196, + Spain = 197, + SriLanka = 198, + StHelena = 199, + StPierreAndMiquelon = 200, + Sudan = 201, + Suriname = 202, + SvalbardAndJanMayenIslands = 203, + Swaziland = 204, + Sweden = 205, + Switzerland = 206, + SyrianArabRepublic = 207, + Taiwan = 208, + Tajikistan = 209, + Tanzania = 210, + Thailand = 211, + Togo = 212, + Tokelau = 213, + TongaCountry = 214, + TrinidadAndTobago = 215, + Tunisia = 216, + Turkey = 217, + Turkmenistan = 218, + TurksAndCaicosIslands = 219, + Tuvalu = 220, + Uganda = 221, + Ukraine = 222, + UnitedArabEmirates = 223, + UnitedKingdom = 224, + UnitedStates = 225, + UnitedStatesMinorOutlyingIslands = 226, + Uruguay = 227, + Uzbekistan = 228, + Vanuatu = 229, + VaticanCityState = 230, + Venezuela = 231, + VietNam = 232, + BritishVirginIslands = 233, + USVirginIslands = 234, + WallisAndFutunaIslands = 235, + WesternSahara = 236, + Yemen = 237, + Yugoslavia = 238, + Zambia = 239, + Zimbabwe = 240, + LastCountry = Zimbabwe + }; + + TQLocale(); + TQLocale(const TQString &name); + TQLocale(Language language, Country country = AnyCountry); + TQLocale(const TQLocale &other); + + TQLocale &operator=(const TQLocale &other); + + Language language() const; + Country country() const; + TQString name() const; + + short toShort(const TQString &s, bool *ok = 0) const; + ushort toUShort(const TQString &s, bool *ok = 0) const; + int toInt(const TQString &s, bool *ok = 0) const; + uint toUInt(const TQString &s, bool *ok = 0) const; + TQ_LONG toLong(const TQString &s, bool *ok = 0) const; + TQ_ULONG toULong(const TQString &s, bool *ok = 0) const; + TQ_LLONG toLongLong(const TQString &s, bool *ok = 0) const; + TQ_ULLONG toULongLong(const TQString &s, bool *ok = 0) const; + float toFloat(const TQString &s, bool *ok = 0) const; + double toDouble(const TQString &s, bool *ok = 0) const; + + TQString toString(short i) const + { return toString((TQ_LLONG)i); } + TQString toString(ushort i) const + { return toString((TQ_ULLONG)i); } + TQString toString(int i) const + { return toString((TQ_LLONG)i); } + TQString toString(uint i) const + { return toString((TQ_ULLONG)i); } +#if !defined(Q_OS_WIN64) + TQString toString(TQ_LONG i) const + { return toString((TQ_LLONG)i); } + TQString toString(TQ_ULONG i) const + { return toString((TQ_ULLONG)i); } +#endif + TQString toString(TQ_LLONG i) const; + TQString toString(TQ_ULLONG i) const; + TQString toString(float i, char f = 'g', int prec = 6) const + { return toString((double) i, f, prec); } + TQString toString(double i, char f = 'g', int prec = 6) const; + + static TQString languageToString(Language language); + static TQString countryToString(Country country); + static void setDefault(const TQLocale &locale); + + static TQLocale c() { return TQLocale(C); } + static TQLocale system(); + +private: + const TQLocalePrivate *d; + static const TQLocalePrivate *default_d; +}; + +#endif diff --git a/src/tools/tqlocale_p.h b/src/tools/tqlocale_p.h new file mode 100644 index 000000000..8d562d22c --- /dev/null +++ b/src/tools/tqlocale_p.h @@ -0,0 +1,131 @@ +/**************************************************************************** +** +** Declaration of the TQLocalePrivate class +** +** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. +** +** This file is part of the widgets module of the TQt GUI Toolkit. +** +** This file may be used under the terms of the GNU General +** Public License versions 2.0 or 3.0 as published by the Free +** Software Foundation and appearing in the files LICENSE.GPL2 +** and LICENSE.GPL3 included in the packaging of this file. +** Alternatively you may (at your option) use any later version +** of the GNU General Public License if such license has been +** publicly approved by Trolltech ASA (or its successors, if any) +** and the KDE Free TQt Foundation. +** +** Please review the following information to ensure GNU General +** Public Licensing requirements will be met: +** http://trolltech.com/products/qt/licenses/licensing/opensource/. +** If you are unsure which license is appropriate for your use, please +** review the following information: +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview +** or contact the sales department at sales@trolltech.com. +** +** This file may be used under the terms of the Q Public License as +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL +** included in the packaging of this file. Licensees holding valid TQt +** Commercial licenses may use this file in accordance with the TQt +** Commercial License Agreement provided with the Software. +** +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted +** herein. +** +**********************************************************************/ + +#ifndef TQLOCALE_P_H +#define TQLOCALE_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the TQt API. It exists for the convenience +// of internal files. This header file may change from version to version +// without notice, or even be removed. +// +// We mean it. +// +// + +#include + +struct TQLocalePrivate +{ +public: + const TQChar &decimal() const { return (TQChar&)m_decimal; } + const TQChar &group() const { return (TQChar&)m_group; } + const TQChar &list() const { return (TQChar&)m_list; } + const TQChar &percent() const { return (TQChar&)m_percent; } + const TQChar &zero() const { return (TQChar&)m_zero; } + TQChar plus() const { return TQChar('+'); } + const TQChar &minus() const { return (TQChar&)m_minus; } + const TQChar &exponential() const { return (TQChar&)m_exponential; } + TQString infinity() const; + TQString nan() const; + + TQ_UINT32 languageId() const { return m_language_id; } + TQ_UINT32 countryId() const { return m_country_id; } + + bool isDigit(TQChar d) const; + + enum GroupSeparatorMode { + FailOnGroupSeparators, + ParseGroupSeparators + }; + + enum DoubleForm { + DFExponent = 0, // %e or %E + DFDecimal, // %f or %F + DFSignificantDigits, // %g or %G + _DFMax = DFSignificantDigits + }; + + enum Flags { + NoFlags = 0, + + // These correspond to the options in a printf format string + Alternate = 0x01, + ZeroPadded = 0x02, + LeftAdjusted = 0x04, + BlankBeforePositive = 0x08, + AlwaysShowSign = 0x10, + ThousandsGroup = 0x20, + CapitalEorX = 0x40 // %x, %e, %f, %g vs. %X, %E, %F, %G + }; + + TQString doubleToString(double d, + int precision = -1, + DoubleForm form = DFSignificantDigits, + int width = -1, + unsigned flags = NoFlags) const; + TQString longLongToString(TQ_LLONG l, int precision = -1, + int base = 10, + int width = -1, + unsigned flags = NoFlags) const; + TQString unsLongLongToString(TQ_ULLONG l, int precision = -1, + int base = 10, + int width = -1, + unsigned flags = NoFlags) const; + double stringToDouble(TQString num, bool *ok, GroupSeparatorMode group_sep_mode) const; + TQ_LLONG stringToLongLong(TQString num, int base, bool *ok, GroupSeparatorMode group_sep_mode) const; + TQ_ULLONG stringToUnsLongLong(TQString num, int base, bool *ok, GroupSeparatorMode group_sep_mode) const; + bool removeGroupSeparators(TQString &num_str) const; + bool numberToCLocale(TQString &locale_num, GroupSeparatorMode group_sep_mode) const; + + TQ_UINT32 m_language_id, m_country_id; + + TQ_UINT16 m_decimal, m_group, m_list, m_percent, + m_zero, m_minus, m_exponential; + + static const TQString m_infinity; + static const TQString m_nan; + static const TQChar m_plus; + + static const char *systemLocaleName(); +}; + +#endif diff --git a/src/tools/tqstring.cpp b/src/tools/tqstring.cpp index 58a377cd7..546069d48 100644 --- a/src/tools/tqstring.cpp +++ b/src/tools/tqstring.cpp @@ -56,8 +56,8 @@ #ifndef TQT_NO_TEXTCODEC #include "tqtextcodec.h" #endif -#include "ntqlocale.h" -#include "qlocale_p.h" +#include "tqlocale.h" +#include "tqlocale_p.h" #include "qunicodetables_p.h" #include diff --git a/src/widgets/ntqlabel.h b/src/widgets/ntqlabel.h deleted file mode 100644 index f8d728807..000000000 --- a/src/widgets/ntqlabel.h +++ /dev/null @@ -1,174 +0,0 @@ -/********************************************************************** -** -** Definition of TQLabel widget class -** -** Created : 941215 -** -** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. -** -** This file is part of the widgets module of the TQt GUI Toolkit. -** -** This file may be used under the terms of the GNU General -** Public License versions 2.0 or 3.0 as published by the Free -** Software Foundation and appearing in the files LICENSE.GPL2 -** and LICENSE.GPL3 included in the packaging of this file. -** Alternatively you may (at your option) use any later version -** of the GNU General Public License if such license has been -** publicly approved by Trolltech ASA (or its successors, if any) -** and the KDE Free TQt Foundation. -** -** Please review the following information to ensure GNU General -** Public Licensing requirements will be met: -** http://trolltech.com/products/qt/licenses/licensing/opensource/. -** If you are unsure which license is appropriate for your use, please -** review the following information: -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview -** or contact the sales department at sales@trolltech.com. -** -** This file may be used under the terms of the Q Public License as -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL -** included in the packaging of this file. Licensees holding valid TQt -** Commercial licenses may use this file in accordance with the TQt -** Commercial License Agreement provided with the Software. -** -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted -** herein. -** -**********************************************************************/ - -#ifndef TQLABEL_H -#define TQLABEL_H - -#ifndef QT_H -#include "ntqframe.h" -#endif // QT_H - -#ifndef TQT_NO_LABEL - -class TQSimpleRichText; -class TQLabelPrivate; - -class TQ_EXPORT TQLabel : public TQFrame -{ - TQ_OBJECT - TQ_PROPERTY( TQString text READ text WRITE setText ) - TQ_PROPERTY( TextFormat textFormat READ textFormat WRITE setTextFormat ) - TQ_PROPERTY( TQPixmap pixmap READ pixmap WRITE setPixmap ) - TQ_PROPERTY( bool scaledContents READ hasScaledContents WRITE setScaledContents ) - TQ_PROPERTY( Alignment alignment READ alignment WRITE setAlignment ) - TQ_PROPERTY( int indent READ indent WRITE setIndent ) - TQ_OVERRIDE( BackgroundMode backgroundMode DESIGNABLE true) - -public: - TQLabel( TQWidget *parent, const char* name=0, WFlags f=0 ); - TQLabel( const TQString &text, TQWidget *parent, const char* name=0, - WFlags f=0 ); - TQLabel( TQWidget *buddy, const TQString &, - TQWidget *parent, const char* name=0, WFlags f=0 ); - ~TQLabel(); - - TQString text() const { return ltext; } - TQPixmap *pixmap() const { return lpixmap; } -#ifndef TQT_NO_PICTURE - TQPicture *picture() const { return lpicture; } -#endif -#ifndef TQT_NO_MOVIE - TQMovie *movie() const; -#endif - - TextFormat textFormat() const; - void setTextFormat( TextFormat ); - - int alignment() const { return align; } - virtual void setAlignment( int ); - int indent() const { return extraMargin; } - void setIndent( int ); - - bool autoResize() const { return autoresize; } - virtual void setAutoResize( bool ); -#ifndef TQT_NO_IMAGE_SMOOTHSCALE - bool hasScaledContents() const; - void setScaledContents( bool ); -#endif - TQSize sizeHint() const; - TQSize minimumSizeHint() const; -#ifndef TQT_NO_ACCEL - virtual void setBuddy( TQWidget * ); - TQWidget *buddy() const; -#endif - int heightForWidth(int) const; - - void setFont( const TQFont &f ); - -public slots: - virtual void setText( const TQString &); - virtual void setPixmap( const TQPixmap & ); -#ifndef TQT_NO_PICTURE - virtual void setPicture( const TQPicture & ); -#endif -#ifndef TQT_NO_MOVIE - virtual void setMovie( const TQMovie & ); -#endif - virtual void setNum( int ); - virtual void setNum( double ); - void clear(); - -protected: - void drawContents( TQPainter * ); - void fontChange( const TQFont & ); - void resizeEvent( TQResizeEvent* ); - -private slots: -#ifndef TQT_NO_ACCEL - void acceleratorSlot(); - void buddyDied(); -#endif -#ifndef TQT_NO_MOVIE - void movieUpdated(const TQRect&); - void movieResized(const TQSize&); -#endif - -private: - void init(); - void clearContents(); - void updateLabel( TQSize oldSizeHint ); - TQSize sizeForWidth( int w ) const; - TQString ltext; - TQPixmap *lpixmap; -#ifndef TQT_NO_PICTURE - TQPicture *lpicture; -#endif -#ifndef TQT_NO_MOVIE - TQMovie * lmovie; -#endif -#ifndef TQT_NO_ACCEL - TQWidget * lbuddy; -#endif - ushort align; - short extraMargin; - uint autoresize:1; - uint scaledcontents :1; - TextFormat textformat; -#ifndef TQT_NO_RICHTEXT - TQSimpleRichText* doc; -#endif -#ifndef TQT_NO_ACCEL - TQAccel * accel; -#endif - TQLabelPrivate* d; - - friend class TQTipLabel; - -private: // Disabled copy constructor and operator= -#if defined(TQ_DISABLE_COPY) - TQLabel( const TQLabel & ); - TQLabel &operator=( const TQLabel & ); -#endif -}; - - -#endif // TQT_NO_LABEL - -#endif // TQLABEL_H diff --git a/src/widgets/ntqsyntaxhighlighter.h b/src/widgets/ntqsyntaxhighlighter.h deleted file mode 100644 index 81556553e..000000000 --- a/src/widgets/ntqsyntaxhighlighter.h +++ /dev/null @@ -1,81 +0,0 @@ -/**************************************************************************** -** -** Definition of the TQSyntaxHighlighter class -** -** Created : 022407 -** -** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. -** -** This file is part of the widgets module of the TQt GUI Toolkit. -** -** This file may be used under the terms of the GNU General -** Public License versions 2.0 or 3.0 as published by the Free -** Software Foundation and appearing in the files LICENSE.GPL2 -** and LICENSE.GPL3 included in the packaging of this file. -** Alternatively you may (at your option) use any later version -** of the GNU General Public License if such license has been -** publicly approved by Trolltech ASA (or its successors, if any) -** and the KDE Free TQt Foundation. -** -** Please review the following information to ensure GNU General -** Public Licensing requirements will be met: -** http://trolltech.com/products/qt/licenses/licensing/opensource/. -** If you are unsure which license is appropriate for your use, please -** review the following information: -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview -** or contact the sales department at sales@trolltech.com. -** -** This file may be used under the terms of the Q Public License as -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL -** included in the packaging of this file. Licensees holding valid TQt -** Commercial licenses may use this file in accordance with the TQt -** Commercial License Agreement provided with the Software. -** -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted -** herein. -** -**********************************************************************/ - -#ifndef TQSYNTAXHIGHLIGHTER_H -#define TQSYNTAXHIGHLIGHTER_H - -#ifndef QT_H -#include "tqfont.h" -#include "tqcolor.h" -#include "tqstring.h" -#endif // QT_H - -class TQTextEdit; -class TQSyntaxHighlighterInternal; -class TQSyntaxHighlighterPrivate; -class TQTextParagraph; - -class TQ_EXPORT TQSyntaxHighlighter : public TQt -{ - friend class TQSyntaxHighlighterInternal; - -public: - TQSyntaxHighlighter( TQTextEdit *textEdit ); - virtual ~TQSyntaxHighlighter(); - - virtual int highlightParagraph( const TQString &text, int endStateOfLastPara ) = 0; - - void setFormat( int start, int count, const TQFont &font, const TQColor &color ); - void setFormat( int start, int count, const TQColor &color ); - void setFormat( int start, int count, const TQFont &font ); - TQTextEdit *textEdit() const { return edit; } - - void rehighlight(); - - int currentParagraph() const; - -private: - TQTextParagraph *para; - TQTextEdit *edit; - TQSyntaxHighlighterPrivate *d; - -}; - -#endif diff --git a/src/widgets/ntqwhatsthis.h b/src/widgets/ntqwhatsthis.h deleted file mode 100644 index 66b4b3c90..000000000 --- a/src/widgets/ntqwhatsthis.h +++ /dev/null @@ -1,81 +0,0 @@ -/**************************************************************************** -** -** Definition of TQWhatsThis class -** -** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. -** -** This file is part of the widgets module of the TQt GUI Toolkit. -** -** This file may be used under the terms of the GNU General -** Public License versions 2.0 or 3.0 as published by the Free -** Software Foundation and appearing in the files LICENSE.GPL2 -** and LICENSE.GPL3 included in the packaging of this file. -** Alternatively you may (at your option) use any later version -** of the GNU General Public License if such license has been -** publicly approved by Trolltech ASA (or its successors, if any) -** and the KDE Free TQt Foundation. -** -** Please review the following information to ensure GNU General -** Public Licensing requirements will be met: -** http://trolltech.com/products/qt/licenses/licensing/opensource/. -** If you are unsure which license is appropriate for your use, please -** review the following information: -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview -** or contact the sales department at sales@trolltech.com. -** -** This file may be used under the terms of the Q Public License as -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL -** included in the packaging of this file. Licensees holding valid TQt -** Commercial licenses may use this file in accordance with the TQt -** Commercial License Agreement provided with the Software. -** -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted -** herein. -** -**********************************************************************/ - -#ifndef TQWHATSTHIS_H -#define TQWHATSTHIS_H - -#ifndef QT_H -#include "tqobject.h" -#endif // QT_H - -#ifndef TQT_NO_WHATSTHIS - -#include "ntqcursor.h" - -class TQToolButton; -class TQPopupMenu; -class TQStyleSheet; - -class TQ_EXPORT TQWhatsThis: public TQt -{ -public: - TQWhatsThis( TQWidget *); - virtual ~TQWhatsThis(); - - virtual TQString text( const TQPoint & ); - virtual bool clicked( const TQString& href ); - - // the common static functions - static void setFont( const TQFont &font ); - - static void add( TQWidget *, const TQString &); - static void remove( TQWidget * ); - static TQString textFor( TQWidget *, const TQPoint & pos = TQPoint(), bool includeParents = FALSE ); - - static TQToolButton * whatsThisButton( TQWidget * parent ); - - static void enterWhatsThisMode(); - static bool inWhatsThisMode(); - static void leaveWhatsThisMode( const TQString& = TQString::null, const TQPoint& pos = TQCursor::pos(), TQWidget* w = 0 ); - - static void display( const TQString& text, const TQPoint& pos = TQCursor::pos(), TQWidget* w = 0 ); -}; - -#endif // TQT_NO_WHATSTHIS - -#endif // TQWHATSTHIS_H diff --git a/src/widgets/qlabel.cpp b/src/widgets/qlabel.cpp deleted file mode 100644 index 7f2c5cbae..000000000 --- a/src/widgets/qlabel.cpp +++ /dev/null @@ -1,1191 +0,0 @@ -/********************************************************************** -** -** Implementation of TQLabel widget class -** -** Created : 941215 -** -** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. -** -** This file is part of the widgets module of the TQt GUI Toolkit. -** -** This file may be used under the terms of the GNU General -** Public License versions 2.0 or 3.0 as published by the Free -** Software Foundation and appearing in the files LICENSE.GPL2 -** and LICENSE.GPL3 included in the packaging of this file. -** Alternatively you may (at your option) use any later version -** of the GNU General Public License if such license has been -** publicly approved by Trolltech ASA (or its successors, if any) -** and the KDE Free TQt Foundation. -** -** Please review the following information to ensure GNU General -** Public Licensing requirements will be met: -** http://trolltech.com/products/qt/licenses/licensing/opensource/. -** If you are unsure which license is appropriate for your use, please -** review the following information: -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview -** or contact the sales department at sales@trolltech.com. -** -** This file may be used under the terms of the Q Public License as -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL -** included in the packaging of this file. Licensees holding valid TQt -** Commercial licenses may use this file in accordance with the TQt -** Commercial License Agreement provided with the Software. -** -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted -** herein. -** -**********************************************************************/ - -#include "ntqlabel.h" -#ifndef TQT_NO_LABEL -#include "tqpainter.h" -#include "ntqdrawutil.h" -#include "ntqaccel.h" -#include "tqmovie.h" -#include "tqimage.h" -#include "tqbitmap.h" -#include "tqpicture.h" -#include "ntqapplication.h" -#include "ntqsimplerichtext.h" -#include "tqstylesheet.h" -#include "tqstyle.h" - -class TQLabelPrivate -{ -public: - TQLabelPrivate() - :img(0), pix(0), valid_hints( -1 ) - {} - TQImage* img; // for scaled contents - TQPixmap* pix; // for scaled contents - TQSize sh; - TQSize msh; - int valid_hints; // stores the frameWidth() for the stored size hint, -1 otherwise -}; - - -/*! - \class TQLabel ntqlabel.h - \brief The TQLabel widget provides a text or image display. - - \ingroup basic - \ingroup text - \mainclass - - TQLabel is used for displaying text or an image. No user - interaction functionality is provided. The visual appearance of - the label can be configured in various ways, and it can be used - for specifying a focus accelerator key for another widget. - - A TQLabel can contain any of the following content types: - \table - \header \i Content \i Setting - \row \i Plain text - \i Pass a TQString to setText(). - \row \i Rich text - \i Pass a TQString that contains rich text to setText(). - \row \i A pixmap - \i Pass a TQPixmap to setPixmap(). - \row \i A movie - \i Pass a TQMovie to setMovie(). - \row \i A number - \i Pass an \e int or a \e double to setNum(), which converts - the number to plain text. - \row \i Nothing - \i The same as an empty plain text. This is the default. Set - by clear(). - \endtable - - When the content is changed using any of these functions, any - previous content is cleared. - - The look of a TQLabel can be tuned in several ways. All the - settings of TQFrame are available for specifying a widget frame. - The positioning of the content within the TQLabel widget area can - be tuned with setAlignment() and setIndent(). For example, this - code sets up a sunken panel with a two-line text in the bottom - right corner (both lines being flush with the right side of the - label): - \code - TQLabel *label = new TQLabel( this ); - label->setFrameStyle( TQFrame::Panel | TQFrame::Sunken ); - label->setText( "first line\nsecond line" ); - label->setAlignment( AlignBottom | AlignRight ); - \endcode - - A TQLabel is often used as a label for an interactive widget. For - this use TQLabel provides a useful mechanism for adding an - accelerator key (see TQAccel) that will set the keyboard focus to - the other widget (called the TQLabel's "buddy"). For example: - \code - TQLineEdit* phoneEdit = new TQLineEdit( this, "phoneEdit" ); - TQLabel* phoneLabel = new TQLabel( phoneEdit, "&Phone:", this, "phoneLabel" ); - \endcode - - In this example, keyboard focus is transferred to the label's - buddy (the TQLineEdit) when the user presses Alt+P. You can - also use the setBuddy() function to accomplish the same thing. - - - - \sa TQLineEdit, TQTextEdit, TQPixmap, TQMovie, - \link guibooks.html#fowler GUI Design Handbook: Label\endlink -*/ - -/*! - \fn TQPicture * TQLabel::picture() const - - Returns the label's picture or 0 if the label doesn't have a - picture. -*/ - - -/*! - Constructs an empty label. - - The \a parent, \a name and widget flag \a f, arguments are passed - to the TQFrame constructor. - - \sa setAlignment(), setFrameStyle(), setIndent() -*/ - -TQLabel::TQLabel( TQWidget *parent, const char *name, WFlags f ) - : TQFrame( parent, name, f | WMouseNoMask ) -{ - init(); -} - - -/*! - Constructs a label that displays the text, \a text. - - The \a parent, \a name and widget flag \a f, arguments are passed - to the TQFrame constructor. - - \sa setText(), setAlignment(), setFrameStyle(), setIndent() -*/ - -TQLabel::TQLabel( const TQString &text, TQWidget *parent, const char *name, - WFlags f ) - : TQFrame( parent, name, f | WMouseNoMask ) -{ - init(); - setText( text ); -} - - -/*! - Constructs a label that displays the text \a text. The label has a - buddy widget, \a buddy. - - If the \a text contains an underlined letter (a letter preceded by - an ampersand, \&), and the text is in plain text format, when the - user presses Alt+ the underlined letter, focus is passed to the - buddy widget. - - The \a parent, \a name and widget flag, \a f, arguments are passed - to the TQFrame constructor. - - \sa setText(), setBuddy(), setAlignment(), setFrameStyle(), - setIndent() -*/ -TQLabel::TQLabel( TQWidget *buddy, const TQString &text, - TQWidget *parent, const char *name, WFlags f ) - : TQFrame( parent, name, f | WMouseNoMask ) -{ - init(); -#ifndef TQT_NO_ACCEL - setBuddy( buddy ); -#endif - setText( text ); -} - -/*! - Destroys the label. -*/ - -TQLabel::~TQLabel() -{ - clearContents(); - delete d; -} - - -void TQLabel::init() -{ - lpixmap = 0; -#ifndef TQT_NO_MOVIE - lmovie = 0; -#endif -#ifndef TQT_NO_ACCEL - lbuddy = 0; - accel = 0; -#endif - lpixmap = 0; -#ifndef TQT_NO_PICTURE - lpicture = 0; -#endif - align = AlignAuto | AlignVCenter | ExpandTabs; - extraMargin = -1; - autoresize = FALSE; - scaledcontents = FALSE; - textformat = TQt::AutoText; -#ifndef TQT_NO_RICHTEXT - doc = 0; -#endif - - setSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Preferred ) ); - d = new TQLabelPrivate; -} - - -/*! - \property TQLabel::text - \brief the label's text - - If no text has been set this will return an empty string. Setting - the text clears any previous content, unless they are the same. - - The text will be interpreted either as a plain text or as a rich - text, depending on the text format setting; see setTextFormat(). - The default setting is \c AutoText, i.e. TQLabel will try to - auto-detect the format of the text set. - - If the text is interpreted as a plain text and a buddy has been - set, the buddy accelerator key is updated from the new text. - - The label resizes itself if auto-resizing is enabled. - - Note that Qlabel is well-suited to display small rich text - documents, i.e. those small documents that get their document - specific settings (font, text color, link color) from the label's - palette and font properties. For large documents, use TQTextEdit - in read-only mode instead. TQTextEdit will flicker less on resize - and can also provide a scrollbar when necessary. - - \sa text, setTextFormat(), setBuddy(), alignment -*/ - -void TQLabel::setText( const TQString &text ) -{ - if ( ltext == text ) - return; - TQSize osh = sizeHint(); -#ifndef TQT_NO_RICHTEXT - bool hadRichtext = doc != 0; -#endif - clearContents(); - ltext = text; -#ifndef TQT_NO_RICHTEXT - bool useRichText = (textformat == RichText || - ( ( textformat == AutoText ) && TQStyleSheet::mightBeRichText(ltext) ) ); -#else - bool useRichText = TRUE; -#endif -#ifndef TQT_NO_ACCEL - // ### Setting accelerators for rich text labels will not work. - // Eg. >Hello will return ALT+G which is clearly - // not intended. - if ( !useRichText ) { - int p = TQAccel::shortcutKey( ltext ); - if ( p ) { - if ( !accel ) - accel = new TQAccel( this, "accel label accel" ); - accel->connectItem( accel->insertItem( p ), - this, TQ_SLOT(acceleratorSlot()) ); - } - } -#endif -#ifndef TQT_NO_RICHTEXT - if ( useRichText ) { - if ( !hadRichtext ) - align |= WordBreak; - TQString t = ltext; - if ( align & AlignRight ) - t.prepend( "

              "); - else if ( align & AlignHCenter ) - t.prepend( "
              "); - if ( (align & WordBreak) == 0 ) - t.prepend( "" ); - doc = new TQSimpleRichText( t, font() ); - } -#endif - - updateLabel( osh ); -} - - -/*! - Clears any label contents. Equivalent to setText( "" ). -*/ - -void TQLabel::clear() -{ - setText( TQString::fromLatin1("") ); -} - -/*! - \property TQLabel::pixmap - \brief the label's pixmap - - If no pixmap has been set this will return an invalid pixmap. - - Setting the pixmap clears any previous content, and resizes the - label if \l TQLabel::autoResize() is TRUE. The buddy accelerator, - if any, is disabled. -*/ -void TQLabel::setPixmap( const TQPixmap &pixmap ) -{ - TQSize osh = sizeHint(); - - if ( !lpixmap || lpixmap->serialNumber() != pixmap.serialNumber() ) { - clearContents(); - lpixmap = new TQPixmap( pixmap ); - } - - if ( lpixmap->depth() == 1 && !lpixmap->mask() ) - lpixmap->setMask( *((TQBitmap *)lpixmap) ); - - updateLabel( osh ); -} - -#ifndef TQT_NO_PICTURE -/*! - Sets the label contents to \a picture. Any previous content is - cleared. - - The buddy accelerator, if any, is disabled. - - \sa picture(), setBuddy() -*/ - -void TQLabel::setPicture( const TQPicture &picture ) -{ - TQSize osh = sizeHint(); - clearContents(); - lpicture = new TQPicture( picture ); - - updateLabel( osh ); -} -#endif // TQT_NO_PICTURE - -/*! - Sets the label contents to plain text containing the textual - representation of integer \a num. Any previous content is cleared. - Does nothing if the integer's string representation is the same as - the current contents of the label. - - The buddy accelerator, if any, is disabled. - - The label resizes itself if auto-resizing is enabled. - - \sa setText(), TQString::setNum(), setBuddy() -*/ - -void TQLabel::setNum( int num ) -{ - TQString str; - str.setNum( num ); - setText( str ); -} - -/*! - \overload - - Sets the label contents to plain text containing the textual - representation of double \a num. Any previous content is cleared. - Does nothing if the double's string representation is the same as - the current contents of the label. - - The buddy accelerator, if any, is disabled. - - The label resizes itself if auto-resizing is enabled. - - \sa setText(), TQString::setNum(), setBuddy() -*/ - -void TQLabel::setNum( double num ) -{ - TQString str; - str.setNum( num ); - setText( str ); -} - -/*! - \property TQLabel::alignment - \brief the alignment of the label's contents - - The alignment is a bitwise OR of \c TQt::AlignmentFlags and \c - TQt::TextFlags values. The \c ExpandTabs, \c SingleLine and \c - ShowPrefix flags apply only if the label contains plain text; - otherwise they are ignored. The \c DontClip flag is always - ignored. \c WordBreak applies to both rich text and plain text - labels. The \c BreakAnywhere flag is not supported in TQLabel. - - If the label has a buddy, the \c ShowPrefix flag is forced to - TRUE. - - The default alignment is \c{AlignAuto | AlignVCenter | ExpandTabs} - if the label doesn't have a buddy and \c{AlignAuto | AlignVCenter - | ExpandTabs | ShowPrefix} if the label has a buddy. If the label - contains rich text, additionally \c WordBreak is turned on. - - \sa TQt::AlignmentFlags, alignment, setBuddy(), text -*/ - -void TQLabel::setAlignment( int alignment ) -{ - if ( alignment == align ) - return; - TQSize osh = sizeHint(); -#ifndef TQT_NO_ACCEL - if ( lbuddy ) - align = alignment | ShowPrefix; - else -#endif - align = alignment; - -#ifndef TQT_NO_RICHTEXT - TQString t = ltext; - if ( !t.isNull() ) { - ltext = TQString::null; - setText( t ); - } -#endif - - updateLabel( osh ); -} - - -/*! - \property TQLabel::indent - \brief the label's text indent in pixels - - If a label displays text, the indent applies to the left edge if - alignment() is \c AlignLeft, to the right edge if alignment() is - \c AlignRight, to the top edge if alignment() is \c AlignTop, and - to to the bottom edge if alignment() is \c AlignBottom. - - If indent is negative, or if no indent has been set, the label - computes the effective indent as follows: If frameWidth() is 0, - the effective indent becomes 0. If frameWidth() is greater than 0, - the effective indent becomes half the width of the "x" character - of the widget's current font(). - - \sa alignment, frameWidth(), font() -*/ - -void TQLabel::setIndent( int indent ) -{ - extraMargin = indent; - updateLabel( TQSize( -1, -1 ) ); -} - - -/*! - \fn bool TQLabel::autoResize() const - - \obsolete - - Returns TRUE if auto-resizing is enabled, or FALSE if auto-resizing - is disabled. - - Auto-resizing is disabled by default. - - \sa setAutoResize() -*/ - -/*! \obsolete - Enables auto-resizing if \a enable is TRUE, or disables it if \a - enable is FALSE. - - When auto-resizing is enabled the label will resize itself to fit - the contents whenever the contents change. The top-left corner is - not moved. This is useful for TQLabel widgets that are not managed by - a TQLayout (e.g., top-level widgets). - - Auto-resizing is disabled by default. - - \sa autoResize(), adjustSize(), sizeHint() -*/ - -void TQLabel::setAutoResize( bool enable ) -{ - if ( (bool)autoresize != enable ) { - autoresize = enable; - if ( autoresize ) - adjustSize(); // calls resize which repaints - } -} - - - -/*! - Returns the size that will be used if the width of the label is \a - w. If \a w is -1, the sizeHint() is returned. -*/ - -TQSize TQLabel::sizeForWidth( int w ) const -{ - TQRect br; - TQPixmap *pix = pixmap(); -#ifndef TQT_NO_PICTURE - TQPicture *pic = picture(); -#else - const int pic = 0; -#endif -#ifndef TQT_NO_MOVIE - TQMovie *mov = movie(); -#else - const int mov = 0; -#endif - int hextra = 2 * frameWidth(); - int vextra = hextra; - TQFontMetrics fm( fontMetrics() ); - int xw = fm.width( 'x' ); - if ( !mov && !pix && !pic ) { - int m = indent(); - if ( m < 0 && hextra ) // no indent, but we do have a frame - m = xw / 2 - margin(); - if ( m >= 0 ) { - int horizAlign = TQApplication::horizontalAlignment( align ); - if ( (horizAlign & AlignLeft) || (horizAlign & AlignRight ) ) - hextra += m; - if ( (align & AlignTop) || (align & AlignBottom ) ) - vextra += m; - } - } - - if ( pix ) - br = pix->rect(); -#ifndef TQT_NO_PICTURE - else if ( pic ) - br = pic->boundingRect(); -#endif -#ifndef TQT_NO_MOVIE - else if ( mov ) - br = mov->framePixmap().rect(); -#endif -#ifndef TQT_NO_RICHTEXT - else if ( doc ) { - int oldW = doc->width(); - if ( align & WordBreak ) { - if ( w < 0 ) - doc->adjustSize(); - else - doc->setWidth( w-hextra ); - } - br = TQRect( 0, 0, doc->widthUsed(), doc->height() ); - doc->setWidth( oldW ); - } -#endif - else { - bool tryWidth = (w < 0) && (align & WordBreak); - if ( tryWidth ) - w = xw * 80; - else if ( w < 0 ) - w = 2000; - w -= hextra; - br = fm.boundingRect( 0, 0, w ,2000, alignment(), text() ); - if ( tryWidth && br.height() < 4*fm.lineSpacing() && br.width() > w/2 ) - br = fm.boundingRect( 0, 0, w/2, 2000, alignment(), text() ); - if ( tryWidth && br.height() < 2*fm.lineSpacing() && br.width() > w/4 ) - br = fm.boundingRect( 0, 0, w/4, 2000, alignment(), text() ); - } - int wid = br.width() + hextra; - int hei = br.height() + vextra; - - return TQSize( wid, hei ); -} - - -/*! - \reimp -*/ - -int TQLabel::heightForWidth( int w ) const -{ - if ( -#ifndef TQT_NO_RICHTEXT - doc || -#endif - (align & WordBreak) ) - return sizeForWidth( w ).height(); - return TQWidget::heightForWidth( w ); -} - - - -/*!\reimp -*/ -TQSize TQLabel::sizeHint() const -{ - if ( d->valid_hints != frameWidth() ) - (void) TQLabel::minimumSizeHint(); - return d->sh; -} - -/*! - \reimp -*/ - -TQSize TQLabel::minimumSizeHint() const -{ - if ( d->valid_hints == frameWidth() ) - return d->msh; - - constPolish(); - d->valid_hints = frameWidth(); - d->sh = sizeForWidth( -1 ); - TQSize sz( -1, -1 ); - - if ( -#ifndef TQT_NO_RICHTEXT - !doc && -#endif - (align & WordBreak) == 0 ) { - sz = d->sh; - } else { - // think about caching these for performance - sz.rwidth() = sizeForWidth( 0 ).width(); - sz.rheight() = sizeForWidth(TQWIDGETSIZE_MAX).height(); - if ( d->sh.height() < sz.height() ) - sz.rheight() = d->sh.height(); - } - if ( sizePolicy().horData() == TQSizePolicy::Ignored ) - sz.rwidth() = -1; - if ( sizePolicy().verData() == TQSizePolicy::Ignored ) - sz.rheight() = -1; - d->msh = sz; - return sz; -} - -/*! - \reimp -*/ -void TQLabel::resizeEvent( TQResizeEvent* e ) -{ - TQFrame::resizeEvent( e ); - -#ifdef TQT_NO_RICHTEXT - static const bool doc = FALSE; -#endif - - // optimize for standard labels - if ( frameShape() == NoFrame && (align & WordBreak) == 0 && !doc && - ( e->oldSize().width() >= e->size().width() && (align & AlignLeft ) == AlignLeft ) - && ( e->oldSize().height() >= e->size().height() && (align & AlignTop ) == AlignTop ) ) { - setWFlags( WResizeNoErase ); - return; - } - - clearWFlags( WResizeNoErase ); - TQRect cr = contentsRect(); - if ( !lpixmap || !cr.isValid() || - // masked pixmaps can only reduce flicker when being top/left - // aligned and when we do not perform scaled contents - ( lpixmap->hasAlpha() && ( scaledcontents || ( ( align & (AlignLeft|AlignTop) ) != (AlignLeft|AlignTop) ) ) ) ) - return; - - setWFlags( WResizeNoErase ); - - if ( !scaledcontents ) { - // don't we all love TQFrame? Reduce pixmap flicker - TQRegion reg = TQRect( TQPoint(0, 0), e->size() ); - reg = reg.subtract( cr ); - int x = cr.x(); - int y = cr.y(); - int w = lpixmap->width(); - int h = lpixmap->height(); - if ( (align & TQt::AlignVCenter) == TQt::AlignVCenter ) - y += cr.height()/2 - h/2; - else if ( (align & TQt::AlignBottom) == TQt::AlignBottom) - y += cr.height() - h; - if ( (align & TQt::AlignRight) == TQt::AlignRight ) - x += cr.width() - w; - else if ( (align & TQt::AlignHCenter) == TQt::AlignHCenter ) - x += cr.width()/2 - w/2; - if ( x > cr.x() ) - reg = reg.unite( TQRect( cr.x(), cr.y(), x - cr.x(), cr.height() ) ); - if ( y > cr.y() ) - reg = reg.unite( TQRect( cr.x(), cr.y(), cr.width(), y - cr.y() ) ); - - if ( x + w < cr.right() ) - reg = reg.unite( TQRect( x + w, cr.y(), cr.right() - x - w, cr.height() ) ); - if ( y + h < cr.bottom() ) - reg = reg.unite( TQRect( cr.x(), y + h, cr.width(), cr.bottom() - y - h ) ); - - erase( reg ); - } -} - - -/*! - Draws the label contents using the painter \a p. -*/ - -void TQLabel::drawContents( TQPainter *p ) -{ - TQRect cr = contentsRect(); - - TQPixmap *pix = pixmap(); -#ifndef TQT_NO_PICTURE - TQPicture *pic = picture(); -#else - const int pic = 0; -#endif -#ifndef TQT_NO_MOVIE - TQMovie *mov = movie(); -#else - const int mov = 0; -#endif - - if ( !mov && !pix && !pic ) { - int m = indent(); - if ( m < 0 && frameWidth() ) // no indent, but we do have a frame - m = fontMetrics().width('x') / 2 - margin(); - if ( m > 0 ) { - int hAlign = TQApplication::horizontalAlignment( align ); - if ( hAlign & AlignLeft ) - cr.setLeft( cr.left() + m ); - if ( hAlign & AlignRight ) - cr.setRight( cr.right() - m ); - if ( align & AlignTop ) - cr.setTop( cr.top() + m ); - if ( align & AlignBottom ) - cr.setBottom( cr.bottom() - m ); - } - } - -#ifndef TQT_NO_MOVIE - if ( mov ) { - // ### should add movie to qDrawItem - TQRect r = style().itemRect( p, cr, align, isEnabled(), &(mov->framePixmap()), - TQString::null ); - // ### could resize movie frame at this point - p->drawPixmap(r.x(), r.y(), mov->framePixmap() ); - } - else -#endif -#ifndef TQT_NO_RICHTEXT - if ( doc ) { - doc->setWidth(p, cr.width() ); - int rh = doc->height(); - int yo = 0; - if ( align & AlignVCenter ) - yo = (cr.height()-rh)/2; - else if ( align & AlignBottom ) - yo = cr.height()-rh; - if (! isEnabled() && - style().styleHint(TQStyle::SH_EtchDisabledText, this)) { - TQColorGroup cg = colorGroup(); - cg.setColor( TQColorGroup::Text, cg.light() ); - doc->draw(p, cr.x()+1, cr.y()+yo+1, cr, cg, 0); - } - - // TQSimpleRichText always draws with TQColorGroup::Text as with - // background mode PaletteBase. TQLabel typically has - // background mode PaletteBackground, so we create a temporary - // color group with the text color adjusted. - TQColorGroup cg = colorGroup(); - if ( backgroundMode() != PaletteBase && isEnabled() ) - cg.setColor( TQColorGroup::Text, paletteForegroundColor() ); - - doc->draw(p, cr.x(), cr.y()+yo, cr, cg, 0); - } else -#endif -#ifndef TQT_NO_PICTURE - if ( pic ) { - TQRect br = pic->boundingRect(); - int rw = br.width(); - int rh = br.height(); - if ( scaledcontents ) { - p->save(); - p->translate( cr.x(), cr.y() ); -#ifndef TQT_NO_TRANSFORMATIONS - p->scale( (double)cr.width()/rw, (double)cr.height()/rh ); -#endif - p->drawPicture( -br.x(), -br.y(), *pic ); - p->restore(); - } else { - int xo = 0; - int yo = 0; - if ( align & AlignVCenter ) - yo = (cr.height()-rh)/2; - else if ( align & AlignBottom ) - yo = cr.height()-rh; - if ( align & AlignRight ) - xo = cr.width()-rw; - else if ( align & AlignHCenter ) - xo = (cr.width()-rw)/2; - p->drawPicture( cr.x()+xo-br.x(), cr.y()+yo-br.y(), *pic ); - } - } else -#endif - { -#ifndef TQT_NO_IMAGE_SMOOTHSCALE - if ( scaledcontents && pix ) { - if ( !d->img ) - d->img = new TQImage( lpixmap->convertToImage() ); - - if ( !d->pix ) - d->pix = new TQPixmap; - if ( d->pix->size() != cr.size() ) - d->pix->convertFromImage( d->img->smoothScale( cr.width(), cr.height() ) ); - pix = d->pix; - } -#endif - int alignment = align; - if ((align & ShowPrefix) && ((!style().styleHint(TQStyle::SH_UnderlineAccelerator, this)) || ((style().styleHint(TQStyle::SH_HideUnderlineAcceleratorWhenAltUp, this)) && (!style().acceleratorsShown())))) { - alignment |= NoAccel; - } - // ordinary text or pixmap label - style().drawItem( p, cr, alignment, colorGroup(), isEnabled(), - pix, ltext ); - } -} - - -/*! - Updates the label, but not the frame. -*/ - -void TQLabel::updateLabel( TQSize oldSizeHint ) -{ - d->valid_hints = -1; - TQSizePolicy policy = sizePolicy(); - bool wordBreak = align & WordBreak; - policy.setHeightForWidth( wordBreak ); - if ( policy != sizePolicy() ) - setSizePolicy( policy ); - if ( sizeHint() != oldSizeHint ) - updateGeometry(); - if ( autoresize ) { - adjustSize(); - update( contentsRect() ); - } else { - update( contentsRect() ); - } -} - - -/*! - \internal - - Internal slot, used to set focus for accelerator labels. -*/ -#ifndef TQT_NO_ACCEL -void TQLabel::acceleratorSlot() -{ - if ( !lbuddy ) - return; - TQWidget * w = lbuddy; - while ( w->focusProxy() ) - w = w->focusProxy(); - if ( !w->hasFocus() && - w->isEnabled() && - w->isVisible() && - w->focusPolicy() != NoFocus ) { - TQFocusEvent::setReason( TQFocusEvent::Shortcut ); - w->setFocus(); - TQFocusEvent::resetReason(); - } -} -#endif - -/*! - \internal - - Internal slot, used to clean up if the buddy widget dies. -*/ -#ifndef TQT_NO_ACCEL -void TQLabel::buddyDied() // I can't remember if I cried. -{ - lbuddy = 0; -} - -/*! - Sets this label's buddy to \a buddy. - - When the user presses the accelerator key indicated by this label, - the keyboard focus is transferred to the label's buddy widget. - - The buddy mechanism is only available for TQLabels that contain - plain text in which one letter is prefixed with an ampersand, \&. - This letter is set as the accelerator key. The letter is displayed - underlined, and the '\&' is not displayed (i.e. the \c ShowPrefix - alignment flag is turned on; see setAlignment()). - - In a dialog, you might create two data entry widgets and a label - for each, and set up the geometry layout so each label is just to - the left of its data entry widget (its "buddy"), for example: - \code - TQLineEdit *nameEd = new TQLineEdit( this ); - TQLabel *nameLb = new TQLabel( "&Name:", this ); - nameLb->setBuddy( nameEd ); - TQLineEdit *phoneEd = new TQLineEdit( this ); - TQLabel *phoneLb = new TQLabel( "&Phone:", this ); - phoneLb->setBuddy( phoneEd ); - // ( layout setup not shown ) - \endcode - - With the code above, the focus jumps to the Name field when the - user presses Alt+N, and to the Phone field when the user presses - Alt+P. - - To unset a previously set buddy, call this function with \a buddy - set to 0. - - \sa buddy(), setText(), TQAccel, setAlignment() -*/ - -void TQLabel::setBuddy( TQWidget *buddy ) -{ - if ( buddy ) - setAlignment( alignment() | ShowPrefix ); - else - setAlignment( alignment() & ~ShowPrefix ); - - if ( lbuddy ) - disconnect( lbuddy, TQ_SIGNAL(destroyed()), this, TQ_SLOT(buddyDied()) ); - - lbuddy = buddy; - - if ( !lbuddy ) - return; -#ifndef TQT_NO_RICHTEXT - if ( !( textformat == RichText || (textformat == AutoText && - TQStyleSheet::mightBeRichText(ltext) ) ) ) -#endif - { - int p = TQAccel::shortcutKey( ltext ); - if ( p ) { - if ( !accel ) - accel = new TQAccel( this, "accel label accel" ); - accel->connectItem( accel->insertItem( p ), - this, TQ_SLOT(acceleratorSlot()) ); - } - } - - connect( lbuddy, TQ_SIGNAL(destroyed()), this, TQ_SLOT(buddyDied()) ); -} - - -/*! - Returns this label's buddy, or 0 if no buddy is currently set. - - \sa setBuddy() -*/ - -TQWidget * TQLabel::buddy() const -{ - return lbuddy; -} -#endif //TQT_NO_ACCEL - - -#ifndef TQT_NO_MOVIE -void TQLabel::movieUpdated(const TQRect& rect) -{ - TQMovie *mov = movie(); - if ( mov && !mov->isNull() ) { - TQRect r = contentsRect(); - r = style().itemRect( 0, r, align, isEnabled(), &(mov->framePixmap()), - TQString::null ); - r.moveBy(rect.x(), rect.y()); - r.setWidth(TQMIN(r.width(), rect.width())); - r.setHeight(TQMIN(r.height(), rect.height())); - repaint( r, mov->framePixmap().mask() != 0 ); - } -} - -void TQLabel::movieResized( const TQSize& size ) -{ - d->valid_hints = -1; - if ( autoresize ) - adjustSize(); - movieUpdated( TQRect( TQPoint(0,0), size ) ); - updateGeometry(); -} - -/*! - Sets the label contents to \a movie. Any previous content is - cleared. - - The buddy accelerator, if any, is disabled. - - The label resizes itself if auto-resizing is enabled. - - \sa movie(), setBuddy() -*/ - -void TQLabel::setMovie( const TQMovie& movie ) -{ - TQSize osh = sizeHint(); - clearContents(); - - lmovie = new TQMovie( movie ); - lmovie->connectResize(this, TQ_SLOT(movieResized(const TQSize&))); - lmovie->connectUpdate(this, TQ_SLOT(movieUpdated(const TQRect&))); - - if ( !lmovie->running() ) // Assume that if the movie is running, - updateLabel( osh ); // resize/update signals will come soon enough -} - -#endif // TQT_NO_MOVIE - -/*! - \internal - - Clears any contents, without updating/repainting the label. -*/ - -void TQLabel::clearContents() -{ -#ifndef TQT_NO_RICHTEXT - delete doc; - doc = 0; -#endif - - delete lpixmap; - lpixmap = 0; -#ifndef TQT_NO_PICTURE - delete lpicture; - lpicture = 0; -#endif - delete d->img; - d->img = 0; - delete d->pix; - d->pix = 0; - - ltext = TQString::null; -#ifndef TQT_NO_ACCEL - if ( accel ) - accel->clear(); -#endif -#ifndef TQT_NO_MOVIE - if ( lmovie ) { - lmovie->disconnectResize(this, TQ_SLOT(movieResized(const TQSize&))); - lmovie->disconnectUpdate(this, TQ_SLOT(movieUpdated(const TQRect&))); - delete lmovie; - lmovie = 0; - } -#endif -} - - -#ifndef TQT_NO_MOVIE - -/*! - Returns a pointer to the label's movie, or 0 if no movie has been - set. - - \sa setMovie() -*/ - -TQMovie* TQLabel::movie() const -{ - return lmovie; -} - -#endif // TQT_NO_MOVIE - -/*! - \property TQLabel::backgroundMode - \brief the label's background mode - - Get this property with backgroundMode(). - - \sa TQWidget::setBackgroundMode() -*/ - -/*! - \property TQLabel::textFormat - \brief the label's text format - - See the \c TQt::TextFormat enum for an explanation of the possible - options. - - The default format is \c AutoText. - - \sa text -*/ - -TQt::TextFormat TQLabel::textFormat() const -{ - return textformat; -} - -void TQLabel::setTextFormat( TQt::TextFormat format ) -{ - if ( format != textformat ) { - textformat = format; - TQString t = ltext; - if ( !t.isNull() ) { - ltext = TQString::null; - setText( t ); - } - } -} - -/*! - \reimp -*/ - -void TQLabel::fontChange( const TQFont & ) -{ - if ( !ltext.isEmpty() ) { -#ifndef TQT_NO_RICHTEXT - if ( doc ) - doc->setDefaultFont( font() ); -#endif - updateLabel( TQSize( -1, -1 ) ); - } -} - -#ifndef TQT_NO_IMAGE_SMOOTHSCALE -/*! - \property TQLabel::scaledContents - \brief whether the label will scale its contents to fill all - available space. - - When enabled and the label shows a pixmap, it will scale the - pixmap to fill the available space. - - This property's default is FALSE. - - \sa setScaledContents() -*/ -bool TQLabel::hasScaledContents() const -{ - return scaledcontents; -} - -void TQLabel::setScaledContents( bool enable ) -{ - if ( (bool)scaledcontents == enable ) - return; - scaledcontents = enable; - if ( !enable ) { - delete d->img; - d->img = 0; - delete d->pix; - d->pix = 0; - } - update( contentsRect() ); -} - -#endif // TQT_NO_IMAGE_SMOOTHSCALE - -/*! - Sets the font used on the TQLabel to font \a f. -*/ - -void TQLabel::setFont( const TQFont &f ) -{ - TQFrame::setFont( f ); -} - -#endif // TQT_NO_LABEL diff --git a/src/widgets/qlineedit.cpp b/src/widgets/qlineedit.cpp index 75570cc09..d37c43539 100644 --- a/src/widgets/qlineedit.cpp +++ b/src/widgets/qlineedit.cpp @@ -59,7 +59,7 @@ #include "tqstringlist.h" #include "ntqguardedptr.h" #include "tqstyle.h" -#include "ntqwhatsthis.h" +#include "tqwhatsthis.h" #include "../kernel/qinternal_p.h" #include "private/tqtextlayout_p.h" #include "tqvaluevector.h" diff --git a/src/widgets/qsyntaxhighlighter.cpp b/src/widgets/qsyntaxhighlighter.cpp deleted file mode 100644 index d9fececf1..000000000 --- a/src/widgets/qsyntaxhighlighter.cpp +++ /dev/null @@ -1,221 +0,0 @@ -/**************************************************************************** -** -** Implementation of the TQSyntaxHighlighter class -** -** Created : 990101 -** -** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. -** -** This file is part of the widgets module of the TQt GUI Toolkit. -** -** This file may be used under the terms of the GNU General -** Public License versions 2.0 or 3.0 as published by the Free -** Software Foundation and appearing in the files LICENSE.GPL2 -** and LICENSE.GPL3 included in the packaging of this file. -** Alternatively you may (at your option) use any later version -** of the GNU General Public License if such license has been -** publicly approved by Trolltech ASA (or its successors, if any) -** and the KDE Free TQt Foundation. -** -** Please review the following information to ensure GNU General -** Public Licensing requirements will be met: -** http://trolltech.com/products/qt/licenses/licensing/opensource/. -** If you are unsure which license is appropriate for your use, please -** review the following information: -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview -** or contact the sales department at sales@trolltech.com. -** -** This file may be used under the terms of the Q Public License as -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL -** included in the packaging of this file. Licensees holding valid TQt -** Commercial licenses may use this file in accordance with the TQt -** Commercial License Agreement provided with the Software. -** -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted -** herein. -** -**********************************************************************/ - -#include "ntqsyntaxhighlighter.h" -#include "private/qsyntaxhighlighter_p.h" - -#ifndef TQT_NO_SYNTAXHIGHLIGHTER -#include "../kernel/qrichtext_p.h" -#include "tqtextedit.h" -#include "tqtimer.h" - -/*! - \class TQSyntaxHighlighter ntqsyntaxhighlighter.h - \brief The TQSyntaxHighlighter class is a base class for - implementing TQTextEdit syntax highlighters. - - \ingroup basic - \ingroup text - - A syntax highligher automatically highlights parts of the text in - a TQTextEdit. Syntax highlighters are often used when the user is - entering text in a specific format (for example, source code) and - help the user to read the text and identify syntax errors. - - To provide your own syntax highlighting for TQTextEdit, you must - subclass TQSyntaxHighlighter and reimplement highlightParagraph(). - - When you create an instance of your TQSyntaxHighlighter subclass, - pass it the TQTextEdit that you want the syntax highlighting to be - applied to. After this your highlightParagraph() function will be - called automatically whenever necessary. Use your - highlightParagraph() function to apply formatting (e.g. setting - the font and color) to the text that is passed to it. -*/ - -/*! - Constructs the TQSyntaxHighlighter and installs it on \a textEdit. - - It is the caller's responsibility to delete the - TQSyntaxHighlighter when it is no longer needed. -*/ - -TQSyntaxHighlighter::TQSyntaxHighlighter( TQTextEdit *textEdit ) - : para( 0 ), edit( textEdit ), d( new TQSyntaxHighlighterPrivate ) -{ - textEdit->document()->setPreProcessor( new TQSyntaxHighlighterInternal( this ) ); - textEdit->document()->invalidate(); - TQTimer::singleShot( 0, textEdit->viewport(), TQ_SLOT( update() ) ); -} - -/*! - Destructor. Uninstalls this syntax highlighter from the textEdit() -*/ - -TQSyntaxHighlighter::~TQSyntaxHighlighter() -{ - delete d; - textEdit()->document()->setPreProcessor( 0 ); -} - -/*! - \fn int TQSyntaxHighlighter::highlightParagraph( const TQString &text, int endStateOfLastPara ) - - This function is called when necessary by the rich text engine, - i.e. on paragraphs which have changed. - - In your reimplementation you should parse the paragraph's \a text - and call setFormat() as often as necessary to apply any font and - color changes that you require. Your function must return a value - which indicates the paragraph's end state: see below. - - Some syntaxes can have constructs that span paragraphs. For - example, a C++ syntax highlighter should be able to cope with - \c{/}\c{*...*}\c{/} comments that span paragraphs. To deal - with these cases it is necessary to know the end state of the - previous paragraph (e.g. "in comment"). - - If your syntax does not have paragraph spanning constructs, simply - ignore the \a endStateOfLastPara parameter and always return 0. - - Whenever highlightParagraph() is called it is passed a value for - \a endStateOfLastPara. For the very first paragraph this value is - always -2. For any other paragraph the value is the value returned - by the most recent highlightParagraph() call that applied to the - preceding paragraph. - - The value you return is up to you. We recommend only returning 0 - (to signify that this paragraph's syntax highlighting does not - affect the following paragraph), or a positive integer (to signify - that this paragraph has ended in the middle of a paragraph - spanning construct). - - To find out which paragraph is highlighted, call - currentParagraph(). - - For example, if you're writing a simple C++ syntax highlighter, - you might designate 1 to signify "in comment". For a paragraph - that ended in the middle of a comment you'd return 1, and for - other paragraphs you'd return 0. In your parsing code if \a - endStateOfLastPara was 1, you would highlight the text as a C++ - comment until you reached the closing \c{*}\c{/}. -*/ - -/*! - This function is applied to the syntax highlighter's current - paragraph (the text of which is passed to the highlightParagraph() - function). - - The specified \a font and \a color are applied to the text from - position \a start for \a count characters. (If \a count is 0, - nothing is done.) -*/ - -void TQSyntaxHighlighter::setFormat( int start, int count, const TQFont &font, const TQColor &color ) -{ - if ( !para || count <= 0 ) - return; - TQTextFormat *f = 0; - f = para->document()->formatCollection()->format( font, color ); - para->setFormat( start, count, f ); - f->removeRef(); -} - -/*! \overload */ - -void TQSyntaxHighlighter::setFormat( int start, int count, const TQColor &color ) -{ - if ( !para || count <= 0 ) - return; - TQTextFormat *f = 0; - TQFont fnt = textEdit()->TQWidget::font(); - f = para->document()->formatCollection()->format( fnt, color ); - para->setFormat( start, count, f ); - f->removeRef(); -} - -/*! \overload */ - -void TQSyntaxHighlighter::setFormat( int start, int count, const TQFont &font ) -{ - if ( !para || count <= 0 ) - return; - TQTextFormat *f = 0; - TQColor c = textEdit()->viewport()->paletteForegroundColor(); - f = para->document()->formatCollection()->format( font, c ); - para->setFormat( start, count, f ); - f->removeRef(); -} - -/*! - \fn TQTextEdit *TQSyntaxHighlighter::textEdit() const - - Returns the TQTextEdit on which this syntax highlighter is - installed -*/ - -/*! Redoes the highlighting of the whole document. -*/ - -void TQSyntaxHighlighter::rehighlight() -{ - TQTextParagraph *s = edit->document()->firstParagraph(); - while ( s ) { - s->invalidate( 0 ); - s->state = -1; - s->needPreProcess = TRUE; - s = s->next(); - } - edit->repaintContents( FALSE ); -} - -/*! - Returns the id of the paragraph which is highlighted, or -1 of no - paragraph is currently highlighted. - - Usually this function is called from within highlightParagraph(). -*/ - -int TQSyntaxHighlighter::currentParagraph() const -{ - return d->currentParagraph; -} - -#endif diff --git a/src/widgets/qsyntaxhighlighter_p.h b/src/widgets/qsyntaxhighlighter_p.h deleted file mode 100644 index 156cc9321..000000000 --- a/src/widgets/qsyntaxhighlighter_p.h +++ /dev/null @@ -1,97 +0,0 @@ -/**************************************************************************** -** -** Definition of the internal TQSyntaxHighlighterInternal class -** -** Created : 031111 -** -** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. -** -** This file is part of the widgets module of the TQt GUI Toolkit. -** -** This file may be used under the terms of the GNU General -** Public License versions 2.0 or 3.0 as published by the Free -** Software Foundation and appearing in the files LICENSE.GPL2 -** and LICENSE.GPL3 included in the packaging of this file. -** Alternatively you may (at your option) use any later version -** of the GNU General Public License if such license has been -** publicly approved by Trolltech ASA (or its successors, if any) -** and the KDE Free TQt Foundation. -** -** Please review the following information to ensure GNU General -** Public Licensing requirements will be met: -** http://trolltech.com/products/qt/licenses/licensing/opensource/. -** If you are unsure which license is appropriate for your use, please -** review the following information: -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview -** or contact the sales department at sales@trolltech.com. -** -** This file may be used under the terms of the Q Public License as -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL -** included in the packaging of this file. Licensees holding valid TQt -** Commercial licenses may use this file in accordance with the TQt -** Commercial License Agreement provided with the Software. -** -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted -** herein. -** -**********************************************************************/ - -#ifndef TQSYNTAXHIGHLIGHTER_P_H -#define TQSYNTAXHIGHLIGHTER_P_H - -#ifndef TQT_NO_SYNTAXHIGHLIGHTER -#include "ntqsyntaxhighlighter.h" -#include "private/qrichtext_p.h" - -class TQSyntaxHighlighterPrivate -{ -public: - TQSyntaxHighlighterPrivate() : - currentParagraph( -1 ) - {} - - int currentParagraph; -}; - -class TQSyntaxHighlighterInternal : public TQTextPreProcessor -{ -public: - TQSyntaxHighlighterInternal( TQSyntaxHighlighter *h ) : highlighter( h ) {} - void process( TQTextDocument *doc, TQTextParagraph *p, int, bool invalidate ) { - if ( p->prev() && p->prev()->endState() == -1 ) - process( doc, p->prev(), 0, FALSE ); - - highlighter->para = p; - TQString text = p->string()->toString(); - int endState = p->prev() ? p->prev()->endState() : -2; - int oldEndState = p->endState(); - highlighter->d->currentParagraph = p->paragId(); - p->setEndState( highlighter->highlightParagraph( text, endState ) ); - highlighter->d->currentParagraph = -1; - highlighter->para = 0; - - p->setFirstPreProcess( FALSE ); - TQTextParagraph *op = p; - p = p->next(); - if ( (!!oldEndState || !!op->endState()) && oldEndState != op->endState() && - invalidate && p && !p->firstPreProcess() && p->endState() != -1 ) { - while ( p ) { - if ( p->endState() == -1 ) - return; - p->setEndState( -1 ); - p = p->next(); - } - } - } - TQTextFormat *format( int ) { return 0; } - -private: - TQSyntaxHighlighter *highlighter; - - friend class TQTextEdit; -}; - -#endif // TQT_NO_SYNTAXHIGHLIGHTER -#endif // TQSYNTAXHIGHLIGHTER_P_H diff --git a/src/widgets/qt_widgets.pri b/src/widgets/qt_widgets.pri index 38ef25ca9..876cc428c 100644 --- a/src/widgets/qt_widgets.pri +++ b/src/widgets/qt_widgets.pri @@ -21,7 +21,7 @@ widgets { $$WIDGETS_H/ntqhgroupbox.h \ $$WIDGETS_H/ntqhbox.h \ $$WIDGETS_H/tqiconview.h \ - $$WIDGETS_H/ntqlabel.h \ + $$WIDGETS_H/tqlabel.h \ $$WIDGETS_H/ntqlcdnumber.h \ $$WIDGETS_H/ntqlineedit.h \ $$WIDGETS_H/ntqlistbox.h \ @@ -43,8 +43,8 @@ widgets { $$WIDGETS_H/ntqsplitter.h \ $$WIDGETS_H/tqstatusbar.h \ $$WIDGETS_H/ntqtabbar.h \ - $$WIDGETS_H/ntqsyntaxhighlighter.h \ - $$WIDGETS_P/qsyntaxhighlighter_p.h \ + $$WIDGETS_H/tqsyntaxhighlighter.h \ + $$WIDGETS_P/tqsyntaxhighlighter_p.h \ $$WIDGETS_H/ntqtabwidget.h \ $$WIDGETS_P/qtitlebar_p.h \ $$WIDGETS_H/tqtoolbar.h \ @@ -55,7 +55,7 @@ widgets { $$WIDGETS_H/ntqvbox.h \ $$WIDGETS_H/ntqvbuttongroup.h \ $$WIDGETS_H/ntqvgroupbox.h \ - $$WIDGETS_H/ntqwhatsthis.h \ + $$WIDGETS_H/tqwhatsthis.h \ $$WIDGETS_H/tqwidgetstack.h \ $$WIDGETS_H/tqaction.h \ $$WIDGETS_H/tqdatetimeedit.h \ @@ -83,7 +83,7 @@ widgets { $$WIDGETS_CPP/qhgroupbox.cpp \ $$WIDGETS_CPP/qhbox.cpp \ $$WIDGETS_CPP/tqiconview.cpp \ - $$WIDGETS_CPP/qlabel.cpp \ + $$WIDGETS_CPP/tqlabel.cpp \ $$WIDGETS_CPP/qlcdnumber.cpp \ $$WIDGETS_CPP/qlineedit.cpp \ $$WIDGETS_CPP/qlistbox.cpp \ @@ -105,7 +105,7 @@ widgets { $$WIDGETS_CPP/qspinwidget.cpp \ $$WIDGETS_CPP/qsplitter.cpp \ $$WIDGETS_CPP/tqstatusbar.cpp \ - $$WIDGETS_CPP/qsyntaxhighlighter.cpp \ + $$WIDGETS_CPP/tqsyntaxhighlighter.cpp \ $$WIDGETS_CPP/qtabbar.cpp \ $$WIDGETS_CPP/qtabwidget.cpp \ $$WIDGETS_CPP/qtitlebar.cpp \ @@ -117,7 +117,7 @@ widgets { $$WIDGETS_CPP/qvbox.cpp \ $$WIDGETS_CPP/qvbuttongroup.cpp \ $$WIDGETS_CPP/qvgroupbox.cpp \ - $$WIDGETS_CPP/qwhatsthis.cpp \ + $$WIDGETS_CPP/tqwhatsthis.cpp \ $$WIDGETS_CPP/tqwidgetstack.cpp \ $$WIDGETS_CPP/tqaction.cpp \ $$WIDGETS_CPP/tqdatetimeedit.cpp \ @@ -133,9 +133,9 @@ wince-* { SOURCES += $$WIDGETS_CPP/ce/qcemainwindow.cpp HEADERS += $$WIDGETS_H/ce/qcemainwindow.h - SOURCES -= $$WIDGETS_CPP/qsyntaxhighlighter.cpp \ + SOURCES -= $$WIDGETS_CPP/tqsyntaxhighlighter.cpp \ $$WIDGETS_CPP/qsplashscreen.cpp - HEADERS -= $$WIDGETS_H/ntqsyntaxhighlighter.h \ + HEADERS -= $$WIDGETS_H/tqsyntaxhighlighter.h \ $$WIDGETS_H/ntqsplashscreen.h } diff --git a/src/widgets/qtitlebar_p.h b/src/widgets/qtitlebar_p.h index b933658dd..ae9fd6b15 100644 --- a/src/widgets/qtitlebar_p.h +++ b/src/widgets/qtitlebar_p.h @@ -57,7 +57,7 @@ #ifndef QT_H #include "ntqbutton.h" -#include "ntqlabel.h" +#include "tqlabel.h" #endif // QT_H #if !defined(TQT_NO_TITLEBAR) diff --git a/src/widgets/qwhatsthis.cpp b/src/widgets/qwhatsthis.cpp deleted file mode 100644 index 65df04e7b..000000000 --- a/src/widgets/qwhatsthis.cpp +++ /dev/null @@ -1,1001 +0,0 @@ -/**************************************************************************** -** -** Implementation of TQWhatsThis class -** -** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. -** -** This file is part of the widgets module of the TQt GUI Toolkit. -** -** This file may be used under the terms of the GNU General -** Public License versions 2.0 or 3.0 as published by the Free -** Software Foundation and appearing in the files LICENSE.GPL2 -** and LICENSE.GPL3 included in the packaging of this file. -** Alternatively you may (at your option) use any later version -** of the GNU General Public License if such license has been -** publicly approved by Trolltech ASA (or its successors, if any) -** and the KDE Free TQt Foundation. -** -** Please review the following information to ensure GNU General -** Public Licensing requirements will be met: -** http://trolltech.com/products/qt/licenses/licensing/opensource/. -** If you are unsure which license is appropriate for your use, please -** review the following information: -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview -** or contact the sales department at sales@trolltech.com. -** -** This file may be used under the terms of the Q Public License as -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL -** included in the packaging of this file. Licensees holding valid TQt -** Commercial licenses may use this file in accordance with the TQt -** Commercial License Agreement provided with the Software. -** -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted -** herein. -** -**********************************************************************/ - -#include "ntqwhatsthis.h" -#ifndef TQT_NO_WHATSTHIS -#include "ntqapplication.h" -#include "tqpaintdevicemetrics.h" -#include "tqpixmap.h" -#include "tqpainter.h" -#include "tqtimer.h" -#include "tqptrdict.h" -#include "tqtoolbutton.h" -#include "ntqshared.h" -#include "ntqcursor.h" -#include "tqbitmap.h" -#include "tqtooltip.h" -#include "ntqsimplerichtext.h" -#include "tqstylesheet.h" -#if defined(QT_ACCESSIBILITY_SUPPORT) -#include "ntqaccessible.h" -#endif -#if defined(TQ_WS_WIN) -#include "qt_windows.h" -#ifndef SPI_GETDROPSHADOW -#define SPI_GETDROPSHADOW 0x1024 -#endif -#endif - -/*! - \class TQWhatsThis ntqwhatsthis.h - \brief The TQWhatsThis class provides a simple description of any - widget, i.e. answering the question "What's this?". - - \ingroup helpsystem - \mainclass - - "What's this?" help is part of an application's online help system - that provides users with information about functionality, usage, - background etc., in various levels of detail from short tool tips - to full text browsing help windows. - - TQWhatsThis provides a single window with an explanatory text that - pops up when the user asks "What's this?". The default way to do - this is to focus the relevant widget and press Shift+F1. The help - text appears immediately; it goes away as soon as the user does - something else. - - (Note that if there is an accelerator for Shift+F1, this mechanism - will not work.) - - To add "What's this?" text to a widget you simply call - TQWhatsThis::add() for the widget. For example, to assign text to a - menu item, call TQMenuData::setWhatsThis(); for a global - accelerator key, call TQAccel::setWhatsThis() and If you're using - actions, use TQAction::setWhatsThis(). - - The text can be either rich text or plain text. If you specify a - rich text formatted string, it will be rendered using the default - stylesheet. This makes it possible to embed images. See - TQStyleSheet::defaultSheet() for details. - - \quotefile action/application.cpp - \skipto fileOpenText - \printuntil setWhatsThis - - An alternative way to enter "What's this?" mode is to use the - ready-made tool bar tool button from - TQWhatsThis::whatsThisButton(). By invoking this context help - button (in the picture below the first one from the right) the - user switches into "What's this?" mode. If they now click on a - widget the appropriate help text is shown. The mode is left when - help is given or when the user presses Esc. - - \img whatsthis.png - - If you are using TQMainWindow you can also use the - TQMainWindow::whatsThis() slot to invoke the mode from a menu item. - - For more control you can create a dedicated TQWhatsThis object for - a special widget. By subclassing and reimplementing - TQWhatsThis::text() it is possible to have different help texts, - depending on the position of the mouse click. By reimplementing - TQWhatsThis::clicked() it is possible to have hyperlinks inside the - help texts. - - If you wish to control the "What's this?" behavior of a widget - manually see TQWidget::customWhatsThis(). - - The What's This object can be removed using TQWhatsThis::remove(), - although this is rarely necessary because it is automatically - removed when the widget is destroyed. - - \sa TQToolTip -*/ - -// a special button -class TQWhatsThisButton: public TQToolButton -{ - TQ_OBJECT - -public: - TQWhatsThisButton( TQWidget * parent, const char * name ); - ~TQWhatsThisButton(); - -public slots: - void mouseReleased(); - -}; - - -class TQWhatsThat : public TQWidget -{ - TQ_OBJECT -public: - TQWhatsThat( TQWidget* w, const TQString& txt, TQWidget* parent, const char* name ); - ~TQWhatsThat() ; - -public slots: - void hide(); - inline void widgetDestroyed() { widget = 0; } - -protected: - void mousePressEvent( TQMouseEvent* ); - void mouseReleaseEvent( TQMouseEvent* ); - void mouseMoveEvent( TQMouseEvent* ); - void keyPressEvent( TQKeyEvent* ); - void paintEvent( TQPaintEvent* ); - -private: - TQString text; -#ifndef TQT_NO_RICHTEXT - TQSimpleRichText* doc; -#endif - TQString anchor; - bool pressed; - TQWidget* widget; -}; - - -class TQWhatsThisPrivate: public TQObject -{ - TQ_OBJECT -public: - - // an item for storing texts - struct WhatsThisItem: public TQShared - { - WhatsThisItem(): TQShared() { whatsthis = 0; } - ~WhatsThisItem(); - TQString s; - TQWhatsThis* whatsthis; - }; - - // the (these days pretty small) state machine - enum State { Inactive, Waiting }; - - TQWhatsThisPrivate(); - ~TQWhatsThisPrivate(); - - bool eventFilter( TQObject *, TQEvent * ); - - WhatsThisItem* newItem( TQWidget * widget ); - void add( TQWidget * widget, TQWhatsThis* special ); - void add( TQWidget * widget, const TQString& text ); - - // say it. - void say( TQWidget *, const TQString&, const TQPoint& ); - - // setup and teardown - static void setUpWhatsThis(); - - void enterWhatsThisMode(); - void leaveWhatsThisMode(); - - // variables - TQWhatsThat * whatsThat; - TQPtrDict * dict; - TQPtrDict * tlw; - TQPtrDict * buttons; - State state; - -private slots: - void cleanupWidget() - { - const TQObject* o = sender(); - if ( o->isWidgetType() ) // sanity - TQWhatsThis::remove((TQWidget*)o); - } - -}; - -// static, but static the less-typing way -static TQWhatsThisPrivate * wt = 0; - -// shadowWidth not const, for XP drop-shadow-fu turns it to 0 -static int shadowWidth = 6; // also used as '5' and '6' and even '8' below -const int vMargin = 8; -const int hMargin = 12; - -// Lets TQPopupMenu destroy the TQWhatsThat. -void qWhatsThisBDH() -{ - if ( wt && wt->whatsThat ) - wt->whatsThat->hide(); -} - - -TQWhatsThat::TQWhatsThat( TQWidget* w, const TQString& txt, TQWidget* parent, const char* name ) - : TQWidget( parent, name, WType_Popup ), text( txt ), pressed( FALSE ), widget( w ) -{ - - setBackgroundMode( NoBackground ); - setPalette( TQToolTip::palette() ); - setMouseTracking( TRUE ); -#ifndef TQT_NO_CURSOR - setCursor( arrowCursor ); -#endif - - if ( widget ) - connect( widget, TQ_SIGNAL( destroyed() ), this, TQ_SLOT( widgetDestroyed() ) ); - - - TQRect r; -#ifndef TQT_NO_RICHTEXT - doc = 0; - if ( TQStyleSheet::mightBeRichText( text ) ) { - TQFont f = TQApplication::font( this ); - doc = new TQSimpleRichText( text, f ); - doc->adjustSize(); - r.setRect( 0, 0, doc->width(), doc->height() ); - } - else -#endif - { - int sw = TQApplication::desktop()->width() / 3; - if ( sw < 200 ) - sw = 200; - else if ( sw > 300 ) - sw = 300; - - r = fontMetrics().boundingRect( 0, 0, sw, 1000, - AlignAuto + AlignTop + WordBreak + ExpandTabs, - text ); - } -#if defined(TQ_WS_WIN) - if ( (qWinVersion()&WV_NT_based) > WV_2000 ) { - BOOL shadow; - SystemParametersInfo( SPI_GETDROPSHADOW, 0, &shadow, 0 ); - shadowWidth = shadow ? 0 : 6; - } -#endif - resize( r.width() + 2*hMargin + shadowWidth, r.height() + 2*vMargin + shadowWidth ); -} - -TQWhatsThat::~TQWhatsThat() -{ - if ( wt && wt->whatsThat == this ) - wt->whatsThat = 0; -#ifndef TQT_NO_RICHTEXT - if ( doc ) - delete doc; -#endif -} - -void TQWhatsThat::hide() -{ - TQWidget::hide(); -#if defined(QT_ACCESSIBILITY_SUPPORT) - TQAccessible::updateAccessibility( this, 0, TQAccessible::ContextHelpEnd ); -#endif -} - -void TQWhatsThat::mousePressEvent( TQMouseEvent* e ) -{ - pressed = TRUE; - if ( e->button() == LeftButton && rect().contains( e->pos() ) ) { -#ifndef TQT_NO_RICHTEXT - if ( doc ) - anchor = doc->anchorAt( e->pos() - TQPoint( hMargin, vMargin) ); -#endif - return; - } - hide(); -} - -void TQWhatsThat::mouseReleaseEvent( TQMouseEvent* e ) -{ - if ( !pressed ) - return; -#ifndef TQT_NO_RICHTEXT - if ( e->button() == LeftButton && doc && rect().contains( e->pos() ) ) { - TQString a = doc->anchorAt( e->pos() - TQPoint( hMargin, vMargin ) ); - TQString href; - if ( anchor == a ) - href = a; - anchor = TQString::null; - if ( widget && wt && wt->dict ) { - TQWhatsThisPrivate::WhatsThisItem * i = wt->dict->find( widget ); - if ( i && i->whatsthis && !i->whatsthis->clicked( href ) ) - return; - } - } -#endif - hide(); -} - -void TQWhatsThat::mouseMoveEvent( TQMouseEvent* e) -{ -#ifndef TQT_NO_RICHTEXT -#ifndef TQT_NO_CURSOR - if ( !doc ) - return; - TQString a = doc->anchorAt( e->pos() - TQPoint( hMargin, vMargin ) ); - if ( !a.isEmpty() ) - setCursor( pointingHandCursor ); - else - setCursor( arrowCursor ); -#endif -#endif -} - - -void TQWhatsThat::keyPressEvent( TQKeyEvent* ) -{ - hide(); -} - - - -void TQWhatsThat::paintEvent( TQPaintEvent* ) -{ - bool drawShadow = TRUE; -#if defined(TQ_WS_WIN) - if ( (qWinVersion()&WV_NT_based) > WV_2000 ) { - BOOL shadow; - SystemParametersInfo( SPI_GETDROPSHADOW, 0, &shadow, 0 ); - drawShadow = !shadow; - } -#elif defined(TQ_WS_MACX) - drawShadow = FALSE; //never draw it on OS X we get it for free -#endif - - TQRect r = rect(); - if ( drawShadow ) - r.addCoords( 0, 0, -shadowWidth, -shadowWidth ); - TQPainter p( this); - p.setPen( colorGroup().foreground() ); - p.drawRect( r ); - p.setPen( colorGroup().mid() ); - p.setBrush( colorGroup().brush( TQColorGroup::Background ) ); - int w = r.width(); - int h = r.height(); - p.drawRect( 1, 1, w-2, h-2 ); - if ( drawShadow ) { - p.setPen( colorGroup().shadow() ); - p.drawPoint( w + 5, 6 ); - p.drawLine( w + 3, 6, w + 5, 8 ); - p.drawLine( w + 1, 6, w + 5, 10 ); - int i; - for( i=7; i < h; i += 2 ) - p.drawLine( w, i, w + 5, i + 5 ); - for( i = w - i + h; i > 6; i -= 2 ) - p.drawLine( i, h, i + 5, h + 5 ); - for( ; i > 0 ; i -= 2 ) - p.drawLine( 6, h + 6 - i, i + 5, h + 5 ); - } - p.setPen( colorGroup().foreground() ); - r.addCoords( hMargin, vMargin, -hMargin, -vMargin ); - -#ifndef TQT_NO_RICHTEXT - if ( doc ) { - doc->draw( &p, r.x(), r.y(), r, colorGroup(), 0 ); - } - else -#endif - { - p.drawText( r, AlignAuto + AlignTop + WordBreak + ExpandTabs, text ); - } -} - -// the item -TQWhatsThisPrivate::WhatsThisItem::~WhatsThisItem() -{ - if ( count ) - tqFatal( "TQWhatsThis: Internal error (%d)", count ); - delete whatsthis; -} - - -static const char * const button_image[] = { -"16 16 3 1", -" c None", -"o c #000000", -"a c #000080", -"o aaaaa ", -"oo aaa aaa ", -"ooo aaa aaa", -"oooo aa aa", -"ooooo aa aa", -"oooooo a aaa", -"ooooooo aaa ", -"oooooooo aaa ", -"ooooooooo aaa ", -"ooooo aaa ", -"oo ooo ", -"o ooo aaa ", -" ooo aaa ", -" ooo ", -" ooo ", -" ooo "}; - -// the button class -TQWhatsThisButton::TQWhatsThisButton( TQWidget * parent, const char * name ) - : TQToolButton( parent, name ) -{ - TQPixmap p( (const char**)button_image ); - setPixmap( p ); - setToggleButton( TRUE ); - setAutoRaise( TRUE ); - setFocusPolicy( NoFocus ); - setTextLabel( tr( "What's this?" ) ); - wt->buttons->insert( (void *)this, this ); - connect( this, TQ_SIGNAL( released() ), - this, TQ_SLOT( mouseReleased() ) ); -} - - -TQWhatsThisButton::~TQWhatsThisButton() -{ - if ( wt && wt->buttons ) - wt->buttons->take( (void *)this ); -} - - -void TQWhatsThisButton::mouseReleased() -{ - if ( wt->state == TQWhatsThisPrivate::Inactive && isOn() ) { - TQWhatsThisPrivate::setUpWhatsThis(); -#ifndef TQT_NO_CURSOR - TQApplication::setOverrideCursor( whatsThisCursor, FALSE ); -#endif - wt->state = TQWhatsThisPrivate::Waiting; - tqApp->installEventFilter( wt ); - } -} - -static void qWhatsThisPrivateCleanup() -{ - if( wt ) { - delete wt; - wt = 0; - } -} - -// the what's this manager class -TQWhatsThisPrivate::TQWhatsThisPrivate() - : TQObject( 0, "global what's this object" ) -{ - whatsThat = 0; - dict = new TQPtrDict; - tlw = new TQPtrDict; - wt = this; - buttons = new TQPtrDict; - state = Inactive; -} - -TQWhatsThisPrivate::~TQWhatsThisPrivate() -{ -#ifndef TQT_NO_CURSOR - if ( state == Waiting && tqApp ) - TQApplication::restoreOverrideCursor(); -#endif - // the two straight-and-simple dicts - delete tlw; - delete buttons; - - // then delete the complex one. - TQPtrDictIterator it( *dict ); - WhatsThisItem * i; - TQWidget * w; - while( (i=it.current()) != 0 ) { - w = (TQWidget *)it.currentKey(); - ++it; - dict->take( w ); - if ( i->deref() ) - delete i; - } - delete dict; - if ( whatsThat && !whatsThat->parentWidget() ) { - delete whatsThat; - } - // and finally lose wt - wt = 0; -} - -bool TQWhatsThisPrivate::eventFilter( TQObject * o, TQEvent * e ) -{ - switch( state ) { - case Waiting: - if ( e->type() == TQEvent::MouseButtonPress && o->isWidgetType() ) { - TQWidget * w = (TQWidget *) o; - if ( ( (TQMouseEvent*)e)->button() == RightButton ) - return FALSE; // ignore RMB - if ( w->customWhatsThis() ) - return FALSE; - TQWhatsThisPrivate::WhatsThisItem * i = 0; - TQMouseEvent* me = (TQMouseEvent*) e; - TQPoint p = me->pos(); - while( w && !i ) { - i = dict->find( w ); - if ( !i ) { - p += w->pos(); - w = w->parentWidget( TRUE ); - } - } - leaveWhatsThisMode(); - if (!i ) { -#if defined(QT_ACCESSIBILITY_SUPPORT) - TQAccessible::updateAccessibility( this, 0, TQAccessible::ContextHelpEnd ); -#endif - return TRUE; - } - if ( i->whatsthis ) - say( w, i->whatsthis->text( p ), me->globalPos() ); - else - say( w, i->s, me->globalPos() ); - return TRUE; - } else if ( e->type() == TQEvent::MouseButtonRelease ) { - if ( ( (TQMouseEvent*)e)->button() == RightButton ) - return FALSE; // ignore RMB - return !o->isWidgetType() || !((TQWidget*)o)->customWhatsThis(); - } else if ( e->type() == TQEvent::MouseMove ) { - return !o->isWidgetType() || !((TQWidget*)o)->customWhatsThis(); - } else if ( e->type() == TQEvent::KeyPress ) { - TQKeyEvent* kev = (TQKeyEvent*)e; - - if ( kev->key() == TQt::Key_Escape ) { - leaveWhatsThisMode(); - return TRUE; - } else if ( o->isWidgetType() && ((TQWidget*)o)->customWhatsThis() ) { - return FALSE; - } else if ( kev->key() == Key_Menu || - ( kev->key() == Key_F10 && - kev->state() == ShiftButton ) ) { - // we don't react to these keys, they are used for context menus - return FALSE; - } else if ( kev->state() == kev->stateAfter() && - kev->key() != Key_Meta ) { // not a modifier key - leaveWhatsThisMode(); - } - } else if ( e->type() == TQEvent::MouseButtonDblClick ) { - return TRUE; - } - break; - case Inactive: - if ( e->type() == TQEvent::Accel && - ((TQKeyEvent *)e)->key() == Key_F1 && - o->isWidgetType() && - ((TQKeyEvent *)e)->state() == ShiftButton ) { - TQWidget * w = ((TQWidget *)o)->focusWidget(); - if ( !w ) - break; - TQString s = TQWhatsThis::textFor( w, TQPoint(0,0), TRUE ); - if ( !s.isNull() ) { - say ( w, s, w->mapToGlobal( w->rect().center() ) ); - ((TQKeyEvent *)e)->accept(); - return TRUE; - } - } - break; - } - return FALSE; -} - - - -void TQWhatsThisPrivate::setUpWhatsThis() -{ - if ( !wt ) { - wt = new TQWhatsThisPrivate(); - - // It is necessary to use a post routine, because - // the destructor deletes pixmaps and other stuff that - // needs a working X connection under X11. - tqAddPostRoutine( qWhatsThisPrivateCleanup ); - } -} - - -void TQWhatsThisPrivate::enterWhatsThisMode() -{ -#if defined(QT_ACCESSIBILITY_SUPPORT) - TQAccessible::updateAccessibility( this, 0, TQAccessible::ContextHelpStart ); -#endif -} - - -void TQWhatsThisPrivate::leaveWhatsThisMode() -{ - if ( state == Waiting ) { - TQPtrDictIterator it( *(wt->buttons) ); - TQWhatsThisButton * b; - while( (b=it.current()) != 0 ) { - ++it; - b->setOn( FALSE ); - } -#ifndef TQT_NO_CURSOR - TQApplication::restoreOverrideCursor(); -#endif - state = Inactive; - tqApp->removeEventFilter( this ); - } -} - - - -void TQWhatsThisPrivate::say( TQWidget * widget, const TQString &text, const TQPoint& ppos) -{ - if ( text.isEmpty() ) - return; - // make a fresh widget, and set it up - delete whatsThat; - whatsThat = new TQWhatsThat( - widget, text, -#if defined(TQ_WS_X11) - TQApplication::desktop()->screen( widget ? - widget->x11Screen() : - TQCursor::x11Screen() ), -#else - 0, -#endif - "automatic what's this? widget" ); - - - // okay, now to find a suitable location - - int scr = ( widget ? - TQApplication::desktop()->screenNumber( widget ) : -#if defined(TQ_WS_X11) - TQCursor::x11Screen() -#else - TQApplication::desktop()->screenNumber( ppos ) -#endif // TQ_WS_X11 - ); - TQRect screen = TQApplication::desktop()->screenGeometry( scr ); - - int x; - int w = whatsThat->width(); - int h = whatsThat->height(); - int sx = screen.x(); - int sy = screen.y(); - - // first try locating the widget immediately above/below, - // with nice alignment if possible. - TQPoint pos; - if ( widget ) - pos = widget->mapToGlobal( TQPoint( 0,0 ) ); - - if ( widget && w > widget->width() + 16 ) - x = pos.x() + widget->width()/2 - w/2; - else - x = ppos.x() - w/2; - - // squeeze it in if that would result in part of what's this - // being only partially visible - if ( x + w + shadowWidth > sx+screen.width() ) - x = (widget? (TQMIN(screen.width(), - pos.x() + widget->width()) - ) : screen.width() ) - - w; - - if ( x < sx ) - x = sx; - - int y; - if ( widget && h > widget->height() + 16 ) { - y = pos.y() + widget->height() + 2; // below, two pixels spacing - // what's this is above or below, wherever there's most space - if ( y + h + 10 > sy+screen.height() ) - y = pos.y() + 2 - shadowWidth - h; // above, overlap - } - y = ppos.y() + 2; - - // squeeze it in if that would result in part of what's this - // being only partially visible - if ( y + h + shadowWidth > sy+screen.height() ) - y = ( widget ? (TQMIN(screen.height(), - pos.y() + widget->height()) - ) : screen.height() ) - - h; - if ( y < sy ) - y = sy; - - whatsThat->move( x, y ); - whatsThat->show(); -} - -TQWhatsThisPrivate::WhatsThisItem* TQWhatsThisPrivate::newItem( TQWidget * widget ) -{ - WhatsThisItem * i = dict->find( (void *)widget ); - if ( i ) - TQWhatsThis::remove( widget ); - i = new WhatsThisItem; - dict->insert( (void *)widget, i ); - TQWidget * t = widget->topLevelWidget(); - if ( !tlw->find( (void *)t ) ) { - tlw->insert( (void *)t, t ); - t->installEventFilter( this ); - } - connect( widget, TQ_SIGNAL(destroyed()), this, TQ_SLOT(cleanupWidget()) ); - return i; -} - -void TQWhatsThisPrivate::add( TQWidget * widget, TQWhatsThis* special ) -{ - newItem( widget )->whatsthis = special; -} - -void TQWhatsThisPrivate::add( TQWidget * widget, const TQString &text ) -{ - newItem( widget )->s = text; -} - - -// and finally the What's This class itself - -/*! - Adds \a text as "What's this" help for \a widget. If the text is - rich text formatted (i.e. it contains markup) it will be rendered - with the default stylesheet TQStyleSheet::defaultSheet(). - - The text is destroyed if the widget is later destroyed, so it need - not be explicitly removed. - - \sa remove() -*/ -void TQWhatsThis::add( TQWidget * widget, const TQString &text ) -{ - if ( text.isEmpty() ) - return; // pointless - TQWhatsThisPrivate::setUpWhatsThis(); - wt->add(widget,text); -} - - -/*! - Removes the "What's this?" help associated with the \a widget. - This happens automatically if the widget is destroyed. - - \sa add() -*/ -void TQWhatsThis::remove( TQWidget * widget ) -{ - TQWhatsThisPrivate::setUpWhatsThis(); - TQWhatsThisPrivate::WhatsThisItem * i = wt->dict->find( (void *)widget ); - if ( !i ) - return; - - wt->dict->take( (void *)widget ); - - i->deref(); - if ( !i->count ) - delete i; -} - - -/*! - Returns the what's this text for widget \a w or TQString::null if - there is no "What's this?" help for the widget. \a pos contains - the mouse position; this is useful, for example, if you've - subclassed to make the text that is displayed position dependent. - - If \a includeParents is TRUE, parent widgets are taken into - consideration as well when looking for what's this help text. - - \sa add() -*/ -TQString TQWhatsThis::textFor( TQWidget * w, const TQPoint& pos, bool includeParents ) -{ - TQWhatsThisPrivate::setUpWhatsThis(); - TQWhatsThisPrivate::WhatsThisItem * i = 0; - TQPoint p = pos; - while( w && !i ) { - i = wt->dict->find( w ); - if ( !includeParents ) - break; - if ( !i ) { - p += w->pos(); - w = w->parentWidget( TRUE ); - } - } - if (!i) - return TQString::null; - if ( i->whatsthis ) - return i->whatsthis->text( p ); - return i->s; -} - - -/*! - Creates a TQToolButton preconfigured to enter "What's this?" mode - when clicked. You will often use this with a tool bar as \a - parent: - \code - (void) TQWhatsThis::whatsThisButton( my_help_tool_bar ); - \endcode -*/ -TQToolButton * TQWhatsThis::whatsThisButton( TQWidget * parent ) -{ - TQWhatsThisPrivate::setUpWhatsThis(); - return new TQWhatsThisButton( parent, - "automatic what's this? button" ); -} - -/*! - Constructs a dynamic "What's this?" object for \a widget. The - object is deleted when the \a widget is destroyed. - - When the widget is queried by the user the text() function of this - TQWhatsThis will be called to provide the appropriate text, rather - than using the text assigned by add(). -*/ -TQWhatsThis::TQWhatsThis( TQWidget * widget) -{ - TQWhatsThisPrivate::setUpWhatsThis(); - wt->add(widget,this); -} - - -/*! - Destroys the object and frees any allocated resources. -*/ -TQWhatsThis::~TQWhatsThis() -{ -} - - -/*! - This virtual function returns the text for position \e p in the - widget that this "What's this?" object documents. If there is no - "What's this?" text for the position, TQString::null is returned. - - The default implementation returns TQString::null. -*/ -TQString TQWhatsThis::text( const TQPoint & ) -{ - return TQString::null; -} - -/*! - \fn bool TQWhatsThis::clicked( const TQString& href ) - - This virtual function is called when the user clicks inside the - "What's this?" window. \a href is the link the user clicked on, or - TQString::null if there was no link. - - If the function returns TRUE (the default), the "What's this?" - window is closed, otherwise it remains visible. - - The default implementation ignores \a href and returns TRUE. -*/ -bool TQWhatsThis::clicked( const TQString& ) -{ - return TRUE; -} - - -/*! - Enters "What's this?" mode and returns immediately. - - TQt will install a special cursor and take over mouse input until - the user clicks somewhere. It then shows any help available and - ends "What's this?" mode. Finally, TQt removes the special cursor - and help window and then restores ordinary event processing, at - which point the left mouse button is no longer pressed. - - The user can also use the Esc key to leave "What's this?" mode. - - \sa inWhatsThisMode(), leaveWhatsThisMode() -*/ - -void TQWhatsThis::enterWhatsThisMode() -{ - TQWhatsThisPrivate::setUpWhatsThis(); - if ( wt->state == TQWhatsThisPrivate::Inactive ) { - wt->enterWhatsThisMode(); -#ifndef TQT_NO_CURSOR - TQApplication::setOverrideCursor( whatsThisCursor, FALSE ); -#endif - wt->state = TQWhatsThisPrivate::Waiting; - tqApp->installEventFilter( wt ); - } -} - - -/*! - Returns TRUE if the application is in "What's this?" mode; - otherwise returns FALSE. - - \sa enterWhatsThisMode(), leaveWhatsThisMode() -*/ -bool TQWhatsThis::inWhatsThisMode() -{ - if (!wt) - return FALSE; - return wt->state == TQWhatsThisPrivate::Waiting; -} - - -/*! - Leaves "What's this?" question mode. - - This function is used internally by widgets that support - TQWidget::customWhatsThis(); applications do not usually call it. - An example of such a widget is TQPopupMenu: menus still work - normally in "What's this?" mode but also provide help texts for - individual menu items. - - If \a text is not TQString::null, a "What's this?" help window is - displayed at the global screen position \a pos. If widget \a w is - not 0 and has its own dedicated TQWhatsThis object, this object - will receive clicked() messages when the user clicks on hyperlinks - inside the help text. - - \sa inWhatsThisMode(), enterWhatsThisMode(), TQWhatsThis::clicked() -*/ -void TQWhatsThis::leaveWhatsThisMode( const TQString& text, const TQPoint& pos, TQWidget* w ) -{ - if ( !inWhatsThisMode() ) - return; - - wt->leaveWhatsThisMode(); - if ( !text.isNull() ) - wt->say( w, text, pos ); -} - -/*! - Display \a text in a help window at the global screen position \a - pos. - - If widget \a w is not 0 and has its own dedicated TQWhatsThis - object, this object will receive clicked() messages when the user - clicks on hyperlinks inside the help text. - - \sa TQWhatsThis::clicked() -*/ -void TQWhatsThis::display( const TQString& text, const TQPoint& pos, TQWidget* w ) -{ - if ( inWhatsThisMode() ) { - leaveWhatsThisMode( text, pos, w ); - return; - } - TQWhatsThisPrivate::setUpWhatsThis(); - wt->say( w, text, pos ); -} - -/*! - Sets the font for all "What's this?" helps to \a font. -*/ -void TQWhatsThis::setFont( const TQFont &font ) -{ - TQApplication::setFont( font, TRUE, "TQWhatsThat" ); -} - -#include "qwhatsthis.moc" -#endif diff --git a/src/widgets/tqaction.cpp b/src/widgets/tqaction.cpp index 6bf1a50f8..31d308420 100644 --- a/src/widgets/tqaction.cpp +++ b/src/widgets/tqaction.cpp @@ -47,7 +47,7 @@ #include "tqtoolbutton.h" #include "ntqcombobox.h" #include "tqtooltip.h" -#include "ntqwhatsthis.h" +#include "tqwhatsthis.h" #include "tqstatusbar.h" #include "tqobjectlist.h" diff --git a/src/widgets/tqlabel.cpp b/src/widgets/tqlabel.cpp new file mode 100644 index 000000000..7f9d858bb --- /dev/null +++ b/src/widgets/tqlabel.cpp @@ -0,0 +1,1191 @@ +/********************************************************************** +** +** Implementation of TQLabel widget class +** +** Created : 941215 +** +** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. +** +** This file is part of the widgets module of the TQt GUI Toolkit. +** +** This file may be used under the terms of the GNU General +** Public License versions 2.0 or 3.0 as published by the Free +** Software Foundation and appearing in the files LICENSE.GPL2 +** and LICENSE.GPL3 included in the packaging of this file. +** Alternatively you may (at your option) use any later version +** of the GNU General Public License if such license has been +** publicly approved by Trolltech ASA (or its successors, if any) +** and the KDE Free TQt Foundation. +** +** Please review the following information to ensure GNU General +** Public Licensing requirements will be met: +** http://trolltech.com/products/qt/licenses/licensing/opensource/. +** If you are unsure which license is appropriate for your use, please +** review the following information: +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview +** or contact the sales department at sales@trolltech.com. +** +** This file may be used under the terms of the Q Public License as +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL +** included in the packaging of this file. Licensees holding valid TQt +** Commercial licenses may use this file in accordance with the TQt +** Commercial License Agreement provided with the Software. +** +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted +** herein. +** +**********************************************************************/ + +#include "tqlabel.h" +#ifndef TQT_NO_LABEL +#include "tqpainter.h" +#include "ntqdrawutil.h" +#include "ntqaccel.h" +#include "tqmovie.h" +#include "tqimage.h" +#include "tqbitmap.h" +#include "tqpicture.h" +#include "ntqapplication.h" +#include "tqsimplerichtext.h" +#include "tqstylesheet.h" +#include "tqstyle.h" + +class TQLabelPrivate +{ +public: + TQLabelPrivate() + :img(0), pix(0), valid_hints( -1 ) + {} + TQImage* img; // for scaled contents + TQPixmap* pix; // for scaled contents + TQSize sh; + TQSize msh; + int valid_hints; // stores the frameWidth() for the stored size hint, -1 otherwise +}; + + +/*! + \class TQLabel tqlabel.h + \brief The TQLabel widget provides a text or image display. + + \ingroup basic + \ingroup text + \mainclass + + TQLabel is used for displaying text or an image. No user + interaction functionality is provided. The visual appearance of + the label can be configured in various ways, and it can be used + for specifying a focus accelerator key for another widget. + + A TQLabel can contain any of the following content types: + \table + \header \i Content \i Setting + \row \i Plain text + \i Pass a TQString to setText(). + \row \i Rich text + \i Pass a TQString that contains rich text to setText(). + \row \i A pixmap + \i Pass a TQPixmap to setPixmap(). + \row \i A movie + \i Pass a TQMovie to setMovie(). + \row \i A number + \i Pass an \e int or a \e double to setNum(), which converts + the number to plain text. + \row \i Nothing + \i The same as an empty plain text. This is the default. Set + by clear(). + \endtable + + When the content is changed using any of these functions, any + previous content is cleared. + + The look of a TQLabel can be tuned in several ways. All the + settings of TQFrame are available for specifying a widget frame. + The positioning of the content within the TQLabel widget area can + be tuned with setAlignment() and setIndent(). For example, this + code sets up a sunken panel with a two-line text in the bottom + right corner (both lines being flush with the right side of the + label): + \code + TQLabel *label = new TQLabel( this ); + label->setFrameStyle( TQFrame::Panel | TQFrame::Sunken ); + label->setText( "first line\nsecond line" ); + label->setAlignment( AlignBottom | AlignRight ); + \endcode + + A TQLabel is often used as a label for an interactive widget. For + this use TQLabel provides a useful mechanism for adding an + accelerator key (see TQAccel) that will set the keyboard focus to + the other widget (called the TQLabel's "buddy"). For example: + \code + TQLineEdit* phoneEdit = new TQLineEdit( this, "phoneEdit" ); + TQLabel* phoneLabel = new TQLabel( phoneEdit, "&Phone:", this, "phoneLabel" ); + \endcode + + In this example, keyboard focus is transferred to the label's + buddy (the TQLineEdit) when the user presses Alt+P. You can + also use the setBuddy() function to accomplish the same thing. + + + + \sa TQLineEdit, TQTextEdit, TQPixmap, TQMovie, + \link guibooks.html#fowler GUI Design Handbook: Label\endlink +*/ + +/*! + \fn TQPicture * TQLabel::picture() const + + Returns the label's picture or 0 if the label doesn't have a + picture. +*/ + + +/*! + Constructs an empty label. + + The \a parent, \a name and widget flag \a f, arguments are passed + to the TQFrame constructor. + + \sa setAlignment(), setFrameStyle(), setIndent() +*/ + +TQLabel::TQLabel( TQWidget *parent, const char *name, WFlags f ) + : TQFrame( parent, name, f | WMouseNoMask ) +{ + init(); +} + + +/*! + Constructs a label that displays the text, \a text. + + The \a parent, \a name and widget flag \a f, arguments are passed + to the TQFrame constructor. + + \sa setText(), setAlignment(), setFrameStyle(), setIndent() +*/ + +TQLabel::TQLabel( const TQString &text, TQWidget *parent, const char *name, + WFlags f ) + : TQFrame( parent, name, f | WMouseNoMask ) +{ + init(); + setText( text ); +} + + +/*! + Constructs a label that displays the text \a text. The label has a + buddy widget, \a buddy. + + If the \a text contains an underlined letter (a letter preceded by + an ampersand, \&), and the text is in plain text format, when the + user presses Alt+ the underlined letter, focus is passed to the + buddy widget. + + The \a parent, \a name and widget flag, \a f, arguments are passed + to the TQFrame constructor. + + \sa setText(), setBuddy(), setAlignment(), setFrameStyle(), + setIndent() +*/ +TQLabel::TQLabel( TQWidget *buddy, const TQString &text, + TQWidget *parent, const char *name, WFlags f ) + : TQFrame( parent, name, f | WMouseNoMask ) +{ + init(); +#ifndef TQT_NO_ACCEL + setBuddy( buddy ); +#endif + setText( text ); +} + +/*! + Destroys the label. +*/ + +TQLabel::~TQLabel() +{ + clearContents(); + delete d; +} + + +void TQLabel::init() +{ + lpixmap = 0; +#ifndef TQT_NO_MOVIE + lmovie = 0; +#endif +#ifndef TQT_NO_ACCEL + lbuddy = 0; + accel = 0; +#endif + lpixmap = 0; +#ifndef TQT_NO_PICTURE + lpicture = 0; +#endif + align = AlignAuto | AlignVCenter | ExpandTabs; + extraMargin = -1; + autoresize = FALSE; + scaledcontents = FALSE; + textformat = TQt::AutoText; +#ifndef TQT_NO_RICHTEXT + doc = 0; +#endif + + setSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Preferred ) ); + d = new TQLabelPrivate; +} + + +/*! + \property TQLabel::text + \brief the label's text + + If no text has been set this will return an empty string. Setting + the text clears any previous content, unless they are the same. + + The text will be interpreted either as a plain text or as a rich + text, depending on the text format setting; see setTextFormat(). + The default setting is \c AutoText, i.e. TQLabel will try to + auto-detect the format of the text set. + + If the text is interpreted as a plain text and a buddy has been + set, the buddy accelerator key is updated from the new text. + + The label resizes itself if auto-resizing is enabled. + + Note that TQLabel is well-suited to display small rich text + documents, i.e. those small documents that get their document + specific settings (font, text color, link color) from the label's + palette and font properties. For large documents, use TQTextEdit + in read-only mode instead. TQTextEdit will flicker less on resize + and can also provide a scrollbar when necessary. + + \sa text, setTextFormat(), setBuddy(), alignment +*/ + +void TQLabel::setText( const TQString &text ) +{ + if ( ltext == text ) + return; + TQSize osh = sizeHint(); +#ifndef TQT_NO_RICHTEXT + bool hadRichtext = doc != 0; +#endif + clearContents(); + ltext = text; +#ifndef TQT_NO_RICHTEXT + bool useRichText = (textformat == RichText || + ( ( textformat == AutoText ) && TQStyleSheet::mightBeRichText(ltext) ) ); +#else + bool useRichText = TRUE; +#endif +#ifndef TQT_NO_ACCEL + // ### Setting accelerators for rich text labels will not work. + // Eg. >Hello will return ALT+G which is clearly + // not intended. + if ( !useRichText ) { + int p = TQAccel::shortcutKey( ltext ); + if ( p ) { + if ( !accel ) + accel = new TQAccel( this, "accel label accel" ); + accel->connectItem( accel->insertItem( p ), + this, TQ_SLOT(acceleratorSlot()) ); + } + } +#endif +#ifndef TQT_NO_RICHTEXT + if ( useRichText ) { + if ( !hadRichtext ) + align |= WordBreak; + TQString t = ltext; + if ( align & AlignRight ) + t.prepend( "
              "); + else if ( align & AlignHCenter ) + t.prepend( "
              "); + if ( (align & WordBreak) == 0 ) + t.prepend( "" ); + doc = new TQSimpleRichText( t, font() ); + } +#endif + + updateLabel( osh ); +} + + +/*! + Clears any label contents. Equivalent to setText( "" ). +*/ + +void TQLabel::clear() +{ + setText( TQString::fromLatin1("") ); +} + +/*! + \property TQLabel::pixmap + \brief the label's pixmap + + If no pixmap has been set this will return an invalid pixmap. + + Setting the pixmap clears any previous content, and resizes the + label if \l TQLabel::autoResize() is TRUE. The buddy accelerator, + if any, is disabled. +*/ +void TQLabel::setPixmap( const TQPixmap &pixmap ) +{ + TQSize osh = sizeHint(); + + if ( !lpixmap || lpixmap->serialNumber() != pixmap.serialNumber() ) { + clearContents(); + lpixmap = new TQPixmap( pixmap ); + } + + if ( lpixmap->depth() == 1 && !lpixmap->mask() ) + lpixmap->setMask( *((TQBitmap *)lpixmap) ); + + updateLabel( osh ); +} + +#ifndef TQT_NO_PICTURE +/*! + Sets the label contents to \a picture. Any previous content is + cleared. + + The buddy accelerator, if any, is disabled. + + \sa picture(), setBuddy() +*/ + +void TQLabel::setPicture( const TQPicture &picture ) +{ + TQSize osh = sizeHint(); + clearContents(); + lpicture = new TQPicture( picture ); + + updateLabel( osh ); +} +#endif // TQT_NO_PICTURE + +/*! + Sets the label contents to plain text containing the textual + representation of integer \a num. Any previous content is cleared. + Does nothing if the integer's string representation is the same as + the current contents of the label. + + The buddy accelerator, if any, is disabled. + + The label resizes itself if auto-resizing is enabled. + + \sa setText(), TQString::setNum(), setBuddy() +*/ + +void TQLabel::setNum( int num ) +{ + TQString str; + str.setNum( num ); + setText( str ); +} + +/*! + \overload + + Sets the label contents to plain text containing the textual + representation of double \a num. Any previous content is cleared. + Does nothing if the double's string representation is the same as + the current contents of the label. + + The buddy accelerator, if any, is disabled. + + The label resizes itself if auto-resizing is enabled. + + \sa setText(), TQString::setNum(), setBuddy() +*/ + +void TQLabel::setNum( double num ) +{ + TQString str; + str.setNum( num ); + setText( str ); +} + +/*! + \property TQLabel::alignment + \brief the alignment of the label's contents + + The alignment is a bitwise OR of \c TQt::AlignmentFlags and \c + TQt::TextFlags values. The \c ExpandTabs, \c SingleLine and \c + ShowPrefix flags apply only if the label contains plain text; + otherwise they are ignored. The \c DontClip flag is always + ignored. \c WordBreak applies to both rich text and plain text + labels. The \c BreakAnywhere flag is not supported in TQLabel. + + If the label has a buddy, the \c ShowPrefix flag is forced to + TRUE. + + The default alignment is \c{AlignAuto | AlignVCenter | ExpandTabs} + if the label doesn't have a buddy and \c{AlignAuto | AlignVCenter + | ExpandTabs | ShowPrefix} if the label has a buddy. If the label + contains rich text, additionally \c WordBreak is turned on. + + \sa TQt::AlignmentFlags, alignment, setBuddy(), text +*/ + +void TQLabel::setAlignment( int alignment ) +{ + if ( alignment == align ) + return; + TQSize osh = sizeHint(); +#ifndef TQT_NO_ACCEL + if ( lbuddy ) + align = alignment | ShowPrefix; + else +#endif + align = alignment; + +#ifndef TQT_NO_RICHTEXT + TQString t = ltext; + if ( !t.isNull() ) { + ltext = TQString::null; + setText( t ); + } +#endif + + updateLabel( osh ); +} + + +/*! + \property TQLabel::indent + \brief the label's text indent in pixels + + If a label displays text, the indent applies to the left edge if + alignment() is \c AlignLeft, to the right edge if alignment() is + \c AlignRight, to the top edge if alignment() is \c AlignTop, and + to to the bottom edge if alignment() is \c AlignBottom. + + If indent is negative, or if no indent has been set, the label + computes the effective indent as follows: If frameWidth() is 0, + the effective indent becomes 0. If frameWidth() is greater than 0, + the effective indent becomes half the width of the "x" character + of the widget's current font(). + + \sa alignment, frameWidth(), font() +*/ + +void TQLabel::setIndent( int indent ) +{ + extraMargin = indent; + updateLabel( TQSize( -1, -1 ) ); +} + + +/*! + \fn bool TQLabel::autoResize() const + + \obsolete + + Returns TRUE if auto-resizing is enabled, or FALSE if auto-resizing + is disabled. + + Auto-resizing is disabled by default. + + \sa setAutoResize() +*/ + +/*! \obsolete + Enables auto-resizing if \a enable is TRUE, or disables it if \a + enable is FALSE. + + When auto-resizing is enabled the label will resize itself to fit + the contents whenever the contents change. The top-left corner is + not moved. This is useful for TQLabel widgets that are not managed by + a TQLayout (e.g., top-level widgets). + + Auto-resizing is disabled by default. + + \sa autoResize(), adjustSize(), sizeHint() +*/ + +void TQLabel::setAutoResize( bool enable ) +{ + if ( (bool)autoresize != enable ) { + autoresize = enable; + if ( autoresize ) + adjustSize(); // calls resize which repaints + } +} + + + +/*! + Returns the size that will be used if the width of the label is \a + w. If \a w is -1, the sizeHint() is returned. +*/ + +TQSize TQLabel::sizeForWidth( int w ) const +{ + TQRect br; + TQPixmap *pix = pixmap(); +#ifndef TQT_NO_PICTURE + TQPicture *pic = picture(); +#else + const int pic = 0; +#endif +#ifndef TQT_NO_MOVIE + TQMovie *mov = movie(); +#else + const int mov = 0; +#endif + int hextra = 2 * frameWidth(); + int vextra = hextra; + TQFontMetrics fm( fontMetrics() ); + int xw = fm.width( 'x' ); + if ( !mov && !pix && !pic ) { + int m = indent(); + if ( m < 0 && hextra ) // no indent, but we do have a frame + m = xw / 2 - margin(); + if ( m >= 0 ) { + int horizAlign = TQApplication::horizontalAlignment( align ); + if ( (horizAlign & AlignLeft) || (horizAlign & AlignRight ) ) + hextra += m; + if ( (align & AlignTop) || (align & AlignBottom ) ) + vextra += m; + } + } + + if ( pix ) + br = pix->rect(); +#ifndef TQT_NO_PICTURE + else if ( pic ) + br = pic->boundingRect(); +#endif +#ifndef TQT_NO_MOVIE + else if ( mov ) + br = mov->framePixmap().rect(); +#endif +#ifndef TQT_NO_RICHTEXT + else if ( doc ) { + int oldW = doc->width(); + if ( align & WordBreak ) { + if ( w < 0 ) + doc->adjustSize(); + else + doc->setWidth( w-hextra ); + } + br = TQRect( 0, 0, doc->widthUsed(), doc->height() ); + doc->setWidth( oldW ); + } +#endif + else { + bool tryWidth = (w < 0) && (align & WordBreak); + if ( tryWidth ) + w = xw * 80; + else if ( w < 0 ) + w = 2000; + w -= hextra; + br = fm.boundingRect( 0, 0, w ,2000, alignment(), text() ); + if ( tryWidth && br.height() < 4*fm.lineSpacing() && br.width() > w/2 ) + br = fm.boundingRect( 0, 0, w/2, 2000, alignment(), text() ); + if ( tryWidth && br.height() < 2*fm.lineSpacing() && br.width() > w/4 ) + br = fm.boundingRect( 0, 0, w/4, 2000, alignment(), text() ); + } + int wid = br.width() + hextra; + int hei = br.height() + vextra; + + return TQSize( wid, hei ); +} + + +/*! + \reimp +*/ + +int TQLabel::heightForWidth( int w ) const +{ + if ( +#ifndef TQT_NO_RICHTEXT + doc || +#endif + (align & WordBreak) ) + return sizeForWidth( w ).height(); + return TQWidget::heightForWidth( w ); +} + + + +/*!\reimp +*/ +TQSize TQLabel::sizeHint() const +{ + if ( d->valid_hints != frameWidth() ) + (void) TQLabel::minimumSizeHint(); + return d->sh; +} + +/*! + \reimp +*/ + +TQSize TQLabel::minimumSizeHint() const +{ + if ( d->valid_hints == frameWidth() ) + return d->msh; + + constPolish(); + d->valid_hints = frameWidth(); + d->sh = sizeForWidth( -1 ); + TQSize sz( -1, -1 ); + + if ( +#ifndef TQT_NO_RICHTEXT + !doc && +#endif + (align & WordBreak) == 0 ) { + sz = d->sh; + } else { + // think about caching these for performance + sz.rwidth() = sizeForWidth( 0 ).width(); + sz.rheight() = sizeForWidth(TQWIDGETSIZE_MAX).height(); + if ( d->sh.height() < sz.height() ) + sz.rheight() = d->sh.height(); + } + if ( sizePolicy().horData() == TQSizePolicy::Ignored ) + sz.rwidth() = -1; + if ( sizePolicy().verData() == TQSizePolicy::Ignored ) + sz.rheight() = -1; + d->msh = sz; + return sz; +} + +/*! + \reimp +*/ +void TQLabel::resizeEvent( TQResizeEvent* e ) +{ + TQFrame::resizeEvent( e ); + +#ifdef TQT_NO_RICHTEXT + static const bool doc = FALSE; +#endif + + // optimize for standard labels + if ( frameShape() == NoFrame && (align & WordBreak) == 0 && !doc && + ( e->oldSize().width() >= e->size().width() && (align & AlignLeft ) == AlignLeft ) + && ( e->oldSize().height() >= e->size().height() && (align & AlignTop ) == AlignTop ) ) { + setWFlags( WResizeNoErase ); + return; + } + + clearWFlags( WResizeNoErase ); + TQRect cr = contentsRect(); + if ( !lpixmap || !cr.isValid() || + // masked pixmaps can only reduce flicker when being top/left + // aligned and when we do not perform scaled contents + ( lpixmap->hasAlpha() && ( scaledcontents || ( ( align & (AlignLeft|AlignTop) ) != (AlignLeft|AlignTop) ) ) ) ) + return; + + setWFlags( WResizeNoErase ); + + if ( !scaledcontents ) { + // don't we all love TQFrame? Reduce pixmap flicker + TQRegion reg = TQRect( TQPoint(0, 0), e->size() ); + reg = reg.subtract( cr ); + int x = cr.x(); + int y = cr.y(); + int w = lpixmap->width(); + int h = lpixmap->height(); + if ( (align & TQt::AlignVCenter) == TQt::AlignVCenter ) + y += cr.height()/2 - h/2; + else if ( (align & TQt::AlignBottom) == TQt::AlignBottom) + y += cr.height() - h; + if ( (align & TQt::AlignRight) == TQt::AlignRight ) + x += cr.width() - w; + else if ( (align & TQt::AlignHCenter) == TQt::AlignHCenter ) + x += cr.width()/2 - w/2; + if ( x > cr.x() ) + reg = reg.unite( TQRect( cr.x(), cr.y(), x - cr.x(), cr.height() ) ); + if ( y > cr.y() ) + reg = reg.unite( TQRect( cr.x(), cr.y(), cr.width(), y - cr.y() ) ); + + if ( x + w < cr.right() ) + reg = reg.unite( TQRect( x + w, cr.y(), cr.right() - x - w, cr.height() ) ); + if ( y + h < cr.bottom() ) + reg = reg.unite( TQRect( cr.x(), y + h, cr.width(), cr.bottom() - y - h ) ); + + erase( reg ); + } +} + + +/*! + Draws the label contents using the painter \a p. +*/ + +void TQLabel::drawContents( TQPainter *p ) +{ + TQRect cr = contentsRect(); + + TQPixmap *pix = pixmap(); +#ifndef TQT_NO_PICTURE + TQPicture *pic = picture(); +#else + const int pic = 0; +#endif +#ifndef TQT_NO_MOVIE + TQMovie *mov = movie(); +#else + const int mov = 0; +#endif + + if ( !mov && !pix && !pic ) { + int m = indent(); + if ( m < 0 && frameWidth() ) // no indent, but we do have a frame + m = fontMetrics().width('x') / 2 - margin(); + if ( m > 0 ) { + int hAlign = TQApplication::horizontalAlignment( align ); + if ( hAlign & AlignLeft ) + cr.setLeft( cr.left() + m ); + if ( hAlign & AlignRight ) + cr.setRight( cr.right() - m ); + if ( align & AlignTop ) + cr.setTop( cr.top() + m ); + if ( align & AlignBottom ) + cr.setBottom( cr.bottom() - m ); + } + } + +#ifndef TQT_NO_MOVIE + if ( mov ) { + // ### should add movie to qDrawItem + TQRect r = style().itemRect( p, cr, align, isEnabled(), &(mov->framePixmap()), + TQString::null ); + // ### could resize movie frame at this point + p->drawPixmap(r.x(), r.y(), mov->framePixmap() ); + } + else +#endif +#ifndef TQT_NO_RICHTEXT + if ( doc ) { + doc->setWidth(p, cr.width() ); + int rh = doc->height(); + int yo = 0; + if ( align & AlignVCenter ) + yo = (cr.height()-rh)/2; + else if ( align & AlignBottom ) + yo = cr.height()-rh; + if (! isEnabled() && + style().styleHint(TQStyle::SH_EtchDisabledText, this)) { + TQColorGroup cg = colorGroup(); + cg.setColor( TQColorGroup::Text, cg.light() ); + doc->draw(p, cr.x()+1, cr.y()+yo+1, cr, cg, 0); + } + + // TQSimpleRichText always draws with TQColorGroup::Text as with + // background mode PaletteBase. TQLabel typically has + // background mode PaletteBackground, so we create a temporary + // color group with the text color adjusted. + TQColorGroup cg = colorGroup(); + if ( backgroundMode() != PaletteBase && isEnabled() ) + cg.setColor( TQColorGroup::Text, paletteForegroundColor() ); + + doc->draw(p, cr.x(), cr.y()+yo, cr, cg, 0); + } else +#endif +#ifndef TQT_NO_PICTURE + if ( pic ) { + TQRect br = pic->boundingRect(); + int rw = br.width(); + int rh = br.height(); + if ( scaledcontents ) { + p->save(); + p->translate( cr.x(), cr.y() ); +#ifndef TQT_NO_TRANSFORMATIONS + p->scale( (double)cr.width()/rw, (double)cr.height()/rh ); +#endif + p->drawPicture( -br.x(), -br.y(), *pic ); + p->restore(); + } else { + int xo = 0; + int yo = 0; + if ( align & AlignVCenter ) + yo = (cr.height()-rh)/2; + else if ( align & AlignBottom ) + yo = cr.height()-rh; + if ( align & AlignRight ) + xo = cr.width()-rw; + else if ( align & AlignHCenter ) + xo = (cr.width()-rw)/2; + p->drawPicture( cr.x()+xo-br.x(), cr.y()+yo-br.y(), *pic ); + } + } else +#endif + { +#ifndef TQT_NO_IMAGE_SMOOTHSCALE + if ( scaledcontents && pix ) { + if ( !d->img ) + d->img = new TQImage( lpixmap->convertToImage() ); + + if ( !d->pix ) + d->pix = new TQPixmap; + if ( d->pix->size() != cr.size() ) + d->pix->convertFromImage( d->img->smoothScale( cr.width(), cr.height() ) ); + pix = d->pix; + } +#endif + int alignment = align; + if ((align & ShowPrefix) && ((!style().styleHint(TQStyle::SH_UnderlineAccelerator, this)) || ((style().styleHint(TQStyle::SH_HideUnderlineAcceleratorWhenAltUp, this)) && (!style().acceleratorsShown())))) { + alignment |= NoAccel; + } + // ordinary text or pixmap label + style().drawItem( p, cr, alignment, colorGroup(), isEnabled(), + pix, ltext ); + } +} + + +/*! + Updates the label, but not the frame. +*/ + +void TQLabel::updateLabel( TQSize oldSizeHint ) +{ + d->valid_hints = -1; + TQSizePolicy policy = sizePolicy(); + bool wordBreak = align & WordBreak; + policy.setHeightForWidth( wordBreak ); + if ( policy != sizePolicy() ) + setSizePolicy( policy ); + if ( sizeHint() != oldSizeHint ) + updateGeometry(); + if ( autoresize ) { + adjustSize(); + update( contentsRect() ); + } else { + update( contentsRect() ); + } +} + + +/*! + \internal + + Internal slot, used to set focus for accelerator labels. +*/ +#ifndef TQT_NO_ACCEL +void TQLabel::acceleratorSlot() +{ + if ( !lbuddy ) + return; + TQWidget * w = lbuddy; + while ( w->focusProxy() ) + w = w->focusProxy(); + if ( !w->hasFocus() && + w->isEnabled() && + w->isVisible() && + w->focusPolicy() != NoFocus ) { + TQFocusEvent::setReason( TQFocusEvent::Shortcut ); + w->setFocus(); + TQFocusEvent::resetReason(); + } +} +#endif + +/*! + \internal + + Internal slot, used to clean up if the buddy widget dies. +*/ +#ifndef TQT_NO_ACCEL +void TQLabel::buddyDied() // I can't remember if I cried. +{ + lbuddy = 0; +} + +/*! + Sets this label's buddy to \a buddy. + + When the user presses the accelerator key indicated by this label, + the keyboard focus is transferred to the label's buddy widget. + + The buddy mechanism is only available for TQLabels that contain + plain text in which one letter is prefixed with an ampersand, \&. + This letter is set as the accelerator key. The letter is displayed + underlined, and the '\&' is not displayed (i.e. the \c ShowPrefix + alignment flag is turned on; see setAlignment()). + + In a dialog, you might create two data entry widgets and a label + for each, and set up the geometry layout so each label is just to + the left of its data entry widget (its "buddy"), for example: + \code + TQLineEdit *nameEd = new TQLineEdit( this ); + TQLabel *nameLb = new TQLabel( "&Name:", this ); + nameLb->setBuddy( nameEd ); + TQLineEdit *phoneEd = new TQLineEdit( this ); + TQLabel *phoneLb = new TQLabel( "&Phone:", this ); + phoneLb->setBuddy( phoneEd ); + // ( layout setup not shown ) + \endcode + + With the code above, the focus jumps to the Name field when the + user presses Alt+N, and to the Phone field when the user presses + Alt+P. + + To unset a previously set buddy, call this function with \a buddy + set to 0. + + \sa buddy(), setText(), TQAccel, setAlignment() +*/ + +void TQLabel::setBuddy( TQWidget *buddy ) +{ + if ( buddy ) + setAlignment( alignment() | ShowPrefix ); + else + setAlignment( alignment() & ~ShowPrefix ); + + if ( lbuddy ) + disconnect( lbuddy, TQ_SIGNAL(destroyed()), this, TQ_SLOT(buddyDied()) ); + + lbuddy = buddy; + + if ( !lbuddy ) + return; +#ifndef TQT_NO_RICHTEXT + if ( !( textformat == RichText || (textformat == AutoText && + TQStyleSheet::mightBeRichText(ltext) ) ) ) +#endif + { + int p = TQAccel::shortcutKey( ltext ); + if ( p ) { + if ( !accel ) + accel = new TQAccel( this, "accel label accel" ); + accel->connectItem( accel->insertItem( p ), + this, TQ_SLOT(acceleratorSlot()) ); + } + } + + connect( lbuddy, TQ_SIGNAL(destroyed()), this, TQ_SLOT(buddyDied()) ); +} + + +/*! + Returns this label's buddy, or 0 if no buddy is currently set. + + \sa setBuddy() +*/ + +TQWidget * TQLabel::buddy() const +{ + return lbuddy; +} +#endif //TQT_NO_ACCEL + + +#ifndef TQT_NO_MOVIE +void TQLabel::movieUpdated(const TQRect& rect) +{ + TQMovie *mov = movie(); + if ( mov && !mov->isNull() ) { + TQRect r = contentsRect(); + r = style().itemRect( 0, r, align, isEnabled(), &(mov->framePixmap()), + TQString::null ); + r.moveBy(rect.x(), rect.y()); + r.setWidth(TQMIN(r.width(), rect.width())); + r.setHeight(TQMIN(r.height(), rect.height())); + repaint( r, mov->framePixmap().mask() != 0 ); + } +} + +void TQLabel::movieResized( const TQSize& size ) +{ + d->valid_hints = -1; + if ( autoresize ) + adjustSize(); + movieUpdated( TQRect( TQPoint(0,0), size ) ); + updateGeometry(); +} + +/*! + Sets the label contents to \a movie. Any previous content is + cleared. + + The buddy accelerator, if any, is disabled. + + The label resizes itself if auto-resizing is enabled. + + \sa movie(), setBuddy() +*/ + +void TQLabel::setMovie( const TQMovie& movie ) +{ + TQSize osh = sizeHint(); + clearContents(); + + lmovie = new TQMovie( movie ); + lmovie->connectResize(this, TQ_SLOT(movieResized(const TQSize&))); + lmovie->connectUpdate(this, TQ_SLOT(movieUpdated(const TQRect&))); + + if ( !lmovie->running() ) // Assume that if the movie is running, + updateLabel( osh ); // resize/update signals will come soon enough +} + +#endif // TQT_NO_MOVIE + +/*! + \internal + + Clears any contents, without updating/repainting the label. +*/ + +void TQLabel::clearContents() +{ +#ifndef TQT_NO_RICHTEXT + delete doc; + doc = 0; +#endif + + delete lpixmap; + lpixmap = 0; +#ifndef TQT_NO_PICTURE + delete lpicture; + lpicture = 0; +#endif + delete d->img; + d->img = 0; + delete d->pix; + d->pix = 0; + + ltext = TQString::null; +#ifndef TQT_NO_ACCEL + if ( accel ) + accel->clear(); +#endif +#ifndef TQT_NO_MOVIE + if ( lmovie ) { + lmovie->disconnectResize(this, TQ_SLOT(movieResized(const TQSize&))); + lmovie->disconnectUpdate(this, TQ_SLOT(movieUpdated(const TQRect&))); + delete lmovie; + lmovie = 0; + } +#endif +} + + +#ifndef TQT_NO_MOVIE + +/*! + Returns a pointer to the label's movie, or 0 if no movie has been + set. + + \sa setMovie() +*/ + +TQMovie* TQLabel::movie() const +{ + return lmovie; +} + +#endif // TQT_NO_MOVIE + +/*! + \property TQLabel::backgroundMode + \brief the label's background mode + + Get this property with backgroundMode(). + + \sa TQWidget::setBackgroundMode() +*/ + +/*! + \property TQLabel::textFormat + \brief the label's text format + + See the \c TQt::TextFormat enum for an explanation of the possible + options. + + The default format is \c AutoText. + + \sa text +*/ + +TQt::TextFormat TQLabel::textFormat() const +{ + return textformat; +} + +void TQLabel::setTextFormat( TQt::TextFormat format ) +{ + if ( format != textformat ) { + textformat = format; + TQString t = ltext; + if ( !t.isNull() ) { + ltext = TQString::null; + setText( t ); + } + } +} + +/*! + \reimp +*/ + +void TQLabel::fontChange( const TQFont & ) +{ + if ( !ltext.isEmpty() ) { +#ifndef TQT_NO_RICHTEXT + if ( doc ) + doc->setDefaultFont( font() ); +#endif + updateLabel( TQSize( -1, -1 ) ); + } +} + +#ifndef TQT_NO_IMAGE_SMOOTHSCALE +/*! + \property TQLabel::scaledContents + \brief whether the label will scale its contents to fill all + available space. + + When enabled and the label shows a pixmap, it will scale the + pixmap to fill the available space. + + This property's default is FALSE. + + \sa setScaledContents() +*/ +bool TQLabel::hasScaledContents() const +{ + return scaledcontents; +} + +void TQLabel::setScaledContents( bool enable ) +{ + if ( (bool)scaledcontents == enable ) + return; + scaledcontents = enable; + if ( !enable ) { + delete d->img; + d->img = 0; + delete d->pix; + d->pix = 0; + } + update( contentsRect() ); +} + +#endif // TQT_NO_IMAGE_SMOOTHSCALE + +/*! + Sets the font used on the TQLabel to font \a f. +*/ + +void TQLabel::setFont( const TQFont &f ) +{ + TQFrame::setFont( f ); +} + +#endif // TQT_NO_LABEL diff --git a/src/widgets/tqlabel.h b/src/widgets/tqlabel.h new file mode 100644 index 000000000..f8d728807 --- /dev/null +++ b/src/widgets/tqlabel.h @@ -0,0 +1,174 @@ +/********************************************************************** +** +** Definition of TQLabel widget class +** +** Created : 941215 +** +** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. +** +** This file is part of the widgets module of the TQt GUI Toolkit. +** +** This file may be used under the terms of the GNU General +** Public License versions 2.0 or 3.0 as published by the Free +** Software Foundation and appearing in the files LICENSE.GPL2 +** and LICENSE.GPL3 included in the packaging of this file. +** Alternatively you may (at your option) use any later version +** of the GNU General Public License if such license has been +** publicly approved by Trolltech ASA (or its successors, if any) +** and the KDE Free TQt Foundation. +** +** Please review the following information to ensure GNU General +** Public Licensing requirements will be met: +** http://trolltech.com/products/qt/licenses/licensing/opensource/. +** If you are unsure which license is appropriate for your use, please +** review the following information: +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview +** or contact the sales department at sales@trolltech.com. +** +** This file may be used under the terms of the Q Public License as +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL +** included in the packaging of this file. Licensees holding valid TQt +** Commercial licenses may use this file in accordance with the TQt +** Commercial License Agreement provided with the Software. +** +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted +** herein. +** +**********************************************************************/ + +#ifndef TQLABEL_H +#define TQLABEL_H + +#ifndef QT_H +#include "ntqframe.h" +#endif // QT_H + +#ifndef TQT_NO_LABEL + +class TQSimpleRichText; +class TQLabelPrivate; + +class TQ_EXPORT TQLabel : public TQFrame +{ + TQ_OBJECT + TQ_PROPERTY( TQString text READ text WRITE setText ) + TQ_PROPERTY( TextFormat textFormat READ textFormat WRITE setTextFormat ) + TQ_PROPERTY( TQPixmap pixmap READ pixmap WRITE setPixmap ) + TQ_PROPERTY( bool scaledContents READ hasScaledContents WRITE setScaledContents ) + TQ_PROPERTY( Alignment alignment READ alignment WRITE setAlignment ) + TQ_PROPERTY( int indent READ indent WRITE setIndent ) + TQ_OVERRIDE( BackgroundMode backgroundMode DESIGNABLE true) + +public: + TQLabel( TQWidget *parent, const char* name=0, WFlags f=0 ); + TQLabel( const TQString &text, TQWidget *parent, const char* name=0, + WFlags f=0 ); + TQLabel( TQWidget *buddy, const TQString &, + TQWidget *parent, const char* name=0, WFlags f=0 ); + ~TQLabel(); + + TQString text() const { return ltext; } + TQPixmap *pixmap() const { return lpixmap; } +#ifndef TQT_NO_PICTURE + TQPicture *picture() const { return lpicture; } +#endif +#ifndef TQT_NO_MOVIE + TQMovie *movie() const; +#endif + + TextFormat textFormat() const; + void setTextFormat( TextFormat ); + + int alignment() const { return align; } + virtual void setAlignment( int ); + int indent() const { return extraMargin; } + void setIndent( int ); + + bool autoResize() const { return autoresize; } + virtual void setAutoResize( bool ); +#ifndef TQT_NO_IMAGE_SMOOTHSCALE + bool hasScaledContents() const; + void setScaledContents( bool ); +#endif + TQSize sizeHint() const; + TQSize minimumSizeHint() const; +#ifndef TQT_NO_ACCEL + virtual void setBuddy( TQWidget * ); + TQWidget *buddy() const; +#endif + int heightForWidth(int) const; + + void setFont( const TQFont &f ); + +public slots: + virtual void setText( const TQString &); + virtual void setPixmap( const TQPixmap & ); +#ifndef TQT_NO_PICTURE + virtual void setPicture( const TQPicture & ); +#endif +#ifndef TQT_NO_MOVIE + virtual void setMovie( const TQMovie & ); +#endif + virtual void setNum( int ); + virtual void setNum( double ); + void clear(); + +protected: + void drawContents( TQPainter * ); + void fontChange( const TQFont & ); + void resizeEvent( TQResizeEvent* ); + +private slots: +#ifndef TQT_NO_ACCEL + void acceleratorSlot(); + void buddyDied(); +#endif +#ifndef TQT_NO_MOVIE + void movieUpdated(const TQRect&); + void movieResized(const TQSize&); +#endif + +private: + void init(); + void clearContents(); + void updateLabel( TQSize oldSizeHint ); + TQSize sizeForWidth( int w ) const; + TQString ltext; + TQPixmap *lpixmap; +#ifndef TQT_NO_PICTURE + TQPicture *lpicture; +#endif +#ifndef TQT_NO_MOVIE + TQMovie * lmovie; +#endif +#ifndef TQT_NO_ACCEL + TQWidget * lbuddy; +#endif + ushort align; + short extraMargin; + uint autoresize:1; + uint scaledcontents :1; + TextFormat textformat; +#ifndef TQT_NO_RICHTEXT + TQSimpleRichText* doc; +#endif +#ifndef TQT_NO_ACCEL + TQAccel * accel; +#endif + TQLabelPrivate* d; + + friend class TQTipLabel; + +private: // Disabled copy constructor and operator= +#if defined(TQ_DISABLE_COPY) + TQLabel( const TQLabel & ); + TQLabel &operator=( const TQLabel & ); +#endif +}; + + +#endif // TQT_NO_LABEL + +#endif // TQLABEL_H diff --git a/src/widgets/tqmainwindow.cpp b/src/widgets/tqmainwindow.cpp index 071a330ff..7b66839db 100644 --- a/src/widgets/tqmainwindow.cpp +++ b/src/widgets/tqmainwindow.cpp @@ -57,7 +57,7 @@ #include "ntqscrollview.h" #include "tqtooltip.h" #include "tqdatetime.h" -#include "ntqwhatsthis.h" +#include "tqwhatsthis.h" #include "tqbitmap.h" #include "ntqdockarea.h" #include "tqstringlist.h" diff --git a/src/widgets/tqpopupmenu.cpp b/src/widgets/tqpopupmenu.cpp index 09961bf03..26aa7f9cc 100644 --- a/src/widgets/tqpopupmenu.cpp +++ b/src/widgets/tqpopupmenu.cpp @@ -48,7 +48,7 @@ #include "tqpixmap.h" #include "tqpixmapcache.h" #include "tqtimer.h" -#include "ntqwhatsthis.h" +#include "tqwhatsthis.h" #include "tqobjectlist.h" #include "ntqguardedptr.h" #include "qeffects_p.h" @@ -124,7 +124,7 @@ static void popupSubMenuLater( int msec, TQPopupMenu * receiver ) { static bool preventAnimation = FALSE; #ifndef TQT_NO_WHATSTHIS -extern void qWhatsThisBDH(); +extern void tqWhatsThisBDH(); static TQMenuItem* whatsThisItem = 0; #endif @@ -816,7 +816,7 @@ void TQPopupMenu::hideAllPopups() #ifndef TQT_NO_WHATSTHIS if (whatsThisItem) { - qWhatsThisBDH(); + tqWhatsThisBDH(); whatsThisItem = 0; } #endif @@ -2570,7 +2570,7 @@ void TQPopupMenu::setActiveItem( int i ) hilitSig( mi->id() ); #ifndef TQT_NO_WHATSTHIS if (whatsThisItem && whatsThisItem != mi) { - qWhatsThisBDH(); + tqWhatsThisBDH(); } whatsThisItem = mi; #endif diff --git a/src/widgets/tqsyntaxhighlighter.cpp b/src/widgets/tqsyntaxhighlighter.cpp new file mode 100644 index 000000000..223f7930c --- /dev/null +++ b/src/widgets/tqsyntaxhighlighter.cpp @@ -0,0 +1,221 @@ +/**************************************************************************** +** +** Implementation of the TQSyntaxHighlighter class +** +** Created : 990101 +** +** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. +** +** This file is part of the widgets module of the TQt GUI Toolkit. +** +** This file may be used under the terms of the GNU General +** Public License versions 2.0 or 3.0 as published by the Free +** Software Foundation and appearing in the files LICENSE.GPL2 +** and LICENSE.GPL3 included in the packaging of this file. +** Alternatively you may (at your option) use any later version +** of the GNU General Public License if such license has been +** publicly approved by Trolltech ASA (or its successors, if any) +** and the KDE Free TQt Foundation. +** +** Please review the following information to ensure GNU General +** Public Licensing requirements will be met: +** http://trolltech.com/products/qt/licenses/licensing/opensource/. +** If you are unsure which license is appropriate for your use, please +** review the following information: +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview +** or contact the sales department at sales@trolltech.com. +** +** This file may be used under the terms of the Q Public License as +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL +** included in the packaging of this file. Licensees holding valid TQt +** Commercial licenses may use this file in accordance with the TQt +** Commercial License Agreement provided with the Software. +** +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted +** herein. +** +**********************************************************************/ + +#include "tqsyntaxhighlighter.h" +#include "private/tqsyntaxhighlighter_p.h" + +#ifndef TQT_NO_SYNTAXHIGHLIGHTER +#include "../kernel/qrichtext_p.h" +#include "tqtextedit.h" +#include "tqtimer.h" + +/*! + \class TQSyntaxHighlighter tqsyntaxhighlighter.h + \brief The TQSyntaxHighlighter class is a base class for + implementing TQTextEdit syntax highlighters. + + \ingroup basic + \ingroup text + + A syntax highligher automatically highlights parts of the text in + a TQTextEdit. Syntax highlighters are often used when the user is + entering text in a specific format (for example, source code) and + help the user to read the text and identify syntax errors. + + To provide your own syntax highlighting for TQTextEdit, you must + subclass TQSyntaxHighlighter and reimplement highlightParagraph(). + + When you create an instance of your TQSyntaxHighlighter subclass, + pass it the TQTextEdit that you want the syntax highlighting to be + applied to. After this your highlightParagraph() function will be + called automatically whenever necessary. Use your + highlightParagraph() function to apply formatting (e.g. setting + the font and color) to the text that is passed to it. +*/ + +/*! + Constructs the TQSyntaxHighlighter and installs it on \a textEdit. + + It is the caller's responsibility to delete the + TQSyntaxHighlighter when it is no longer needed. +*/ + +TQSyntaxHighlighter::TQSyntaxHighlighter( TQTextEdit *textEdit ) + : para( 0 ), edit( textEdit ), d( new TQSyntaxHighlighterPrivate ) +{ + textEdit->document()->setPreProcessor( new TQSyntaxHighlighterInternal( this ) ); + textEdit->document()->invalidate(); + TQTimer::singleShot( 0, textEdit->viewport(), TQ_SLOT( update() ) ); +} + +/*! + Destructor. Uninstalls this syntax highlighter from the textEdit() +*/ + +TQSyntaxHighlighter::~TQSyntaxHighlighter() +{ + delete d; + textEdit()->document()->setPreProcessor( 0 ); +} + +/*! + \fn int TQSyntaxHighlighter::highlightParagraph( const TQString &text, int endStateOfLastPara ) + + This function is called when necessary by the rich text engine, + i.e. on paragraphs which have changed. + + In your reimplementation you should parse the paragraph's \a text + and call setFormat() as often as necessary to apply any font and + color changes that you require. Your function must return a value + which indicates the paragraph's end state: see below. + + Some syntaxes can have constructs that span paragraphs. For + example, a C++ syntax highlighter should be able to cope with + \c{/}\c{*...*}\c{/} comments that span paragraphs. To deal + with these cases it is necessary to know the end state of the + previous paragraph (e.g. "in comment"). + + If your syntax does not have paragraph spanning constructs, simply + ignore the \a endStateOfLastPara parameter and always return 0. + + Whenever highlightParagraph() is called it is passed a value for + \a endStateOfLastPara. For the very first paragraph this value is + always -2. For any other paragraph the value is the value returned + by the most recent highlightParagraph() call that applied to the + preceding paragraph. + + The value you return is up to you. We recommend only returning 0 + (to signify that this paragraph's syntax highlighting does not + affect the following paragraph), or a positive integer (to signify + that this paragraph has ended in the middle of a paragraph + spanning construct). + + To find out which paragraph is highlighted, call + currentParagraph(). + + For example, if you're writing a simple C++ syntax highlighter, + you might designate 1 to signify "in comment". For a paragraph + that ended in the middle of a comment you'd return 1, and for + other paragraphs you'd return 0. In your parsing code if \a + endStateOfLastPara was 1, you would highlight the text as a C++ + comment until you reached the closing \c{*}\c{/}. +*/ + +/*! + This function is applied to the syntax highlighter's current + paragraph (the text of which is passed to the highlightParagraph() + function). + + The specified \a font and \a color are applied to the text from + position \a start for \a count characters. (If \a count is 0, + nothing is done.) +*/ + +void TQSyntaxHighlighter::setFormat( int start, int count, const TQFont &font, const TQColor &color ) +{ + if ( !para || count <= 0 ) + return; + TQTextFormat *f = 0; + f = para->document()->formatCollection()->format( font, color ); + para->setFormat( start, count, f ); + f->removeRef(); +} + +/*! \overload */ + +void TQSyntaxHighlighter::setFormat( int start, int count, const TQColor &color ) +{ + if ( !para || count <= 0 ) + return; + TQTextFormat *f = 0; + TQFont fnt = textEdit()->TQWidget::font(); + f = para->document()->formatCollection()->format( fnt, color ); + para->setFormat( start, count, f ); + f->removeRef(); +} + +/*! \overload */ + +void TQSyntaxHighlighter::setFormat( int start, int count, const TQFont &font ) +{ + if ( !para || count <= 0 ) + return; + TQTextFormat *f = 0; + TQColor c = textEdit()->viewport()->paletteForegroundColor(); + f = para->document()->formatCollection()->format( font, c ); + para->setFormat( start, count, f ); + f->removeRef(); +} + +/*! + \fn TQTextEdit *TQSyntaxHighlighter::textEdit() const + + Returns the TQTextEdit on which this syntax highlighter is + installed +*/ + +/*! Redoes the highlighting of the whole document. +*/ + +void TQSyntaxHighlighter::rehighlight() +{ + TQTextParagraph *s = edit->document()->firstParagraph(); + while ( s ) { + s->invalidate( 0 ); + s->state = -1; + s->needPreProcess = TRUE; + s = s->next(); + } + edit->repaintContents( FALSE ); +} + +/*! + Returns the id of the paragraph which is highlighted, or -1 of no + paragraph is currently highlighted. + + Usually this function is called from within highlightParagraph(). +*/ + +int TQSyntaxHighlighter::currentParagraph() const +{ + return d->currentParagraph; +} + +#endif diff --git a/src/widgets/tqsyntaxhighlighter.h b/src/widgets/tqsyntaxhighlighter.h new file mode 100644 index 000000000..81556553e --- /dev/null +++ b/src/widgets/tqsyntaxhighlighter.h @@ -0,0 +1,81 @@ +/**************************************************************************** +** +** Definition of the TQSyntaxHighlighter class +** +** Created : 022407 +** +** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. +** +** This file is part of the widgets module of the TQt GUI Toolkit. +** +** This file may be used under the terms of the GNU General +** Public License versions 2.0 or 3.0 as published by the Free +** Software Foundation and appearing in the files LICENSE.GPL2 +** and LICENSE.GPL3 included in the packaging of this file. +** Alternatively you may (at your option) use any later version +** of the GNU General Public License if such license has been +** publicly approved by Trolltech ASA (or its successors, if any) +** and the KDE Free TQt Foundation. +** +** Please review the following information to ensure GNU General +** Public Licensing requirements will be met: +** http://trolltech.com/products/qt/licenses/licensing/opensource/. +** If you are unsure which license is appropriate for your use, please +** review the following information: +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview +** or contact the sales department at sales@trolltech.com. +** +** This file may be used under the terms of the Q Public License as +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL +** included in the packaging of this file. Licensees holding valid TQt +** Commercial licenses may use this file in accordance with the TQt +** Commercial License Agreement provided with the Software. +** +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted +** herein. +** +**********************************************************************/ + +#ifndef TQSYNTAXHIGHLIGHTER_H +#define TQSYNTAXHIGHLIGHTER_H + +#ifndef QT_H +#include "tqfont.h" +#include "tqcolor.h" +#include "tqstring.h" +#endif // QT_H + +class TQTextEdit; +class TQSyntaxHighlighterInternal; +class TQSyntaxHighlighterPrivate; +class TQTextParagraph; + +class TQ_EXPORT TQSyntaxHighlighter : public TQt +{ + friend class TQSyntaxHighlighterInternal; + +public: + TQSyntaxHighlighter( TQTextEdit *textEdit ); + virtual ~TQSyntaxHighlighter(); + + virtual int highlightParagraph( const TQString &text, int endStateOfLastPara ) = 0; + + void setFormat( int start, int count, const TQFont &font, const TQColor &color ); + void setFormat( int start, int count, const TQColor &color ); + void setFormat( int start, int count, const TQFont &font ); + TQTextEdit *textEdit() const { return edit; } + + void rehighlight(); + + int currentParagraph() const; + +private: + TQTextParagraph *para; + TQTextEdit *edit; + TQSyntaxHighlighterPrivate *d; + +}; + +#endif diff --git a/src/widgets/tqsyntaxhighlighter_p.h b/src/widgets/tqsyntaxhighlighter_p.h new file mode 100644 index 000000000..c4d7deabf --- /dev/null +++ b/src/widgets/tqsyntaxhighlighter_p.h @@ -0,0 +1,97 @@ +/**************************************************************************** +** +** Definition of the internal TQSyntaxHighlighterInternal class +** +** Created : 031111 +** +** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. +** +** This file is part of the widgets module of the TQt GUI Toolkit. +** +** This file may be used under the terms of the GNU General +** Public License versions 2.0 or 3.0 as published by the Free +** Software Foundation and appearing in the files LICENSE.GPL2 +** and LICENSE.GPL3 included in the packaging of this file. +** Alternatively you may (at your option) use any later version +** of the GNU General Public License if such license has been +** publicly approved by Trolltech ASA (or its successors, if any) +** and the KDE Free TQt Foundation. +** +** Please review the following information to ensure GNU General +** Public Licensing requirements will be met: +** http://trolltech.com/products/qt/licenses/licensing/opensource/. +** If you are unsure which license is appropriate for your use, please +** review the following information: +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview +** or contact the sales department at sales@trolltech.com. +** +** This file may be used under the terms of the Q Public License as +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL +** included in the packaging of this file. Licensees holding valid TQt +** Commercial licenses may use this file in accordance with the TQt +** Commercial License Agreement provided with the Software. +** +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted +** herein. +** +**********************************************************************/ + +#ifndef TQSYNTAXHIGHLIGHTER_P_H +#define TQSYNTAXHIGHLIGHTER_P_H + +#ifndef TQT_NO_SYNTAXHIGHLIGHTER +#include "tqsyntaxhighlighter.h" +#include "private/qrichtext_p.h" + +class TQSyntaxHighlighterPrivate +{ +public: + TQSyntaxHighlighterPrivate() : + currentParagraph( -1 ) + {} + + int currentParagraph; +}; + +class TQSyntaxHighlighterInternal : public TQTextPreProcessor +{ +public: + TQSyntaxHighlighterInternal( TQSyntaxHighlighter *h ) : highlighter( h ) {} + void process( TQTextDocument *doc, TQTextParagraph *p, int, bool invalidate ) { + if ( p->prev() && p->prev()->endState() == -1 ) + process( doc, p->prev(), 0, FALSE ); + + highlighter->para = p; + TQString text = p->string()->toString(); + int endState = p->prev() ? p->prev()->endState() : -2; + int oldEndState = p->endState(); + highlighter->d->currentParagraph = p->paragId(); + p->setEndState( highlighter->highlightParagraph( text, endState ) ); + highlighter->d->currentParagraph = -1; + highlighter->para = 0; + + p->setFirstPreProcess( FALSE ); + TQTextParagraph *op = p; + p = p->next(); + if ( (!!oldEndState || !!op->endState()) && oldEndState != op->endState() && + invalidate && p && !p->firstPreProcess() && p->endState() != -1 ) { + while ( p ) { + if ( p->endState() == -1 ) + return; + p->setEndState( -1 ); + p = p->next(); + } + } + } + TQTextFormat *format( int ) { return 0; } + +private: + TQSyntaxHighlighter *highlighter; + + friend class TQTextEdit; +}; + +#endif // TQT_NO_SYNTAXHIGHLIGHTER +#endif // TQSYNTAXHIGHLIGHTER_P_H diff --git a/src/widgets/tqtextbrowser.cpp b/src/widgets/tqtextbrowser.cpp index fd4bced0a..1409a20ff 100644 --- a/src/widgets/tqtextbrowser.cpp +++ b/src/widgets/tqtextbrowser.cpp @@ -54,7 +54,7 @@ #include "tqbitmap.h" #include "tqtimer.h" #include "tqimage.h" -#include "ntqsimplerichtext.h" +#include "tqsimplerichtext.h" #include "tqdragobject.h" #include "tqurl.h" #include "ntqcursor.h" diff --git a/src/widgets/tqtextedit.cpp b/src/widgets/tqtextedit.cpp index a0887cb5d..9ef0752a7 100644 --- a/src/widgets/tqtextedit.cpp +++ b/src/widgets/tqtextedit.cpp @@ -75,7 +75,7 @@ #include "ntqmetaobject.h" #include "tqtextbrowser.h" #include -#include "private/qsyntaxhighlighter_p.h" +#include "private/tqsyntaxhighlighter_p.h" #include #ifndef TQT_NO_ACCEL diff --git a/src/widgets/tqtooltip.cpp b/src/widgets/tqtooltip.cpp index 6a048f5e1..7a9166452 100644 --- a/src/widgets/tqtooltip.cpp +++ b/src/widgets/tqtooltip.cpp @@ -38,7 +38,7 @@ #include "tqtooltip.h" #ifndef TQT_NO_TOOLTIP -#include "ntqlabel.h" +#include "tqlabel.h" #include "tqptrdict.h" #include "ntqapplication.h" #include "ntqguardedptr.h" diff --git a/src/widgets/tqwhatsthis.cpp b/src/widgets/tqwhatsthis.cpp new file mode 100644 index 000000000..1328c49ea --- /dev/null +++ b/src/widgets/tqwhatsthis.cpp @@ -0,0 +1,1001 @@ +/**************************************************************************** +** +** Implementation of TQWhatsThis class +** +** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. +** +** This file is part of the widgets module of the TQt GUI Toolkit. +** +** This file may be used under the terms of the GNU General +** Public License versions 2.0 or 3.0 as published by the Free +** Software Foundation and appearing in the files LICENSE.GPL2 +** and LICENSE.GPL3 included in the packaging of this file. +** Alternatively you may (at your option) use any later version +** of the GNU General Public License if such license has been +** publicly approved by Trolltech ASA (or its successors, if any) +** and the KDE Free TQt Foundation. +** +** Please review the following information to ensure GNU General +** Public Licensing requirements will be met: +** http://trolltech.com/products/qt/licenses/licensing/opensource/. +** If you are unsure which license is appropriate for your use, please +** review the following information: +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview +** or contact the sales department at sales@trolltech.com. +** +** This file may be used under the terms of the Q Public License as +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL +** included in the packaging of this file. Licensees holding valid TQt +** Commercial licenses may use this file in accordance with the TQt +** Commercial License Agreement provided with the Software. +** +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted +** herein. +** +**********************************************************************/ + +#include "tqwhatsthis.h" +#ifndef TQT_NO_WHATSTHIS +#include "ntqapplication.h" +#include "tqpaintdevicemetrics.h" +#include "tqpixmap.h" +#include "tqpainter.h" +#include "tqtimer.h" +#include "tqptrdict.h" +#include "tqtoolbutton.h" +#include "ntqshared.h" +#include "ntqcursor.h" +#include "tqbitmap.h" +#include "tqtooltip.h" +#include "tqsimplerichtext.h" +#include "tqstylesheet.h" +#if defined(QT_ACCESSIBILITY_SUPPORT) +#include "ntqaccessible.h" +#endif +#if defined(TQ_WS_WIN) +#include "qt_windows.h" +#ifndef SPI_GETDROPSHADOW +#define SPI_GETDROPSHADOW 0x1024 +#endif +#endif + +/*! + \class TQWhatsThis tqwhatsthis.h + \brief The TQWhatsThis class provides a simple description of any + widget, i.e. answering the question "What's this?". + + \ingroup helpsystem + \mainclass + + "What's this?" help is part of an application's online help system + that provides users with information about functionality, usage, + background etc., in various levels of detail from short tool tips + to full text browsing help windows. + + TQWhatsThis provides a single window with an explanatory text that + pops up when the user asks "What's this?". The default way to do + this is to focus the relevant widget and press Shift+F1. The help + text appears immediately; it goes away as soon as the user does + something else. + + (Note that if there is an accelerator for Shift+F1, this mechanism + will not work.) + + To add "What's this?" text to a widget you simply call + TQWhatsThis::add() for the widget. For example, to assign text to a + menu item, call TQMenuData::setWhatsThis(); for a global + accelerator key, call TQAccel::setWhatsThis() and If you're using + actions, use TQAction::setWhatsThis(). + + The text can be either rich text or plain text. If you specify a + rich text formatted string, it will be rendered using the default + stylesheet. This makes it possible to embed images. See + TQStyleSheet::defaultSheet() for details. + + \quotefile action/application.cpp + \skipto fileOpenText + \printuntil setWhatsThis + + An alternative way to enter "What's this?" mode is to use the + ready-made tool bar tool button from + TQWhatsThis::whatsThisButton(). By invoking this context help + button (in the picture below the first one from the right) the + user switches into "What's this?" mode. If they now click on a + widget the appropriate help text is shown. The mode is left when + help is given or when the user presses Esc. + + \img whatsthis.png + + If you are using TQMainWindow you can also use the + TQMainWindow::whatsThis() slot to invoke the mode from a menu item. + + For more control you can create a dedicated TQWhatsThis object for + a special widget. By subclassing and reimplementing + TQWhatsThis::text() it is possible to have different help texts, + depending on the position of the mouse click. By reimplementing + TQWhatsThis::clicked() it is possible to have hyperlinks inside the + help texts. + + If you wish to control the "What's this?" behavior of a widget + manually see TQWidget::customWhatsThis(). + + The What's This object can be removed using TQWhatsThis::remove(), + although this is rarely necessary because it is automatically + removed when the widget is destroyed. + + \sa TQToolTip +*/ + +// a special button +class TQWhatsThisButton: public TQToolButton +{ + TQ_OBJECT + +public: + TQWhatsThisButton( TQWidget * parent, const char * name ); + ~TQWhatsThisButton(); + +public slots: + void mouseReleased(); + +}; + + +class TQWhatsThat : public TQWidget +{ + TQ_OBJECT +public: + TQWhatsThat( TQWidget* w, const TQString& txt, TQWidget* parent, const char* name ); + ~TQWhatsThat() ; + +public slots: + void hide(); + inline void widgetDestroyed() { widget = 0; } + +protected: + void mousePressEvent( TQMouseEvent* ); + void mouseReleaseEvent( TQMouseEvent* ); + void mouseMoveEvent( TQMouseEvent* ); + void keyPressEvent( TQKeyEvent* ); + void paintEvent( TQPaintEvent* ); + +private: + TQString text; +#ifndef TQT_NO_RICHTEXT + TQSimpleRichText* doc; +#endif + TQString anchor; + bool pressed; + TQWidget* widget; +}; + + +class TQWhatsThisPrivate: public TQObject +{ + TQ_OBJECT +public: + + // an item for storing texts + struct WhatsThisItem: public TQShared + { + WhatsThisItem(): TQShared() { whatsthis = 0; } + ~WhatsThisItem(); + TQString s; + TQWhatsThis* whatsthis; + }; + + // the (these days pretty small) state machine + enum State { Inactive, Waiting }; + + TQWhatsThisPrivate(); + ~TQWhatsThisPrivate(); + + bool eventFilter( TQObject *, TQEvent * ); + + WhatsThisItem* newItem( TQWidget * widget ); + void add( TQWidget * widget, TQWhatsThis* special ); + void add( TQWidget * widget, const TQString& text ); + + // say it. + void say( TQWidget *, const TQString&, const TQPoint& ); + + // setup and teardown + static void setUpWhatsThis(); + + void enterWhatsThisMode(); + void leaveWhatsThisMode(); + + // variables + TQWhatsThat * whatsThat; + TQPtrDict * dict; + TQPtrDict * tlw; + TQPtrDict * buttons; + State state; + +private slots: + void cleanupWidget() + { + const TQObject* o = sender(); + if ( o->isWidgetType() ) // sanity + TQWhatsThis::remove((TQWidget*)o); + } + +}; + +// static, but static the less-typing way +static TQWhatsThisPrivate * wt = 0; + +// shadowWidth not const, for XP drop-shadow-fu turns it to 0 +static int shadowWidth = 6; // also used as '5' and '6' and even '8' below +const int vMargin = 8; +const int hMargin = 12; + +// Lets TQPopupMenu destroy the TQWhatsThat. +void tqWhatsThisBDH() +{ + if ( wt && wt->whatsThat ) + wt->whatsThat->hide(); +} + + +TQWhatsThat::TQWhatsThat( TQWidget* w, const TQString& txt, TQWidget* parent, const char* name ) + : TQWidget( parent, name, WType_Popup ), text( txt ), pressed( FALSE ), widget( w ) +{ + + setBackgroundMode( NoBackground ); + setPalette( TQToolTip::palette() ); + setMouseTracking( TRUE ); +#ifndef TQT_NO_CURSOR + setCursor( arrowCursor ); +#endif + + if ( widget ) + connect( widget, TQ_SIGNAL( destroyed() ), this, TQ_SLOT( widgetDestroyed() ) ); + + + TQRect r; +#ifndef TQT_NO_RICHTEXT + doc = 0; + if ( TQStyleSheet::mightBeRichText( text ) ) { + TQFont f = TQApplication::font( this ); + doc = new TQSimpleRichText( text, f ); + doc->adjustSize(); + r.setRect( 0, 0, doc->width(), doc->height() ); + } + else +#endif + { + int sw = TQApplication::desktop()->width() / 3; + if ( sw < 200 ) + sw = 200; + else if ( sw > 300 ) + sw = 300; + + r = fontMetrics().boundingRect( 0, 0, sw, 1000, + AlignAuto + AlignTop + WordBreak + ExpandTabs, + text ); + } +#if defined(TQ_WS_WIN) + if ( (qWinVersion()&WV_NT_based) > WV_2000 ) { + BOOL shadow; + SystemParametersInfo( SPI_GETDROPSHADOW, 0, &shadow, 0 ); + shadowWidth = shadow ? 0 : 6; + } +#endif + resize( r.width() + 2*hMargin + shadowWidth, r.height() + 2*vMargin + shadowWidth ); +} + +TQWhatsThat::~TQWhatsThat() +{ + if ( wt && wt->whatsThat == this ) + wt->whatsThat = 0; +#ifndef TQT_NO_RICHTEXT + if ( doc ) + delete doc; +#endif +} + +void TQWhatsThat::hide() +{ + TQWidget::hide(); +#if defined(QT_ACCESSIBILITY_SUPPORT) + TQAccessible::updateAccessibility( this, 0, TQAccessible::ContextHelpEnd ); +#endif +} + +void TQWhatsThat::mousePressEvent( TQMouseEvent* e ) +{ + pressed = TRUE; + if ( e->button() == LeftButton && rect().contains( e->pos() ) ) { +#ifndef TQT_NO_RICHTEXT + if ( doc ) + anchor = doc->anchorAt( e->pos() - TQPoint( hMargin, vMargin) ); +#endif + return; + } + hide(); +} + +void TQWhatsThat::mouseReleaseEvent( TQMouseEvent* e ) +{ + if ( !pressed ) + return; +#ifndef TQT_NO_RICHTEXT + if ( e->button() == LeftButton && doc && rect().contains( e->pos() ) ) { + TQString a = doc->anchorAt( e->pos() - TQPoint( hMargin, vMargin ) ); + TQString href; + if ( anchor == a ) + href = a; + anchor = TQString::null; + if ( widget && wt && wt->dict ) { + TQWhatsThisPrivate::WhatsThisItem * i = wt->dict->find( widget ); + if ( i && i->whatsthis && !i->whatsthis->clicked( href ) ) + return; + } + } +#endif + hide(); +} + +void TQWhatsThat::mouseMoveEvent( TQMouseEvent* e) +{ +#ifndef TQT_NO_RICHTEXT +#ifndef TQT_NO_CURSOR + if ( !doc ) + return; + TQString a = doc->anchorAt( e->pos() - TQPoint( hMargin, vMargin ) ); + if ( !a.isEmpty() ) + setCursor( pointingHandCursor ); + else + setCursor( arrowCursor ); +#endif +#endif +} + + +void TQWhatsThat::keyPressEvent( TQKeyEvent* ) +{ + hide(); +} + + + +void TQWhatsThat::paintEvent( TQPaintEvent* ) +{ + bool drawShadow = TRUE; +#if defined(TQ_WS_WIN) + if ( (qWinVersion()&WV_NT_based) > WV_2000 ) { + BOOL shadow; + SystemParametersInfo( SPI_GETDROPSHADOW, 0, &shadow, 0 ); + drawShadow = !shadow; + } +#elif defined(TQ_WS_MACX) + drawShadow = FALSE; //never draw it on OS X we get it for free +#endif + + TQRect r = rect(); + if ( drawShadow ) + r.addCoords( 0, 0, -shadowWidth, -shadowWidth ); + TQPainter p( this); + p.setPen( colorGroup().foreground() ); + p.drawRect( r ); + p.setPen( colorGroup().mid() ); + p.setBrush( colorGroup().brush( TQColorGroup::Background ) ); + int w = r.width(); + int h = r.height(); + p.drawRect( 1, 1, w-2, h-2 ); + if ( drawShadow ) { + p.setPen( colorGroup().shadow() ); + p.drawPoint( w + 5, 6 ); + p.drawLine( w + 3, 6, w + 5, 8 ); + p.drawLine( w + 1, 6, w + 5, 10 ); + int i; + for( i=7; i < h; i += 2 ) + p.drawLine( w, i, w + 5, i + 5 ); + for( i = w - i + h; i > 6; i -= 2 ) + p.drawLine( i, h, i + 5, h + 5 ); + for( ; i > 0 ; i -= 2 ) + p.drawLine( 6, h + 6 - i, i + 5, h + 5 ); + } + p.setPen( colorGroup().foreground() ); + r.addCoords( hMargin, vMargin, -hMargin, -vMargin ); + +#ifndef TQT_NO_RICHTEXT + if ( doc ) { + doc->draw( &p, r.x(), r.y(), r, colorGroup(), 0 ); + } + else +#endif + { + p.drawText( r, AlignAuto + AlignTop + WordBreak + ExpandTabs, text ); + } +} + +// the item +TQWhatsThisPrivate::WhatsThisItem::~WhatsThisItem() +{ + if ( count ) + tqFatal( "TQWhatsThis: Internal error (%d)", count ); + delete whatsthis; +} + + +static const char * const button_image[] = { +"16 16 3 1", +" c None", +"o c #000000", +"a c #000080", +"o aaaaa ", +"oo aaa aaa ", +"ooo aaa aaa", +"oooo aa aa", +"ooooo aa aa", +"oooooo a aaa", +"ooooooo aaa ", +"oooooooo aaa ", +"ooooooooo aaa ", +"ooooo aaa ", +"oo ooo ", +"o ooo aaa ", +" ooo aaa ", +" ooo ", +" ooo ", +" ooo "}; + +// the button class +TQWhatsThisButton::TQWhatsThisButton( TQWidget * parent, const char * name ) + : TQToolButton( parent, name ) +{ + TQPixmap p( (const char**)button_image ); + setPixmap( p ); + setToggleButton( TRUE ); + setAutoRaise( TRUE ); + setFocusPolicy( NoFocus ); + setTextLabel( tr( "What's this?" ) ); + wt->buttons->insert( (void *)this, this ); + connect( this, TQ_SIGNAL( released() ), + this, TQ_SLOT( mouseReleased() ) ); +} + + +TQWhatsThisButton::~TQWhatsThisButton() +{ + if ( wt && wt->buttons ) + wt->buttons->take( (void *)this ); +} + + +void TQWhatsThisButton::mouseReleased() +{ + if ( wt->state == TQWhatsThisPrivate::Inactive && isOn() ) { + TQWhatsThisPrivate::setUpWhatsThis(); +#ifndef TQT_NO_CURSOR + TQApplication::setOverrideCursor( whatsThisCursor, FALSE ); +#endif + wt->state = TQWhatsThisPrivate::Waiting; + tqApp->installEventFilter( wt ); + } +} + +static void tqWhatsThisPrivateCleanup() +{ + if( wt ) { + delete wt; + wt = 0; + } +} + +// the what's this manager class +TQWhatsThisPrivate::TQWhatsThisPrivate() + : TQObject( 0, "global what's this object" ) +{ + whatsThat = 0; + dict = new TQPtrDict; + tlw = new TQPtrDict; + wt = this; + buttons = new TQPtrDict; + state = Inactive; +} + +TQWhatsThisPrivate::~TQWhatsThisPrivate() +{ +#ifndef TQT_NO_CURSOR + if ( state == Waiting && tqApp ) + TQApplication::restoreOverrideCursor(); +#endif + // the two straight-and-simple dicts + delete tlw; + delete buttons; + + // then delete the complex one. + TQPtrDictIterator it( *dict ); + WhatsThisItem * i; + TQWidget * w; + while( (i=it.current()) != 0 ) { + w = (TQWidget *)it.currentKey(); + ++it; + dict->take( w ); + if ( i->deref() ) + delete i; + } + delete dict; + if ( whatsThat && !whatsThat->parentWidget() ) { + delete whatsThat; + } + // and finally lose wt + wt = 0; +} + +bool TQWhatsThisPrivate::eventFilter( TQObject * o, TQEvent * e ) +{ + switch( state ) { + case Waiting: + if ( e->type() == TQEvent::MouseButtonPress && o->isWidgetType() ) { + TQWidget * w = (TQWidget *) o; + if ( ( (TQMouseEvent*)e)->button() == RightButton ) + return FALSE; // ignore RMB + if ( w->customWhatsThis() ) + return FALSE; + TQWhatsThisPrivate::WhatsThisItem * i = 0; + TQMouseEvent* me = (TQMouseEvent*) e; + TQPoint p = me->pos(); + while( w && !i ) { + i = dict->find( w ); + if ( !i ) { + p += w->pos(); + w = w->parentWidget( TRUE ); + } + } + leaveWhatsThisMode(); + if (!i ) { +#if defined(QT_ACCESSIBILITY_SUPPORT) + TQAccessible::updateAccessibility( this, 0, TQAccessible::ContextHelpEnd ); +#endif + return TRUE; + } + if ( i->whatsthis ) + say( w, i->whatsthis->text( p ), me->globalPos() ); + else + say( w, i->s, me->globalPos() ); + return TRUE; + } else if ( e->type() == TQEvent::MouseButtonRelease ) { + if ( ( (TQMouseEvent*)e)->button() == RightButton ) + return FALSE; // ignore RMB + return !o->isWidgetType() || !((TQWidget*)o)->customWhatsThis(); + } else if ( e->type() == TQEvent::MouseMove ) { + return !o->isWidgetType() || !((TQWidget*)o)->customWhatsThis(); + } else if ( e->type() == TQEvent::KeyPress ) { + TQKeyEvent* kev = (TQKeyEvent*)e; + + if ( kev->key() == TQt::Key_Escape ) { + leaveWhatsThisMode(); + return TRUE; + } else if ( o->isWidgetType() && ((TQWidget*)o)->customWhatsThis() ) { + return FALSE; + } else if ( kev->key() == Key_Menu || + ( kev->key() == Key_F10 && + kev->state() == ShiftButton ) ) { + // we don't react to these keys, they are used for context menus + return FALSE; + } else if ( kev->state() == kev->stateAfter() && + kev->key() != Key_Meta ) { // not a modifier key + leaveWhatsThisMode(); + } + } else if ( e->type() == TQEvent::MouseButtonDblClick ) { + return TRUE; + } + break; + case Inactive: + if ( e->type() == TQEvent::Accel && + ((TQKeyEvent *)e)->key() == Key_F1 && + o->isWidgetType() && + ((TQKeyEvent *)e)->state() == ShiftButton ) { + TQWidget * w = ((TQWidget *)o)->focusWidget(); + if ( !w ) + break; + TQString s = TQWhatsThis::textFor( w, TQPoint(0,0), TRUE ); + if ( !s.isNull() ) { + say ( w, s, w->mapToGlobal( w->rect().center() ) ); + ((TQKeyEvent *)e)->accept(); + return TRUE; + } + } + break; + } + return FALSE; +} + + + +void TQWhatsThisPrivate::setUpWhatsThis() +{ + if ( !wt ) { + wt = new TQWhatsThisPrivate(); + + // It is necessary to use a post routine, because + // the destructor deletes pixmaps and other stuff that + // needs a working X connection under X11. + tqAddPostRoutine( tqWhatsThisPrivateCleanup ); + } +} + + +void TQWhatsThisPrivate::enterWhatsThisMode() +{ +#if defined(QT_ACCESSIBILITY_SUPPORT) + TQAccessible::updateAccessibility( this, 0, TQAccessible::ContextHelpStart ); +#endif +} + + +void TQWhatsThisPrivate::leaveWhatsThisMode() +{ + if ( state == Waiting ) { + TQPtrDictIterator it( *(wt->buttons) ); + TQWhatsThisButton * b; + while( (b=it.current()) != 0 ) { + ++it; + b->setOn( FALSE ); + } +#ifndef TQT_NO_CURSOR + TQApplication::restoreOverrideCursor(); +#endif + state = Inactive; + tqApp->removeEventFilter( this ); + } +} + + + +void TQWhatsThisPrivate::say( TQWidget * widget, const TQString &text, const TQPoint& ppos) +{ + if ( text.isEmpty() ) + return; + // make a fresh widget, and set it up + delete whatsThat; + whatsThat = new TQWhatsThat( + widget, text, +#if defined(TQ_WS_X11) + TQApplication::desktop()->screen( widget ? + widget->x11Screen() : + TQCursor::x11Screen() ), +#else + 0, +#endif + "automatic what's this? widget" ); + + + // okay, now to find a suitable location + + int scr = ( widget ? + TQApplication::desktop()->screenNumber( widget ) : +#if defined(TQ_WS_X11) + TQCursor::x11Screen() +#else + TQApplication::desktop()->screenNumber( ppos ) +#endif // TQ_WS_X11 + ); + TQRect screen = TQApplication::desktop()->screenGeometry( scr ); + + int x; + int w = whatsThat->width(); + int h = whatsThat->height(); + int sx = screen.x(); + int sy = screen.y(); + + // first try locating the widget immediately above/below, + // with nice alignment if possible. + TQPoint pos; + if ( widget ) + pos = widget->mapToGlobal( TQPoint( 0,0 ) ); + + if ( widget && w > widget->width() + 16 ) + x = pos.x() + widget->width()/2 - w/2; + else + x = ppos.x() - w/2; + + // squeeze it in if that would result in part of what's this + // being only partially visible + if ( x + w + shadowWidth > sx+screen.width() ) + x = (widget? (TQMIN(screen.width(), + pos.x() + widget->width()) + ) : screen.width() ) + - w; + + if ( x < sx ) + x = sx; + + int y; + if ( widget && h > widget->height() + 16 ) { + y = pos.y() + widget->height() + 2; // below, two pixels spacing + // what's this is above or below, wherever there's most space + if ( y + h + 10 > sy+screen.height() ) + y = pos.y() + 2 - shadowWidth - h; // above, overlap + } + y = ppos.y() + 2; + + // squeeze it in if that would result in part of what's this + // being only partially visible + if ( y + h + shadowWidth > sy+screen.height() ) + y = ( widget ? (TQMIN(screen.height(), + pos.y() + widget->height()) + ) : screen.height() ) + - h; + if ( y < sy ) + y = sy; + + whatsThat->move( x, y ); + whatsThat->show(); +} + +TQWhatsThisPrivate::WhatsThisItem* TQWhatsThisPrivate::newItem( TQWidget * widget ) +{ + WhatsThisItem * i = dict->find( (void *)widget ); + if ( i ) + TQWhatsThis::remove( widget ); + i = new WhatsThisItem; + dict->insert( (void *)widget, i ); + TQWidget * t = widget->topLevelWidget(); + if ( !tlw->find( (void *)t ) ) { + tlw->insert( (void *)t, t ); + t->installEventFilter( this ); + } + connect( widget, TQ_SIGNAL(destroyed()), this, TQ_SLOT(cleanupWidget()) ); + return i; +} + +void TQWhatsThisPrivate::add( TQWidget * widget, TQWhatsThis* special ) +{ + newItem( widget )->whatsthis = special; +} + +void TQWhatsThisPrivate::add( TQWidget * widget, const TQString &text ) +{ + newItem( widget )->s = text; +} + + +// and finally the What's This class itself + +/*! + Adds \a text as "What's this" help for \a widget. If the text is + rich text formatted (i.e. it contains markup) it will be rendered + with the default stylesheet TQStyleSheet::defaultSheet(). + + The text is destroyed if the widget is later destroyed, so it need + not be explicitly removed. + + \sa remove() +*/ +void TQWhatsThis::add( TQWidget * widget, const TQString &text ) +{ + if ( text.isEmpty() ) + return; // pointless + TQWhatsThisPrivate::setUpWhatsThis(); + wt->add(widget,text); +} + + +/*! + Removes the "What's this?" help associated with the \a widget. + This happens automatically if the widget is destroyed. + + \sa add() +*/ +void TQWhatsThis::remove( TQWidget * widget ) +{ + TQWhatsThisPrivate::setUpWhatsThis(); + TQWhatsThisPrivate::WhatsThisItem * i = wt->dict->find( (void *)widget ); + if ( !i ) + return; + + wt->dict->take( (void *)widget ); + + i->deref(); + if ( !i->count ) + delete i; +} + + +/*! + Returns the what's this text for widget \a w or TQString::null if + there is no "What's this?" help for the widget. \a pos contains + the mouse position; this is useful, for example, if you've + subclassed to make the text that is displayed position dependent. + + If \a includeParents is TRUE, parent widgets are taken into + consideration as well when looking for what's this help text. + + \sa add() +*/ +TQString TQWhatsThis::textFor( TQWidget * w, const TQPoint& pos, bool includeParents ) +{ + TQWhatsThisPrivate::setUpWhatsThis(); + TQWhatsThisPrivate::WhatsThisItem * i = 0; + TQPoint p = pos; + while( w && !i ) { + i = wt->dict->find( w ); + if ( !includeParents ) + break; + if ( !i ) { + p += w->pos(); + w = w->parentWidget( TRUE ); + } + } + if (!i) + return TQString::null; + if ( i->whatsthis ) + return i->whatsthis->text( p ); + return i->s; +} + + +/*! + Creates a TQToolButton preconfigured to enter "What's this?" mode + when clicked. You will often use this with a tool bar as \a + parent: + \code + (void) TQWhatsThis::whatsThisButton( my_help_tool_bar ); + \endcode +*/ +TQToolButton * TQWhatsThis::whatsThisButton( TQWidget * parent ) +{ + TQWhatsThisPrivate::setUpWhatsThis(); + return new TQWhatsThisButton( parent, + "automatic what's this? button" ); +} + +/*! + Constructs a dynamic "What's this?" object for \a widget. The + object is deleted when the \a widget is destroyed. + + When the widget is queried by the user the text() function of this + TQWhatsThis will be called to provide the appropriate text, rather + than using the text assigned by add(). +*/ +TQWhatsThis::TQWhatsThis( TQWidget * widget) +{ + TQWhatsThisPrivate::setUpWhatsThis(); + wt->add(widget,this); +} + + +/*! + Destroys the object and frees any allocated resources. +*/ +TQWhatsThis::~TQWhatsThis() +{ +} + + +/*! + This virtual function returns the text for position \e p in the + widget that this "What's this?" object documents. If there is no + "What's this?" text for the position, TQString::null is returned. + + The default implementation returns TQString::null. +*/ +TQString TQWhatsThis::text( const TQPoint & ) +{ + return TQString::null; +} + +/*! + \fn bool TQWhatsThis::clicked( const TQString& href ) + + This virtual function is called when the user clicks inside the + "What's this?" window. \a href is the link the user clicked on, or + TQString::null if there was no link. + + If the function returns TRUE (the default), the "What's this?" + window is closed, otherwise it remains visible. + + The default implementation ignores \a href and returns TRUE. +*/ +bool TQWhatsThis::clicked( const TQString& ) +{ + return TRUE; +} + + +/*! + Enters "What's this?" mode and returns immediately. + + TQt will install a special cursor and take over mouse input until + the user clicks somewhere. It then shows any help available and + ends "What's this?" mode. Finally, TQt removes the special cursor + and help window and then restores ordinary event processing, at + which point the left mouse button is no longer pressed. + + The user can also use the Esc key to leave "What's this?" mode. + + \sa inWhatsThisMode(), leaveWhatsThisMode() +*/ + +void TQWhatsThis::enterWhatsThisMode() +{ + TQWhatsThisPrivate::setUpWhatsThis(); + if ( wt->state == TQWhatsThisPrivate::Inactive ) { + wt->enterWhatsThisMode(); +#ifndef TQT_NO_CURSOR + TQApplication::setOverrideCursor( whatsThisCursor, FALSE ); +#endif + wt->state = TQWhatsThisPrivate::Waiting; + tqApp->installEventFilter( wt ); + } +} + + +/*! + Returns TRUE if the application is in "What's this?" mode; + otherwise returns FALSE. + + \sa enterWhatsThisMode(), leaveWhatsThisMode() +*/ +bool TQWhatsThis::inWhatsThisMode() +{ + if (!wt) + return FALSE; + return wt->state == TQWhatsThisPrivate::Waiting; +} + + +/*! + Leaves "What's this?" question mode. + + This function is used internally by widgets that support + TQWidget::customWhatsThis(); applications do not usually call it. + An example of such a widget is TQPopupMenu: menus still work + normally in "What's this?" mode but also provide help texts for + individual menu items. + + If \a text is not TQString::null, a "What's this?" help window is + displayed at the global screen position \a pos. If widget \a w is + not 0 and has its own dedicated TQWhatsThis object, this object + will receive clicked() messages when the user clicks on hyperlinks + inside the help text. + + \sa inWhatsThisMode(), enterWhatsThisMode(), TQWhatsThis::clicked() +*/ +void TQWhatsThis::leaveWhatsThisMode( const TQString& text, const TQPoint& pos, TQWidget* w ) +{ + if ( !inWhatsThisMode() ) + return; + + wt->leaveWhatsThisMode(); + if ( !text.isNull() ) + wt->say( w, text, pos ); +} + +/*! + Display \a text in a help window at the global screen position \a + pos. + + If widget \a w is not 0 and has its own dedicated TQWhatsThis + object, this object will receive clicked() messages when the user + clicks on hyperlinks inside the help text. + + \sa TQWhatsThis::clicked() +*/ +void TQWhatsThis::display( const TQString& text, const TQPoint& pos, TQWidget* w ) +{ + if ( inWhatsThisMode() ) { + leaveWhatsThisMode( text, pos, w ); + return; + } + TQWhatsThisPrivate::setUpWhatsThis(); + wt->say( w, text, pos ); +} + +/*! + Sets the font for all "What's this?" helps to \a font. +*/ +void TQWhatsThis::setFont( const TQFont &font ) +{ + TQApplication::setFont( font, TRUE, "TQWhatsThat" ); +} + +#include "tqwhatsthis.moc" +#endif diff --git a/src/widgets/tqwhatsthis.h b/src/widgets/tqwhatsthis.h new file mode 100644 index 000000000..66b4b3c90 --- /dev/null +++ b/src/widgets/tqwhatsthis.h @@ -0,0 +1,81 @@ +/**************************************************************************** +** +** Definition of TQWhatsThis class +** +** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. +** +** This file is part of the widgets module of the TQt GUI Toolkit. +** +** This file may be used under the terms of the GNU General +** Public License versions 2.0 or 3.0 as published by the Free +** Software Foundation and appearing in the files LICENSE.GPL2 +** and LICENSE.GPL3 included in the packaging of this file. +** Alternatively you may (at your option) use any later version +** of the GNU General Public License if such license has been +** publicly approved by Trolltech ASA (or its successors, if any) +** and the KDE Free TQt Foundation. +** +** Please review the following information to ensure GNU General +** Public Licensing requirements will be met: +** http://trolltech.com/products/qt/licenses/licensing/opensource/. +** If you are unsure which license is appropriate for your use, please +** review the following information: +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview +** or contact the sales department at sales@trolltech.com. +** +** This file may be used under the terms of the Q Public License as +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL +** included in the packaging of this file. Licensees holding valid TQt +** Commercial licenses may use this file in accordance with the TQt +** Commercial License Agreement provided with the Software. +** +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted +** herein. +** +**********************************************************************/ + +#ifndef TQWHATSTHIS_H +#define TQWHATSTHIS_H + +#ifndef QT_H +#include "tqobject.h" +#endif // QT_H + +#ifndef TQT_NO_WHATSTHIS + +#include "ntqcursor.h" + +class TQToolButton; +class TQPopupMenu; +class TQStyleSheet; + +class TQ_EXPORT TQWhatsThis: public TQt +{ +public: + TQWhatsThis( TQWidget *); + virtual ~TQWhatsThis(); + + virtual TQString text( const TQPoint & ); + virtual bool clicked( const TQString& href ); + + // the common static functions + static void setFont( const TQFont &font ); + + static void add( TQWidget *, const TQString &); + static void remove( TQWidget * ); + static TQString textFor( TQWidget *, const TQPoint & pos = TQPoint(), bool includeParents = FALSE ); + + static TQToolButton * whatsThisButton( TQWidget * parent ); + + static void enterWhatsThisMode(); + static bool inWhatsThisMode(); + static void leaveWhatsThisMode( const TQString& = TQString::null, const TQPoint& pos = TQCursor::pos(), TQWidget* w = 0 ); + + static void display( const TQString& text, const TQPoint& pos = TQCursor::pos(), TQWidget* w = 0 ); +}; + +#endif // TQT_NO_WHATSTHIS + +#endif // TQWHATSTHIS_H diff --git a/src/workspace/tqworkspace.cpp b/src/workspace/tqworkspace.cpp index bf4fe9de0..72319497b 100644 --- a/src/workspace/tqworkspace.cpp +++ b/src/workspace/tqworkspace.cpp @@ -45,7 +45,7 @@ #include "tqobjectlist.h" #include "ntqlayout.h" #include "tqtoolbutton.h" -#include "ntqlabel.h" +#include "tqlabel.h" #include "ntqvbox.h" #include "ntqaccel.h" #include "ntqcursor.h" diff --git a/tools/assistant/helpdialogimpl.cpp b/tools/assistant/helpdialogimpl.cpp index bc866eab0..073727cf3 100644 --- a/tools/assistant/helpdialogimpl.cpp +++ b/tools/assistant/helpdialogimpl.cpp @@ -47,7 +47,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tools/assistant/mainwindow.ui b/tools/assistant/mainwindow.ui index a2e3b4019..8c1977309 100644 --- a/tools/assistant/mainwindow.ui +++ b/tools/assistant/mainwindow.ui @@ -577,7 +577,7 @@ ntqaccel.h ntqcombobox.h tqpaintdevicemetrics.h - ntqsimplerichtext.h + tqsimplerichtext.h tqfileinfo.h tqtextstream.h ntqdockwindow.h diff --git a/tools/assistant/topicchooserimpl.cpp b/tools/assistant/topicchooserimpl.cpp index 736aa4845..a0ff04826 100644 --- a/tools/assistant/topicchooserimpl.cpp +++ b/tools/assistant/topicchooserimpl.cpp @@ -33,7 +33,7 @@ #include "topicchooserimpl.h" -#include +#include #include #include diff --git a/tools/designer/designer/actioneditorimpl.cpp b/tools/designer/designer/actioneditorimpl.cpp index ee1c0f1c6..938b8f25e 100644 --- a/tools/designer/designer/actioneditorimpl.cpp +++ b/tools/designer/designer/actioneditorimpl.cpp @@ -42,7 +42,7 @@ #include #include -#include +#include #include #include #include diff --git a/tools/designer/designer/customwidgeteditorimpl.cpp b/tools/designer/designer/customwidgeteditorimpl.cpp index fa88543ed..296000d9a 100644 --- a/tools/designer/designer/customwidgeteditorimpl.cpp +++ b/tools/designer/designer/customwidgeteditorimpl.cpp @@ -45,7 +45,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tools/designer/designer/designer_pch.h b/tools/designer/designer/designer_pch.h index e2544b926..0be6a87ac 100644 --- a/tools/designer/designer/designer_pch.h +++ b/tools/designer/designer/designer_pch.h @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include #include @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include #include "command.h" diff --git a/tools/designer/designer/editfunctionsimpl.cpp b/tools/designer/designer/editfunctionsimpl.cpp index 437dec8c2..dbdbe133b 100644 --- a/tools/designer/designer/editfunctionsimpl.cpp +++ b/tools/designer/designer/editfunctionsimpl.cpp @@ -46,7 +46,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tools/designer/designer/formwindow.cpp b/tools/designer/designer/formwindow.cpp index 1e023fda0..4b8fb1d2f 100644 --- a/tools/designer/designer/formwindow.cpp +++ b/tools/designer/designer/formwindow.cpp @@ -54,7 +54,7 @@ #include #include #include -#include +#include #include #include #include @@ -67,7 +67,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tools/designer/designer/iconvieweditorimpl.cpp b/tools/designer/designer/iconvieweditorimpl.cpp index 7f45cda5e..34bbf1bdb 100644 --- a/tools/designer/designer/iconvieweditorimpl.cpp +++ b/tools/designer/designer/iconvieweditorimpl.cpp @@ -37,7 +37,7 @@ #include "pixmapchooser.h" #include -#include +#include #include #include #include diff --git a/tools/designer/designer/listboxeditorimpl.cpp b/tools/designer/designer/listboxeditorimpl.cpp index e1bfb45a8..907648d1d 100644 --- a/tools/designer/designer/listboxeditorimpl.cpp +++ b/tools/designer/designer/listboxeditorimpl.cpp @@ -40,7 +40,7 @@ #include "listboxrename.h" #include -#include +#include #include #include #include diff --git a/tools/designer/designer/listvieweditorimpl.cpp b/tools/designer/designer/listvieweditorimpl.cpp index 9bce2ffaf..6d2e98235 100644 --- a/tools/designer/designer/listvieweditorimpl.cpp +++ b/tools/designer/designer/listvieweditorimpl.cpp @@ -45,7 +45,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tools/designer/designer/mainwindow.cpp b/tools/designer/designer/mainwindow.cpp index a8ff8b6fb..3c188d6c6 100644 --- a/tools/designer/designer/mainwindow.cpp +++ b/tools/designer/designer/mainwindow.cpp @@ -100,11 +100,11 @@ #include #include #include -#include +#include #include #include #include -#include +#include #include #include #include diff --git a/tools/designer/designer/mainwindowactions.cpp b/tools/designer/designer/mainwindowactions.cpp index ec13ffca7..1699b4725 100644 --- a/tools/designer/designer/mainwindowactions.cpp +++ b/tools/designer/designer/mainwindowactions.cpp @@ -35,7 +35,7 @@ #include #include -#include +#include #include #include #include diff --git a/tools/designer/designer/newformimpl.cpp b/tools/designer/designer/newformimpl.cpp index f050bdab6..b1d237eef 100644 --- a/tools/designer/designer/newformimpl.cpp +++ b/tools/designer/designer/newformimpl.cpp @@ -45,7 +45,7 @@ #include "sourcefile.h" #include -#include +#include #include #include #include diff --git a/tools/designer/designer/pixmapchooser.cpp b/tools/designer/designer/pixmapchooser.cpp index 169a5c9cb..1ded61d8b 100644 --- a/tools/designer/designer/pixmapchooser.cpp +++ b/tools/designer/designer/pixmapchooser.cpp @@ -47,7 +47,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tools/designer/designer/projectsettingsimpl.cpp b/tools/designer/designer/projectsettingsimpl.cpp index 2699421ed..27554c196 100644 --- a/tools/designer/designer/projectsettingsimpl.cpp +++ b/tools/designer/designer/projectsettingsimpl.cpp @@ -49,7 +49,7 @@ #include #include #include -#include +#include /* * Constructs a ProjectSettings which is a child of 'parent', with the diff --git a/tools/designer/designer/propertyeditor.cpp b/tools/designer/designer/propertyeditor.cpp index 30525df70..c38b86dab 100644 --- a/tools/designer/designer/propertyeditor.cpp +++ b/tools/designer/designer/propertyeditor.cpp @@ -69,12 +69,12 @@ #include #include #include -#include +#include #include #include #include #include -#include +#include #include #include #include diff --git a/tools/designer/designer/resource.cpp b/tools/designer/designer/resource.cpp index b1cd5d1bb..b1974e311 100644 --- a/tools/designer/designer/resource.cpp +++ b/tools/designer/designer/resource.cpp @@ -60,7 +60,7 @@ #include #include #include -#include +#include #include #include #include @@ -79,7 +79,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tools/designer/designer/sizehandle.cpp b/tools/designer/designer/sizehandle.cpp index 7cb3749b0..60d36cfd8 100644 --- a/tools/designer/designer/sizehandle.cpp +++ b/tools/designer/designer/sizehandle.cpp @@ -39,7 +39,7 @@ #include #include -#include +#include SizeHandle::SizeHandle( FormWindow *parent, Direction d, WidgetSelection *s ) : TQWidget( parent ) diff --git a/tools/designer/designer/startdialogimpl.cpp b/tools/designer/designer/startdialogimpl.cpp index 1d618a3d0..b27131ae6 100644 --- a/tools/designer/designer/startdialogimpl.cpp +++ b/tools/designer/designer/startdialogimpl.cpp @@ -3,7 +3,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tools/designer/designer/styledbutton.cpp b/tools/designer/designer/styledbutton.cpp index 543da3c9a..fdee54823 100644 --- a/tools/designer/designer/styledbutton.cpp +++ b/tools/designer/designer/styledbutton.cpp @@ -37,7 +37,7 @@ #include "pixmapchooser.h" #include #include -#include +#include #include #include #include diff --git a/tools/designer/designer/tableeditorimpl.cpp b/tools/designer/designer/tableeditorimpl.cpp index 329dd667a..38d043f96 100644 --- a/tools/designer/designer/tableeditorimpl.cpp +++ b/tools/designer/designer/tableeditorimpl.cpp @@ -36,7 +36,7 @@ #include #endif #include "formwindow.h" -#include +#include #include #include #include diff --git a/tools/designer/designer/widgetfactory.cpp b/tools/designer/designer/widgetfactory.cpp index 9fb3e33dd..edc24274b 100644 --- a/tools/designer/designer/widgetfactory.cpp +++ b/tools/designer/designer/widgetfactory.cpp @@ -68,7 +68,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tools/designer/designer/widgetfactory.h b/tools/designer/designer/widgetfactory.h index 6e5b45370..93cece6c2 100644 --- a/tools/designer/designer/widgetfactory.h +++ b/tools/designer/designer/widgetfactory.h @@ -44,7 +44,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tools/designer/editor/arghintwidget.cpp b/tools/designer/editor/arghintwidget.cpp index c8f643ba1..5589bac6c 100644 --- a/tools/designer/editor/arghintwidget.cpp +++ b/tools/designer/editor/arghintwidget.cpp @@ -33,7 +33,7 @@ #include "arghintwidget.h" #include -#include +#include #include #include #include diff --git a/tools/designer/editor/viewmanager.cpp b/tools/designer/editor/viewmanager.cpp index f4f3e8b7e..521e202a6 100644 --- a/tools/designer/editor/viewmanager.cpp +++ b/tools/designer/editor/viewmanager.cpp @@ -38,7 +38,7 @@ #include #include "paragdata.h" #include -#include +#include #include ViewManager::ViewManager( TQWidget *parent, const char *name ) diff --git a/tools/designer/examples/colortool/mainform.ui b/tools/designer/examples/colortool/mainform.ui index 199c9bf0e..f76e39e1b 100644 --- a/tools/designer/examples/colortool/mainform.ui +++ b/tools/designer/examples/colortool/mainform.ui @@ -527,7 +527,7 @@ tqstatusbar.h ntqmessagebox.h tqclipboard.h - ntqlabel.h + tqlabel.h ntqlineedit.h optionsform.h mainform.ui.h diff --git a/tools/designer/examples/credit/creditformbase.cpp b/tools/designer/examples/credit/creditformbase.cpp index 788ccf6a4..7ea445897 100644 --- a/tools/designer/examples/credit/creditformbase.cpp +++ b/tools/designer/examples/credit/creditformbase.cpp @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include "creditformbase.ui.h" #include #include diff --git a/tools/designer/plugins/wizards/sqlformwizardimpl.cpp b/tools/designer/plugins/wizards/sqlformwizardimpl.cpp index f9ebb15b2..ac721699c 100644 --- a/tools/designer/plugins/wizards/sqlformwizardimpl.cpp +++ b/tools/designer/plugins/wizards/sqlformwizardimpl.cpp @@ -38,7 +38,7 @@ #include #include -#include +#include #include #include #include diff --git a/tools/designer/shared/widgetdatabase.cpp b/tools/designer/shared/widgetdatabase.cpp index e69f004d2..f96b6e549 100644 --- a/tools/designer/shared/widgetdatabase.cpp +++ b/tools/designer/shared/widgetdatabase.cpp @@ -68,6 +68,7 @@ static TQString converted_widgets[] = "TQDateTimeEdit", "TQFileDialog", "TQIconView", + "TQLabel", "TQMainWindow", "TQMenuBar", "TQPopupMenu", "TQStatusBar", "TQSizeGrip", diff --git a/tools/designer/uic/form.cpp b/tools/designer/uic/form.cpp index fd4755c78..143d9a02a 100644 --- a/tools/designer/uic/form.cpp +++ b/tools/designer/uic/form.cpp @@ -828,7 +828,7 @@ void Uic::createFormImpl( const TQDomElement &e ) out << "#include " << endl; out << "#include " << endl; - out << "#include " << endl; + out << "#include " << endl; if ( objClass == "TQMainWindow" ) { out << "#include " << endl; out << "#include " << endl; diff --git a/tools/designer/uilib/tqwidgetfactory.cpp b/tools/designer/uilib/tqwidgetfactory.cpp index 00234331a..03c0046cf 100644 --- a/tools/designer/uilib/tqwidgetfactory.cpp +++ b/tools/designer/uilib/tqwidgetfactory.cpp @@ -46,7 +46,7 @@ #include #include #include -#include +#include #include #include #include @@ -75,7 +75,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tools/linguist/book/linguist-programmer.leaf b/tools/linguist/book/linguist-programmer.leaf index 95e9be5fc..8e2f77732 100644 --- a/tools/linguist/book/linguist-programmer.leaf +++ b/tools/linguist/book/linguist-programmer.leaf @@ -246,13 +246,13 @@ QApplication::translate() function directly: \code void some_global_function( LoginWidget *logwid ) { - QLabel *label = new QLabel( + TQLabel *label = new TQLabel( LoginWidget::tr("Password:"), logwid ); } void same_global_function( LoginWidget *logwid ) { - QLabel *label = new QLabel( + TQLabel *label = new TQLabel( tqApp->translate("LoginWidget", "Password:"), logwid ); } @@ -1059,7 +1059,7 @@ We'll now prepare release 1.1 of Troll Print. Start your favorite text editor and follow these steps: \list -\i Uncomment the two lines that create a \l QLabel with the text +\i Uncomment the two lines that create a \l TQLabel with the text "\TROLL PRINT\" in \c printpanel.cpp. \i Word-tidying: Replace "2-sided" by "Two-sided" in \c printpanel.cpp. \i Replace "1.0" with "1.1" everywhere it occurs in \c mainwindow.cpp. diff --git a/tools/linguist/linguist/finddialog.cpp b/tools/linguist/linguist/finddialog.cpp index 3978b974c..26663bf3d 100644 --- a/tools/linguist/linguist/finddialog.cpp +++ b/tools/linguist/linguist/finddialog.cpp @@ -40,11 +40,11 @@ #include "finddialog.h" #include -#include +#include #include #include #include -#include +#include FindDialog::FindDialog( bool replace, TQWidget *parent, const char *name, bool modal ) diff --git a/tools/linguist/linguist/main.cpp b/tools/linguist/linguist/main.cpp index cea49d599..7b4bd14e4 100644 --- a/tools/linguist/linguist/main.cpp +++ b/tools/linguist/linguist/main.cpp @@ -34,7 +34,7 @@ #include "trwindow.h" #include -#include +#include #include #include #include diff --git a/tools/linguist/linguist/msgedit.cpp b/tools/linguist/linguist/msgedit.cpp index 0e422f269..292fbc153 100644 --- a/tools/linguist/linguist/msgedit.cpp +++ b/tools/linguist/linguist/msgedit.cpp @@ -45,14 +45,14 @@ #include #include #include -#include +#include #include #include #include #include #include #include -#include +#include #include #include #include diff --git a/tools/linguist/linguist/phrasebookbox.cpp b/tools/linguist/linguist/phrasebookbox.cpp index cefac1b34..90ebdd950 100644 --- a/tools/linguist/linguist/phrasebookbox.cpp +++ b/tools/linguist/linguist/phrasebookbox.cpp @@ -41,12 +41,12 @@ #include "phraselv.h" #include -#include +#include #include #include #include #include -#include +#include PhraseBookBox::PhraseBookBox( const TQString& filename, const PhraseBook& phraseBook, TQWidget *parent, diff --git a/tools/linguist/linguist/phraselv.cpp b/tools/linguist/linguist/phraselv.cpp index 62e1d1180..61cfa3a63 100644 --- a/tools/linguist/linguist/phraselv.cpp +++ b/tools/linguist/linguist/phraselv.cpp @@ -40,7 +40,7 @@ #include "phraselv.h" #include -#include +#include #include class WhatPhrase : public TQWhatsThis diff --git a/tools/linguist/linguist/trwindow.cpp b/tools/linguist/linguist/trwindow.cpp index 38d46ea14..6de1b47d9 100644 --- a/tools/linguist/linguist/trwindow.cpp +++ b/tools/linguist/linguist/trwindow.cpp @@ -57,7 +57,7 @@ #include #include #include -#include +#include #include #include #include @@ -66,7 +66,7 @@ #include #include #include -#include +#include #include #include diff --git a/tools/linguist/tutorial/tt3/printpanel.cpp b/tools/linguist/tutorial/tt3/printpanel.cpp index 183a6f5b9..3f8f6eda4 100644 --- a/tools/linguist/tutorial/tt3/printpanel.cpp +++ b/tools/linguist/tutorial/tt3/printpanel.cpp @@ -6,7 +6,7 @@ #include "printpanel.h" -#include +#include #include #include diff --git a/tools/qconfig/main.cpp b/tools/qconfig/main.cpp index 47f565f21..f01802bec 100644 --- a/tools/qconfig/main.cpp +++ b/tools/qconfig/main.cpp @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tools/qtconfig/mainwindow.cpp b/tools/qtconfig/mainwindow.cpp index 3b98c4d6e..da33fbd0b 100644 --- a/tools/qtconfig/mainwindow.cpp +++ b/tools/qtconfig/mainwindow.cpp @@ -36,7 +36,7 @@ #include "previewframe.h" #include "paletteeditoradvanced.h" -#include +#include #include #include #include diff --git a/translations/qt_ar.ts b/translations/qt_ar.ts index 43d86c9f1..9a9bb96d1 100644 --- a/translations/qt_ar.ts +++ b/translations/qt_ar.ts @@ -1734,7 +1734,7 @@ to - QWhatsThisButton + TQWhatsThisButton What's this? ما هذا؟ diff --git a/translations/qt_ca.ts b/translations/qt_ca.ts index b4b3f9553..96a8a46ff 100644 --- a/translations/qt_ca.ts +++ b/translations/qt_ca.ts @@ -1742,7 +1742,7 @@ per a més informació.</p> - QWhatsThisButton + TQWhatsThisButton What's this? Què és això? diff --git a/translations/qt_cs.ts b/translations/qt_cs.ts index ce321e743..2dcfaf650 100644 --- a/translations/qt_cs.ts +++ b/translations/qt_cs.ts @@ -1742,7 +1742,7 @@ dalšími verzemi Unixu s grafickým prostředím X11. - QWhatsThisButton + TQWhatsThisButton What's this? Co je toto? diff --git a/translations/qt_de.ts b/translations/qt_de.ts index 1b3920ad1..da5585f93 100644 --- a/translations/qt_de.ts +++ b/translations/qt_de.ts @@ -1833,7 +1833,7 @@ nach - QWhatsThisButton + TQWhatsThisButton What's this? Direkthilfe diff --git a/translations/qt_es.ts b/translations/qt_es.ts index 1321049f9..d0dec0ecb 100644 --- a/translations/qt_es.ts +++ b/translations/qt_es.ts @@ -1736,7 +1736,7 @@ a - QWhatsThisButton + TQWhatsThisButton What's this? ¿Qué es ésto? diff --git a/translations/qt_fr.ts b/translations/qt_fr.ts index 23cc15110..57e3ee3b8 100644 --- a/translations/qt_fr.ts +++ b/translations/qt_fr.ts @@ -1859,7 +1859,7 @@ en - QWhatsThisButton + TQWhatsThisButton What's this? Qu'est-ce que c'est ? diff --git a/translations/qt_he.ts b/translations/qt_he.ts index 2a0cac7d5..7b7c743ee 100644 --- a/translations/qt_he.ts +++ b/translations/qt_he.ts @@ -1830,7 +1830,7 @@ to - QWhatsThisButton + TQWhatsThisButton What's this? מה זה? diff --git a/translations/qt_it.ts b/translations/qt_it.ts index 13538f510..107728016 100644 --- a/translations/qt_it.ts +++ b/translations/qt_it.ts @@ -1736,7 +1736,7 @@ in - QWhatsThisButton + TQWhatsThisButton What's this? Che cos'è? diff --git a/translations/qt_ja.ts b/translations/qt_ja.ts index f0b61c0bc..f8c9b8113 100644 --- a/translations/qt_ja.ts +++ b/translations/qt_ja.ts @@ -1734,7 +1734,7 @@ to - QWhatsThisButton + TQWhatsThisButton What's this? ヒント('S) diff --git a/translations/qt_nb.ts b/translations/qt_nb.ts index 23d57e77b..0970468f6 100644 --- a/translations/qt_nb.ts +++ b/translations/qt_nb.ts @@ -1736,7 +1736,7 @@ til - QWhatsThisButton + TQWhatsThisButton What's this? Hva er dette? diff --git a/translations/qt_pt-br.ts b/translations/qt_pt-br.ts index 3c8c6615d..849b5e9cb 100644 --- a/translations/qt_pt-br.ts +++ b/translations/qt_pt-br.ts @@ -1736,7 +1736,7 @@ para - QWhatsThisButton + TQWhatsThisButton What's this? O que é isso? diff --git a/translations/qt_pt.ts b/translations/qt_pt.ts index e00563e8f..37fc52ca5 100644 --- a/translations/qt_pt.ts +++ b/translations/qt_pt.ts @@ -1736,7 +1736,7 @@ para - QWhatsThisButton + TQWhatsThisButton What's this? O que é isso? diff --git a/translations/qt_ru.ts b/translations/qt_ru.ts index 4f9cd0949..dda35f07b 100644 --- a/translations/qt_ru.ts +++ b/translations/qt_ru.ts @@ -1957,7 +1957,7 @@ to - QWhatsThisButton + TQWhatsThisButton What's this? Что это? diff --git a/translations/qt_sk.ts b/translations/qt_sk.ts index 1a4cc56ba..b2e6fa112 100644 --- a/translations/qt_sk.ts +++ b/translations/qt_sk.ts @@ -1743,7 +1743,7 @@ Mac&nbsp;OS&nbsp;X, Linux, a mnohé ďalšie komerčné verzie Unixu. - QWhatsThisButton + TQWhatsThisButton What's this? Čo je to? diff --git a/translations/qt_tr.ts b/translations/qt_tr.ts index 876a3d9e5..f6afc0fb2 100644 --- a/translations/qt_tr.ts +++ b/translations/qt_tr.ts @@ -1717,7 +1717,7 @@ to - QWhatsThisButton + TQWhatsThisButton What's this? diff --git a/translations/qt_zh-cn.ts b/translations/qt_zh-cn.ts index b88a417fd..73c80cf26 100644 --- a/translations/qt_zh-cn.ts +++ b/translations/qt_zh-cn.ts @@ -1733,7 +1733,7 @@ to - QWhatsThisButton + TQWhatsThisButton What's this? 这是什么? diff --git a/translations/qt_zh-tw.ts b/translations/qt_zh-tw.ts index bdb8ba277..6c1d522f6 100644 --- a/translations/qt_zh-tw.ts +++ b/translations/qt_zh-tw.ts @@ -1734,7 +1734,7 @@ to - QWhatsThisButton + TQWhatsThisButton What's this? 這是什麼? diff --git a/translations/template.ts b/translations/template.ts index 08096d4d2..9a77f25f1 100644 --- a/translations/template.ts +++ b/translations/template.ts @@ -1715,7 +1715,7 @@ to - QWhatsThisButton + TQWhatsThisButton What's this? diff --git a/tutorial/t12/lcdrange.cpp b/tutorial/t12/lcdrange.cpp index dfa7f6e93..f5b713a9a 100644 --- a/tutorial/t12/lcdrange.cpp +++ b/tutorial/t12/lcdrange.cpp @@ -8,7 +8,7 @@ #include #include -#include +#include LCDRange::LCDRange( TQWidget *parent, const char *name ) diff --git a/tutorial/t13/gamebrd.cpp b/tutorial/t13/gamebrd.cpp index 61bee22be..a0534c92b 100644 --- a/tutorial/t13/gamebrd.cpp +++ b/tutorial/t13/gamebrd.cpp @@ -8,7 +8,7 @@ #include #include -#include +#include #include #include #include diff --git a/tutorial/t13/lcdrange.cpp b/tutorial/t13/lcdrange.cpp index 5ce3e37ed..61717ff9c 100644 --- a/tutorial/t13/lcdrange.cpp +++ b/tutorial/t13/lcdrange.cpp @@ -8,7 +8,7 @@ #include #include -#include +#include #include diff --git a/tutorial/t14/gamebrd.cpp b/tutorial/t14/gamebrd.cpp index e4bf8134f..dfebd2ca6 100644 --- a/tutorial/t14/gamebrd.cpp +++ b/tutorial/t14/gamebrd.cpp @@ -8,7 +8,7 @@ #include #include -#include +#include #include #include #include diff --git a/tutorial/t14/lcdrange.cpp b/tutorial/t14/lcdrange.cpp index 5ce3e37ed..61717ff9c 100644 --- a/tutorial/t14/lcdrange.cpp +++ b/tutorial/t14/lcdrange.cpp @@ -8,7 +8,7 @@ #include #include -#include +#include #include -- cgit v1.2.1