From 1f0ce8533cc837aa2d4155b5fc17d2004bed0197 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Wed, 5 Jun 2024 19:02:23 +0900 Subject: Rename template library nt* related files to equivalent tq* Signed-off-by: Michele Calgaro --- doc/classchart.doc | 14 +- doc/collect.doc | 16 +- doc/datastreamformat.doc | 4 +- doc/html/annotated.html | 18 +- doc/html/canvas-chart-example.html | 2 +- doc/html/canvas-example.html | 8 +- doc/html/chart-canvasview-cpp.html | 2 +- doc/html/chart-chartform_canvas-cpp.html | 2 +- doc/html/chart-element-cpp.html | 6 +- doc/html/chart-element-h.html | 2 +- doc/html/checklists-example.html | 14 +- doc/html/classchart.html | 14 +- doc/html/classes.html | 18 +- doc/html/collection.html | 16 +- doc/html/designer-manual-3.html | 2 +- doc/html/designer-manual-4.html | 6 +- doc/html/designer-manual-8.html | 8 +- doc/html/dirview-example.html | 4 +- doc/html/examples.html | 2 +- doc/html/fileiconview-example.html | 16 +- doc/html/functions.html | 104 +- doc/html/headerfilesynonyms | 8 +- doc/html/headers.html | 10 +- doc/html/helpviewer-example.html | 4 +- doc/html/hierarchy.html | 18 +- doc/html/iconview-example.html | 2 +- doc/html/iconview-simple_dd-main-cpp.html | 8 +- doc/html/iconview-simple_dd-main-h.html | 4 +- doc/html/index | 356 +++--- doc/html/listviews-example.html | 2 +- doc/html/mail-example.html | 8 +- doc/html/mainclasses.html | 8 +- doc/html/network.html | 10 +- doc/html/ntqapplication.html | 4 +- doc/html/ntqdeepcopy.html | 6 +- doc/html/ntqdict.html | 4 +- doc/html/ntqdns.html | 36 +- doc/html/ntqfiledialog.html | 10 +- doc/html/ntqfont.html | 2 +- doc/html/ntqfontdatabase.html | 20 +- doc/html/ntqiconview.html | 8 +- doc/html/ntqimage.html | 24 +- doc/html/ntqintdict.html | 2 +- doc/html/ntqmap.html | 574 ---------- doc/html/ntqmemarray.html | 10 +- doc/html/ntqnetworkprotocol.html | 2 +- doc/html/ntqpair.html | 126 -- doc/html/ntqprocess.html | 4 +- doc/html/ntqptrcollection.html | 4 +- doc/html/ntqptrlist.html | 2 +- doc/html/ntqptrqueue.html | 2 +- doc/html/ntqptrstack.html | 2 +- doc/html/ntqptrvector.html | 2 +- doc/html/ntqregexp.html | 4 +- doc/html/ntqsessionmanager.html | 8 +- doc/html/ntqsettings.html | 8 +- doc/html/ntqsplitter.html | 10 +- doc/html/ntqstringlist.html | 16 +- doc/html/ntqstylesheet.html | 2 +- doc/html/ntqtextcodecplugin.html | 2 +- doc/html/ntqtl.html | 18 +- doc/html/ntqtranslator.html | 8 +- doc/html/ntqurloperator.html | 2 +- doc/html/ntqvaluelist.html | 785 ------------- doc/html/ntqvaluestack.html | 158 --- doc/html/ntqvaluevector.html | 666 ----------- doc/html/ntqvariant.html | 70 +- doc/html/porting.html | 4 +- doc/html/properties.html | 6 +- doc/html/propertydocs | 14 +- doc/html/qaxbase.html | 12 +- doc/html/qaxobject.html | 2 +- doc/html/qaxscript.html | 2 +- doc/html/qaxscriptmanager.html | 4 +- doc/html/qaxserver.html | 2 +- doc/html/qaxwidget.html | 2 +- doc/html/qdockarea-h.html | 2 +- doc/html/qevent-h.html | 2 +- doc/html/qfontdatabase-h.html | 2 +- doc/html/qiconviewitem.html | 2 +- doc/html/qmacmime.html | 4 +- doc/html/qmap-h.html | 921 --------------- doc/html/qmap-members.html | 68 -- doc/html/qmapconstiterator-members.html | 54 - doc/html/qmapconstiterator.html | 173 --- doc/html/qmapiterator-members.html | 54 - doc/html/qmapiterator.html | 196 ---- doc/html/qmime-h.html | 2 +- doc/html/qpair-h.html | 153 --- doc/html/qpair-members.html | 47 - doc/html/qsplitter-h.html | 2 +- doc/html/qstringlist-h.html | 2 +- doc/html/qstringlist-members.html | 68 +- doc/html/qstylesheet-h.html | 2 +- doc/html/qt-template-lib.html | 70 +- doc/html/qt.dcf | 424 +++---- doc/html/qtabletevent.html | 6 +- doc/html/qtextedit-h.html | 2 +- doc/html/qtl-qvaluelist-example.html | 8 +- doc/html/qtranslator-h.html | 2 +- doc/html/qvaluelist-h.html | 714 ------------ doc/html/qvaluelist-members.html | 82 -- doc/html/qvaluelistconstiterator-members.html | 52 - doc/html/qvaluelistconstiterator.html | 157 --- doc/html/qvaluelistiterator-members.html | 54 - doc/html/qvaluelistiterator.html | 207 ---- doc/html/qvaluestack-h.html | 112 -- doc/html/qvaluestack-members.html | 85 -- doc/html/qvaluevector-h.html | 620 ---------- doc/html/qvaluevector-members.html | 73 -- doc/html/qvariant-h.html | 4 +- doc/html/qwindowsystem_qws-h.html | 2 +- doc/html/shared.html | 10 +- doc/html/shclass.html | 10 +- doc/html/simple-font-demo-example.html | 8 +- doc/html/simple_dd-example.html | 12 +- doc/html/sql-overview-insert-main-cpp.html | 4 +- doc/html/sql-overview-table3-main-h.html | 4 +- doc/html/sql-overview-table4-main-h.html | 4 +- doc/html/sql.html | 10 +- doc/html/statistics-example.html | 6 +- doc/html/table-statistics-statistics-cpp.html | 6 +- doc/html/themes-example.html | 6 +- doc/html/titleindex | 48 +- doc/html/tools.html | 18 +- doc/html/toplevel-example.html | 2 +- doc/html/tqcanvas-h.html | 2 +- doc/html/tqcanvasitemlist-members.html | 66 +- doc/html/tqcanvasitemlist.html | 6 +- doc/html/tqcanvaspixmaparray.html | 4 +- doc/html/tqcanvasview.html | 2 +- doc/html/tqdatabrowser.html | 4 +- doc/html/tqdatatable.html | 4 +- doc/html/tqmap-h.html | 921 +++++++++++++++ doc/html/tqmap-members.html | 68 ++ doc/html/tqmap.html | 574 ++++++++++ doc/html/tqmapconstiterator-members.html | 54 + doc/html/tqmapconstiterator.html | 173 +++ doc/html/tqmapiterator-members.html | 54 + doc/html/tqmapiterator.html | 196 ++++ doc/html/tqpair-h.html | 153 +++ doc/html/tqpair-members.html | 47 + doc/html/tqpair.html | 126 ++ doc/html/tqsqldatabase.html | 12 +- doc/html/tqsqldriver-h.html | 2 +- doc/html/tqsqlform-h.html | 2 +- doc/html/tqsqlquery-h.html | 2 +- doc/html/tqsqlquery.html | 10 +- doc/html/tqsqlrecordinfo.html | 4 +- doc/html/tqvaluelist-h.html | 714 ++++++++++++ doc/html/tqvaluelist-members.html | 82 ++ doc/html/tqvaluelist.html | 785 +++++++++++++ doc/html/tqvaluelistconstiterator-members.html | 52 + doc/html/tqvaluelistconstiterator.html | 157 +++ doc/html/tqvaluelistiterator-members.html | 54 + doc/html/tqvaluelistiterator.html | 207 ++++ doc/html/tqvaluestack-h.html | 112 ++ doc/html/tqvaluestack-members.html | 85 ++ doc/html/tqvaluestack.html | 158 +++ doc/html/tqvaluevector-h.html | 620 ++++++++++ doc/html/tqvaluevector-members.html | 73 ++ doc/html/tqvaluevector.html | 666 +++++++++++ doc/html/tqwidgetfactory-h.html | 4 +- doc/html/tqxml-h.html | 2 +- doc/html/tqxmlnamespacesupport.html | 8 +- doc/html/tutorial2-03.html | 12 +- doc/html/tutorial2-06.html | 4 +- doc/html/whatsthis | 16 +- doc/man/man3/tqaxbase.3qt | 16 +- doc/man/man3/tqaxobject.3qt | 4 +- doc/man/man3/tqaxscript.3qt | 4 +- doc/man/man3/tqaxscriptmanager.3qt | 6 +- doc/man/man3/tqaxwidget.3qt | 4 +- doc/man/man3/tqcanvasitemlist.3qt | 6 +- doc/man/man3/tqcanvaspixmaparray.3qt | 6 +- doc/man/man3/tqdeepcopy.3qt | 6 +- doc/man/man3/tqdict.3qt | 4 +- doc/man/man3/tqdns.3qt | 24 +- doc/man/man3/tqfiledialog.3qt | 2 +- doc/man/man3/tqfont.3qt | 2 +- doc/man/man3/tqfontdatabase.3qt | 24 +- doc/man/man3/tqiconview.3qt | 10 +- doc/man/man3/tqiconviewitem.3qt | 4 +- doc/man/man3/tqimage.3qt | 8 +- doc/man/man3/tqintdict.3qt | 2 +- doc/man/man3/tqmacmime.3qt | 8 +- doc/man/man3/tqmap.3qt | 184 +-- doc/man/man3/tqmapconstiterator.3qt | 70 +- doc/man/man3/tqmapiterator.3qt | 72 +- doc/man/man3/tqmemarray.3qt | 10 +- doc/man/man3/tqnetworkprotocol.3qt | 4 +- doc/man/man3/tqpair.3qt | 8 +- doc/man/man3/tqptrcollection.3qt | 2 +- doc/man/man3/tqptrlist.3qt | 2 +- doc/man/man3/tqptrqueue.3qt | 2 +- doc/man/man3/tqptrstack.3qt | 2 +- doc/man/man3/tqptrvector.3qt | 2 +- doc/man/man3/tqsplitter.3qt | 12 +- doc/man/man3/tqsqlquery.3qt | 12 +- doc/man/man3/tqsqlrecordinfo.3qt | 4 +- doc/man/man3/tqstringlist.3qt | 10 +- doc/man/man3/tqstylesheet.3qt | 4 +- doc/man/man3/tqtextcodecplugin.3qt | 4 +- doc/man/man3/tqtranslator.3qt | 8 +- doc/man/man3/tqurloperator.3qt | 4 +- doc/man/man3/tqvaluelist.3qt | 242 ++-- doc/man/man3/tqvaluelistconstiterator.3qt | 62 +- doc/man/man3/tqvaluelistiterator.3qt | 72 +- doc/man/man3/tqvaluestack.3qt | 44 +- doc/man/man3/tqvaluevector.3qt | 192 ++-- doc/man/man3/tqvariant.3qt | 80 +- doc/network.doc | 8 +- doc/object.doc | 8 +- doc/porting3.doc | 4 +- doc/qdict.doc | 4 +- doc/qintdict.doc | 2 +- doc/qmap.doc | 902 --------------- doc/qmemarray.doc | 12 +- doc/qpair.doc | 146 --- doc/qptrlist.doc | 2 +- doc/qptrqueue.doc | 2 +- doc/qptrstack.doc | 2 +- doc/qptrvector.doc | 2 +- doc/qtl.doc | 40 +- doc/qvaluelist.doc | 1200 -------------------- doc/qvaluestack.doc | 169 --- doc/qvaluevector.doc | 724 ------------ doc/shclass.doc | 10 +- doc/sql.doc | 10 +- doc/tqmap.doc | 902 +++++++++++++++ doc/tqpair.doc | 146 +++ doc/tqvaluelist.doc | 1200 ++++++++++++++++++++ doc/tqvaluestack.doc | 169 +++ doc/tqvaluevector.doc | 724 ++++++++++++ doc/tutorial2.doc | 6 +- examples/README | 2 +- examples/chart/element.h | 2 +- examples/checklists/checklists.cpp | 2 +- examples/demo/dnd/dnd.h | 2 +- examples/demo/qasteroids/toplevel.h | 2 +- examples/demo/textdrawing/helpwindow.h | 2 +- examples/demo/textdrawing/textedit.h | 2 +- examples/helpviewer/helpwindow.h | 2 +- examples/qtl/qtl-qvaluelist.doc | 6 +- examples/qtl/qtl.pro | 2 +- examples/qtl/qvaluelistiterator.cpp | 57 - examples/qtl/tqvaluelistiterator.cpp | 57 + examples/sql/overview/table3/main.h | 2 +- examples/sql/overview/table4/main.h | 2 +- examples/textedit/textedit.h | 2 +- include/ntqmap.h | 1 - include/ntqpair.h | 1 - include/ntqvaluelist.h | 1 - include/ntqvaluestack.h | 1 - include/ntqvaluevector.h | 1 - include/tqmap.h | 1 + include/tqpair.h | 1 + include/tqvaluelist.h | 1 + include/tqvaluestack.h | 1 + include/tqvaluevector.h | 1 + qmake/Makefile.unix | 8 +- qmake/Makefile.win32-g++ | 6 +- qmake/generators/win32/msvc_dsp.h | 2 +- qmake/meta.h | 2 +- qmake/project.cpp | 2 +- qmake/project.h | 2 +- qmake/property.cpp | 2 +- src/canvas/tqcanvas.h | 2 +- src/codecs/qtextcodec.cpp | 2 +- src/dialogs/qfiledialog.cpp | 2 +- src/kernel/ntqevent.h | 2 +- src/kernel/ntqfontdatabase.h | 2 +- src/kernel/ntqmime.h | 2 +- src/kernel/ntqstylesheet.h | 2 +- src/kernel/ntqt.h | 10 +- src/kernel/ntqtranslator.h | 2 +- src/kernel/ntqvariant.h | 4 +- src/kernel/qapplication_x11.cpp | 2 +- src/kernel/qclipboard_x11.cpp | 4 +- src/kernel/qfontengine_p.h | 2 +- src/kernel/qimage.cpp | 2 +- src/kernel/qkeysequence.cpp | 2 +- src/kernel/qmime.cpp | 2 +- src/kernel/qnetworkprotocol.cpp | 2 +- src/kernel/qpsprinter.cpp | 2 +- src/kernel/qrichtext.cpp | 2 +- src/kernel/qrichtext_p.h | 6 +- src/kernel/qt_pch.h | 2 +- src/kernel/qtranslator.cpp | 2 +- src/kernel/qurloperator.cpp | 2 +- src/moc/moc.pro | 2 +- src/network/qhttp.cpp | 2 +- src/opengl/qgl_x11.cpp | 2 +- src/sql/drivers/cache/tqsqlcachedresult.h | 2 +- src/sql/drivers/mysql/tqsql_mysql.cpp | 2 +- src/sql/drivers/odbc/tqsql_odbc.h | 2 +- src/sql/drivers/sqlite3/tqsql_sqlite3.cpp | 2 +- src/sql/tqdatatable.cpp | 2 +- src/sql/tqsqldriver.h | 2 +- src/sql/tqsqlextension_p.h | 4 +- src/sql/tqsqlform.h | 2 +- src/sql/tqsqlpropertymap.cpp | 2 +- src/sql/tqsqlquery.h | 2 +- src/sql/tqsqlrecord.cpp | 2 +- src/tools/ntqmap.h | 881 -------------- src/tools/ntqpair.h | 109 -- src/tools/ntqstringlist.h | 2 +- src/tools/ntqvaluelist.h | 681 ----------- src/tools/ntqvaluestack.h | 67 -- src/tools/ntqvaluevector.h | 577 ---------- src/tools/qdir_p.h | 2 +- src/tools/qglist.cpp | 2 +- src/tools/qgpluginmanager.cpp | 2 +- src/tools/qmap.cpp | 257 ----- src/tools/qregexp.cpp | 2 +- src/tools/qsettings.cpp | 2 +- src/tools/qsettings_p.h | 4 +- src/tools/qt_tools.pri | 10 +- src/tools/qwinexport.cpp | 6 +- src/tools/tqmap.cpp | 257 +++++ src/tools/tqmap.h | 881 ++++++++++++++ src/tools/tqpair.h | 109 ++ src/tools/tqvaluelist.h | 681 +++++++++++ src/tools/tqvaluestack.h | 67 ++ src/tools/tqvaluevector.h | 577 ++++++++++ src/widgets/ntqdockarea.h | 2 +- src/widgets/ntqsplitter.h | 2 +- src/widgets/ntqtextedit.h | 2 +- src/widgets/qdatetimeedit.cpp | 2 +- src/widgets/qdialogbuttons.cpp | 4 +- src/widgets/qdockarea.cpp | 2 +- src/widgets/qlineedit.cpp | 2 +- src/widgets/qmainwindow.cpp | 2 +- src/widgets/qtextbrowser.cpp | 2 +- src/widgets/qtoolbox.cpp | 2 +- src/xml/qsvgdevice.cpp | 4 +- src/xml/tqxml.cpp | 4 +- src/xml/tqxml.h | 2 +- tools/assistant/config.h | 2 +- tools/assistant/docuparser.h | 2 +- tools/assistant/helpdialogimpl.h | 2 +- tools/assistant/mainwindow.ui | 2 +- tools/assistant/profile.h | 2 +- tools/assistant/settingsdialogimpl.cpp | 2 +- tools/designer/designer/actiondnd.h | 2 +- tools/designer/designer/command.h | 4 +- tools/designer/designer/customwidgeteditorimpl.h | 2 +- tools/designer/designer/designer_pch.h | 2 +- tools/designer/designer/editfunctionsimpl.h | 2 +- tools/designer/designer/formwindow.h | 2 +- tools/designer/designer/layout.cpp | 2 +- tools/designer/designer/layout.h | 4 +- tools/designer/designer/listboxdnd.cpp | 2 +- tools/designer/designer/listviewdnd.cpp | 2 +- tools/designer/designer/listvieweditorimpl.h | 4 +- tools/designer/designer/mainwindow.h | 2 +- tools/designer/designer/metadatabase.h | 2 +- tools/designer/designer/outputwindow.h | 2 +- tools/designer/designer/pixmapcollection.h | 2 +- tools/designer/designer/project.h | 2 +- tools/designer/designer/resource.h | 2 +- tools/designer/designer/startdialogimpl.cpp | 2 +- tools/designer/designer/startdialogimpl.h | 2 +- tools/designer/designer/syntaxhighlighter_html.cpp | 2 +- tools/designer/designer/tableeditorimpl.cpp | 2 +- tools/designer/designer/tableeditorimpl.h | 2 +- tools/designer/designer/widgetfactory.cpp | 2 +- tools/designer/editor/completion.cpp | 2 +- tools/designer/editor/completion.h | 2 +- tools/designer/editor/conf.h | 2 +- tools/designer/editor/parenmatcher.h | 2 +- tools/designer/editor/preferences.ui | 2 +- tools/designer/editor/viewmanager.h | 2 +- .../designer/examples/colortool/colornameform.ui.h | 2 +- tools/designer/interfaces/designerinterface.h | 2 +- tools/designer/interfaces/editorinterface.h | 4 +- tools/designer/interfaces/languageinterface.h | 4 +- .../plugins/cppeditor/syntaxhighliter_cpp.cpp | 2 +- tools/designer/plugins/cppeditor/yyreg.h | 2 +- tools/designer/plugins/dlg/dlg2ui.h | 2 +- tools/designer/plugins/glade/glade2ui.h | 2 +- tools/designer/plugins/wizards/sqlformwizardimpl.h | 2 +- tools/designer/tools/tqtcreatecw/main.cpp | 2 +- tools/designer/uic/form.cpp | 2 +- tools/designer/uic/uic.h | 2 +- tools/designer/uilib/tqwidgetfactory.h | 4 +- tools/linguist/linguist/msgedit.h | 2 +- tools/linguist/linguist/phrase.h | 2 +- tools/linguist/linguist/phrasebookbox.h | 2 +- tools/linguist/linguist/printout.h | 2 +- tools/linguist/linguist/simtexth.cpp | 4 +- tools/linguist/linguist/simtexth.h | 2 +- tools/linguist/lupdate/fetchtr.cpp | 2 +- tools/linguist/lupdate/numberh.cpp | 2 +- tools/linguist/lupdate/sametexth.cpp | 2 +- tools/linguist/shared/metatranslator.h | 4 +- tools/linguist/shared/proparser.h | 2 +- tools/qconfig/main.h | 2 +- 398 files changed, 13747 insertions(+), 13747 deletions(-) delete mode 100644 doc/html/ntqmap.html delete mode 100644 doc/html/ntqpair.html delete mode 100644 doc/html/ntqvaluelist.html delete mode 100644 doc/html/ntqvaluestack.html delete mode 100644 doc/html/ntqvaluevector.html delete mode 100644 doc/html/qmap-h.html delete mode 100644 doc/html/qmap-members.html delete mode 100644 doc/html/qmapconstiterator-members.html delete mode 100644 doc/html/qmapconstiterator.html delete mode 100644 doc/html/qmapiterator-members.html delete mode 100644 doc/html/qmapiterator.html delete mode 100644 doc/html/qpair-h.html delete mode 100644 doc/html/qpair-members.html delete mode 100644 doc/html/qvaluelist-h.html delete mode 100644 doc/html/qvaluelist-members.html delete mode 100644 doc/html/qvaluelistconstiterator-members.html delete mode 100644 doc/html/qvaluelistconstiterator.html delete mode 100644 doc/html/qvaluelistiterator-members.html delete mode 100644 doc/html/qvaluelistiterator.html delete mode 100644 doc/html/qvaluestack-h.html delete mode 100644 doc/html/qvaluestack-members.html delete mode 100644 doc/html/qvaluevector-h.html delete mode 100644 doc/html/qvaluevector-members.html create mode 100644 doc/html/tqmap-h.html create mode 100644 doc/html/tqmap-members.html create mode 100644 doc/html/tqmap.html create mode 100644 doc/html/tqmapconstiterator-members.html create mode 100644 doc/html/tqmapconstiterator.html create mode 100644 doc/html/tqmapiterator-members.html create mode 100644 doc/html/tqmapiterator.html create mode 100644 doc/html/tqpair-h.html create mode 100644 doc/html/tqpair-members.html create mode 100644 doc/html/tqpair.html create mode 100644 doc/html/tqvaluelist-h.html create mode 100644 doc/html/tqvaluelist-members.html create mode 100644 doc/html/tqvaluelist.html create mode 100644 doc/html/tqvaluelistconstiterator-members.html create mode 100644 doc/html/tqvaluelistconstiterator.html create mode 100644 doc/html/tqvaluelistiterator-members.html create mode 100644 doc/html/tqvaluelistiterator.html create mode 100644 doc/html/tqvaluestack-h.html create mode 100644 doc/html/tqvaluestack-members.html create mode 100644 doc/html/tqvaluestack.html create mode 100644 doc/html/tqvaluevector-h.html create mode 100644 doc/html/tqvaluevector-members.html create mode 100644 doc/html/tqvaluevector.html delete mode 100644 doc/qmap.doc delete mode 100644 doc/qpair.doc delete mode 100644 doc/qvaluelist.doc delete mode 100644 doc/qvaluestack.doc delete mode 100644 doc/qvaluevector.doc create mode 100644 doc/tqmap.doc create mode 100644 doc/tqpair.doc create mode 100644 doc/tqvaluelist.doc create mode 100644 doc/tqvaluestack.doc create mode 100644 doc/tqvaluevector.doc delete mode 100644 examples/qtl/qvaluelistiterator.cpp create mode 100644 examples/qtl/tqvaluelistiterator.cpp delete mode 120000 include/ntqmap.h delete mode 120000 include/ntqpair.h delete mode 120000 include/ntqvaluelist.h delete mode 120000 include/ntqvaluestack.h delete mode 120000 include/ntqvaluevector.h create mode 120000 include/tqmap.h create mode 120000 include/tqpair.h create mode 120000 include/tqvaluelist.h create mode 120000 include/tqvaluestack.h create mode 120000 include/tqvaluevector.h delete mode 100644 src/tools/ntqmap.h delete mode 100644 src/tools/ntqpair.h delete mode 100644 src/tools/ntqvaluelist.h delete mode 100644 src/tools/ntqvaluestack.h delete mode 100644 src/tools/ntqvaluevector.h delete mode 100644 src/tools/qmap.cpp create mode 100644 src/tools/tqmap.cpp create mode 100644 src/tools/tqmap.h create mode 100644 src/tools/tqpair.h create mode 100644 src/tools/tqvaluelist.h create mode 100644 src/tools/tqvaluestack.h create mode 100644 src/tools/tqvaluevector.h diff --git a/doc/classchart.doc b/doc/classchart.doc index 942be6920..a42f874e9 100644 --- a/doc/classchart.doc +++ b/doc/classchart.doc @@ -267,7 +267,7 @@ - + @@ -282,7 +282,7 @@ - + @@ -305,8 +305,8 @@ - - + + @@ -327,10 +327,10 @@ - + - - + + diff --git a/doc/collect.doc b/doc/collect.doc index e2b862e34..d7dfdeb79 100644 --- a/doc/collect.doc +++ b/doc/collect.doc @@ -59,10 +59,10 @@ details. The value-based collections are: \list -\i \l QValueList, a value-based list. -\i \l QValueVector, a value-based vector. -\i \l QValueStack, a value-based stack. -\i \l QMap, a value-based dictionary (associative array). +\i \l TQValueList, a value-based list. +\i \l TQValueVector, a value-based vector. +\i \l TQValueStack, a value-based stack. +\i \l TQMap, a value-based dictionary (associative array). \endlist The pointer-based collections are: @@ -89,10 +89,10 @@ is a class for traversing the items in a collection: \link QIntDictIterator QIntDictIterator\endlink, and \link QPtrDictIterator QPtrDictIterator\endlink \i \link QPtrListIterator QPtrListIterator\endlink -\i \link QValueListIterator QValueListIterator\endlink, and - \link QValueListConstIterator QValueListConstIterator\endlink -\i \link QMapIterator QMapIterator\endlink, and - \link QMapConstIterator QMapConstIterator\endlink +\i \link TQValueListIterator TQValueListIterator\endlink, and + \link TQValueListConstIterator TQValueListConstIterator\endlink +\i \link TQMapIterator TQMapIterator\endlink, and + \link TQMapConstIterator TQMapConstIterator\endlink \endlist The value-based collections plus algorithms operating on them are diff --git a/doc/datastreamformat.doc b/doc/datastreamformat.doc index 4c3f393e2..690060055 100644 --- a/doc/datastreamformat.doc +++ b/doc/datastreamformat.doc @@ -159,7 +159,7 @@ and to read back into the same TQt integer type when reading. stream the image into a QBuffer (using QImageIO) and stream that. \endlist -\row \i QMap +\row \i TQMap \i \list \i The number of items (TQ_UINT32) \i For all items, the key and value @@ -224,7 +224,7 @@ and to read back into the same TQt integer type when reading. \i \list \i Milliseconds since midnight (TQ_UINT32) \endlist -\row \i QValueList +\row \i TQValueList \i \list \i The number of list elements (TQ_UINT32) \i All the elements in sequential order diff --git a/doc/html/annotated.html b/doc/html/annotated.html index 4bad6ca06..2dbf7b695 100644 --- a/doc/html/annotated.html +++ b/doc/html/annotated.html @@ -245,9 +245,9 @@ body { background: #ffffff; color: black; } 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 -TQMapValue-based template class that provides a dictionary -TQMapConstIteratorIterator for TQMap -TQMapIteratorIterator for TQMap +TQMapValue-based template class that provides a dictionary +TQMapConstIteratorIterator for TQMap +TQMapIteratorIterator for TQMap TQMemArrayTemplate class that provides arrays of simple types TQMenuBarHorizontal menu bar TQMenuDataBase class for TQMenuBar and TQPopupMenu @@ -283,7 +283,7 @@ body { background: #ffffff; color: black; } TQPaintDeviceMetricsInformation about a paint device TQPaintEventEvent parameters for paint events TQPainterDoes low-level painting e.g. on widgets -TQPairValue-based template class that provides a pair of elements +TQPairValue-based template class that provides a pair of elements TQPaletteColor groups for each widget state TQPenDefines how a TQPainter should draw lines and outlines of shapes TQPicturePaint device that records and replays TQPainter commands @@ -411,11 +411,11 @@ body { background: #ffffff; color: black; } TQVButtonGroupOrganizes TQButton widgets in a vertical column TQVGroupBoxOrganizes a group of widgets in a vertical column TQValidatorValidation of input text -TQValueListValue-based template class that provides lists -TQValueListConstIteratorConst iterator for TQValueList -TQValueListIteratorIterator for TQValueList -TQValueStackValue-based template class that provides a stack -TQValueVectorValue-based template class that provides a dynamic array +TQValueListValue-based template class that provides lists +TQValueListConstIteratorConst iterator for TQValueList +TQValueListIteratorIterator for TQValueList +TQValueStackValue-based template class that provides a stack +TQValueVectorValue-based template class that provides a dynamic array TQVariantActs like a union for the most common TQt data types TQWMatrix2D transformations of a coordinate system TQWSDecorationAllows the appearance of the TQt/Embedded Window Manager to be customized diff --git a/doc/html/canvas-chart-example.html b/doc/html/canvas-chart-example.html index d14d6a1ce..34a697ae0 100644 --- a/doc/html/canvas-chart-example.html +++ b/doc/html/canvas-chart-example.html @@ -70,7 +70,7 @@ SOURCES += element.cpp \ #include <ntqcolor.h> #include <ntqnamespace.h> #include <ntqstring.h> -#include <ntqvaluevector.h> +#include <tqvaluevector.h> class Element; diff --git a/doc/html/canvas-example.html b/doc/html/canvas-example.html index b33774f37..0d877ecec 100644 --- a/doc/html/canvas-example.html +++ b/doc/html/canvas-example.html @@ -303,7 +303,7 @@ void NodeItem::moveBy(double dx, double d { TQPoint p = inverseWorldMatrix().map(e->pos()); TQCanvasItemList l=canvas()->collisions(p); - for (TQCanvasItemList::Iterator it=l.begin(); it!=l.end(); ++it) { + for (TQCanvasItemList::Iterator it=l.begin(); it!=l.end(); ++it) { if ( (*it)->rtti() == imageRTTI ) { ImageItem *item= (ImageItem*)(*it); if ( !item->hit( p ) ) @@ -319,8 +319,8 @@ void NodeItem::moveBy(double dx, double d void FigureEditor::clear() { TQCanvasItemList list = canvas()->allItems(); - TQCanvasItemList::Iterator it = list.begin(); - for (; it != list.end(); ++it) { + TQCanvasItemList::Iterator it = list.begin(); + for (; it != list.end(); ++it) { if ( *it ) delete *it; } @@ -397,7 +397,7 @@ void BouncyLogo::initSpeed() for (int bounce=0; bounce<4; bounce++) { TQCanvasItemList l=collisions(FALSE); - for (TQCanvasItemList::Iterator it=l.begin(); it!=l.end(); ++it) { + for (TQCanvasItemList::Iterator it=l.begin(); it!=l.end(); ++it) { TQCanvasItem *hit = *it; if ( hit->rtti()==logo_rtti && hit->collidesWith(this) ) { switch ( bounce ) { diff --git a/doc/html/chart-canvasview-cpp.html b/doc/html/chart-canvasview-cpp.html index 064fb312e..2f9f779d2 100644 --- a/doc/html/chart-canvasview-cpp.html +++ b/doc/html/chart-canvasview-cpp.html @@ -57,7 +57,7 @@ void CanvasView::viewportResize void CanvasView::contentsMousePressEvent( TQMouseEvent *e ) { TQCanvasItemList list = canvas()->collisions( e->pos() ); - for ( TQCanvasItemList::iterator it = list.begin(); it != list.end(); ++it ) + for ( TQCanvasItemList::iterator it = list.begin(); it != list.end(); ++it ) if ( (*it)->rtti() == CanvasText::CANVAS_TEXT ) { m_movingItem = *it; m_pos = e->pos(); diff --git a/doc/html/chart-chartform_canvas-cpp.html b/doc/html/chart-chartform_canvas-cpp.html index 2a8975edd..182d1d8f9 100644 --- a/doc/html/chart-chartform_canvas-cpp.html +++ b/doc/html/chart-chartform_canvas-cpp.html @@ -47,7 +47,7 @@ body { background: #ffffff; color: black; } void ChartForm::drawElements() { TQCanvasItemList list = m_canvas->allItems(); - for ( TQCanvasItemList::iterator it = list.begin(); it != list.end(); ++it ) + for ( TQCanvasItemList::iterator it = list.begin(); it != list.end(); ++it ) delete *it; // 360 * 16 for pies; TQt works with 16ths of degrees diff --git a/doc/html/chart-element-cpp.html b/doc/html/chart-element-cpp.html index cb58e259c..9c0e65e17 100644 --- a/doc/html/chart-element-cpp.html +++ b/doc/html/chart-element-cpp.html @@ -118,7 +118,7 @@ TQTextStream &operator>>( TQTextStreamTQStringList fields = TQStringList::split( FIELD_SEP, data ); - if ( fields.count() >= 4 ) { + if ( fields.count() >= 4 ) { double value = fields[0].toDouble( &ok ); if ( !ok ) errors++; @@ -137,8 +137,8 @@ TQTextStream &operator>>( TQTextStreambegin(); - i < Element::MAX_PROPOINTS && point != propoints.end(); + for ( TQStringList::iterator point = propoints.begin(); + i < Element::MAX_PROPOINTS && point != propoints.end(); ++i, ++point ) { errors = 0; TQStringList xy = TQStringList::split( XY_SEP, *point ); diff --git a/doc/html/chart-element-h.html b/doc/html/chart-element-h.html index cc8895432..fa152018b 100644 --- a/doc/html/chart-element-h.html +++ b/doc/html/chart-element-h.html @@ -38,7 +38,7 @@ body { background: #ffffff; color: black; } #include <ntqcolor.h> #include <ntqnamespace.h> #include <ntqstring.h> -#include <ntqvaluevector.h> +#include <tqvaluevector.h> class Element; diff --git a/doc/html/checklists-example.html b/doc/html/checklists-example.html index 9a58769e0..2dded4efe 100644 --- a/doc/html/checklists-example.html +++ b/doc/html/checklists-example.html @@ -92,7 +92,7 @@ protected slots: #include <ntqlistview.h> #include <ntqvbox.h> #include <ntqlabel.h> -#include <ntqvaluelist.h> +#include <tqvaluelist.h> #include <ntqstring.h> #include <ntqpushbutton.h> #include <ntqlayout.h> @@ -123,17 +123,17 @@ protected slots: lv1->setRootIsDecorated( TRUE ); // create a list with 4 ListViewItems which will be parent items of other ListViewItems - TQValueList<TQListViewItem *> parentList; + TQValueList<TQListViewItem *> parentList; - parentList.append( new TQCheckListItem( lv1, "Parent Item 1", TQCheckListItem::CheckBoxController ) ); - parentList.append( new TQCheckListItem( lv1, "Parent Item 2", TQCheckListItem::CheckBoxController ) ); - parentList.append( new TQCheckListItem( lv1, "Parent Item 3", TQCheckListItem::CheckBoxController ) ); - parentList.append( new TQCheckListItem( lv1, "Parent Item 4", TQCheckListItem::CheckBoxController ) ); + parentList.append( new TQCheckListItem( lv1, "Parent Item 1", TQCheckListItem::CheckBoxController ) ); + parentList.append( new TQCheckListItem( lv1, "Parent Item 2", TQCheckListItem::CheckBoxController ) ); + parentList.append( new TQCheckListItem( lv1, "Parent Item 3", TQCheckListItem::CheckBoxController ) ); + parentList.append( new TQCheckListItem( lv1, "Parent Item 4", TQCheckListItem::CheckBoxController ) ); TQListViewItem *item = 0; unsigned int num = 1; // go through the list of parent items... - for ( TQValueList<TQListViewItem*>::Iterator it = parentList.begin(); it != parentList.end(); + for ( TQValueList<TQListViewItem*>::Iterator it = parentList.begin(); it != parentList.end(); ( *it )->setOpen( TRUE ), ++it, num++ ) { item = *it; // ...and create 5 checkable child ListViewItems for each parent item diff --git a/doc/html/classchart.html b/doc/html/classchart.html index d618b6627..675e4329a 100644 --- a/doc/html/classchart.html +++ b/doc/html/classchart.html @@ -257,7 +257,7 @@ body { background: #ffffff; color: black; } - + @@ -272,7 +272,7 @@ body { background: #ffffff; color: black; } - + @@ -295,8 +295,8 @@ body { background: #ffffff; color: black; } - - + + @@ -317,10 +317,10 @@ body { background: #ffffff; color: black; } - + - - + + diff --git a/doc/html/classes.html b/doc/html/classes.html index 5d9558791..729de0258 100644 --- a/doc/html/classes.html +++ b/doc/html/classes.html @@ -453,7 +453,7 @@ classes, see TQt's Main Classes. TQSimpleRichText -TQValueList +TQValueList TQCanvasLine @@ -464,7 +464,7 @@ classes, see TQt's Main Classes. TQSize -TQValueListConstIterator +TQValueListConstIterator TQCanvasPixmap @@ -475,7 +475,7 @@ classes, see TQt's Main Classes. TQSizeGrip -TQValueListIterator +TQValueListIterator TQCanvasPixmapArray @@ -486,7 +486,7 @@ classes, see TQt's Main Classes. TQSizePolicy -TQValueStack +TQValueStack TQCanvasPolygon @@ -497,14 +497,14 @@ classes, see TQt's Main Classes. TQSjisCodec -TQValueVector +TQValueVector TQCanvasPolygonalItem TQFocusEvent -TQMap +TQMap TQSlider @@ -515,7 +515,7 @@ classes, see TQt's Main Classes. TQFont -TQMapConstIterator +TQMapConstIterator TQSocket @@ -526,7 +526,7 @@ classes, see TQt's Main Classes. TQFontDatabase -TQMapIterator +TQMapIterator TQSocketDevice @@ -911,7 +911,7 @@ classes, see TQt's Main Classes. I TQIconDrag -TQPair +TQPair TQStyleSheet diff --git a/doc/html/collection.html b/doc/html/collection.html index 06b5d5e3b..08b6be42c 100644 --- a/doc/html/collection.html +++ b/doc/html/collection.html @@ -46,10 +46,10 @@ can be used with STL algorithms and containers. See the TQValueList, a value-based list. -
  • TQValueVector, a value-based vector. -
  • TQValueStack, a value-based stack. -
  • TQMap, a value-based dictionary (associative array). +
  • TQValueList, a value-based list. +
  • TQValueVector, a value-based vector. +
  • TQValueStack, a value-based stack. +
  • TQMap, a value-based dictionary (associative array).

    The pointer-based collections are:

    The value-based collections plus algorithms operating on them are grouped together in the TQt Template diff --git a/doc/html/designer-manual-3.html b/doc/html/designer-manual-3.html index ec01038ff..ec4039b32 100644 --- a/doc/html/designer-manual-3.html +++ b/doc/html/designer-manual-3.html @@ -672,7 +672,7 @@ RED WHITESPACE GREEN WHITESPACE BLUE WHITESPACE NAME

    The file may also include comment lines; these begin with '!' for example.

    There are numerous approaches we could have taken to parsing these files, but we've opted for a simple regular expression (regex). The regex is more "liberal" regarding the whitespace in the input than the format demands.

    -

    If a line matches the regex we create a new entry in the m_colors TQMap, setting its text to be the name of the color (regex.cap( 4 )), and its value to be a new TQColor created from the red, green and blue values. Lines that don't match the regex are treated as comments and are stored in the m_comments string list. (When we save the file we write all the comments out first even if they appeared in the middle of the file.)

    +

    If a line matches the regex we create a new entry in the m_colors TQMap, setting its text to be the name of the color (regex.cap( 4 )), and its value to be a new TQColor created from the red, green and blue values. Lines that don't match the regex are treated as comments and are stored in the m_comments string list. (When we save the file we write all the comments out first even if they appeared in the middle of the file.)

    Once we've populated the m_colors map we mark the visible view as "dirty" and call populate() to update it. We then mark the visible view as not dirty and the non-visible view as dirty. This ensures that when user changes the view, the view they switch to will be updated. We could have simply marked both views as dirty and updated them both, but it is more efficient to update "lazily", after all the user may only ever use one view, so why waste their time updating the other one.

    Since we're using TQFile and TQRegExp we need to include the relevant headers. (Right click "Includes (in Implementation)", then click New. Type "ntqfile.h" and press Enter. Repeat this process to add "ntqregexp.h".)

    You should now have added the following declarations to your includes (in implementation):

    diff --git a/doc/html/designer-manual-4.html b/doc/html/designer-manual-4.html index 2f50a2451..a0272eb60 100644 --- a/doc/html/designer-manual-4.html +++ b/doc/html/designer-manual-4.html @@ -121,7 +121,7 @@ body { background: #ffffff; color: black; }

    We'll start by adding some includes.

        #include <ntqcolor.h>
    -    #include <ntqmap.h>
    +    #include <tqmap.h>
         #include <ntqstring.h>
     

    Enter these above the validate() function.

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

    Add this line; we'll store the colors in a local m_colors map.

    We also need a function that the caller can call to populate the m_colors map with the current colors.

    -
        void ColorNameForm::setColors( const TQMap<TQString,TQColor>& colors )
    +
        void ColorNameForm::setColors( const TQMap<TQString,TQColor>& colors )
         {
             m_colors = colors;
         }
    @@ -502,7 +502,7 @@ body { background: #ffffff; color: black; }
     

    ColorNameForm Members

    We put all the ColorNameForm declarations in the source code file. The file colornameform.ui.h should begin with the following declarations:

        #include <ntqcolor.h>
    -    #include <ntqmap.h>
    +    #include <tqmap.h>
         #include <ntqstring.h>
     
         TQMap<TQString,TQColor> m_colors;
    diff --git a/doc/html/designer-manual-8.html b/doc/html/designer-manual-8.html
    index 25db3e6b6..38b207de7 100644
    --- a/doc/html/designer-manual-8.html
    +++ b/doc/html/designer-manual-8.html
    @@ -344,7 +344,7 @@ bool createConnections()
         }
     

    Firstly we look up the book's author and secondly we iterate through the ComboBox's items until we find the author and set the ComboBox's current item to the matching author.

    -

    If the author name has changed or been deleted the query will fail and no author id will be inserted into the buffer causing the INSERT to fail. An alternative is to record the author id's as we populate the ComboBox and store them in a TQMap which we can then look up as required. This approach requires changes to the init(), beforeUpdateBook() and primeInsertBook() functions and the addition of a new function, mapAuthor(). The relevant code from qt/tools/designer/examples/book/book8/editbook.ui is shown below.

    +

    If the author name has changed or been deleted the query will fail and no author id will be inserted into the buffer causing the INSERT to fail. An alternative is to record the author id's as we populate the ComboBox and store them in a TQMap which we can then look up as required. This approach requires changes to the init(), beforeUpdateBook() and primeInsertBook() functions and the addition of a new function, mapAuthor(). The relevant code from qt/tools/designer/examples/book/book8/editbook.ui is shown below.

    1. First we need to create a class variable to map author names to author id's. Click in the Members tab of the Object Explorer, then right click the Class Variables item and click New. Type in 'TQMap<TQString,int> authorMap;'.

    2. We now record the author id's in the init() function.

          void EditBookForm::init()
      @@ -357,8 +357,8 @@ bool createConnections()
               }
           }
       
      -

      After inserting each author's name into the ComboBox we populate a TQMap with the author's name and id.

      -
    3. Instead of looking up the author's id in the database we look it up in the TQMap.

      +

      After inserting each author's name into the ComboBox we populate a TQMap with the author's name and id.

      +
    4. Instead of looking up the author's id in the database we look it up in the TQMap.

          void EditBookForm::beforeUpdateBook( TQSqlRecord * buffer )
           {
               int id;
      @@ -375,7 +375,7 @@ bool createConnections()
                   id = authorMap[ name ];
           }
       
      -

      If the populate flag is TRUE, we store the author's name and id in the TQMap, otherwise we look up the given author name and set id appropriately.

      +

      If the populate flag is TRUE, we store the author's name and id in the TQMap, otherwise we look up the given author name and set id appropriately.

    5. Before we perform an update we must ensure that the author combobox shows the right author.

          void EditBookForm::primeUpdateBook( TQSqlRecord * buffer )
           {
      diff --git a/doc/html/dirview-example.html b/doc/html/dirview-example.html
      index 76c58739b..c734559bb 100644
      --- a/doc/html/dirview-example.html
      +++ b/doc/html/dirview-example.html
      @@ -659,8 +659,8 @@ void DirectoryView::setDir( const TQ
       
           TQStringList lst( TQStringList::split( "/", s ) );
           TQListViewItem *item = firstChild();
      -    TQStringList::Iterator it2 = lst.begin();
      -    for ( ; it2 != lst.end(); ++it2 ) {
      +    TQStringList::Iterator it2 = lst.begin();
      +    for ( ; it2 != lst.end(); ++it2 ) {
               while ( item ) {
                   if ( item->text( 0 ) == *it2 ) {
                       item->setOpen( TRUE );
      diff --git a/doc/html/examples.html b/doc/html/examples.html
      index 29370d066..874a30ec4 100644
      --- a/doc/html/examples.html
      +++ b/doc/html/examples.html
      @@ -109,7 +109,7 @@ in a line-by-line coverage please refer to the tutorials
       TQDir
       Font Displayer
       TQMag
      -A Tiny TQTL Example
      +A Tiny TQTL Example
       Simple editor that can load encodings
       Range controls
       A Small Application for Testing Regular Expressions
      diff --git a/doc/html/fileiconview-example.html b/doc/html/fileiconview-example.html
      index edce37490..8b3e779c2 100644
      --- a/doc/html/fileiconview-example.html
      +++ b/doc/html/fileiconview-example.html
      @@ -127,7 +127,7 @@ signals:
       
       protected slots:
           void itemDoubleClicked( TQIconViewItem *i );
      -    void slotDropped( TQDropEvent *e, const TQValueList<TQIconDragItem> & );
      +    void slotDropped( TQDropEvent *e, const TQValueList<TQIconDragItem> & );
       
           void viewLarge();
           void viewSmall();
      @@ -198,7 +198,7 @@ public:
           void paintItem( TQPainter *p, const TQColorGroup &cg );
       
       protected:
      -    virtual void dropped( TQDropEvent *e, const TQValueList<TQIconDragItem> & );
      +    virtual void dropped( TQDropEvent *e, const TQValueList<TQIconDragItem> & );
       
           TQString itemFileName;
           TQFileInfo *itemFileInfo;
      @@ -631,7 +631,7 @@ TQtFileIconViewItem::~TQtFileIconViewItem()
           return FALSE;
       }
       
      -void TQtFileIconViewItem::dropped( TQDropEvent *e, const TQValueList<TQIconDragItem> & )
      +void TQtFileIconViewItem::dropped( TQDropEvent *e, const TQValueList<TQIconDragItem> & )
       {
           timer.stop();
       
      @@ -648,7 +648,7 @@ TQtFileIconViewItem::~TQtFileIconViewItem()
               str = "Copy\n\n";
           else
               str = "Move\n\n";
      -    for ( uint i = 0; i < lst.count(); ++i )
      +    for ( uint i = 0; i < lst.count(); ++i )
               str += TQString( "   %1\n" ).arg( lst[i] );
           str += TQString( "\n"
               "To\n\n"
      @@ -720,8 +720,8 @@ TQtFileIconViewItem::~TQtFileIconViewItem()
                    this, TQ_SLOT( itemDoubleClicked( TQIconViewItem * ) ) );
           connect( this, TQ_SIGNAL( returnPressed( TQIconViewItem * ) ),
                    this, TQ_SLOT( itemDoubleClicked( TQIconViewItem * ) ) );
      -    connect( this, TQ_SIGNAL( dropped( TQDropEvent *, const TQValueList<TQIconDragItem> & ) ),
      -             this, TQ_SLOT( slotDropped( TQDropEvent *, const TQValueList<TQIconDragItem> & ) ) );
      +    connect( this, TQ_SIGNAL( dropped( TQDropEvent *, const TQValueList<TQIconDragItem> & ) ),
      +             this, TQ_SLOT( slotDropped( TQDropEvent *, const TQValueList<TQIconDragItem> & ) ) );
           connect( this, TQ_SIGNAL( contextMenuRequested( TQIconViewItem *, const TQPoint & ) ),
                    this, TQ_SLOT( slotRightPressed( TQIconViewItem * ) ) );
       
      @@ -909,7 +909,7 @@ void TQtFileIconView::itemDoubleClicked( keyPressEvent( e );
       }
       
      -void TQtFileIconView::slotDropped( TQDropEvent *e, const TQValueList<TQIconDragItem> & )
      +void TQtFileIconView::slotDropped( TQDropEvent *e, const TQValueList<TQIconDragItem> & )
       {
           if ( openItem )
               openItem->timer.stop();
      @@ -926,7 +926,7 @@ void TQtFileIconView::slotDropped( 
               str = "Copy\n\n";
           else
               str = "Move\n\n";
      -    for ( uint i = 0; i < lst.count(); ++i )
      +    for ( uint i = 0; i < lst.count(); ++i )
               str += TQString( "   %1\n" ).arg( TQDir::convertSeparators(lst[i]) );
           str += TQString( "\n"
               "To\n\n"
      diff --git a/doc/html/functions.html b/doc/html/functions.html
      index 7ff410364..d4f6228a9 100644
      --- a/doc/html/functions.html
      +++ b/doc/html/functions.html
      @@ -155,7 +155,7 @@ abort:
        TQCanvasItem
    6. answerRect: TQDragMoveEvent
    7. appID: TQAxFactory
    8. append: - TQCString TQIconDrag TQPtrList TQSqlCursor TQSqlIndex TQSqlRecord TQString TQTextEdit TQValueList TQValueVector TQXmlAttributes
    9. appendChild: + TQCString TQIconDrag TQPtrList TQSqlCursor TQSqlIndex TQSqlRecord TQString TQTextEdit TQValueList TQValueVector TQXmlAttributes
    10. appendChild: TQDomNode
    11. appendData: TQDomCharacterData
    12. applicationContext: TQMotif
    13. applicationDirPath: @@ -214,7 +214,7 @@ abort: TQMemArray
    14. assistantClosed: TQAssistantClient
    15. assistantOpened: TQAssistantClient
    16. at: - TQBitArray TQIODevice TQMemArray TQPtrList TQPtrVector TQSocket TQSqlQuery TQSqlResult TQString TQValueList TQValueVector
    17. atBeginning: + TQBitArray TQIODevice TQMemArray TQPtrList TQPtrVector TQSocket TQSqlQuery TQSqlResult TQString TQValueList TQValueVector
    18. atBeginning: TQMultiLineEdit
    19. atEnd: TQDataStream TQFile TQIODevice TQMultiLineEdit TQSocket TQTextStream
    20. atFirst: TQAsciiCacheIterator TQCacheIterator TQIntCacheIterator TQPtrListIterator
    21. atLast: @@ -244,7 +244,7 @@ abort: TQDesktopWidget
    22. awake: TQEventLoop
    23. back: - TQValueList TQValueVector TQWizard
    24. backButton: + TQValueList TQValueVector TQWizard
    25. backButton: TQWizard
    26. background: TQColorGroup
    27. backgroundBrush: TQWidget
    28. backgroundColor: @@ -263,7 +263,7 @@ back: TQDataBrowser TQDataTable
    29. beforeSeek: TQSqlQuery
    30. beforeUpdate: TQDataBrowser TQDataTable
    31. begin: - TQMap TQMemArray TQPainter TQValueList TQValueVector
    32. beginEdit: + TQMap TQMemArray TQPainter TQValueList TQValueVector
    33. beginEdit: TQTable
    34. beginGroup: TQSettings
    35. beginInsert: TQDataTable
    36. beginTransaction: @@ -339,7 +339,7 @@ c: TQCanvasItem TQCanvasView
    37. cap: TQRegExp
    38. capStyle: TQPen
    39. capacity: - TQString TQValueVector
    40. caption: + TQString TQValueVector
    41. caption: TQWSWindow TQWidget
    42. capturedTexts: TQRegExp
    43. cascade: TQWorkspace
    44. caseSensitive: @@ -396,7 +396,7 @@ c: TQDir
    45. cleanText: TQSpinBox
    46. cleanup: TQColor TQCursor TQFontManager
    47. clear: - TQAccel TQAsciiCache TQAsciiDict TQAxBase TQCache TQClipboard TQComboBox TQDict TQDomNode TQIconView TQIntCache TQIntDict TQLabel TQLineEdit TQListBox TQListView TQMap TQMenuBar TQMenuData TQObjectCleanupHandler TQPixmapCache TQPopupMenu TQPtrCollection TQPtrDict TQPtrList TQPtrQueue TQPtrStack TQPtrVector TQSplashScreen TQSqlCursor TQSqlField TQSqlForm TQSqlRecord TQStatusBar TQTextEdit TQToolBar TQToolTip TQTranslator TQValueList TQValueVector TQVariant TQXmlAttributes
    48. clearArguments: + TQAccel TQAsciiCache TQAsciiDict TQAxBase TQCache TQClipboard TQComboBox TQDict TQDomNode TQIconView TQIntCache TQIntDict TQLabel TQLineEdit TQListBox TQListView TQMap TQMenuBar TQMenuData TQObjectCleanupHandler TQPixmapCache TQPopupMenu TQPtrCollection TQPtrDict TQPtrList TQPtrQueue TQPtrStack TQPtrVector TQSplashScreen TQSqlCursor TQSqlField TQSqlForm TQSqlRecord TQStatusBar TQTextEdit TQToolBar TQToolTip TQTranslator TQValueList TQValueVector TQVariant TQXmlAttributes
    49. clearArguments: TQProcess
    50. clearBit: TQBitArray
    51. clearCalibration: TQWSMouseHandler
    52. clearCell: @@ -505,12 +505,12 @@ c: TQSocket
    53. connectionClosed: TQSocket
    54. connectionStateChanged: TQNetworkProtocol TQUrlOperator
    55. constBegin: - TQMap TQValueList TQValueVector
    56. constEnd: - TQMap TQValueList TQValueVector
    57. constPolish: + TQMap TQValueList TQValueVector
    58. constEnd: + TQMap TQValueList TQValueVector
    59. constPolish: TQWidget
    60. constref: TQString
    61. consume: TQContextMenuEvent
    62. contains: - TQCString TQDomNamedNodeMap TQIconViewItem TQMap TQMemArray TQPtrList TQPtrVector TQRect TQRegion TQSqlDatabase TQSqlRecord TQSqlRecordInfo TQString TQTranslator TQValueList
    63. containsRef: + TQCString TQDomNamedNodeMap TQIconViewItem TQMap TQMemArray TQPtrList TQPtrVector TQRect TQRegion TQSqlDatabase TQSqlRecord TQSqlRecordInfo TQString TQTranslator TQValueList
    64. containsRef: TQPtrList TQPtrVector
    65. contentHandler: TQXmlReader
    66. contentLength: TQHttpHeader
    67. contentType: @@ -558,7 +558,7 @@ c: TQTextEdit
    68. copyBlt: TQPixmap
    69. cornerWidget: TQScrollView TQTabWidget
    70. count: - TQAccel TQAsciiCache TQAsciiCacheIterator TQAsciiDict TQAsciiDictIterator TQButtonGroup TQCache TQCacheIterator TQCanvasPixmapArray TQComboBox TQComboTableItem TQDict TQDictIterator TQDir TQDockArea TQDomNamedNodeMap TQDomNodeList TQFocusData TQHeader TQIconView TQIntCache TQIntCacheIterator TQIntDict TQIntDictIterator TQKeyEvent TQKeySequence TQListBox TQMap TQMemArray TQMenuData TQPtrCollection TQPtrDict TQPtrDictIterator TQPtrList TQPtrListIterator TQPtrQueue TQPtrStack TQPtrVector TQSqlForm TQSqlRecord TQTabBar TQTabWidget TQToolBox TQValueList TQValueVector TQXmlAttributes
    71. countCf: + TQAccel TQAsciiCache TQAsciiCacheIterator TQAsciiDict TQAsciiDictIterator TQButtonGroup TQCache TQCacheIterator TQCanvasPixmapArray TQComboBox TQComboTableItem TQDict TQDictIterator TQDir TQDockArea TQDomNamedNodeMap TQDomNodeList TQFocusData TQHeader TQIconView TQIntCache TQIntCacheIterator TQIntDict TQIntDictIterator TQKeyEvent TQKeySequence TQListBox TQMap TQMemArray TQMenuData TQPtrCollection TQPtrDict TQPtrDictIterator TQPtrList TQPtrListIterator TQPtrQueue TQPtrStack TQPtrVector TQSqlForm TQSqlRecord TQTabBar TQTabWidget TQToolBox TQValueList TQValueVector TQXmlAttributes
    72. countCf: TQWindowsMime
    73. countFlavors: TQMacMime
    74. country: TQLocale
    75. countryToString: @@ -658,7 +658,7 @@ c: TQLineEdit TQTextEdit
    76. dark: TQColor TQColorGroup
    77. data: - TQClipboard TQCustomEvent TQDomCharacterData TQDomProcessingInstruction TQIconDragItem TQMapConstIterator TQMapIterator TQMemArray TQMimeSourceFactory TQNetworkProtocol TQPicture TQPtrVector TQSqlResult TQUrlOperator TQXmlInputSource
    78. dataChanged: + TQClipboard TQCustomEvent TQDomCharacterData TQDomProcessingInstruction TQIconDragItem TQMapConstIterator TQMapIterator TQMemArray TQMimeSourceFactory TQNetworkProtocol TQPicture TQPtrVector TQSqlResult TQUrlOperator TQXmlInputSource
    79. dataChanged: TQClipboard
    80. dataReadProgress: TQHttp
    81. dataSendProgress: TQHttp
    82. dataTransferProgress: @@ -724,7 +724,7 @@ dark: TQColor
    83. destroyed: TQObject
    84. det: TQWMatrix
    85. detach: - TQBitArray TQGLColormap TQIconSet TQImage TQMap TQMemArray TQPicture TQPixmap
    86. device: + TQBitArray TQGLColormap TQIconSet TQImage TQMap TQMemArray TQPicture TQPixmap
    87. device: TQDataStream TQGLContext TQPainter TQTabletEvent TQTextStream
    88. deviceHeight: TQScreen
    89. deviceIsPixmap: TQGLContext
    90. deviceWidth: @@ -858,7 +858,7 @@ echoMode: TQDomDocument TQDomElement
    91. elementsByTagNameNS: TQDomDocument TQDomElement
    92. emitSelectionChanged: TQIconView
    93. empty: - TQMap TQValueList TQValueVector
    94. enableClipper: + TQMap TQValueList TQValueVector
    95. enableClipper: TQScrollView
    96. enablePainting: TQWSServer
    97. enableRewind: TQDataSource TQIODeviceSource
    98. enabled: @@ -868,7 +868,7 @@ echoMode: TQFile
    99. encodedData: TQDropEvent TQIconDrag TQMimeSource TQStoredDrag
    100. encodedPathAndQuery: TQUrl
    101. end: - TQImageConsumer TQLineEdit TQMap TQMemArray TQMultiLineEdit TQNPStream TQPainter TQValueList TQValueVector
    102. endCDATA: + TQImageConsumer TQLineEdit TQMap TQMemArray TQMultiLineEdit TQNPStream TQPainter TQValueList TQValueVector
    103. endCDATA: TQXmlLexicalHandler
    104. endDTD: TQXmlLexicalHandler
    105. endDocument: TQXmlContentHandler
    106. endEdit: @@ -902,7 +902,7 @@ echoMode: TQDataSink
    107. eor: TQRegion
    108. equal: TQUrlInfo
    109. erase: - TQMap TQValueList TQValueVector TQWidget
    110. eraseColor: + TQMap TQValueList TQValueVector TQWidget
    111. eraseColor: TQWidget
    112. erasePixmap: TQWidget
    113. eraseRect: TQPainter
    114. erased: @@ -958,9 +958,9 @@ falseText: TQPainter
    115. filter: TQDataBrowser TQDataTable TQDir TQSqlCursor TQWSInputMethod
    116. filterSelected: TQFileDialog
    117. find: - TQAsciiCache TQAsciiDict TQButtonGroup TQCString TQCache TQDataTable TQDict TQGLColormap TQIntCache TQIntDict TQMap TQMemArray TQPixmapCache TQPtrDict TQPtrList TQPtrVector TQSqlRecordInfo TQString TQTextEdit TQValueList TQWidget
    118. findFirstVisibleItem: + TQAsciiCache TQAsciiDict TQButtonGroup TQCString TQCache TQDataTable TQDict TQGLColormap TQIntCache TQIntDict TQMap TQMemArray TQPixmapCache TQPtrDict TQPtrList TQPtrVector TQSqlRecordInfo TQString TQTextEdit TQValueList TQWidget
    119. findFirstVisibleItem: TQIconView
    120. findIndex: - TQValueList
    121. findItem: + TQValueList
    122. findItem: TQIconView TQListBox TQListView TQMenuData
    123. findKey: TQAccel
    124. findLastVisibleItem: TQIconView
    125. findMessage: @@ -975,7 +975,7 @@ falseText: TQSplashScreen
    126. finishButton: TQWizard
    127. finished: TQAxScript TQMovie TQNetworkProtocol TQThread TQUrlOperator
    128. first: - TQDataBrowser TQFocusData TQPtrList TQSqlQuery TQValueList TQValueVector
    129. firstChild: + TQDataBrowser TQFocusData TQPtrList TQSqlQuery TQValueList TQValueVector
    130. firstChild: TQDomNode TQListView TQListViewItem
    131. firstItem: TQIconView TQListBox
    132. firstRecordAvailable: TQDataBrowser
    133. fix: @@ -1034,7 +1034,7 @@ falseText: TQFrame
    134. free: TQNetworkOperation
    135. fromAscii: TQString
    136. fromLast: - TQValueList
    137. fromLatin1: + TQValueList
    138. fromLatin1: TQString
    139. fromLocal8Bit: TQString
    140. fromMimeSource: TQImage TQPixmap
    141. fromPage: @@ -1046,7 +1046,7 @@ falseText: TQString
    142. fromUnicode: TQHebrewCodec TQTextCodec TQTextEncoder
    143. fromUtf8: TQString
    144. front: - TQValueList TQValueVector
    145. fullPage: + TQValueList TQValueVector
    146. fullPage: TQPrinter
    147. fullSpan: TQCustomMenuItem
    148. functions: TQAxScript TQAxScriptManager
    149. @@ -1253,7 +1253,7 @@ icon: TQImage
    150. inputFormats: TQImage TQImageDecoder TQImageIO
    151. inputMask: TQLineEdit
    152. insert: - TQAsciiCache TQAsciiDict TQButtonGroup TQCString TQCache TQDataBrowser TQDict TQIntCache TQIntDict TQLineEdit TQMap TQPixmapCache TQPtrDict TQPtrList TQPtrVector TQSqlCursor TQSqlForm TQSqlPropertyMap TQSqlRecord TQString TQTextEdit TQTranslator TQValueList TQValueVector
    153. insertAfter: + TQAsciiCache TQAsciiDict TQButtonGroup TQCString TQCache TQDataBrowser TQDict TQIntCache TQIntDict TQLineEdit TQMap TQPixmapCache TQPtrDict TQPtrList TQPtrVector TQSqlCursor TQSqlForm TQSqlPropertyMap TQSqlRecord TQString TQTextEdit TQTranslator TQValueList TQValueVector
    154. insertAfter: TQDomNode
    155. insertAndMark: TQMultiLineEdit
    156. insertAt: TQMultiLineEdit TQTextEdit
    157. insertBefore: @@ -1359,7 +1359,7 @@ icon: TQTable
    158. isEffectEnabled: TQApplication
    159. isElement: TQDomElement TQDomNode
    160. isEmpty: - TQAsciiCache TQAsciiCacheIterator TQAsciiDict TQAsciiDictIterator TQCString TQCache TQCacheIterator TQDict TQDictIterator TQDockArea TQGLColormap TQIntCache TQIntCacheIterator TQIntDict TQIntDictIterator TQKeySequence TQLayout TQLayoutItem TQMap TQMemArray TQObjectCleanupHandler TQPtrDict TQPtrDictIterator TQPtrList TQPtrListIterator TQPtrQueue TQPtrStack TQPtrVector TQRect TQRegExp TQRegion TQSize TQSpacerItem TQSqlRecord TQString TQTableSelection TQTranslator TQValueList TQValueVector TQWidgetItem
    161. isEnabled: + TQAsciiCache TQAsciiCacheIterator TQAsciiDict TQAsciiDictIterator TQCString TQCache TQCacheIterator TQDict TQDictIterator TQDockArea TQGLColormap TQIntCache TQIntCacheIterator TQIntDict TQIntDictIterator TQKeySequence TQLayout TQLayoutItem TQMap TQMemArray TQObjectCleanupHandler TQPtrDict TQPtrDictIterator TQPtrList TQPtrListIterator TQPtrQueue TQPtrStack TQPtrVector TQRect TQRegExp TQRegion TQSize TQSpacerItem TQSqlRecord TQString TQTableSelection TQTranslator TQValueList TQValueVector TQWidgetItem
    162. isEnabled: TQAccel TQAction TQCanvasItem TQLayout TQListViewItem TQSocketNotifier TQTab TQTableItem TQWidget
    163. isEnabledTo: TQWidget
    164. isEntity: TQDomEntity TQDomNode
    165. isEntityReference: @@ -1514,7 +1514,7 @@ join: TQChar
    166. jumpTable: TQImage
    167. key: - TQAccel TQFont TQIconViewItem TQKeyEvent TQListViewItem TQMapConstIterator TQMapIterator TQTableItem
    168. keyMap: + TQAccel TQFont TQIconViewItem TQKeyEvent TQListViewItem TQMapConstIterator TQMapIterator TQTableItem
    169. keyMap: TQWSServer
    170. keyPressEvent: TQLineEdit TQTextBrowser TQTextEdit TQWidget
    171. keyReleaseEvent: TQWidget
    172. keyToValue: @@ -1522,7 +1522,7 @@ key: TQTabBar
    173. keyboardGrabber: TQWidget
    174. keyboardHandler: TQWSServer
    175. keys: - TQGfxDriverFactory TQGfxDriverPlugin TQHttpHeader TQImageFormatPlugin TQKbdDriverFactory TQKbdDriverPlugin TQMap TQMouseDriverFactory TQMouseDriverPlugin TQSqlDriverPlugin TQStyleFactory TQStylePlugin TQWidgetPlugin
    176. keysToValue: + TQGfxDriverFactory TQGfxDriverPlugin TQHttpHeader TQImageFormatPlugin TQKbdDriverFactory TQKbdDriverPlugin TQMap TQMouseDriverFactory TQMouseDriverPlugin TQSqlDriverPlugin TQStyleFactory TQStylePlugin TQWidgetPlugin
    177. keysToValue: TQMetaProperty
    178. kill: TQProcess
    179. killLine: TQMultiLineEdit
    180. killTimer: @@ -1533,7 +1533,7 @@ label: TQProgressDialog
    181. language: TQLocale
    182. languageToString: TQLocale
    183. last: - TQDataBrowser TQFocusData TQPtrList TQSqlQuery TQValueList TQValueVector
    184. lastChild: + TQDataBrowser TQFocusData TQPtrList TQSqlQuery TQValueList TQValueVector
    185. lastChild: TQDomNode
    186. lastError: TQSqlDatabase TQSqlDriver TQSqlQuery TQSqlResult
    187. lastItem: TQIconView TQListView
    188. lastModified: @@ -1877,30 +1877,30 @@ object: TQString
    189. operator type *: TQAsciiCacheIterator TQAsciiDictIterator TQCacheIterator TQDictIterator TQIntCacheIterator TQIntDictIterator TQPtrDictIterator TQPtrListIterator TQPtrQueue TQPtrStack
    190. operator!: TQString
    191. operator!=: - TQBrush TQCString TQChar TQColor TQColorGroup TQDate TQDateTime TQDir TQDomImplementation TQDomNamedNodeMap TQDomNode TQDomNodeList TQFont TQGuardedPtr TQImage TQKeySequence TQMapConstIterator TQMapIterator TQMemArray TQPalette TQPen TQPoint TQPtrList TQRect TQRegExp TQRegion TQSize TQSizePolicy TQString TQTableSelection TQTime TQTranslatorMessage TQUuid TQValueList TQValueListConstIterator TQValueListIterator TQVariant TQWMatrix
    192. operator&: + TQBrush TQCString TQChar TQColor TQColorGroup TQDate TQDateTime TQDir TQDomImplementation TQDomNamedNodeMap TQDomNode TQDomNodeList TQFont TQGuardedPtr TQImage TQKeySequence TQMapConstIterator TQMapIterator TQMemArray TQPalette TQPen TQPoint TQPtrList TQRect TQRegExp TQRegion TQSize TQSizePolicy TQString TQTableSelection TQTime TQTranslatorMessage TQUuid TQValueList TQValueListConstIterator TQValueListIterator TQVariant TQWMatrix
    193. operator&: TQBitArray TQRect TQRegion
    194. operator&=: TQBitArray TQRect TQRegion
    195. operator(): TQAsciiCacheIterator TQAsciiDictIterator TQCacheIterator TQDictIterator TQIntCacheIterator TQIntDictIterator TQPtrDictIterator TQPtrListIterator
    196. operator*: - TQGuardedPtr TQListViewItemIterator TQMapConstIterator TQMapIterator TQPoint TQPtrListIterator TQSize TQValueListConstIterator TQValueListIterator
    197. operator*=: + TQGuardedPtr TQListViewItemIterator TQMapConstIterator TQMapIterator TQPoint TQPtrListIterator TQSize TQValueListConstIterator TQValueListIterator
    198. operator*=: TQPoint TQSize TQWMatrix
    199. operator+: - TQCString TQCanvasItemList TQPoint TQRegion TQSize TQString TQValueList
    200. operator++: - TQAsciiCacheIterator TQAsciiDictIterator TQCacheIterator TQDictIterator TQIntCacheIterator TQIntDictIterator TQLayoutIterator TQListViewItemIterator TQMapConstIterator TQMapIterator TQPtrDictIterator TQPtrListIterator TQSemaphore TQValueListConstIterator TQValueListIterator
    201. operator+=: - TQAsciiCacheIterator TQAsciiDictIterator TQCString TQCacheIterator TQIntCacheIterator TQIntDictIterator TQListViewItemIterator TQPoint TQPtrDictIterator TQPtrListIterator TQRegion TQSemaphore TQSize TQString TQValueList TQValueListIterator
    202. operator-: + TQCString TQCanvasItemList TQPoint TQRegion TQSize TQString TQValueList
    203. operator++: + TQAsciiCacheIterator TQAsciiDictIterator TQCacheIterator TQDictIterator TQIntCacheIterator TQIntDictIterator TQLayoutIterator TQListViewItemIterator TQMapConstIterator TQMapIterator TQPtrDictIterator TQPtrListIterator TQSemaphore TQValueListConstIterator TQValueListIterator
    204. operator+=: + TQAsciiCacheIterator TQAsciiDictIterator TQCString TQCacheIterator TQIntCacheIterator TQIntDictIterator TQListViewItemIterator TQPoint TQPtrDictIterator TQPtrListIterator TQRegion TQSemaphore TQSize TQString TQValueList TQValueListIterator
    205. operator-: TQPoint TQRegion TQSize
    206. operator--: - TQAsciiCacheIterator TQCacheIterator TQIntCacheIterator TQListViewItemIterator TQMapConstIterator TQMapIterator TQPtrListIterator TQSemaphore TQValueListConstIterator TQValueListIterator
    207. operator-=: - TQAsciiCacheIterator TQCacheIterator TQIntCacheIterator TQListViewItemIterator TQPoint TQPtrListIterator TQRegion TQSemaphore TQSize TQValueListIterator
    208. operator->: + TQAsciiCacheIterator TQCacheIterator TQIntCacheIterator TQListViewItemIterator TQMapConstIterator TQMapIterator TQPtrListIterator TQSemaphore TQValueListConstIterator TQValueListIterator
    209. operator-=: + TQAsciiCacheIterator TQCacheIterator TQIntCacheIterator TQListViewItemIterator TQPoint TQPtrListIterator TQRegion TQSemaphore TQSize TQValueListIterator
    210. operator->: TQGuardedPtr
    211. operator/: TQPoint TQSize
    212. operator/=: TQPoint TQSize
    213. operator<: TQCString TQChar TQDate TQDateTime TQString TQTime TQTranslatorMessage TQUuid
    214. operator<<: - TQBitArray TQBrush TQCString TQColor TQColorGroup TQCursor TQDataStream TQDate TQDateTime TQDockArea TQDomNode TQFont TQImage TQKeySequence TQMainWindow TQMap TQMemArray TQPalette TQPen TQPicture TQPixmap TQPoint TQPointArray TQRect TQRegion TQSize TQSplitter TQString TQTextStream TQTime TQUuid TQValueList TQWMatrix
    215. operator<=: + TQBitArray TQBrush TQCString TQColor TQColorGroup TQCursor TQDataStream TQDate TQDateTime TQDockArea TQDomNode TQFont TQImage TQKeySequence TQMainWindow TQMap TQMemArray TQPalette TQPen TQPicture TQPixmap TQPoint TQPointArray TQRect TQRegion TQSize TQSplitter TQString TQTextStream TQTime TQUuid TQValueList TQWMatrix
    216. operator<=: TQCString TQChar TQDate TQDateTime TQString TQTime TQTranslatorMessage
    217. operator=: - TQAsciiCacheIterator TQAsciiDict TQBitArray TQBitVal TQBitmap TQBrush TQCString TQCacheIterator TQColor TQColorGroup TQCursor TQDeepCopy TQDict TQDir TQDomAttr TQDomCDATASection TQDomCharacterData TQDomComment TQDomDocument TQDomDocumentFragment TQDomDocumentType TQDomElement TQDomEntity TQDomEntityReference TQDomImplementation TQDomNamedNodeMap TQDomNode TQDomNodeList TQDomNotation TQDomProcessingInstruction TQDomText TQFileInfo TQFont TQFontInfo TQFontMetrics TQGLColormap TQGuardedPtr TQHostAddress TQHttpHeader TQIconSet TQImage TQIntCacheIterator TQIntDict fnord TQKeySequence TQLayoutIterator TQListViewItemIterator TQLocale TQMap TQMemArray TQMovie TQObjectList TQObjectListIterator TQPair TQPalette TQPen TQPicture TQPixmap TQPointArray TQPtrDict TQPtrList TQPtrListIterator TQPtrQueue TQPtrStack TQPtrVector TQRegExp TQRegion TQSqlCursor TQSqlError TQSqlField TQSqlFieldInfo TQSqlIndex TQSqlQuery TQSqlRecord TQStrList TQString TQStyleSheetItem TQTranslatorMessage TQUrl TQUrlInfo TQUuid TQValueList TQValueVector TQVariant
    218. operator==: - TQBrush TQCString TQChar TQColor TQColorGroup TQDate TQDateTime TQDir TQDomImplementation TQDomNamedNodeMap TQDomNode TQDomNodeList TQFont TQGuardedPtr TQHostAddress TQImage TQKeySequence TQMapConstIterator TQMapIterator TQMemArray TQPalette TQPen TQPoint TQPtrList TQPtrVector TQRect TQRegExp TQRegion TQSize TQSizePolicy TQSqlField TQSqlFieldInfo TQString TQTableSelection TQTime TQTranslatorMessage TQUrl TQUrlInfo TQUuid TQValueList TQValueListConstIterator TQValueListIterator TQValueVector TQVariant TQWMatrix
    219. operator>: + TQAsciiCacheIterator TQAsciiDict TQBitArray TQBitVal TQBitmap TQBrush TQCString TQCacheIterator TQColor TQColorGroup TQCursor TQDeepCopy TQDict TQDir TQDomAttr TQDomCDATASection TQDomCharacterData TQDomComment TQDomDocument TQDomDocumentFragment TQDomDocumentType TQDomElement TQDomEntity TQDomEntityReference TQDomImplementation TQDomNamedNodeMap TQDomNode TQDomNodeList TQDomNotation TQDomProcessingInstruction TQDomText TQFileInfo TQFont TQFontInfo TQFontMetrics TQGLColormap TQGuardedPtr TQHostAddress TQHttpHeader TQIconSet TQImage TQIntCacheIterator TQIntDict fnord TQKeySequence TQLayoutIterator TQListViewItemIterator TQLocale TQMap TQMemArray TQMovie TQObjectList TQObjectListIterator TQPair TQPalette TQPen TQPicture TQPixmap TQPointArray TQPtrDict TQPtrList TQPtrListIterator TQPtrQueue TQPtrStack TQPtrVector TQRegExp TQRegion TQSqlCursor TQSqlError TQSqlField TQSqlFieldInfo TQSqlIndex TQSqlQuery TQSqlRecord TQStrList TQString TQStyleSheetItem TQTranslatorMessage TQUrl TQUrlInfo TQUuid TQValueList TQValueVector TQVariant
    220. operator==: + TQBrush TQCString TQChar TQColor TQColorGroup TQDate TQDateTime TQDir TQDomImplementation TQDomNamedNodeMap TQDomNode TQDomNodeList TQFont TQGuardedPtr TQHostAddress TQImage TQKeySequence TQMapConstIterator TQMapIterator TQMemArray TQPalette TQPen TQPoint TQPtrList TQPtrVector TQRect TQRegExp TQRegion TQSize TQSizePolicy TQSqlField TQSqlFieldInfo TQString TQTableSelection TQTime TQTranslatorMessage TQUrl TQUrlInfo TQUuid TQValueList TQValueListConstIterator TQValueListIterator TQValueVector TQVariant TQWMatrix
    221. operator>: TQCString TQChar TQDate TQDateTime TQString TQTime TQTranslatorMessage TQUuid
    222. operator>=: TQCString TQChar TQDate TQDateTime TQString TQTime TQTranslatorMessage
    223. operator>>: - TQBitArray TQBrush TQCString TQColor TQCursor TQDataStream TQDate TQDateTime TQDockArea TQFont TQImage TQKeySequence TQMainWindow TQMap TQMemArray TQPalette TQPen TQPicture TQPixmap TQPoint TQPointArray TQRect TQRegion TQSize TQSplitter TQString TQTextStream TQTime TQUuid TQValueList TQWMatrix
    224. operator[]: - TQAsciiCache TQAsciiDict TQBitArray TQCache TQDict TQDir TQIntCache TQIntDict TQKeySequence TQMap TQMemArray TQPtrDict TQPtrVector TQString TQValueList TQValueVector
    225. operator^: + TQBitArray TQBrush TQCString TQColor TQCursor TQDataStream TQDate TQDateTime TQDockArea TQFont TQImage TQKeySequence TQMainWindow TQMap TQMemArray TQPalette TQPen TQPicture TQPixmap TQPoint TQPointArray TQRect TQRegion TQSize TQSplitter TQString TQTextStream TQTime TQUuid TQValueList TQWMatrix
    226. operator[]: + TQAsciiCache TQAsciiDict TQBitArray TQCache TQDict TQDir TQIntCache TQIntDict TQKeySequence TQMap TQMemArray TQPtrDict TQPtrVector TQString TQValueList TQValueVector
    227. operator^: TQBitArray TQRegion
    228. operator^=: TQBitArray TQRegion
    229. operator|: TQBitArray TQRect TQRegion
    230. operator|=: @@ -2011,10 +2011,10 @@ packImage: TQCanvasPolygon
    231. polish: TQApplication TQStyle TQWidget
    232. polishPopupMenu: TQStyle
    233. pop: - TQPtrStack TQValueStack
    234. popContext: + TQPtrStack TQValueStack
    235. popContext: TQXmlNamespaceSupport
    236. pop_back: - TQValueList TQValueVector
    237. pop_front: - TQValueList
    238. popup: + TQValueList TQValueVector
    239. pop_front: + TQValueList
    240. popup: TQComboBox TQPopupMenu TQPushButton TQToolButton
    241. popupDelay: TQToolButton
    242. port: TQServerSocket TQSocket TQSocketDevice TQSqlDatabase TQUrl
    243. pos: @@ -2028,7 +2028,7 @@ packImage: TQDomNode TQSpinBox TQXmlNamespaceSupport
    244. prefixes: TQXmlNamespaceSupport
    245. prepare: TQSqlQuery
    246. prepend: - TQCString TQPtrList TQString TQValueList
    247. pressed: + TQCString TQPtrList TQString TQValueList
    248. pressed: TQButton TQButtonGroup TQCheckBox TQHeader TQIconView TQListBox TQListView TQPushButton TQRadioButton TQTable
    249. pressure: TQTabletEvent
    250. prev: TQDataBrowser TQFocusData TQListBoxItem TQPtrList TQSqlQuery
    251. prevItem: @@ -2068,12 +2068,12 @@ packImage: TQNetworkOperation
    252. provides: TQDropEvent TQMimeSource
    253. publicId: TQDomDocumentType TQDomEntity TQDomNotation TQXmlParseException
    254. push: - TQPtrStack TQValueStack
    255. pushContext: + TQPtrStack TQValueStack
    256. pushContext: TQXmlNamespaceSupport
    257. pushData: TQMovie
    258. pushSpace: TQMovie
    259. push_back: - TQValueList TQValueVector
    260. push_front: - TQValueList
    261. put: + TQValueList TQValueVector
    262. push_front: + TQValueList
    263. put: TQFtp TQUrlOperator
    264. putPoints: TQPointArray
    265. putch: TQFile TQIODevice TQSocket
    266. @@ -2095,7 +2095,7 @@ tqAddPostRoutine: TQColor
    267. tqInitNetworkProtocols: TQUrlOperator
    268. qInstallMsgHandler: TQApplication
    269. qMakePair: - TQPair
    270. qName: + TQPair
    271. qName: TQXmlAttributes
    272. tqRed: TQColor
    273. tqRgb: TQColor
    274. tqRgba: @@ -2211,7 +2211,7 @@ rBottom: TQWidget
    275. released: TQButton TQButtonGroup TQCheckBox TQHeader TQPushButton TQRadioButton
    276. reload: TQTextBrowser
    277. remove: - TQAsciiCache TQAsciiDict TQButtonGroup TQCString TQCache TQDict TQDir TQFile TQFtp TQIntCache TQIntDict TQLayout TQMap TQObjectCleanupHandler TQPixmapCache TQPtrDict TQPtrList TQPtrQueue TQPtrStack TQPtrVector TQSqlCursor TQSqlForm TQSqlPropertyMap TQSqlRecord TQString TQToolTip TQTranslator TQUrlOperator TQValueList TQWhatsThis
    278. removeAttribute: + TQAsciiCache TQAsciiDict TQButtonGroup TQCString TQCache TQDict TQDir TQFile TQFtp TQIntCache TQIntDict TQLayout TQMap TQObjectCleanupHandler TQPixmapCache TQPtrDict TQPtrList TQPtrQueue TQPtrStack TQPtrVector TQSqlCursor TQSqlForm TQSqlPropertyMap TQSqlRecord TQString TQToolTip TQTranslator TQUrlOperator TQValueList TQWhatsThis
    279. removeAttribute: TQDomElement
    280. removeAttributeNS: TQDomElement
    281. removeAttributeNode: TQDomElement
    282. removeChild: @@ -2268,7 +2268,7 @@ rBottom: TQIconView
    283. repaintSelections: TQTable
    284. reparent: TQWidget
    285. replace: - TQAsciiDict TQCString TQDict TQIntDict TQMap TQPtrDict TQPtrList TQString
    286. replaceChild: + TQAsciiDict TQCString TQDict TQIntDict TQMap TQPtrDict TQPtrList TQString
    287. replaceChild: TQDomNode
    288. replaceData: TQDomCharacterData
    289. reportError: TQAxBindable
    290. request: @@ -2281,7 +2281,7 @@ rBottom: TQWSWindow
    291. requestedFormat: TQGLContext
    292. rereadDir: TQFileDialog
    293. reserve: - TQString TQValueVector
    294. reset: + TQString TQValueVector
    295. reset: TQDataTable TQGLContext TQIODevice TQIconSet TQImage TQMetaProperty TQProgressBar TQProgressDialog TQSqlResult TQTextStream TQUrl TQWMatrix TQWSInputMethod TQXmlInputSource TQXmlNamespaceSupport
    296. resetGroup: TQSettings
    297. resetInputContext: TQWidget
    298. resetRawData: @@ -2289,7 +2289,7 @@ rBottom: TQFocusEvent
    299. resetStatus: TQIODevice
    300. resetXForm: TQPainter
    301. resize: - TQAsciiDict TQBitArray TQCString TQCanvas TQDict TQIntDict TQMemArray TQPixmap TQPtrDict TQPtrVector TQValueVector TQWidget
    302. resizeContents: + TQAsciiDict TQBitArray TQCString TQCanvas TQDict TQIntDict TQMemArray TQPixmap TQPtrDict TQPtrVector TQValueVector TQWidget
    303. resizeContents: TQScrollView
    304. resizeData: TQTable
    305. resizeEvent: TQFrame TQGLWidget TQListView TQWidget
    306. resizeGL: @@ -3187,7 +3187,7 @@ sRect: TQTextCodec
    307. simplifyWhiteSpace: TQCString TQString
    308. singleShot: TQTimer
    309. size: - TQAsciiCache TQAsciiDict TQBitArray TQCache TQCanvas TQCanvasRectangle TQDict TQDirectPainter TQFile TQFileInfo TQFontMetrics TQGLColormap TQIODevice TQIconViewItem TQImage TQIntCache TQIntDict TQMap TQMemArray TQPicture TQPixmap TQPtrDict TQPtrVector TQRect TQResizeEvent TQSocket TQSqlQuery TQSqlResult TQUrlInfo TQValueList TQValueVector TQWidget
    310. sizeChange: + TQAsciiCache TQAsciiDict TQBitArray TQCache TQCanvas TQCanvasRectangle TQDict TQDirectPainter TQFile TQFileInfo TQFontMetrics TQGLColormap TQIODevice TQIconViewItem TQImage TQIntCache TQIntDict TQMap TQMemArray TQPicture TQPixmap TQPtrDict TQPtrVector TQRect TQResizeEvent TQSocket TQSqlQuery TQSqlResult TQUrlInfo TQValueList TQValueVector TQWidget
    311. sizeChange: TQHeader
    312. sizeFromContents: TQStyle
    313. sizeHint: TQBoxLayout TQCanvasView TQCustomMenuItem TQGridLayout TQLayoutItem TQLineEdit TQProgressDialog TQSizeGrip TQSpacerItem TQTableItem TQWidget TQWidgetItem
    314. sizeIncrement: @@ -3452,7 +3452,7 @@ tab: TQMainWindow
    315. toolTip: TQAction TQTabBar TQWidgetPlugin
    316. toolTipGroup: TQMainWindow
    317. top: - TQDoubleValidator TQIntValidator TQPtrStack TQRect TQValueStack
    318. topDock: + TQDoubleValidator TQIntValidator TQPtrStack TQRect TQValueStack
    319. topDock: TQMainWindow
    320. topEdge: TQCanvasSprite
    321. topItem: TQListBox
    322. topLeft: @@ -3566,7 +3566,7 @@ vScrollBarMode: TQRangeControl
    323. valueToKey: TQMetaProperty
    324. valueToKeys: TQMetaProperty
    325. values: - TQMap
    326. variableHeight: + TQMap
    327. variableHeight: TQListBox
    328. variableWidth: TQListBox
    329. variant: TQUuid
    330. verData: diff --git a/doc/html/headerfilesynonyms b/doc/html/headerfilesynonyms index dacad6b8a..7b25e7b73 100644 --- a/doc/html/headerfilesynonyms +++ b/doc/html/headerfilesynonyms @@ -109,8 +109,8 @@ qlistviewitem.h ntqlistview.h qchecklistitem.h ntqlistview.h qlistviewitemiterator.h ntqlistview.h qmacstyle.h qmacstyle_mac.h -qmapiterator.h ntqmap.h -qmapconstiterator.h ntqmap.h +tqmapiterator.h tqmap.h +tqmapconstiterator.h tqmap.h qcustommenuitem.h ntqmenudata.h qmetaproperty.h ntqmetaobject.h qmimesource.h ntqmime.h @@ -152,8 +152,8 @@ qtranslatormessage.h ntqtranslator.h qintvalidator.h ntqvalidator.h qdoublevalidator.h ntqvalidator.h qregexpvalidator.h ntqvalidator.h -qvaluelistiterator.h ntqvaluelist.h -qvaluelistconstiterator.h ntqvaluelist.h +tqvaluelistiterator.h tqvaluelist.h +tqvaluelistconstiterator.h tqvaluelist.h tqxmlnamespacesupport.h tqxml.h tqxmlattributes.h tqxml.h tqxmlinputsource.h tqxml.h diff --git a/doc/html/headers.html b/doc/html/headers.html index 088d0eb47..81d5c4970 100644 --- a/doc/html/headers.html +++ b/doc/html/headers.html @@ -148,7 +148,7 @@ body { background: #ffffff; color: black; }
    331. ntqlocalfs.h
    332. qmacstyle_mac.h
    333. ntqmainwindow.h -
    334. ntqmap.h +
    335. tqmap.h
    336. ntqmemarray.h
    337. ntqmenubar.h
    338. ntqmenudata.h @@ -175,7 +175,7 @@ body { background: #ffffff; color: black; }
    339. ntqpaintdevice.h
    340. ntqpaintdevicemetrics.h
    341. ntqpainter.h -
    342. ntqpair.h +
    343. tqpair.h
    344. ntqpalette.h
    345. ntqpen.h
    346. ntqpicture.h @@ -273,9 +273,9 @@ body { background: #ffffff; color: black; }
    347. ntqurloperator.h
    348. ntquuid.h
    349. ntqvalidator.h -
    350. ntqvaluelist.h -
    351. ntqvaluestack.h -
    352. ntqvaluevector.h +
    353. tqvaluelist.h +
    354. tqvaluestack.h +
    355. tqvaluevector.h
    356. ntqvariant.h
    357. ntqvbox.h
    358. ntqvbuttongroup.h diff --git a/doc/html/helpviewer-example.html b/doc/html/helpviewer-example.html index 9e7be2cd0..b108de02e 100644 --- a/doc/html/helpviewer-example.html +++ b/doc/html/helpviewer-example.html @@ -53,7 +53,7 @@ TQt's richtext capabilities. #include <ntqmainwindow.h> #include <ntqtextbrowser.h> #include <ntqstringlist.h> -#include <ntqmap.h> +#include <tqmap.h> #include <ntqdir.h> class TQComboBox; @@ -90,7 +90,7 @@ private: TQComboBox *pathCombo; int backwardId, forwardId; TQStringList history, bookmarks; - TQMap<int, TQString> mHistory, mBookmarks; + TQMap<int, TQString> mHistory, mBookmarks; TQPopupMenu *hist, *bookm; }; diff --git a/doc/html/hierarchy.html b/doc/html/hierarchy.html index e3d464910..6faac1e04 100644 --- a/doc/html/hierarchy.html +++ b/doc/html/hierarchy.html @@ -152,9 +152,9 @@ classes in the TQt API.
    359. TQListViewItemIterator
    360. TQLocale
    361. TQMacMime -
    362. TQMap -
    363. TQMapConstIterator -
    364. TQMapIterator +
    365. TQMap +
    366. TQMapConstIterator +
    367. TQMapIterator
    368. TQMemArray
    369. TQPaintDeviceMetrics -
    370. TQPair +
    371. TQPair
    372. TQPalette
    373. TQPixmapCache
    374. TQPNGImagePacker @@ -552,15 +552,15 @@ classes in the TQt API.
    375. TQUrl
    376. TQUrlInfo
    377. TQUuid -
    378. TQValueList +
    379. TQValueList -
    380. TQValueListConstIterator -
    381. TQValueListIterator -
    382. TQValueVector +
    383. TQValueListConstIterator +
    384. TQValueListIterator +
    385. TQValueVector
    386. TQVariant
    387. TQWaitCondition
    388. TQWidgetFactory diff --git a/doc/html/iconview-example.html b/doc/html/iconview-example.html index f3bb2c1f3..af30f18a4 100644 --- a/doc/html/iconview-example.html +++ b/doc/html/iconview-example.html @@ -101,7 +101,7 @@ int main( int argc, char **argv ) qiconview.setCaption( "TQt Example - Iconview" ); ListenDND listen_dnd( &qiconview ); - TQObject::connect( &qiconview, TQ_SIGNAL( dropped( TQDropEvent *, const TQValueList<TQIconDragItem> & ) ), + TQObject::connect( &qiconview, TQ_SIGNAL( dropped( TQDropEvent *, const TQValueList<TQIconDragItem> & ) ), &listen_dnd, TQ_SLOT( dropped( TQDropEvent * ) ) ); TQObject::connect( &qiconview, TQ_SIGNAL( moved() ), &listen_dnd, TQ_SLOT( moved() ) ); diff --git a/doc/html/iconview-simple_dd-main-cpp.html b/doc/html/iconview-simple_dd-main-cpp.html index 8dab1e73c..5f716c4f3 100644 --- a/doc/html/iconview-simple_dd-main-cpp.html +++ b/doc/html/iconview-simple_dd-main-cpp.html @@ -162,7 +162,7 @@ const char* green_icon[]={ } -void DDIconViewItem::dropped( TQDropEvent *evt, const TQValueList<TQIconDragItem>& ) +void DDIconViewItem::dropped( TQDropEvent *evt, const TQValueList<TQIconDragItem>& ) { TQString label; @@ -178,7 +178,7 @@ const char* green_icon[]={ return new TQTextDrag( currentItem()->text(), this ); } -void DDIconView::slotNewItem( TQDropEvent *evt, const TQValueList<TQIconDragItem>& ) +void DDIconView::slotNewItem( TQDropEvent *evt, const TQValueList<TQIconDragItem>& ) { TQString label; @@ -204,8 +204,8 @@ int main( int argc, char *argv[] ) // Set up the connection so that we can drop items into the icon view TQObject::connect( - iv, TQ_SIGNAL(dropped(TQDropEvent*, const TQValueList<TQIconDragItem>&)), - iv, TQ_SLOT(slotNewItem(TQDropEvent*, const TQValueList<TQIconDragItem>&))); + iv, TQ_SIGNAL(dropped(TQDropEvent*, const TQValueList<TQIconDragItem>&)), + iv, TQ_SLOT(slotNewItem(TQDropEvent*, const TQValueList<TQIconDragItem>&))); // Populate the TQIconView with icons DDIconViewItem *item; diff --git a/doc/html/iconview-simple_dd-main-h.html b/doc/html/iconview-simple_dd-main-h.html index d6476cb0b..d8d44c775 100644 --- a/doc/html/iconview-simple_dd-main-h.html +++ b/doc/html/iconview-simple_dd-main-h.html @@ -77,7 +77,7 @@ public: TQIconViewItem( parent, text ) {} // High-level drag and drop bool acceptDrop( const TQMimeSource *mime ) const; - void dropped( TQDropEvent *evt, const TQValueList<TQIconDragItem>& ); + void dropped( TQDropEvent *evt, const TQValueList<TQIconDragItem>& ); }; @@ -90,7 +90,7 @@ public: // High-level drag and drop TQDragObject *dragObject(); public slots: - void slotNewItem( TQDropEvent *evt, const TQValueList<TQIconDragItem>& list ); + void slotNewItem( TQDropEvent *evt, const TQValueList<TQIconDragItem>& list ); };
    389. diff --git a/doc/html/index b/doc/html/index index c886e40d2..2ac0d810e 100644 --- a/doc/html/index +++ b/doc/html/index @@ -8,7 +8,7 @@ "A Rectangle Draw \"Benchmark\"" forever-example.html "A Small Application for Testing Regular Expressions" regexptester-example.html "A Tiny Example Featuring a Toggle Action" toggleaction-example.html -"A Tiny QTL Example" qtl-qvaluelist-example.html +"A Tiny QTL Example" qtl-tqvaluelist-example.html "A Web Browser" qaxcontainer-example-webbrowser.html "A qt-interest mail archive search" archivesearch-example.html "A simple ActiveQt control (executable)" qaxserver-example-simple.html @@ -3998,65 +3998,65 @@ "QMainWindow::usesTextLabelChanged" ntqmainwindow.html#usesTextLabelChanged "QMainWindow::whatsThis" ntqmainwindow.html#whatsThis "QMainWindow::~QMainWindow" ntqmainwindow.html#~QMainWindow -"QMap" ntqmap.html -"QMap::ConstIterator" ntqmap.html#ConstIterator -"QMap::Iterator" ntqmap.html#Iterator -"QMap::ValueType" ntqmap.html#ValueType -"QMap::begin" ntqmap.html#begin -"QMap::clear" ntqmap.html#clear -"QMap::constBegin" ntqmap.html#constBegin -"QMap::constEnd" ntqmap.html#constEnd -"QMap::const_iterator" ntqmap.html#const_iterator -"QMap::const_pointer" ntqmap.html#const_pointer -"QMap::const_reference" ntqmap.html#const_reference -"QMap::contains" ntqmap.html#contains -"QMap::count" ntqmap.html#count -"QMap::detach" ntqmap.html#detach -"QMap::empty" ntqmap.html#empty -"QMap::end" ntqmap.html#end -"QMap::erase" ntqmap.html#erase -"QMap::find" ntqmap.html#find -"QMap::insert" ntqmap.html#insert -"QMap::isEmpty" ntqmap.html#isEmpty -"QMap::iterator" ntqmap.html#iterator -"QMap::key_type" ntqmap.html#key_type -"QMap::keys" ntqmap.html#keys -"QMap::mapped_type" ntqmap.html#mapped_type -"QMap::operator=" ntqmap.html#operator-eq -"QMap::operator[]" ntqmap.html#operator[] -"QMap::pointer" ntqmap.html#pointer -"QMap::reference" ntqmap.html#reference -"QMap::remove" ntqmap.html#remove -"QMap::replace" ntqmap.html#replace -"QMap::size" ntqmap.html#size -"QMap::size_type" ntqmap.html#size_type -"QMap::value_type" ntqmap.html#value_type -"QMap::values" ntqmap.html#values -"QMap::~QMap" ntqmap.html#~QMap -"QMapConstIterator" qmapconstiterator.html -"QMapConstIterator::data" qmapconstiterator.html#data -"QMapConstIterator::iterator_category" qmapconstiterator.html#iterator_category -"QMapConstIterator::key" qmapconstiterator.html#key -"QMapConstIterator::operator!=" qmapconstiterator.html#operator!-eq -"QMapConstIterator::operator*" qmapconstiterator.html#operator* -"QMapConstIterator::operator++" qmapconstiterator.html#operator++ -"QMapConstIterator::operator--" qmapconstiterator.html#operator-- -"QMapConstIterator::operator==" qmapconstiterator.html#operator-eq-eq -"QMapConstIterator::pointer" qmapconstiterator.html#pointer -"QMapConstIterator::reference" qmapconstiterator.html#reference -"QMapConstIterator::value_type" qmapconstiterator.html#value_type -"QMapIterator" qmapiterator.html -"QMapIterator::data" qmapiterator.html#data -"QMapIterator::iterator_category" qmapiterator.html#iterator_category -"QMapIterator::key" qmapiterator.html#key -"QMapIterator::operator!=" qmapiterator.html#operator!-eq -"QMapIterator::operator*" qmapiterator.html#operator* -"QMapIterator::operator++" qmapiterator.html#operator++ -"QMapIterator::operator--" qmapiterator.html#operator-- -"QMapIterator::operator==" qmapiterator.html#operator-eq-eq -"QMapIterator::pointer" qmapiterator.html#pointer -"QMapIterator::reference" qmapiterator.html#reference -"QMapIterator::value_type" qmapiterator.html#value_type +"TQMap" tqmap.html +"TQMap::ConstIterator" tqmap.html#ConstIterator +"TQMap::Iterator" tqmap.html#Iterator +"TQMap::ValueType" tqmap.html#ValueType +"TQMap::begin" tqmap.html#begin +"TQMap::clear" tqmap.html#clear +"TQMap::constBegin" tqmap.html#constBegin +"TQMap::constEnd" tqmap.html#constEnd +"TQMap::const_iterator" tqmap.html#const_iterator +"TQMap::const_pointer" tqmap.html#const_pointer +"TQMap::const_reference" tqmap.html#const_reference +"TQMap::contains" tqmap.html#contains +"TQMap::count" tqmap.html#count +"TQMap::detach" tqmap.html#detach +"TQMap::empty" tqmap.html#empty +"TQMap::end" tqmap.html#end +"TQMap::erase" tqmap.html#erase +"TQMap::find" tqmap.html#find +"TQMap::insert" tqmap.html#insert +"TQMap::isEmpty" tqmap.html#isEmpty +"TQMap::iterator" tqmap.html#iterator +"TQMap::key_type" tqmap.html#key_type +"TQMap::keys" tqmap.html#keys +"TQMap::mapped_type" tqmap.html#mapped_type +"TQMap::operator=" tqmap.html#operator-eq +"TQMap::operator[]" tqmap.html#operator[] +"TQMap::pointer" tqmap.html#pointer +"TQMap::reference" tqmap.html#reference +"TQMap::remove" tqmap.html#remove +"TQMap::replace" tqmap.html#replace +"TQMap::size" tqmap.html#size +"TQMap::size_type" tqmap.html#size_type +"TQMap::value_type" tqmap.html#value_type +"TQMap::values" tqmap.html#values +"TQMap::~TQMap" tqmap.html#~TQMap +"TQMapConstIterator" tqmapconstiterator.html +"TQMapConstIterator::data" tqmapconstiterator.html#data +"TQMapConstIterator::iterator_category" tqmapconstiterator.html#iterator_category +"TQMapConstIterator::key" tqmapconstiterator.html#key +"TQMapConstIterator::operator!=" tqmapconstiterator.html#operator!-eq +"TQMapConstIterator::operator*" tqmapconstiterator.html#operator* +"TQMapConstIterator::operator++" tqmapconstiterator.html#operator++ +"TQMapConstIterator::operator--" tqmapconstiterator.html#operator-- +"TQMapConstIterator::operator==" tqmapconstiterator.html#operator-eq-eq +"TQMapConstIterator::pointer" tqmapconstiterator.html#pointer +"TQMapConstIterator::reference" tqmapconstiterator.html#reference +"TQMapConstIterator::value_type" tqmapconstiterator.html#value_type +"TQMapIterator" tqmapiterator.html +"TQMapIterator::data" tqmapiterator.html#data +"TQMapIterator::iterator_category" tqmapiterator.html#iterator_category +"TQMapIterator::key" tqmapiterator.html#key +"TQMapIterator::operator!=" tqmapiterator.html#operator!-eq +"TQMapIterator::operator*" tqmapiterator.html#operator* +"TQMapIterator::operator++" tqmapiterator.html#operator++ +"TQMapIterator::operator--" tqmapiterator.html#operator-- +"TQMapIterator::operator==" tqmapiterator.html#operator-eq-eq +"TQMapIterator::pointer" tqmapiterator.html#pointer +"TQMapIterator::reference" tqmapiterator.html#reference +"TQMapIterator::value_type" tqmapiterator.html#value_type "QMemArray" ntqmemarray.html "QMemArray::ConstIterator" ntqmemarray.html#ConstIterator "QMemArray::Iterator" ntqmemarray.html#Iterator @@ -4621,9 +4621,9 @@ "QPainter::xForm" ntqpainter.html#xForm "QPainter::xFormDev" ntqpainter.html#xFormDev "QPainter::~QPainter" ntqpainter.html#~QPainter -"TQPair" ntqpair.html -"TQPair::first_type" ntqpair.html#first_type -"TQPair::second_type" ntqpair.html#second_type +"TQPair" tqpair.html +"TQPair::first_type" tqpair.html#first_type +"TQPair::second_type" tqpair.html#second_type "QPalette" ntqpalette.html "QPalette::ColorGroup" ntqpalette.html#ColorGroup "QPalette::active" ntqpalette.html#active @@ -7265,116 +7265,116 @@ "QValidator::fixup" ntqvalidator.html#fixup "QValidator::validate" ntqvalidator.html#validate "QValidator::~QValidator" ntqvalidator.html#~QValidator -"QValueList" ntqvaluelist.html -"QValueList::ConstIterator" ntqvaluelist.html#ConstIterator -"QValueList::Iterator" ntqvaluelist.html#Iterator -"QValueList::append" ntqvaluelist.html#append -"QValueList::at" ntqvaluelist.html#at -"QValueList::back" ntqvaluelist.html#back -"QValueList::begin" ntqvaluelist.html#begin -"QValueList::clear" ntqvaluelist.html#clear -"QValueList::constBegin" ntqvaluelist.html#constBegin -"QValueList::constEnd" ntqvaluelist.html#constEnd -"QValueList::const_iterator" ntqvaluelist.html#const_iterator -"QValueList::const_pointer" ntqvaluelist.html#const_pointer -"QValueList::const_reference" ntqvaluelist.html#const_reference -"QValueList::contains" ntqvaluelist.html#contains -"QValueList::count" ntqvaluelist.html#count -"QValueList::empty" ntqvaluelist.html#empty -"QValueList::end" ntqvaluelist.html#end -"QValueList::erase" ntqvaluelist.html#erase -"QValueList::find" ntqvaluelist.html#find -"QValueList::findIndex" ntqvaluelist.html#findIndex -"QValueList::first" ntqvaluelist.html#first -"QValueList::fromLast" ntqvaluelist.html#fromLast -"QValueList::front" ntqvaluelist.html#front -"QValueList::insert" ntqvaluelist.html#insert -"QValueList::isEmpty" ntqvaluelist.html#isEmpty -"QValueList::iterator" ntqvaluelist.html#iterator -"QValueList::last" ntqvaluelist.html#last -"QValueList::operator!=" ntqvaluelist.html#operator!-eq -"QValueList::operator+" ntqvaluelist.html#operator+ -"QValueList::operator+=" ntqvaluelist.html#operator+-eq -"QValueList::operator<<" ntqvaluelist.html#operator-lt-lt -"QValueList::operator=" ntqvaluelist.html#operator-eq -"QValueList::operator==" ntqvaluelist.html#operator-eq-eq -"QValueList::operator[]" ntqvaluelist.html#operator[] -"QValueList::pointer" ntqvaluelist.html#pointer -"QValueList::pop_back" ntqvaluelist.html#pop_back -"QValueList::pop_front" ntqvaluelist.html#pop_front -"QValueList::prepend" ntqvaluelist.html#prepend -"QValueList::push_back" ntqvaluelist.html#push_back -"QValueList::push_front" ntqvaluelist.html#push_front -"QValueList::reference" ntqvaluelist.html#reference -"QValueList::remove" ntqvaluelist.html#remove -"QValueList::size" ntqvaluelist.html#size -"QValueList::size_type" ntqvaluelist.html#size_type -"QValueList::value_type" ntqvaluelist.html#value_type -"QValueList::~QValueList" ntqvaluelist.html#~QValueList -"QValueListConstIterator" qvaluelistconstiterator.html -"QValueListConstIterator::operator!=" qvaluelistconstiterator.html#operator!-eq -"QValueListConstIterator::operator*" qvaluelistconstiterator.html#operator* -"QValueListConstIterator::operator++" qvaluelistconstiterator.html#operator++ -"QValueListConstIterator::operator--" qvaluelistconstiterator.html#operator-- -"QValueListConstIterator::operator==" qvaluelistconstiterator.html#operator-eq-eq -"QValueListConstIterator::pointer" qvaluelistconstiterator.html#pointer -"QValueListConstIterator::reference" qvaluelistconstiterator.html#reference -"QValueListConstIterator::value_type" qvaluelistconstiterator.html#value_type -"QValueListIterator" qvaluelistiterator.html -"QValueListIterator::operator!=" qvaluelistiterator.html#operator!-eq -"QValueListIterator::operator*" qvaluelistiterator.html#operator* -"QValueListIterator::operator++" qvaluelistiterator.html#operator++ -"QValueListIterator::operator+=" qvaluelistiterator.html#operator+-eq -"QValueListIterator::operator--" qvaluelistiterator.html#operator-- -"QValueListIterator::operator-=" qvaluelistiterator.html#operator--eq -"QValueListIterator::operator==" qvaluelistiterator.html#operator-eq-eq -"QValueListIterator::pointer" qvaluelistiterator.html#pointer -"QValueListIterator::reference" qvaluelistiterator.html#reference -"QValueListIterator::value_type" qvaluelistiterator.html#value_type -"QValueStack" ntqvaluestack.html -"QValueStack::pop" ntqvaluestack.html#pop -"QValueStack::push" ntqvaluestack.html#push -"QValueStack::top" ntqvaluestack.html#top -"QValueStack::~QValueStack" ntqvaluestack.html#~QValueStack -"QValueVector" ntqvaluevector.html -"QValueVector::ConstIterator" ntqvaluevector.html#ConstIterator -"QValueVector::Iterator" ntqvaluevector.html#Iterator -"QValueVector::ValueType" ntqvaluevector.html#ValueType -"QValueVector::append" ntqvaluevector.html#append -"QValueVector::at" ntqvaluevector.html#at -"QValueVector::back" ntqvaluevector.html#back -"QValueVector::begin" ntqvaluevector.html#begin -"QValueVector::capacity" ntqvaluevector.html#capacity -"QValueVector::clear" ntqvaluevector.html#clear -"QValueVector::constBegin" ntqvaluevector.html#constBegin -"QValueVector::constEnd" ntqvaluevector.html#constEnd -"QValueVector::const_iterator" ntqvaluevector.html#const_iterator -"QValueVector::const_pointer" ntqvaluevector.html#const_pointer -"QValueVector::const_reference" ntqvaluevector.html#const_reference -"QValueVector::count" ntqvaluevector.html#count -"QValueVector::difference_type" ntqvaluevector.html#difference_type -"QValueVector::empty" ntqvaluevector.html#empty -"QValueVector::end" ntqvaluevector.html#end -"QValueVector::erase" ntqvaluevector.html#erase -"QValueVector::first" ntqvaluevector.html#first -"QValueVector::front" ntqvaluevector.html#front -"QValueVector::insert" ntqvaluevector.html#insert -"QValueVector::isEmpty" ntqvaluevector.html#isEmpty -"QValueVector::iterator" ntqvaluevector.html#iterator -"QValueVector::last" ntqvaluevector.html#last -"QValueVector::operator=" ntqvaluevector.html#operator-eq -"QValueVector::operator==" ntqvaluevector.html#operator-eq-eq -"QValueVector::operator[]" ntqvaluevector.html#operator[] -"QValueVector::pointer" ntqvaluevector.html#pointer -"QValueVector::pop_back" ntqvaluevector.html#pop_back -"QValueVector::push_back" ntqvaluevector.html#push_back -"QValueVector::reference" ntqvaluevector.html#reference -"QValueVector::reserve" ntqvaluevector.html#reserve -"QValueVector::resize" ntqvaluevector.html#resize -"QValueVector::size" ntqvaluevector.html#size -"QValueVector::size_type" ntqvaluevector.html#size_type -"QValueVector::value_type" ntqvaluevector.html#value_type -"QValueVector::~QValueVector" ntqvaluevector.html#~QValueVector +"TQValueList" tqvaluelist.html +"TQValueList::ConstIterator" tqvaluelist.html#ConstIterator +"TQValueList::Iterator" tqvaluelist.html#Iterator +"TQValueList::append" tqvaluelist.html#append +"TQValueList::at" tqvaluelist.html#at +"TQValueList::back" tqvaluelist.html#back +"TQValueList::begin" tqvaluelist.html#begin +"TQValueList::clear" tqvaluelist.html#clear +"TQValueList::constBegin" tqvaluelist.html#constBegin +"TQValueList::constEnd" tqvaluelist.html#constEnd +"TQValueList::const_iterator" tqvaluelist.html#const_iterator +"TQValueList::const_pointer" tqvaluelist.html#const_pointer +"TQValueList::const_reference" tqvaluelist.html#const_reference +"TQValueList::contains" tqvaluelist.html#contains +"TQValueList::count" tqvaluelist.html#count +"TQValueList::empty" tqvaluelist.html#empty +"TQValueList::end" tqvaluelist.html#end +"TQValueList::erase" tqvaluelist.html#erase +"TQValueList::find" tqvaluelist.html#find +"TQValueList::findIndex" tqvaluelist.html#findIndex +"TQValueList::first" tqvaluelist.html#first +"TQValueList::fromLast" tqvaluelist.html#fromLast +"TQValueList::front" tqvaluelist.html#front +"TQValueList::insert" tqvaluelist.html#insert +"TQValueList::isEmpty" tqvaluelist.html#isEmpty +"TQValueList::iterator" tqvaluelist.html#iterator +"TQValueList::last" tqvaluelist.html#last +"TQValueList::operator!=" tqvaluelist.html#operator!-eq +"TQValueList::operator+" tqvaluelist.html#operator+ +"TQValueList::operator+=" tqvaluelist.html#operator+-eq +"TQValueList::operator<<" tqvaluelist.html#operator-lt-lt +"TQValueList::operator=" tqvaluelist.html#operator-eq +"TQValueList::operator==" tqvaluelist.html#operator-eq-eq +"TQValueList::operator[]" tqvaluelist.html#operator[] +"TQValueList::pointer" tqvaluelist.html#pointer +"TQValueList::pop_back" tqvaluelist.html#pop_back +"TQValueList::pop_front" tqvaluelist.html#pop_front +"TQValueList::prepend" tqvaluelist.html#prepend +"TQValueList::push_back" tqvaluelist.html#push_back +"TQValueList::push_front" tqvaluelist.html#push_front +"TQValueList::reference" tqvaluelist.html#reference +"TQValueList::remove" tqvaluelist.html#remove +"TQValueList::size" tqvaluelist.html#size +"TQValueList::size_type" tqvaluelist.html#size_type +"TQValueList::value_type" tqvaluelist.html#value_type +"TQValueList::~TQValueList" tqvaluelist.html#~TQValueList +"TQValueListConstIterator" tqvaluelistconstiterator.html +"TQValueListConstIterator::operator!=" tqvaluelistconstiterator.html#operator!-eq +"TQValueListConstIterator::operator*" tqvaluelistconstiterator.html#operator* +"TQValueListConstIterator::operator++" tqvaluelistconstiterator.html#operator++ +"TQValueListConstIterator::operator--" tqvaluelistconstiterator.html#operator-- +"TQValueListConstIterator::operator==" tqvaluelistconstiterator.html#operator-eq-eq +"TQValueListConstIterator::pointer" tqvaluelistconstiterator.html#pointer +"TQValueListConstIterator::reference" tqvaluelistconstiterator.html#reference +"TQValueListConstIterator::value_type" tqvaluelistconstiterator.html#value_type +"TQValueListIterator" tqvaluelistiterator.html +"TQValueListIterator::operator!=" tqvaluelistiterator.html#operator!-eq +"TQValueListIterator::operator*" tqvaluelistiterator.html#operator* +"TQValueListIterator::operator++" tqvaluelistiterator.html#operator++ +"TQValueListIterator::operator+=" tqvaluelistiterator.html#operator+-eq +"TQValueListIterator::operator--" tqvaluelistiterator.html#operator-- +"TQValueListIterator::operator-=" tqvaluelistiterator.html#operator--eq +"TQValueListIterator::operator==" tqvaluelistiterator.html#operator-eq-eq +"TQValueListIterator::pointer" tqvaluelistiterator.html#pointer +"TQValueListIterator::reference" tqvaluelistiterator.html#reference +"TQValueListIterator::value_type" tqvaluelistiterator.html#value_type +"TQValueStack" tqvaluestack.html +"TQValueStack::pop" tqvaluestack.html#pop +"TQValueStack::push" tqvaluestack.html#push +"TQValueStack::top" tqvaluestack.html#top +"TQValueStack::~TQValueStack" tqvaluestack.html#~TQValueStack +"TQValueVector" tqvaluevector.html +"TQValueVector::ConstIterator" tqvaluevector.html#ConstIterator +"TQValueVector::Iterator" tqvaluevector.html#Iterator +"TQValueVector::ValueType" tqvaluevector.html#ValueType +"TQValueVector::append" tqvaluevector.html#append +"TQValueVector::at" tqvaluevector.html#at +"TQValueVector::back" tqvaluevector.html#back +"TQValueVector::begin" tqvaluevector.html#begin +"TQValueVector::capacity" tqvaluevector.html#capacity +"TQValueVector::clear" tqvaluevector.html#clear +"TQValueVector::constBegin" tqvaluevector.html#constBegin +"TQValueVector::constEnd" tqvaluevector.html#constEnd +"TQValueVector::const_iterator" tqvaluevector.html#const_iterator +"TQValueVector::const_pointer" tqvaluevector.html#const_pointer +"TQValueVector::const_reference" tqvaluevector.html#const_reference +"TQValueVector::count" tqvaluevector.html#count +"TQValueVector::difference_type" tqvaluevector.html#difference_type +"TQValueVector::empty" tqvaluevector.html#empty +"TQValueVector::end" tqvaluevector.html#end +"TQValueVector::erase" tqvaluevector.html#erase +"TQValueVector::first" tqvaluevector.html#first +"TQValueVector::front" tqvaluevector.html#front +"TQValueVector::insert" tqvaluevector.html#insert +"TQValueVector::isEmpty" tqvaluevector.html#isEmpty +"TQValueVector::iterator" tqvaluevector.html#iterator +"TQValueVector::last" tqvaluevector.html#last +"TQValueVector::operator=" tqvaluevector.html#operator-eq +"TQValueVector::operator==" tqvaluevector.html#operator-eq-eq +"TQValueVector::operator[]" tqvaluevector.html#operator[] +"TQValueVector::pointer" tqvaluevector.html#pointer +"TQValueVector::pop_back" tqvaluevector.html#pop_back +"TQValueVector::push_back" tqvaluevector.html#push_back +"TQValueVector::reference" tqvaluevector.html#reference +"TQValueVector::reserve" tqvaluevector.html#reserve +"TQValueVector::resize" tqvaluevector.html#resize +"TQValueVector::size" tqvaluevector.html#size +"TQValueVector::size_type" tqvaluevector.html#size_type +"TQValueVector::value_type" tqvaluevector.html#value_type +"TQValueVector::~TQValueVector" tqvaluevector.html#~TQValueVector "QVariant" ntqvariant.html "QVariant::Type" ntqvariant.html#Type "QVariant::asBitArray" ntqvariant.html#asBitArray @@ -8314,7 +8314,7 @@ "operator<<" ntqimage.html#operator-lt-lt "operator<<" ntqkeysequence.html#operator-lt-lt "operator<<" ntqmainwindow.html#operator-lt-lt -"operator<<" ntqmap.html#operator-lt-lt +"operator<<" tqmap.html#operator-lt-lt "operator<<" ntqmemarray.html#operator-lt-lt "operator<<" ntqpalette.html#operator-lt-lt "operator<<" ntqpen.html#operator-lt-lt @@ -8329,7 +8329,7 @@ "operator<<" ntqstring.html#operator-lt-lt "operator<<" qtime.html#operator-lt-lt "operator<<" ntquuid.html#operator-lt-lt -"operator<<" ntqvaluelist.html#operator-lt-lt +"operator<<" tqvaluelist.html#operator-lt-lt "operator<<" ntqwmatrix.html#operator-lt-lt "operator<=" qchar.html#operator-lt-eq "operator<=" ntqcstring.html#operator-lt-eq @@ -8358,7 +8358,7 @@ "operator>>" ntqimage.html#operator-gt-gt "operator>>" ntqkeysequence.html#operator-gt-gt "operator>>" ntqmainwindow.html#operator-gt-gt -"operator>>" ntqmap.html#operator-gt-gt +"operator>>" tqmap.html#operator-gt-gt "operator>>" ntqmemarray.html#operator-gt-gt "operator>>" ntqpalette.html#operator-gt-gt "operator>>" ntqpen.html#operator-gt-gt @@ -8373,7 +8373,7 @@ "operator>>" ntqstring.html#operator-gt-gt "operator>>" qtime.html#operator-gt-gt "operator>>" ntquuid.html#operator-gt-gt -"operator>>" ntqvaluelist.html#operator-gt-gt +"operator>>" tqvaluelist.html#operator-gt-gt "operator>>" ntqwmatrix.html#operator-gt-gt "operator^" ntqbitarray.html#operator^ "operator|" ntqbitarray.html#operator| @@ -8396,7 +8396,7 @@ "qGreen" ntqcolor.html#qGreen "qInitNetworkProtocols" ntqurloperator.html#qInitNetworkProtocols "qInstallMsgHandler" ntqapplication.html#qInstallMsgHandler -"qMakePair" ntqpair.html#qMakePair +"qMakePair" tqpair.html#qMakePair "qRed" ntqcolor.html#qRed "qRgb" ntqcolor.html#qRgb "qRgba" ntqcolor.html#qRgba diff --git a/doc/html/listviews-example.html b/doc/html/listviews-example.html index 8e4d19c64..90f5c7037 100644 --- a/doc/html/listviews-example.html +++ b/doc/html/listviews-example.html @@ -365,7 +365,7 @@ void FolderListItem::insertSubFolders( const setCurrentItem( messages->firstChild() ); message->setMargin( 5 ); - TQValueList<int> lst; + TQValueList<int> lst; lst.append( 170 ); setSizes( lst ); } diff --git a/doc/html/mail-example.html b/doc/html/mail-example.html index 312d72e34..58677ff19 100644 --- a/doc/html/mail-example.html +++ b/doc/html/mail-example.html @@ -161,16 +161,16 @@ Smtp::~Smtp() void Smtp::dnsLookupHelper() { - TQValueList<TQDns::MailServer> s = mxLookup->mailServers(); - if ( s.isEmpty() ) { + TQValueList<TQDns::MailServer> s = mxLookup->mailServers(); + if ( s.isEmpty() ) { if ( !mxLookup->isWorking() ) emit status( tr( "Error in MX record lookup" ) ); return; } - emit status( tr( "Connecting to %1" ).arg( s.first().name ) ); + emit status( tr( "Connecting to %1" ).arg( s.first().name ) ); - socket->connectToHost( s.first().name, 25 ); + socket->connectToHost( s.first().name, 25 ); t = new TQTextStream( socket ); } diff --git a/doc/html/mainclasses.html b/doc/html/mainclasses.html index 907dd7ee3..7cc02d0de 100644 --- a/doc/html/mainclasses.html +++ b/doc/html/mainclasses.html @@ -146,7 +146,7 @@ classes), see TQt's Classes. TQSqlQuery -TQValueList +TQValueList TQDataView @@ -157,7 +157,7 @@ classes), see TQt's Classes. TQStatusBar -TQValueStack +TQValueStack TQDate @@ -168,7 +168,7 @@ classes), see TQt's Classes. TQString -TQValueVector +TQValueVector TQDateEdit @@ -250,7 +250,7 @@ classes), see TQt's Classes. TQDockWindow -TQMap +TQMap TQSettings diff --git a/doc/html/network.html b/doc/html/network.html index ce58eb245..72e300f08 100644 --- a/doc/html/network.html +++ b/doc/html/network.html @@ -146,18 +146,18 @@ TQUrlOperator op; MyClass::MyClass() : TQObject(), op( "ftp://ftp.trolltech.com" ) { - connect( &op, TQ_SIGNAL( newChildren( const TQValueList<TQUrlInfo> &, TQNetworkOperation * ) ), - this, TQ_SLOT( slotInsertEntries( const TQValueList<TQUrlInfo> &, TQNetworkOperation * ) ) ); + connect( &op, TQ_SIGNAL( newChildren( const TQValueList<TQUrlInfo> &, TQNetworkOperation * ) ), + this, TQ_SLOT( slotInsertEntries( const TQValueList<TQUrlInfo> &, TQNetworkOperation * ) ) ); connect( &op, TQ_SIGNAL( start( TQNetworkOperation * ) ), this, TQ_SLOT( slotStart( TQNetworkOperation *) ) ); connect( &op, TQ_SIGNAL( finished( TQNetworkOperation * ) ), this, TQ_SLOT( slotFinished( TQNetworkOperation *) ) ); } -void MyClass::slotInsertEntries( const TQValueList<TQUrlInfo> &info, TQNetworkOperation * ) +void MyClass::slotInsertEntries( const TQValueList<TQUrlInfo> &info, TQNetworkOperation * ) { - TQValueList<TQUrlInfo>::ConstIterator it = info.begin(); - for ( ; it != info.end(); ++it ) { + TQValueList<TQUrlInfo>::ConstIterator it = info.begin(); + for ( ; it != info.end(); ++it ) { const TQUrlInfo &inf = *it; tqDebug( "Name: %s, Size: %d, Last Modified: %s", inf.name().latin1(), inf.size(), inf.lastModified().toString().latin1() ); diff --git a/doc/html/ntqapplication.html b/doc/html/ntqapplication.html index 8fc277163..22ce1183a 100644 --- a/doc/html/ntqapplication.html +++ b/doc/html/ntqapplication.html @@ -965,8 +965,8 @@ working directory) is also added to the plugin paths. copy, e.g.
           TQStringList list = app.libraryPaths();
      -    TQStringList::Iterator it = list.begin();
      -    while( it != list.end() ) {
      +    TQStringList::Iterator it = list.begin();
      +    while( it != list.end() ) {
               myProcessing( *it );
               ++it;
           }
      diff --git a/doc/html/ntqdeepcopy.html b/doc/html/ntqdeepcopy.html
      index 3df2ba2e2..ac516d089 100644
      --- a/doc/html/ntqdeepcopy.html
      +++ b/doc/html/ntqdeepcopy.html
      @@ -127,10 +127,10 @@ shared classes like TQByteArray.
       

      Currently, TQDeepCopy works with the following classes:

      See also Thread Support in TQt, Implicitly and Explicitly Shared Classes, and Non-GUI Classes. diff --git a/doc/html/ntqdict.html b/doc/html/ntqdict.html index f430efaa2..cfca2729d 100644 --- a/doc/html/ntqdict.html +++ b/doc/html/ntqdict.html @@ -75,7 +75,7 @@ dictionary based on TQString keys.

      -

      TQMap is an STL-compatible alternative to this class. +

      TQMap is an STL-compatible alternative to this class.

      TQDict is implemented as a template class. Define a template instance TQDict<X> to create a dictionary that operates on pointers to X (X *). @@ -153,7 +153,7 @@ dictionary. TQStringList styleList = TQStyleFactory::styles(); styleList.sort(); TQDict<int> letterDict( 17, FALSE ); - for ( TQStringList::Iterator it = styleList.begin(); it != styleList.end(); ++it ) { + for ( TQStringList::Iterator it = styleList.begin(); it != styleList.end(); ++it ) { TQString styleName = *it; TQString styleAccel = styleName; if ( letterDict[styleAccel.left(1)] ) { diff --git a/doc/html/ntqdns.html b/doc/html/ntqdns.html index ab4e6d974..d1df6eb48 100644 --- a/doc/html/ntqdns.html +++ b/doc/html/ntqdns.html @@ -148,7 +148,7 @@ emitted. Destroys the DNS query object and frees its allocated resources. -

      TQValueList<TQHostAddress> TQDns::addresses () const +

      TQValueList<TQHostAddress> TQDns::addresses () const

      Returns a list of the addresses for this name if this TQDns object has a recordType() of TQDns::A or TQDns::Aaaa and the answer @@ -158,9 +158,9 @@ function returns that address.

      Note that if you want to iterate over the list, you should iterate over a copy, e.g.

      -    TQValueList<TQHostAddress> list = myDns.addresses();
      -    TQValueList<TQHostAddress>::Iterator it = list.begin();
      -    while( it != list.end() ) {
      +    TQValueList<TQHostAddress> list = myDns.addresses();
      +    TQValueList<TQHostAddress>::Iterator it = list.begin();
      +    while( it != list.end() ) {
               myProcessing( *it );
               ++it;
           }
      @@ -187,8 +187,8 @@ Returns a list of host names if the record type is Pt
       over a copy, e.g.
       
           TQStringList list = myDns.hostNames();
      -    TQStringList::Iterator it = list.begin();
      -    while( it != list.end() ) {
      +    TQStringList::Iterator it = list.begin();
      +    while( it != list.end() ) {
               myProcessing( *it );
               ++it;
           }
      @@ -209,7 +209,7 @@ returns FALSE.
       

      Returns the domain name for which this object returns information.

      See also setLabel(). -

      TQValueList<MailServer> TQDns::mailServers () const +

      TQValueList<MailServer> TQDns::mailServers () const

      Returns a list of mail servers if the record type is Mx. The class TQDns::MailServer contains the following public variables: @@ -220,9 +220,9 @@ class TQDns::MailServer contains the following public variables:

      Note that if you want to iterate over the list, you should iterate over a copy, e.g.

      -    TQValueList<TQDns::MailServer> list = myDns.mailServers();
      -    TQValueList<TQDns::MailServer>::Iterator it = list.begin();
      -    while( it != list.end() ) {
      +    TQValueList<TQDns::MailServer> list = myDns.mailServers();
      +    TQValueList<TQDns::MailServer>::Iterator it = list.begin();
      +    while( it != list.end() ) {
               myProcessing( *it );
               ++it;
           }
      @@ -238,8 +238,8 @@ over a copy, e.g.
       over a copy, e.g.
       
           TQStringList list = myDns.qualifiedNames();
      -    TQStringList::Iterator it = list.begin();
      -    while( it != list.end() ) {
      +    TQStringList::Iterator it = list.begin();
      +    while( it != list.end() ) {
               myProcessing( *it );
               ++it;
           }
      @@ -259,7 +259,7 @@ over a copy, e.g.
       qualifiedNames().
       
       

      Example: network/mail/smtp.cpp. -

      TQValueList<Server> TQDns::servers () const +

      TQValueList<Server> TQDns::servers () const

      Returns a list of servers if the record type is Srv. The class TQDns::Server contains the following public variables: @@ -272,9 +272,9 @@ Returns a list of servers if the record type is Srv Note that if you want to iterate over the list, you should iterate over a copy, e.g.
      -    TQValueList<TQDns::Server> list = myDns.servers();
      -    TQValueList<TQDns::Server>::Iterator it = list.begin();
      -    while( it != list.end() ) {
      +    TQValueList<TQDns::Server> list = myDns.servers();
      +    TQValueList<TQDns::Server>::Iterator it = list.begin();
      +    while( it != list.end() ) {
               myProcessing( *it );
               ++it;
           }
      @@ -313,8 +313,8 @@ Returns a list of texts if the record type is Txt
       over a copy, e.g.
       
           TQStringList list = myDns.texts();
      -    TQStringList::Iterator it = list.begin();
      -    while( it != list.end() ) {
      +    TQStringList::Iterator it = list.begin();
      +    while( it != list.end() ) {
               myProcessing( *it );
               ++it;
           }
      diff --git a/doc/html/ntqfiledialog.html b/doc/html/ntqfiledialog.html
      index 20de1d9a6..d1ec3946f 100644
      --- a/doc/html/ntqfiledialog.html
      +++ b/doc/html/ntqfiledialog.html
      @@ -526,8 +526,8 @@ symlinks as regular directories.
       iterate over a copy, e.g.
       
           TQStringList list = files;
      -    TQStringList::Iterator it = list.begin();
      -    while( it != list.end() ) {
      +    TQStringList::Iterator it = list.begin();
      +    while( it != list.end() ) {
               myProcessing( *it );
               ++it;
           }
      @@ -864,14 +864,14 @@ the mode isn't ExistingFiles selectedFiles is an empty list.
       iterate over a copy, e.g.
       
           TQStringList list = myFileDialog.selectedFiles();
      -    TQStringList::Iterator it = list.begin();
      -    while( it != list.end() ) {
      +    TQStringList::Iterator it = list.begin();
      +    while( it != list.end() ) {
               myProcessing( *it );
               ++it;
           }
           
      -

      See also selectedFile, selectedFilter, and TQValueList::empty(). +

      See also selectedFile, selectedFilter, and TQValueList::empty().

      Get this property's value with selectedFiles().

      TQString selectedFilter

      diff --git a/doc/html/ntqfont.html b/doc/html/ntqfont.html index a9ba3a624..eb9da5779 100644 --- a/doc/html/ntqfont.html +++ b/doc/html/ntqfont.html @@ -562,7 +562,7 @@ Returns TRUE if italic has been set; otherwise returns FALSE. Returns the font's key, a textual representation of a font. It is typically used as the key for a cache or dictionary of fonts. -

      See also TQMap. +

      See also TQMap.

      TQString TQFont::lastResortFamily () const

      diff --git a/doc/html/ntqfontdatabase.html b/doc/html/ntqfontdatabase.html index 66cf97c71..5b7115cb8 100644 --- a/doc/html/ntqfontdatabase.html +++ b/doc/html/ntqfontdatabase.html @@ -113,16 +113,16 @@ int main( int argc, char **argv ) TQApplication app( argc, argv ); TQFontDatabase fdb; TQStringList families = fdb.families(); - for ( TQStringList::Iterator f = families.begin(); f != families.end(); ++f ) { + for ( TQStringList::Iterator f = families.begin(); f != families.end(); ++f ) { TQString family = *f; tqDebug( family ); TQStringList styles = fdb.styles( family ); - for ( TQStringList::Iterator s = styles.begin(); s != styles.end(); ++s ) { + for ( TQStringList::Iterator s = styles.begin(); s != styles.end(); ++s ) { TQString style = *s; TQString dstyle = "\t" + style + " ("; - TQValueList<int> smoothies = fdb.smoothSizes( family, style ); - for ( TQValueList<int>::Iterator points = smoothies.begin(); - points != smoothies.end(); ++points ) { + TQValueList<int> smoothies = fdb.smoothSizes( family, style ); + for ( TQValueList<int>::Iterator points = smoothies.begin(); + points != smoothies.end(); ++points ) { dstyle += TQString::number( *points ) + " "; } dstyle = dstyle.left( dstyle.length() - 1 ) + ")"; @@ -240,13 +240,13 @@ Returns TRUE if the font that has family family and style styleThis function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code.

      -

      TQValueList<int> TQFontDatabase::pointSizes ( const TQString & family, const TQString & style = TQString::null ) +

      TQValueList<int> TQFontDatabase::pointSizes ( const TQString & family, const TQString & style = TQString::null )

      Returns a list of the point sizes available for the font that has family family and style style. The list may be empty.

      See also smoothSizes() and standardSizes(). -

      TQValueList<int> TQFontDatabase::pointSizes ( const TQString & family, const TQString & style, const TQString & ) +

      TQValueList<int> TQFontDatabase::pointSizes ( const TQString & family, const TQString & style, const TQString & )

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

      @@ -263,7 +263,7 @@ the name of the script as defined by the Unicode 3.0 standard. Returns a string with sample characters from script.

      See also TQFont::Script. -

      TQValueList<int> TQFontDatabase::smoothSizes ( const TQString & family, const TQString & style ) +

      TQValueList<int> TQFontDatabase::smoothSizes ( const TQString & family, const TQString & style )

      Returns the point sizes of a font that has family family and style style that will look attractive. The list may be empty. @@ -271,12 +271,12 @@ For non-scalable fonts and bitmap scalable fonts, this function is equivalent to pointSizes().

      See also pointSizes() and standardSizes(). -

      TQValueList<int> TQFontDatabase::smoothSizes ( const TQString & family, const TQString & style, const TQString & ) +

      TQValueList<int> TQFontDatabase::smoothSizes ( const TQString & family, const TQString & style, const TQString & )

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

      -

      TQValueList<int> TQFontDatabase::standardSizes () [static] +

      TQValueList<int> TQFontDatabase::standardSizes () [static]

      Returns a list of standard font sizes.

      See also smoothSizes() and pointSizes(). diff --git a/doc/html/ntqiconview.html b/doc/html/ntqiconview.html index 937ed06a3..b1d6f5b48 100644 --- a/doc/html/ntqiconview.html +++ b/doc/html/ntqiconview.html @@ -279,7 +279,7 @@ item's pixmap and returned that instead.

      TQIconViews and their TQIconViewItems can also be the targets of drag and drops. To make the TQIconView itself able to accept drops connect to the dropped() signal. When a drop occurs this signal will be -emitted with a TQDragEvent and a TQValueList of TQIconDragItems. To +emitted with a TQDragEvent and a TQValueList of TQIconDragItems. To make a TQIconViewItem into a drop target subclass TQIconViewItem and reimplement TQIconViewItem::acceptDrop() and TQIconViewItem::dropped(). @@ -291,7 +291,7 @@ reimplement TQIconViewItem::acceptDropTQDropEvent *evt, const TQValueList<TQIconDragItem>& ) + void MyIconViewItem::dropped( TQDropEvent *evt, const TQValueList<TQIconDragItem>& ) { TQString label; if ( TQTextDrag::decode( evt, label ) ) @@ -319,7 +319,7 @@ functions. connect to the dropped() signal and reimplement TQIconViewItem::acceptDrop() and TQIconViewItem::dropped(). If you've used a TQIconDrag (or a subclass of it) the second argument to the -dropped signal contains a TQValueList of TQIconDragItems -- you can +dropped signal contains a TQValueList of TQIconDragItems -- you can access their data by calling TQIconDragItem::data() on each one.

      For an example implementation of complex drag-and-drop look at the fileiconview example (qt/examples/fileiconview). @@ -506,7 +506,7 @@ backgrounds. Draws the rubber band using the painter p. -

      void TQIconView::dropped ( TQDropEvent * e, const TQValueList<TQIconDragItem> & lst ) [signal] +

      void TQIconView::dropped ( TQDropEvent * e, const TQValueList<TQIconDragItem> & lst ) [signal]

      This signal is emitted when a drop event occurs in the viewport diff --git a/doc/html/ntqimage.html b/doc/html/ntqimage.html index b5b1edfd7..da2d76a9a 100644 --- a/doc/html/ntqimage.html +++ b/doc/html/ntqimage.html @@ -594,8 +594,8 @@ input. over a copy, e.g.

           TQStringList list = myImage.inputFormatList();
      -    TQStringList::Iterator it = list.begin();
      -    while( it != list.end() ) {
      +    TQStringList::Iterator it = list.begin();
      +    while( it != list.end() ) {
               myProcessing( *it );
               ++it;
           }
      @@ -747,8 +747,8 @@ output.
       over a copy, e.g.
       
           TQStringList list = myImage.outputFormatList();
      -    TQStringList::Iterator it = list.begin();
      -    while( it != list.end() ) {
      +    TQStringList::Iterator it = list.begin();
      +    while( it != list.end() ) {
               myProcessing( *it );
               ++it;
           }
      @@ -1009,8 +1009,8 @@ Returns the keywords for which some texts are recorded.
       over a copy, e.g.
       
           TQStringList list = myImage.textKeys();
      -    TQStringList::Iterator it = list.begin();
      -    while( it != list.end() ) {
      +    TQStringList::Iterator it = list.begin();
      +    while( it != list.end() ) {
               myProcessing( *it );
               ++it;
           }
      @@ -1026,8 +1026,8 @@ recorded.
       over a copy, e.g.
       
           TQStringList list = myImage.textLanguages();
      -    TQStringList::Iterator it = list.begin();
      -    while( it != list.end() ) {
      +    TQStringList::Iterator it = list.begin();
      +    while( it != list.end() ) {
               myProcessing( *it );
               ++it;
           }
      @@ -1035,16 +1035,16 @@ over a copy, e.g.
        
       

      See also textList(), text(), setText(), and textKeys(). -

      TQValueList<TQImageTextKeyLang> TQImage::textList () const +

      TQValueList<TQImageTextKeyLang> TQImage::textList () const

      Returns a list of TQImageTextKeyLang objects that enumerate all the texts key/language pairs set by setText() for this image.

      Note that if you want to iterate over the list, you should iterate over a copy, e.g.

      -    TQValueList<TQImageTextKeyLang> list = myImage.textList();
      -    TQValueList<TQImageTextKeyLang>::Iterator it = list.begin();
      -    while( it != list.end() ) {
      +    TQValueList<TQImageTextKeyLang> list = myImage.textList();
      +    TQValueList<TQImageTextKeyLang>::Iterator it = list.begin();
      +    while( it != list.end() ) {
               myProcessing( *it );
               ++it;
           }
      diff --git a/doc/html/ntqintdict.html b/doc/html/ntqintdict.html
      index ea0d4d463..9b13c49e3 100644
      --- a/doc/html/ntqintdict.html
      +++ b/doc/html/ntqintdict.html
      @@ -72,7 +72,7 @@ The TQIntDict class is a template class that provides a dictionary based on long
       

      -

      TQMap is an STL-compatible alternative to this class. +

      TQMap is an STL-compatible alternative to this class.

      TQIntDict is implemented as a template class. Define a template instance TQIntDict<X> to create a dictionary that operates on pointers to X (X*). diff --git a/doc/html/ntqmap.html b/doc/html/ntqmap.html deleted file mode 100644 index 013cb8372..000000000 --- a/doc/html/ntqmap.html +++ /dev/null @@ -1,574 +0,0 @@ - - - - - -TQMap Class - - - - - - - -
      - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

      TQMap Class Reference

      - -

      The TQMap class is a value-based template class that -provides a dictionary. -More... -

      #include <ntqmap.h> -

      List of all member functions. -

      Public Members

      -
        -
      • typedef Key key_type
      • -
      • typedef T mapped_type
      • -
      • typedef TQPair<const key_type, mapped_type> value_type
      • -
      • typedef value_type * pointer
      • -
      • typedef const value_type * const_pointer
      • -
      • typedef value_type & reference
      • -
      • typedef const value_type & const_reference
      • -
      • typedef size_t size_type
      • -
      • typedef TQMapIterator<Key, T> iterator
      • -
      • typedef TQMapConstIterator<Key, T> const_iterator
      • -
      • typedef TQPair<iterator, bool> insert_pair
      • -
      • typedef TQMapIterator<Key, T> Iterator
      • -
      • typedef TQMapConstIterator<Key, T> ConstIterator
      • -
      • typedef T ValueType
      • -
      • TQMap ()
      • -
      • TQMap ( const TQMap<Key, T> & m )
      • -
      • TQMap ( const std::map<Key, T> & m )
      • -
      • ~TQMap ()
      • -
      • TQMap<Key, T> & operator= ( const TQMap<Key, T> & m )
      • -
      • TQMap<Key, T> & operator= ( const std::map<Key, T> & m )
      • -
      • iterator begin ()
      • -
      • iterator end ()
      • -
      • const_iterator begin () const
      • -
      • const_iterator end () const
      • -
      • const_iterator constBegin () const
      • -
      • const_iterator constEnd () const
      • -
      • iterator replace ( const Key & k, const T & v )
      • -
      • size_type size () const
      • -
      • bool empty () const
      • -
      • TQPair<iterator, bool> insert ( const value_type & x )
      • -
      • void erase ( iterator it )
      • -
      • void erase ( const key_type & k )
      • -
      • size_type count ( const key_type & k ) const
      • -
      • T & operator[] ( const Key & k )
      • -
      • void clear ()
      • -
      • iterator find ( const Key & k )
      • -
      • const_iterator find ( const Key & k ) const
      • -
      • const T & operator[] ( const Key & k ) const
      • -
      • bool contains ( const Key & k ) const
      • -
      • size_type count () const
      • -
      • TQValueList<Key> keys () const
      • -
      • TQValueList<T> values () const
      • -
      • bool isEmpty () const
      • -
      • iterator insert ( const Key & key, const T & value, bool overwrite = TRUE )
      • -
      • void remove ( iterator it )
      • -
      • void remove ( const Key & k )
      • -
      -

      Protected Members

      - -

      Related Functions

      -
        -
      • TQDataStream & operator>> ( TQDataStream & s, TQMap<Key, T> & m )
      • -
      • TQDataStream & operator<< ( TQDataStream & s, const TQMap<Key, T> & m )
      • -
      -

      Detailed Description

      - - -The TQMap class is a value-based template class that -provides a dictionary. -

      - - - -

      TQMap is a TQt implementation of an STL-like map container. It can -be used in your application if the standard map is not -available on all your target platforms. TQMap is part of the TQt Template Library. -

      TQMap<Key, Data> defines a template instance to create a -dictionary with keys of type Key and values of type Data. TQMap -does not store pointers to the members of the map; instead, it -holds a copy of every member. For this reason, TQMap is -value-based, whereas TQPtrList and TQDict are pointer-based. -

      TQMap contains and manages a collection of objects of type Data -with associated key values of type Key and provides iterators that -allow the contained objects to be addressed. TQMap owns the -contained items. -

      Some classes cannot be used within a TQMap. For example everything -derived from TQObject and thus all classes that implement widgets. -Only values can be used in a TQMap. To qualify as a value, the -class must provide -

        -
      • A copy constructor -
      • An assignment operator -
      • A default constructor, i.e. a constructor that does not take -any arguments. -
      -

      Note that C++ defaults to field-by-field assignment operators and -copy constructors if no explicit version is supplied. In many -cases, this is sufficient. -

      The class used for the key requires that the operator< is -implemented to define ordering of the keys. -

      TQMap's function naming is consistent with the other TQt classes -(e.g., count(), isEmpty()). TQMap also provides extra functions for -compatibility with STL algorithms, such as size() and empty(). -Programmers already familiar with the STL map can use these -the STL-like functions if preferred. -

      Example: - -

      -    #include <ntqstring.h>
      -    #include <ntqmap.h>
      -    #include <ntqstring.h>
      -
      -    class Employee
      -    {
      -    public:
      -        Employee(): sn(0) {}
      -        Employee( const TQString& forename, const TQString& surname, int salary )
      -            : fn(forename), sn(surname), sal(salary)
      -        { }
      -
      -        TQString forename() const { return fn; }
      -        TQString surname() const { return sn; }
      -        int salary() const { return sal; }
      -        void setSalary( int salary ) { sal = salary; }
      -
      -    private:
      -        TQString fn;
      -        TQString sn;
      -        int sal;
      -    };
      -
      -    int main(int argc, char **argv)
      -    {
      -        TQApplication app( argc, argv );
      -
      -        typedef TQMap<TQString, Employee> EmployeeMap;
      -        EmployeeMap map;
      -
      -        map["JD001"] = Employee("John", "Doe", 50000);
      -        map["JW002"] = Employee("Jane", "Williams", 80000);
      -        map["TJ001"] = Employee("Tom", "Jones", 60000);
      -
      -        Employee sasha( "Sasha", "Hind", 50000 );
      -        map["SH001"] = sasha;
      -        sasha.setSalary( 40000 );
      -
      -        EmployeeMap::Iterator it;
      -        for ( it = map.begin(); it != map.end(); ++it ) {
      -            printf( "%s: %s, %s earns %d\n",
      -                    it.key().latin1(),
      -                    it.data().surname().latin1(),
      -                    it.data().forename().latin1(),
      -                    it.data().salary() );
      -        }
      -        return 0;
      -    }
      -    
      - -

      Program output: -

      -    JD001: Doe, John earns 50000
      -    JW002: Williams, Jane earns 80000
      -    SH001: Hind, Sasha earns 50000
      -    TJ001: Jones, Tom earns 60000
      -    
      - -

      The latest changes to Sasha's salary did not affect the value in -the list because the map created a copy of Sasha's entry. In -addition, notice that the items are sorted alphabetically (by key) -when iterating over the map. -

      There are several ways to find items in a map. The begin() and -end() functions return iterators to the beginning and end of the -map. The advantage of using an iterator is that you can move -forward or backward by incrementing/decrementing the iterator. -The iterator returned by end() points to the element which is one -past the last element in the container. The past-the-end iterator -is still associated with the map it belongs to, however it is not dereferenceable; operator*() will not return a well-defined -value. If the map is empty, the iterator returned by begin() will -equal the iterator returned by end(). -

      Another way to find an element in the map is by using the find() -function. This returns an iterator pointing to the desired item or -to the end() iterator if no such element exists. -

      Another approach uses the operator[]. But be warned: if the map -does not contain an entry for the element you are looking for, -operator[] inserts a default value. If you do not know that the -element you are searching for is really in the list, you should -not use operator[]. The following example illustrates this: -

      -        TQMap<TQString,TQString> map;
      -        map["Clinton"] = "Bill";
      -        str << map["Clinton"] << map["Bush"] << endl;
      -    
      - -

      The code fragment will print out "Clinton", "". Since the value -associated with the "Bush" key did not exist, the map inserted a -default value (in this case, an empty string). If you are not -sure whether a certain element is in the map, you should use -find() and iterators instead. -

      If you just want to know whether a certain key is contained in the -map, use the contains() function. In addition, count() tells you -how many keys are in the map. -

      It is safe to have multiple iterators at the same time. If some -member of the map is removed, only iterators pointing to the -removed member become invalid; inserting in the map does not -invalidate any iterators. -

      Since TQMap is value-based, there is no need to be concerned about -deleting items in the map. The map holds its own copies and will -free them if the corresponding member or the map itself is -deleted. -

      TQMap is implicitly shared. This means you can just make copies of -the map in time O(1). If multiple TQMap instances share the same -data and one is modifying the map's data, this modifying instance -makes a copy and modifies its private copy: so it does not affect -other instances. If a TQMap is being used in a multi-threaded -program, you must protect all access to the map. See TQMutex. -

      There are a couple of ways of inserting new items into the map. -One uses the insert() method; the other uses operator[]: -

      -    TQMap<TQString, TQString> map;
      -    map["Clinton"] = "Bill";
      -    map.insert( "Bush", "George" );
      -    
      - -

      Items can also be removed from the map in several ways. One way is -to pass an iterator to remove(). Another way is to pass a key -value to remove(), which will delete the entry with the requested -key. In addition you can clear the entire map using the clear() -method. -

      See also TQMapIterator, TQt Template Library Classes, Implicitly and Explicitly Shared Classes, and Non-GUI Classes. - -


      Member Type Documentation

      -

      TQMap::ConstIterator

      -The map's const iterator type, TQt style. -

      TQMap::Iterator

      -The map's iterator type, TQt style. -

      TQMap::ValueType

      -Corresponds to TQPair<key_type, mapped_type>, TQt style. -

      TQMap::const_iterator

      -The map's const iterator type. -

      TQMap::const_pointer

      -Const pointer to value_type. -

      TQMap::const_reference

      -Const reference to value_type. -

      TQMap::iterator

      -The map's iterator type. -

      TQMap::key_type

      -The map's key type. -

      TQMap::mapped_type

      -The map's data type. -

      TQMap::pointer

      -Pointer to value_type. -

      TQMap::reference

      -Reference to value_type. -

      TQMap::size_type

      -An unsigned integral type, used to represent various sizes. -

      TQMap::value_type

      -Corresponds to TQPair<key_type, mapped_type>. -

      Member Function Documentation

      -

      TQMap::TQMap () -

      - -

      Constructs an empty map. - -

      TQMap::TQMap ( const TQMap<Key, T> & m ) -

      - -

      Constructs a copy of m. -

      This operation costs O(1) time because TQMap is implicitly shared. -This makes returning a TQMap from a function very fast. If a shared -instance is modified, it will be copied (copy-on-write), and this -takes O(n) time. - -

      TQMap::TQMap ( const std::map<Key, T> & m ) -

      - -

      Constructs a copy of m. - -

      TQMap::~TQMap () -

      - -

      Destroys the map. References to the values in the map and all -iterators of this map become invalidated. Since TQMap is highly -tuned for performance you won't see warnings if you use invalid -iterators, because it is not possible for an iterator to check -whether it is valid or not. - -

      iterator TQMap::begin () -

      - -

      Returns an iterator pointing to the first element in the map. This -iterator equals end() if the map is empty. -

      The items in the map are traversed in the order defined by -operator<(Key, Key). -

      See also end() and TQMapIterator. - -

      const_iterator TQMap::begin () const -

      - -

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

      See also end() and TQMapConstIterator. - -

      void TQMap::clear () -

      - -

      Removes all items from the map. -

      See also remove(). - -

      const_iterator TQMap::constBegin () const -

      - -

      Returns an iterator pointing to the first element in the map. This -iterator equals end() if the map is empty. -

      The items in the map are traversed in the order defined by -operator<(Key, Key). -

      See also constEnd() and TQMapConstIterator. - -

      const_iterator TQMap::constEnd () const -

      - -

      The iterator returned by end() points to the element which is one -past the last element in the container. The past-the-end iterator -is still associated with the map it belongs to, but it is not -dereferenceable; operator*() will not return a well-defined value. -

      This iterator equals constBegin() if the map is empty. -

      See also constBegin() and TQMapConstIterator. - -

      bool TQMap::contains ( const Key & k ) const -

      - -

      Returns TRUE if the map contains an item with key k; otherwise -returns FALSE. - -

      size_type TQMap::count ( const key_type & k ) const -

      - -

      Returns the number of items whose key is k. Since TQMap does not -allow duplicate keys, the return value is always 0 or 1. -

      This function is provided for STL compatibility. - -

      size_type TQMap::count () const -

      - -

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

      Returns the number of items in the map. -

      See also isEmpty(). - -

      void TQMap::detach () [protected] -

      - -

      If the map does not share its data with another TQMap instance, -nothing happens; otherwise the function creates a new copy of this -map and detaches from the shared one. This function is called -whenever the map is modified. The implicit sharing mechanism is -implemented this way. - -

      bool TQMap::empty () const -

      - -

      Returns TRUE if the map contains no items; otherwise returns -FALSE. -

      This function is provided for STL compatibility. It is equivalent -to isEmpty(). -

      See also size(). - -

      iterator TQMap::end () -

      - -

      The iterator returned by end() points to the element which is one -past the last element in the container. The past-the-end iterator -is still associated with the map it belongs to, but it is not -dereferenceable; operator*() will not return a well-defined value. -

      This iterator equals begin() if the map is empty. -

      See also begin() and TQMapIterator. - -

      const_iterator TQMap::end () const -

      - -

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

      -

      void TQMap::erase ( iterator it ) -

      - -

      Removes the item associated with the iterator it from the map. -

      This function is provided for STL compatibility. It is equivalent -to remove(). -

      See also clear(). - -

      void TQMap::erase ( const key_type & k ) -

      - -

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

      Removes the item with the key k from the map. - -

      iterator TQMap::find ( const Key & k ) -

      - -

      Returns an iterator pointing to the element with key k in the -map. -

      Returns end() if no key matched. -

      See also TQMapIterator. - -

      const_iterator TQMap::find ( const Key & k ) const -

      - -

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

      Returns an iterator pointing to the element with key k in the -map. -

      Returns end() if no key matched. -

      See also TQMapConstIterator. - -

      iterator TQMap::insert ( const Key & key, const T & value, bool overwrite = TRUE ) -

      - -

      Inserts a new item with the key, key, and a value of value. -If there is already an item whose key is key, that item's value -is replaced with value, unless overwrite is FALSE (it is -TRUE by default). In this case an iterator to this item is -returned, else an iterator to the new item is returned. -

      -

      TQPair<iterator, bool> TQMap::insert ( const value_type & x ) -

      - -

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

      Inserts the (key, value) pair x into the map. x is a TQPair -whose first element is a key to be inserted and whose second -element is the associated value to be inserted. Returns a pair -whose first element is an iterator pointing to the inserted -item and whose second element is a bool indicating TRUE if x -was inserted and FALSE if it was not inserted, e.g. because it was -already present. -

      See also replace(). - -

      bool TQMap::isEmpty () const -

      - -

      Returns TRUE if the map contains no items; otherwise returns -FALSE. -

      See also count(). - -

      TQValueList<Key> TQMap::keys () const -

      - -

      Returns a list of all the keys in the map, in order. - -

      TQMap<Key, T> & TQMap::operator= ( const TQMap<Key, T> & m ) -

      - -

      Assigns m to this map and returns a reference to this map. -

      All iterators of the current map become invalidated by this -operation. The cost of such an assignment is O(1), because TQMap is -implicitly shared. - -

      TQMap<Key, T> & TQMap::operator= ( const std::map<Key, T> & m ) -

      - -

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

      Assigns m to this map and returns a reference to this map. -

      All iterators of the current map become invalidated by this -operation. - -

      T & TQMap::operator[] ( const Key & k ) -

      - -

      Returns the value associated with the key k. If no such key is -present, an empty item is inserted with this key and a reference -to the empty item is returned. -

      You can use this operator both for reading and writing: -

      -    TQMap<TQString, TQString> map;
      -    map["Clinton"] = "Bill";
      -    stream << map["Clinton"];
      -    
      - - -

      const T & TQMap::operator[] ( const Key & k ) const -

      - -

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

      Warning: This function differs from the non-const version of the -same function. It will not insert an empty value if the key k does not exist. This may lead to logic errors in your program. -You should check if the element exists before calling this -function. -

      Returns the value associated with the key k. If no such key is -present, a reference to an empty item is returned. - -

      void TQMap::remove ( iterator it ) -

      - -

      Removes the item associated with the iterator it from the map. -

      See also clear(). - -

      void TQMap::remove ( const Key & k ) -

      - -

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

      Removes the item with the key k from the map. - -

      iterator TQMap::replace ( const Key & k, const T & v ) -

      - -

      Replaces the value of the element with key k, with the value v. -

      See also insert() and remove(). - -

      size_type TQMap::size () const -

      - -

      Returns the number of items in the map. -

      This function is provided for STL compatibility. It is equivalent -to count(). -

      See also empty(). - -

      TQValueList<T> TQMap::values () const -

      - -

      Returns a list of all the values in the map, in key order. - -


      Related Functions

      -

      TQDataStream & operator<< ( TQDataStream & s, const TQMap<Key, T> & m ) -

      - -

      -

      Writes the map m to the stream s. The types Key and T -must implement the streaming operator as well. - -

      TQDataStream & operator>> ( TQDataStream & s, TQMap<Key, T> & m ) -

      - -

      -

      Reads the map m from the stream s. The types Key and T -must implement the streaming operator as well. - - -


      -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/ntqmemarray.html b/doc/html/ntqmemarray.html index a38a81172..cba6fdccf 100644 --- a/doc/html/ntqmemarray.html +++ b/doc/html/ntqmemarray.html @@ -110,7 +110,7 @@ of the arrays is modified, all the arrays are modified.

      The benefit of sharing is that a program does not need to duplicate data when it is not required, which results in lower memory use and less copying of data. -

      An alternative to TQMemArray is TQValueVector. The TQValueVector class +

      An alternative to TQMemArray is TQValueVector. The TQValueVector class also provides an array of objects, but can deal with objects that have constructors (specifically a copy constructor and a default constructor). TQValueVector provides an STL-compatible syntax and is @@ -267,7 +267,7 @@ at the right time.

      Returns an iterator pointing at the beginning of this array. This iterator can be used in the same way as the iterators of -TQValueList and TQMap, for example. +TQValueList and TQMap, for example.

      ConstIterator TQMemArray::begin () const

      @@ -275,7 +275,7 @@ iterator can be used in the same way as the iterators of

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

      Returns a const iterator pointing at the beginning of this array. This iterator can be used in the same way as the iterators of -TQValueList and TQMap, for example. +TQValueList and TQMap, for example.

      int TQMemArray::bsearch ( const type & v ) const

      @@ -346,7 +346,7 @@ The size of the array is given by size.

      Returns an iterator pointing behind the last element of this array. This iterator can be used in the same way as the iterators -of TQValueList and TQMap, for example. +of TQValueList and TQMap, for example.

      ConstIterator TQMemArray::end () const

      @@ -354,7 +354,7 @@ of TQValueList and TQMap This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

      Returns a const iterator pointing behind the last element of this array. This iterator can be used in the same way as the iterators -of TQValueList and TQMap, for example. +of TQValueList and TQMap, for example.

      bool TQMemArray::fill ( const type & v, int size = -1 )

      diff --git a/doc/html/ntqnetworkprotocol.html b/doc/html/ntqnetworkprotocol.html index cb7432da3..01b693913 100644 --- a/doc/html/ntqnetworkprotocol.html +++ b/doc/html/ntqnetworkprotocol.html @@ -333,7 +333,7 @@ operation that has finished, including the state, etc. network protocol. In all other cases connect to the newChildren() signal with its list of TQUrlInfo objects. -

      void TQNetworkProtocol::newChildren ( const TQValueList<TQUrlInfo> & i, TQNetworkOperation * op ) [signal] +

      void TQNetworkProtocol::newChildren ( const TQValueList<TQUrlInfo> & i, TQNetworkOperation * op ) [signal]

      This signal is emitted after listChildren() was called and new diff --git a/doc/html/ntqpair.html b/doc/html/ntqpair.html deleted file mode 100644 index 411a6c83c..000000000 --- a/doc/html/ntqpair.html +++ /dev/null @@ -1,126 +0,0 @@ - - - - - -TQPair Class - - - - - - - -
      - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

      TQPair Class Reference

      - -

      The TQPair class is a value-based template class that provides a pair of elements. -More... -

      #include <ntqpair.h> -

      List of all member functions. -

      Public Members

      -
        -
      • typedef T1 first_type
      • -
      • typedef T2 second_type
      • -
      • TQPair ()
      • -
      • TQPair ( const T1 & t1, const T2 & t2 )
      • -
      • TQPair<T1, T2> & operator= ( const TQPair<T1, T2> & other )
      • -
      -

      Related Functions

      - -

      Detailed Description

      - - -The TQPair class is a value-based template class that provides a pair of elements. -

      - - -

      TQPair is a TQt implementation of an STL-like pair. It can be used -in your application if the standard pair<> is not available on -your target platforms. -

      TQPair<T1, T2> defines a template instance to create a pair of -values that contains two values of type T1 and T2. Please note -that TQPair does not store pointers to the two elements; it holds a -copy of every member. This is why these kinds of classes are -called value based. If you're interested in pointer based -classes see, for example, TQPtrList and TQDict. -

      TQPair holds one copy of type T1 and one copy of type T2, but does -not provide iterators to access these elements. Instead, the two -elements (first and second) are public member variables of -the pair. TQPair owns the contained elements. For more relaxed -ownership semantics, see TQPtrCollection and friends which are -pointer-based containers. -

      Some classes cannot be used within a TQPair: for example, all -classes derived from TQObject and thus all classes that implement -widgets. Only "values" can be used in a TQPair. To qualify as a -value the class must provide: -

        -
      • A copy constructor -
      • An assignment operator -
      • A constructor that takes no arguments -
      -

      Note that C++ defaults to field-by-field assignment operators and -copy constructors if no explicit version is supplied. In many -cases this is sufficient. -

      TQPair uses an STL-like syntax to manipulate and address the -objects it contains. See the TQTL - documentation for more information. -

      Functions that need to return two values can use a TQPair. -

      See also TQt Template Library Classes, Implicitly and Explicitly Shared Classes, and Non-GUI Classes. - -


      Member Type Documentation

      -

      TQPair::first_type

      -The type of the first element in the pair. -

      TQPair::second_type

      -The type of the second element in the pair. -

      Member Function Documentation

      -

      TQPair::TQPair () -

      - -

      Constructs an empty pair. The first and second elements are -default constructed. - -

      TQPair::TQPair ( const T1 & t1, const T2 & t2 ) -

      - -

      Constructs a pair and initializes the first element with t1 -and the second element with t2. - -


      Related Functions

      -

      TQPair qMakePair ( T1 t1, T2 t2 ) -

      - -

      -

      This is a template convenience function. It is used to create a -TQPair<> object that contains t1 and t2. - - -


      -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/ntqprocess.html b/doc/html/ntqprocess.html index ba105e3d3..df4d6e7b8 100644 --- a/doc/html/ntqprocess.html +++ b/doc/html/ntqprocess.html @@ -283,8 +283,8 @@ functions setArguments() and over a copy, e.g.
           TQStringList list = myProcess.arguments();
      -    TQStringList::Iterator it = list.begin();
      -    while( it != list.end() ) {
      +    TQStringList::Iterator it = list.begin();
      +    while( it != list.end() ) {
               myProcessing( *it );
               ++it;
           }
      diff --git a/doc/html/ntqptrcollection.html b/doc/html/ntqptrcollection.html
      index da3f299b7..7ba1bd2f8 100644
      --- a/doc/html/ntqptrcollection.html
      +++ b/doc/html/ntqptrcollection.html
      @@ -62,8 +62,8 @@ The TQPtrCollection class is the base class of most pointer-based TQt collection
       
       

      The TQPtrCollection class is an abstract base class for the TQt collection classes TQDict, TQPtrList, -etc. TQt also includes value based collections, e.g. TQValueList, -TQMap, etc. +etc. TQt also includes value based collections, e.g. TQValueList, +TQMap, etc.

      A TQPtrCollection only knows about the number of objects in the collection and the deletion strategy (see setAutoDelete()).

      A collection is implemented using the Item (generic collection diff --git a/doc/html/ntqptrlist.html b/doc/html/ntqptrlist.html index 22d95079f..4b00f377d 100644 --- a/doc/html/ntqptrlist.html +++ b/doc/html/ntqptrlist.html @@ -100,7 +100,7 @@ The TQPtrList class is a template class that provides a list.

      -

      TQValueList is an STL-compatible alternative to this class. +

      TQValueList is an STL-compatible alternative to this class.

      Define a template instance TQPtrList<X> to create a list that operates on pointers to X (X*).

      The list class is indexable and has a current diff --git a/doc/html/ntqptrqueue.html b/doc/html/ntqptrqueue.html index bae7c7442..b2ac1a832 100644 --- a/doc/html/ntqptrqueue.html +++ b/doc/html/ntqptrqueue.html @@ -64,7 +64,7 @@ body { background: #ffffff; color: black; } The TQPtrQueue class is a template class that provides a queue.

      -

      TQValueVector can be used as an STL-compatible alternative to this +

      TQValueVector can be used as an STL-compatible alternative to this class.

      A template instance TQPtrQueue<X> is a queue that operates on pointers to X (X*). diff --git a/doc/html/ntqptrstack.html b/doc/html/ntqptrstack.html index df6f7a23c..7c1964ae2 100644 --- a/doc/html/ntqptrstack.html +++ b/doc/html/ntqptrstack.html @@ -63,7 +63,7 @@ body { background: #ffffff; color: black; } The TQPtrStack class is a template class that provides a stack.

      -

      TQValueStack is an STL-compatible alternative to this class. +

      TQValueStack is an STL-compatible alternative to this class.

      Define a template instance TQPtrStack<X> to create a stack that operates on pointers to X, (X*).

      A stack is a last in, first out (LIFO) structure. Items are added diff --git a/doc/html/ntqptrvector.html b/doc/html/ntqptrvector.html index f2f3ff9fa..c4eef2b39 100644 --- a/doc/html/ntqptrvector.html +++ b/doc/html/ntqptrvector.html @@ -83,7 +83,7 @@ The TQPtrVector class is a template collection class that provides a vector (array).

      -

      TQValueVector is an STL-compatible alternative to this class. +

      TQValueVector is an STL-compatible alternative to this class.

      TQPtrVector is implemented as a template class. Defines a template instance TQPtrVector<X> to create a vector that contains pointers to X (X*). diff --git a/doc/html/ntqregexp.html b/doc/html/ntqregexp.html index 16ee5d8c0..94480a79f 100644 --- a/doc/html/ntqregexp.html +++ b/doc/html/ntqregexp.html @@ -760,8 +760,8 @@ non-capturing parentheses: over a copy, e.g.

               TQStringList list = rx.capturedTexts();
      -        TQStringList::Iterator it = list.begin();
      -        while( it != list.end() ) {
      +        TQStringList::Iterator it = list.begin();
      +        while( it != list.end() ) {
                   myProcessing( *it );
                   ++it;
               }
      diff --git a/doc/html/ntqsessionmanager.html b/doc/html/ntqsessionmanager.html
      index 8f8833d0a..599148b3a 100644
      --- a/doc/html/ntqsessionmanager.html
      +++ b/doc/html/ntqsessionmanager.html
      @@ -192,8 +192,8 @@ should not call this function without first asking the user.
       iterate over a copy, e.g.
       
           TQStringList list = mySession.discardCommand();
      -    TQStringList::Iterator it = list.begin();
      -    while( it != list.end() ) {
      +    TQStringList::Iterator it = list.begin();
      +    while( it != list.end() ) {
               myProcessing( *it );
               ++it;
           }
      @@ -245,8 +245,8 @@ application's second phase.
       iterate over a copy, e.g.
       
           TQStringList list = mySession.restartCommand();
      -    TQStringList::Iterator it = list.begin();
      -    while( it != list.end() ) {
      +    TQStringList::Iterator it = list.begin();
      +    while( it != list.end() ) {
               myProcessing( *it );
               ++it;
           }
      diff --git a/doc/html/ntqsettings.html b/doc/html/ntqsettings.html
      index f827d3619..4889e2fe6 100644
      --- a/doc/html/ntqsettings.html
      +++ b/doc/html/ntqsettings.html
      @@ -429,8 +429,8 @@ set to FALSE.
       over a copy, e.g.
       
           TQStringList list = mySettings.readListEntry( "recentfiles" );
      -    TQStringList::Iterator it = list.begin();
      -    while( it != list.end() ) {
      +    TQStringList::Iterator it = list.begin();
      +    while( it != list.end() ) {
               myProcessing( *it );
               ++it;
           }
      @@ -454,8 +454,8 @@ that do not take a separator argument.
       over a copy, e.g.
       
           TQStringList list = mySettings.readListEntry( "size", " " );
      -    TQStringList::Iterator it = list.begin();
      -    while( it != list.end() ) {
      +    TQStringList::Iterator it = list.begin();
      +    while( it != list.end() ) {
               myProcessing( *it );
               ++it;
           }
      diff --git a/doc/html/ntqsplitter.html b/doc/html/ntqsplitter.html
      index b19a51878..88f10e783 100644
      --- a/doc/html/ntqsplitter.html
      +++ b/doc/html/ntqsplitter.html
      @@ -249,7 +249,7 @@ Sets resize mode of widget w to mode. (The default is p. If p is negative, the
       rubber band is removed.
       
      -

      void TQSplitter::setSizes ( TQValueList<int> list ) +

      void TQSplitter::setSizes ( TQValueList<int> list )

      Sets the size parameters to the values given in the list. If the splitter is horizontal, the values set the widths of each @@ -262,7 +262,7 @@ the program will still be well-behaved. the widgets should be resized to.

      See also sizes(). -

      TQValueList<int> TQSplitter::sizes () const +

      TQValueList<int> TQSplitter::sizes () const

      Returns a list of the size parameters of all the widgets in this splitter. @@ -274,9 +274,9 @@ produce a splitter with the same layout as this one.

      Note that if you want to iterate over the list, you should iterate over a copy, e.g.

      -    TQValueList<int> list = mySplitter.sizes();
      -    TQValueList<int>::Iterator it = list.begin();
      -    while( it != list.end() ) {
      +    TQValueList<int> list = mySplitter.sizes();
      +    TQValueList<int>::Iterator it = list.begin();
      +    while( it != list.end() ) {
               myProcessing( *it );
               ++it;
           }
      diff --git a/doc/html/ntqstringlist.html b/doc/html/ntqstringlist.html
      index f5f71456d..1cd5e5241 100644
      --- a/doc/html/ntqstringlist.html
      +++ b/doc/html/ntqstringlist.html
      @@ -35,7 +35,7 @@ body { background: #ffffff; color: black; }
       More...
       

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

      #include <ntqstringlist.h> -

      Inherits TQValueList<TQString>. +

      Inherits TQValueList<TQString>.

      List of all member functions.

      Public Members

        @@ -68,18 +68,18 @@ The TQStringList class provides a list of strings.

        It is used to store and manipulate strings that logically belong -together. Essentially TQStringList is a TQValueList of TQString +together. Essentially TQStringList is a TQValueList of TQString objects. Unlike TQStrList, which stores pointers to characters, TQStringList holds real TQString objects. It is the class of choice whenever you work with Unicode strings. TQStringList is part of the TQt Template Library.

        Like TQString itself, TQStringList objects are implicitly shared, so passing them around as value-parameters is both fast and safe. -

        Strings can be added to a list using append(), operator+=() or -operator<<(), e.g. +

        Strings can be added to a list using append(), operator+=() or +operator<<(), e.g.

             TQStringList fonts;
        -    fonts.append( "Times" );
        +    fonts.append( "Times" );
             fonts += "Courier";
             fonts += "Courier New";
             fonts << "Helvetica [Cronyx]" << "Helvetica [Adobe]";
        @@ -87,7 +87,7 @@ passing them around as value-parameters is both fast and safe.
          
         

        String lists have an iterator, TQStringList::Iterator(), e.g.

        -    for ( TQStringList::Iterator it = fonts.begin(); it != fonts.end(); ++it ) {
        +    for ( TQStringList::Iterator it = fonts.begin(); it != fonts.end(); ++it ) {
                 cout << *it << ":";
             }
             cout << endl;
        @@ -152,7 +152,7 @@ copy-on-write.
         In a threaded environment you may require a real deep copy
         .
         
        -

        TQStringList::TQStringList ( const TQValueList<TQString> & l ) +

        TQStringList::TQStringList ( const TQValueList<TQString> & l )

        Constructs a new string list that is a copy of l. @@ -254,7 +254,7 @@ Sorts the list of strings in ascending case-sensitive order. Library's efficient HeapSort implementation that has a time complexity of O(n*log n).

        If you want to sort your strings in an arbitrary order consider -using a TQMap. For example you could use a TQMap<TQString,TQString> +using a TQMap. For example you could use a TQMap<TQString,TQString> to create a case-insensitive ordering (e.g. mapping the lowercase text to the text), or a TQMap<int,TQString> to sort the strings by some integer index, etc. diff --git a/doc/html/ntqstylesheet.html b/doc/html/ntqstylesheet.html index 8759e909d..91c2e78b0 100644 --- a/doc/html/ntqstylesheet.html +++ b/doc/html/ntqstylesheet.html @@ -354,7 +354,7 @@ deleting any style sheet previously set. The ownership is transferred to TQStyleSheet.

        See also defaultSheet(). -

        TQTextCustomItem * TQStyleSheet::tag ( const TQString & name, const TQMap<TQString, TQString> & attr, const TQString & context, const TQMimeSourceFactory & factory, bool emptyTag, TQTextDocument * doc ) const [virtual] +

        TQTextCustomItem * TQStyleSheet::tag ( const TQString & name, const TQMap<TQString, TQString> & attr, const TQString & context, const TQMimeSourceFactory & factory, bool emptyTag, TQTextDocument * doc ) const [virtual]

        This function is under development and is subject to change.

        Generates an internal object for the tag called name, given the diff --git a/doc/html/ntqtextcodecplugin.html b/doc/html/ntqtextcodecplugin.html index b6ec3e115..a7a38face 100644 --- a/doc/html/ntqtextcodecplugin.html +++ b/doc/html/ntqtextcodecplugin.html @@ -89,7 +89,7 @@ automatically when it is no longer used.

        Creates a TQTextCodec object for the codec called name.

        See also names(). -

        TQValueList<int> TQTextCodecPlugin::mibEnums () const [pure virtual] +

        TQValueList<int> TQTextCodecPlugin::mibEnums () const [pure virtual]

        Returns the list of mib enums supported by this plugin. diff --git a/doc/html/ntqtl.html b/doc/html/ntqtl.html index bc63003ab..c25657025 100644 --- a/doc/html/ntqtl.html +++ b/doc/html/ntqtl.html @@ -37,15 +37,15 @@ object containers. See the TQt Template Library.

        -
        TQMapValue-based template class that provides a dictionary -
        TQMapConstIteratorIterator for TQMap -
        TQMapIteratorIterator for TQMap -
        TQPairValue-based template class that provides a pair of elements -
        TQValueListValue-based template class that provides lists -
        TQValueListConstIteratorConst iterator for TQValueList -
        TQValueListIteratorIterator for TQValueList -
        TQValueStackValue-based template class that provides a stack -
        TQValueVectorValue-based template class that provides a dynamic array +
        TQMapValue-based template class that provides a dictionary +
        TQMapConstIteratorIterator for TQMap +
        TQMapIteratorIterator for TQMap +
        TQPairValue-based template class that provides a pair of elements +
        TQValueListValue-based template class that provides lists +
        TQValueListConstIteratorConst iterator for TQValueList +
        TQValueListIteratorIterator for TQValueList +
        TQValueStackValue-based template class that provides a stack +
        TQValueVectorValue-based template class that provides a dynamic array


        diff --git a/doc/html/ntqtranslator.html b/doc/html/ntqtranslator.html index 66f1cbdb2..e45a11713 100644 --- a/doc/html/ntqtranslator.html +++ b/doc/html/ntqtranslator.html @@ -258,7 +258,7 @@ otherwise returns FALSE.

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

        TQValueList<TQTranslatorMessage> TQTranslator::messages () const +

        TQValueList<TQTranslatorMessage> TQTranslator::messages () const

        Returns a list of the messages in the translator. This function is rather slow. Because it is seldom called, it's optimized for @@ -266,9 +266,9 @@ simplicity and small size, rather than speed.

        If you want to iterate over the list, you should iterate over a copy, e.g.

        -    TQValueList<TQTranslatorMessage> list = myTranslator.messages();
        -    TQValueList<TQTranslatorMessage>::Iterator it = list.begin();
        -    while ( it != list.end() ) {
        +    TQValueList<TQTranslatorMessage> list = myTranslator.messages();
        +    TQValueList<TQTranslatorMessage>::Iterator it = list.begin();
        +    while ( it != list.end() ) {
                 process_message( *it );
                 ++it;
             }
        diff --git a/doc/html/ntqurloperator.html b/doc/html/ntqurloperator.html
        index 217daac31..918e42c2b 100644
        --- a/doc/html/ntqurloperator.html
        +++ b/doc/html/ntqurloperator.html
        @@ -379,7 +379,7 @@ file) because the new directory will be created in this path.
         Returns the name filter of the URL.
         

        See also TQUrlOperator::setNameFilter() and TQDir::nameFilter(). -

        void TQUrlOperator::newChildren ( const TQValueList<TQUrlInfo> & i, TQNetworkOperation * op ) [signal] +

        void TQUrlOperator::newChildren ( const TQValueList<TQUrlInfo> & i, TQNetworkOperation * op ) [signal]

        This signal is emitted after listChildren() was called and new diff --git a/doc/html/ntqvaluelist.html b/doc/html/ntqvaluelist.html deleted file mode 100644 index eafd2d6f5..000000000 --- a/doc/html/ntqvaluelist.html +++ /dev/null @@ -1,785 +0,0 @@ - - - - - -TQValueList Class - - - - - - - -
        - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

        TQValueList Class Reference

        - -

        The TQValueList class is a value-based template class that -provides lists. -More... -

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

        -

        #include <ntqvaluelist.h> -

        Inherited by TQCanvasItemList, TQStringList, and TQValueStack. -

        List of all member functions. -

        Public Members

        - -

        Related Functions

        -
          -
        • TQDataStream & operator>> ( TQDataStream & s, TQValueList<T> & l )
        • -
        • TQDataStream & operator<< ( TQDataStream & s, const TQValueList<T> & l )
        • -
        -

        Detailed Description

        - - -The TQValueList class is a value-based template class that -provides lists. -

        - - - - -

        TQValueList is a TQt implementation of an STL-like list container. -It can be used in your application if the standard list is not -available for your target platform(s). TQValueList is part of the -TQt Template Library. -

        TQValueList<T> defines a template instance to create a list of -values that all have the class T. Note that TQValueList does not -store pointers to the members of the list; it holds a copy of -every member. This is why these kinds of classes are called "value -based"; TQPtrList and TQDict are "pointer based". -

        TQValueList contains and manages a collection of objects of type T -and provides iterators that allow the contained objects to be -addressed. TQValueList owns the contained items. For more relaxed -ownership semantics, see TQPtrCollection and friends which are -pointer-based containers. -

        Some classes cannot be used within a TQValueList, for example, all -classes derived from TQObject and thus all classes that implement -widgets. Only values can be used in a TQValueList. To qualify as a -value the class must provide: -

          -
        • a copy constructor; -
        • an assignment operator; -
        • a default constructor, i.e. a constructor that does not take any arguments. -
        -

        Note that C++ defaults to field-by-field assignment operators and -copy constructors if no explicit version is supplied. In many -cases this is sufficient. -

        In addition, some compilers (e.g. Sun CC) might require that the -class provides an equality operator (operator==()). -

        TQValueList's function naming is consistent with the other TQt -classes (e.g. count(), isEmpty()). TQValueList also provides extra -functions for compatibility with STL algorithms, such as size() -and empty(). Programmers already familiar with the STL list may -prefer to use the STL-compatible functions. -

        Example: -

        -    class Employee
        -    {
        -    public:
        -        Employee(): sn(0) {}
        -        Employee( const TQString& forename, const TQString& surname, int salary )
        -            : fn(forename), sn(surname), sal(salary)
        -        {}
        -
        -        TQString forename() const { return fn; }
        -        TQString surname() const { return sn; }
        -        int salary() const { return sal; }
        -        void setSalary( int salary ) { sal = salary; }
        -
        -    private:
        -        TQString fn;
        -        TQString sn;
        -        int sal;
        -    };
        -
        -    typedef TQValueList<Employee> EmployeeList;
        -    EmployeeList list;
        -
        -    list.append( Employee("John", "Doe", 50000) );
        -    list.append( Employee("Jane", "Williams", 80000) );
        -    list.append( Employee("Tom", "Jones", 60000) );
        -
        -    Employee mary( "Mary", "Hawthorne", 90000 );
        -    list.append( mary );
        -    mary.setSalary( 100000 );
        -
        -    EmployeeList::iterator it;
        -    for ( it = list.begin(); it != list.end(); ++it )
        -        cout << (*it).surname().latin1() << ", " <<
        -                (*it).forename().latin1() << " earns " <<
        -                (*it).salary() << endl;
        -
        -    // Output:
        -    // Doe, John earns 50000
        -    // Williams, Jane earns 80000
        -    // Hawthorne, Mary earns 90000
        -    // Jones, Tom earns 60000
        -    
        - -

        Notice that the latest changes to Mary's salary did not affect the -value in the list because the list created a copy of Mary's entry. -

        There are several ways to find items in the list. The begin() and -end() functions return iterators to the beginning and end of the -list. The advantage of getting an iterator is that you can move -forward or backward from this position by -incrementing/decrementing the iterator. The iterator returned by -end() points to the item which is one past the last item in the -container. The past-the-end iterator is still associated with the -list it belongs to, however it is not dereferenceable; -operator*() will not return a well-defined value. If the list is -empty(), the iterator returned by begin() will equal the iterator -returned by end(). -

        Another way to find an item in the list is by using the tqFind() algorithm. For example: -

        -    TQValueList<int> list;
        -    ...
        -    TQValueList<int>::iterator it = tqFind( list.begin(), list.end(), 3 );
        -    if ( it != list.end() )
        -        // it points to the found item
        -    
        - -

        It is safe to have multiple iterators a the list at the same -time. If some member of the list is removed, only iterators -pointing to the removed member become invalid. Inserting into the -list does not invalidate any iterator. For convenience, the -function last() returns a reference to the last item in the list, -and first() returns a reference to the the first item. If the -list is empty(), both last() and first() have undefined behavior -(your application will crash or do unpredictable things). Use -last() and first() with caution, for example: -

        -    TQValueList<int> list;
        -    list.append( 1 );
        -    list.append( 2 );
        -    list.append( 3 );
        -    ...
        -    if ( !list.empty() ) {
        -        // OK, modify the first item
        -        int& i = list.first();
        -        i = 18;
        -    }
        -    ...
        -    TQValueList<double> dlist;
        -    double d = dlist.last(); // undefined
        -    
        - -

        Because TQValueList is value-based there is no need to be careful -about deleting items in the list. The list holds its own copies -and will free them if the corresponding member or the list itself -is deleted. You can force the list to free all of its items with -clear(). -

        TQValueList is shared implicitly, which means it can be copied in -constant time, i.e. O(1). If multiple TQValueList instances share -the same data and one needs to modify its contents, this modifying -instance makes a copy and modifies its private copy; therefore it -does not affect the other instances; this takes O(n) time. This is -often called "copy on write". If a TQValueList is being used in a -multi-threaded program, you must protect all access to the list. -See TQMutex. -

        There are several ways to insert items into the list. The -prepend() and append() functions insert items at the beginning and -the end of the list respectively. The insert() function comes in -several flavors and can be used to add one or more items at -specific positions within the list. -

        Items can also be removed from the list in several ways. There -are several variants of the remove() function, which removes a -specific item from the list. The remove() function will find and -remove items according to a specific item value. -

        Lists can also be sorted using the TQt Template - Library. For example with qHeapSort(): -

        Example: -

        -    TQValueList<int> list;
        -    list.append( 5 );
        -    list.append( 8 );
        -    list.append( 3 );
        -    list.append( 4 );
        -    qHeapSort( list );
        -    
        - -

        See also TQValueListIterator, TQt Template Library Classes, Implicitly and Explicitly Shared Classes, and Non-GUI Classes. - -


        Member Type Documentation

        -

        TQValueList::ConstIterator

        - -

        This iterator is an instantiation of TQValueListConstIterator for -the same type as this TQValueList. In other words, if you -instantiate TQValueList, ConstIterator is a -TQValueListConstIterator. Several member function use it, such -as TQValueList::begin(), which returns an iterator pointing to the -first item in the list. -

        Functionally, this is almost the same as Iterator. The only -difference is you cannot use ConstIterator for non-const -operations, and that the compiler can often generate better code -if you use ConstIterator. -

        See also TQValueListIterator and Iterator. - -

        TQValueList::Iterator

        - -

        This iterator is an instantiation of TQValueListIterator for the -same type as this TQValueList. In other words, if you instantiate -TQValueList, Iterator is a TQValueListIterator. Several -member function use it, such as TQValueList::begin(), which returns -an iterator pointing to the first item in the list. -

        Functionally, this is almost the same as ConstIterator. The only -difference is that you cannot use ConstIterator for non-const -operations, and that the compiler can often generate better code -if you use ConstIterator. -

        See also TQValueListIterator and ConstIterator. - -

        TQValueList::const_iterator

        -The list's const iterator type, TQValueListConstIterator. -

        TQValueList::const_pointer

        -The const pointer to T type. -

        TQValueList::const_reference

        -The const reference to T type. -

        TQValueList::iterator

        -The list's iterator type, TQValueListIterator. -

        TQValueList::pointer

        -The pointer to T type. -

        TQValueList::reference

        -The reference to T type. -

        TQValueList::size_type

        -An unsigned integral type, used to represent various sizes. -

        TQValueList::value_type

        -The type of the object stored in the list, T. -

        Member Function Documentation

        -

        TQValueList::TQValueList () -

        - -

        Constructs an empty list. - -

        TQValueList::TQValueList ( const TQValueList<T> & l ) -

        - -

        Constructs a copy of l. -

        This operation takes O(1) time because TQValueList is implicitly shared. -

        The first modification to a list will take O(n) time. - -

        TQValueList::TQValueList ( const std::list<T> & l ) -

        - -

        Contructs a copy of l. -

        This constructor is provided for compatibility with STL -containers. - -

        TQValueList::~TQValueList () -

        - -

        Destroys the list. References to the values in the list and all -iterators of this list become invalidated. Note that it is -impossible for an iterator to check whether or not it is valid: -TQValueList is highly tuned for performance, not for error -checking. - -

        iterator TQValueList::append ( const T & x ) -

        - -

        Inserts x at the end of the list. -

        See also insert() and prepend(). - -

        Examples: checklists/checklists.cpp and fonts/simple-qfont-demo/viewer.cpp. -

        const_iterator TQValueList::at ( size_type i ) const -

        - -

        Returns an iterator pointing to the item at position i in the -list, or an undefined value if the index is out of range. -

        Warning: This function uses a linear search and can be extremely -slow for large lists. TQValueList is not optimized for random item -access. If you need random access use a different container, such -as TQValueVector. - -

        iterator TQValueList::at ( size_type i ) -

        - -

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

        Returns an iterator pointing to the item at position i in the -list, or an undefined value if the index is out of range. -

        -

        reference TQValueList::back () -

        - -

        Returns a reference to the last item. If the list contains no last -item (i.e. empty() returns TRUE), the return value is undefined. -

        This function is provided for STL compatibility. It is equivalent -to last(). -

        See also front(). - -

        const_reference TQValueList::back () const -

        - -

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

        -

        const_iterator TQValueList::begin () const -

        - -

        Returns an iterator pointing to the first item in the list. This -iterator equals end() if the list is empty. -

        See also first(), end(), and constBegin(). - -

        Examples: canvas/canvas.cpp, chart/canvasview.cpp, chart/element.cpp, checklists/checklists.cpp, sql/overview/insert/main.cpp, table/statistics/statistics.cpp, and themes/themes.cpp. -

        iterator TQValueList::begin () -

        - -

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

        Returns an iterator pointing to the first item in the list. This -iterator equals end() if the list is empty. -

        See also first() and end(). - -

        void TQValueList::clear () -

        - -

        Removes all items from the list. -

        See also remove(). - -

        const_iterator TQValueList::constBegin () const -

        - -

        Returns an iterator pointing to the first item in the list. This -iterator equals constEnd() if the list is empty. -

        See also begin(). - -

        const_iterator TQValueList::constEnd () const -

        - -

        Returns an iterator pointing past the last item in the list. -This iterator equals constBegin() if the list is empty. -

        See also end(). - -

        size_type TQValueList::contains ( const T & x ) const -

        - -

        Returns the number of occurrences of the value x in the list. - -

        size_type TQValueList::count () const -

        - -

        Returns the number of items in the list. -

        See also isEmpty(). - -

        Examples: chart/element.cpp, fileiconview/qfileiconview.cpp, and table/statistics/statistics.cpp. -

        bool TQValueList::empty () const -

        - -

        Returns TRUE if the list contains no items; otherwise returns -FALSE. -

        See also size(). - -

        iterator TQValueList::end () -

        - -

        Returns an iterator pointing past the last item in the list. -This iterator equals begin() if the list is empty. -

        See also last(), begin(), and constEnd(). - -

        Examples: canvas/canvas.cpp, chart/canvasview.cpp, chart/element.cpp, checklists/checklists.cpp, sql/overview/insert/main.cpp, table/statistics/statistics.cpp, and themes/themes.cpp. -

        const_iterator TQValueList::end () const -

        - -

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

        Returns an iterator pointing past the last item in the list. -This iterator equals begin() if the list is empty. -

        See also last() and begin(). - -

        iterator TQValueList::erase ( iterator it ) -

        - -

        Removes the item pointed to by it from the list. No iterators -other than it or other iterators pointing at the same item as -it are invalidated. Returns an iterator to the next item after -it, or end() if there is no such item. -

        This function is provided for STL compatibility. It is equivalent -to remove(). - -

        iterator TQValueList::erase ( iterator first, iterator last ) -

        - -

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

        Deletes all items from first to last (not including last). No iterators are invalidated, except those pointing to the -removed items themselves. Returns last. - -

        iterator TQValueList::find ( const T & x ) -

        - -

        Returns an iterator pointing to the first occurrence of x in -the list. -

        Returns end() is no item matched. - -

        const_iterator TQValueList::find ( const T & x ) const -

        - -

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

        Returns an iterator pointing to the first occurrence of x in -the list. -

        Returns end() if no item matched. - -

        iterator TQValueList::find ( iterator it, const T & x ) -

        - -

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

        Finds the first occurrence of x in the list starting at the -position given by it. -

        Returns end() if no item matched. - -

        const_iterator TQValueList::find ( const_iterator it, const T & x ) const -

        - -

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

        Finds the first occurrence of x in the list starting at the -position given by it. -

        Returns end() if no item matched. - -

        int TQValueList::findIndex ( const T & x ) const -

        - -

        Returns the index of the first occurrence of the value x. -Returns -1 if no item matched. - -

        T & TQValueList::first () -

        - -

        Returns a reference to the first item. If the list contains no -first item (i.e. isEmpty() returns TRUE), the return value is -undefined. -

        See also last(). - -

        Example: network/mail/smtp.cpp. -

        const T & TQValueList::first () const -

        - -

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

        -

        const_iterator TQValueList::fromLast () const -

        - -

        Returns an iterator to the last item in the list, or end() if -there is no last item. -

        Use the end() function instead. For example: -

        -    TQValueList<int> l;
        -    ...
        -    TQValueList<int>::iterator it = l.end();
        -    --it;
        -    if ( it != end() )
        -        // ...
        -    
        - -

        -

        iterator TQValueList::fromLast () -

        - -

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

        Returns an iterator to the last item in the list, or end() if -there is no last item. -

        Use the end() function instead. For example: -

        -    TQValueList<int> l;
        -    ...
        -    TQValueList<int>::iterator it = l.end();
        -    --it;
        -    if ( it != end() )
        -        // ...
        -    
        - -

        -

        reference TQValueList::front () -

        - -

        Returns a reference to the first item. If the list contains no -first item (i.e. empty() returns TRUE), the return value is -undefined. -

        This function is provided for STL compatibility. It is equivalent -to first(). -

        See also back(). - -

        const_reference TQValueList::front () const -

        - -

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

        -

        iterator TQValueList::insert ( iterator it, const T & x ) -

        - -

        Inserts the value x in front of the item pointed to by the -iterator, it. -

        Returns an iterator pointing at the inserted item. -

        See also append() and prepend(). - -

        Example: themes/themes.cpp. -

        void TQValueList::insert ( iterator pos, size_type n, const T & x ) -

        - -

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

        Inserts n copies of x before position pos. - -

        bool TQValueList::isEmpty () const -

        - -

        Returns TRUE if the list contains no items; otherwise returns -FALSE. -

        See also count(). - -

        Examples: fonts/simple-qfont-demo/viewer.cpp and network/mail/smtp.cpp. -

        T & TQValueList::last () -

        - -

        Returns a reference to the last item. If the list contains no last -item (i.e. empty() returns TRUE), the return value is undefined. - -

        const T & TQValueList::last () const -

        - -

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

        -

        bool TQValueList::operator!= ( const TQValueList<T> & l ) const -

        - -

        Compares both lists. -

        Returns TRUE if this list and l are unequal; otherwise returns -FALSE. - -

        TQValueList<T> TQValueList::operator+ ( const TQValueList<T> & l ) const -

        - -

        Creates a new list and fills it with the items of this list. Then -the items of l are appended. Returns the new list. - -

        TQValueList<T> & TQValueList::operator+= ( const TQValueList<T> & l ) -

        - -

        Appends the items of l to this list. Returns a reference to -this list. - -

        TQValueList<T> & TQValueList::operator+= ( const T & x ) -

        - -

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

        Appends the value x to the list. Returns a reference to the -list. - -

        TQValueList<T> & TQValueList::operator<< ( const T & x ) -

        - -

        Adds the value x to the end of the list. -

        Returns a reference to the list. - -

        TQValueList<T> & TQValueList::operator= ( const TQValueList<T> & l ) -

        - -

        Assigns l to this list and returns a reference to this list. -

        All iterators of the current list become invalidated by this -operation. The cost of such an assignment is O(1) since TQValueList -is implicitly shared. - -

        TQValueList<T> & TQValueList::operator= ( const std::list<T> & l ) -

        - -

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

        Assigns the contents of l to the list. -

        All iterators of the current list become invalidated by this -operation. - -

        bool TQValueList::operator== ( const TQValueList<T> & l ) const -

        - -

        Compares both lists. -

        Returns TRUE if this list and l are equal; otherwise returns -FALSE. - -

        bool TQValueList::operator== ( const std::list<T> & l ) const -

        - -

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

        Returns TRUE if this list and l are equal; otherwise returns -FALSE. -

        This operator is provided for compatibility with STL containers. - -

        const T & TQValueList::operator[] ( size_type i ) const -

        - -

        Returns a const reference to the item with index i in the list. -It is up to you to check whether this item really exists. You can -do that easily with the count() function. However this operator -does not check whether i is in range and will deliver undefined -results if it does not exist. -

        Warning: This function uses a linear search and can be extremely -slow for large lists. TQValueList is not optimized for random item -access. If you need random access use a different container, such -as TQValueVector. - -

        T & TQValueList::operator[] ( size_type i ) -

        - -

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

        Returns a non-const reference to the item with index i. - -

        void TQValueList::pop_back () -

        - -

        Removes the last item. If there is no last item, this operation is -undefined. -

        This function is provided for STL compatibility. - -

        void TQValueList::pop_front () -

        - -

        Removes the first item. If there is no first item, this operation -is undefined. -

        This function is provided for STL compatibility. - -

        iterator TQValueList::prepend ( const T & x ) -

        - -

        Inserts x at the beginning of the list. -

        See also insert() and append(). - -

        void TQValueList::push_back ( const T & x ) -

        - -

        Inserts x at the end of the list. -

        This function is provided for STL compatibility. It is equivalent -to append(). - -

        void TQValueList::push_front ( const T & x ) -

        - -

        Inserts x at the beginning of the list. -

        This function is provided for STL compatibility. It is equivalent -to prepend(). - -

        Example: toplevel/options.ui.h. -

        iterator TQValueList::remove ( iterator it ) -

        - -

        Removes the item pointed to by it from the list. No iterators -other than it or other iterators pointing at the same item as -it are invalidated. Returns an iterator to the next item after -it, or end() if there is no such item. -

        See also clear(). - -

        uint TQValueList::remove ( const T & x ) -

        - -

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

        Removes all items that have value x and returns the number of -removed items. - -

        size_type TQValueList::size () const -

        - -

        Returns the number of items in the list. -

        This function is provided for STL compatibility. It is equivalent -to count(). -

        See also empty(). - -


        Related Functions

        -

        TQDataStream & operator<< ( TQDataStream & s, const TQValueList<T> & l ) -

        - -

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

        -

        Writes a list, l, to the stream s. The type T stored in the -list must implement the streaming operator. - -

        TQDataStream & operator>> ( TQDataStream & s, TQValueList<T> & l ) -

        - -

        -

        Reads a list, l, from the stream s. The type T stored in the -list must implement the streaming operator. - - -


        -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/ntqvaluestack.html b/doc/html/ntqvaluestack.html deleted file mode 100644 index 72cbd490f..000000000 --- a/doc/html/ntqvaluestack.html +++ /dev/null @@ -1,158 +0,0 @@ - - - - - -TQValueStack Class - - - - - - - -
        - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

        TQValueStack Class Reference

        - -

        The TQValueStack class is a value-based template class that provides a stack. -More... -

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

        -

        #include <ntqvaluestack.h> -

        Inherits TQValueList<T>. -

        List of all member functions. -

        Public Members

        - -

        Detailed Description

        - - -The TQValueStack class is a value-based template class that provides a stack. -

        - - - - -

        Define a template instance TQValueStack<X> to create a stack of -values that all have the class X. TQValueStack is part of the TQt Template Library. -

        Note that TQValueStack does not store pointers to the members of -the stack; it holds a copy of every member. That is why these -kinds of classes are called "value based"; TQPtrStack, TQPtrList, -TQDict, etc., are "pointer based". -

        A stack is a last in, first out (LIFO) structure. Items are added -to the top of the stack with push() and retrieved from the top -with pop(). The top() function provides access to the topmost item -without removing it. -

        Example: -

        -        TQValueStack<int> stack;
        -        stack.push( 1 );
        -        stack.push( 2 );
        -        stack.push( 3 );
        -        while ( ! stack.isEmpty() )
        -            cout << "Item: " << stack.pop() << endl;
        -
        -        // Output:
        -        //      Item: 3
        -        //      Item: 2
        -        //      Item: 1
        -    
        - -

        TQValueStack is a specialized TQValueList provided for convenience. -All of TQValueList's functionality also applies to TQPtrStack, for -example the facility to iterate over all elements using -TQValueStack::Iterator. See TQValueListIterator for further -details. -

        Some classes cannot be used within a TQValueStack, for example -everything derived from TQObject and thus all classes that -implement widgets. Only values can be used in a TQValueStack. To -qualify as a value, the class must provide -

          -
        • a copy constructor; -
        • an assignment operator; -
        • a default constructor, i.e. a constructor that does not take any arguments. -
        -

        Note that C++ defaults to field-by-field assignment operators and -copy constructors if no explicit version is supplied. In many -cases this is sufficient. -

        See also TQt Template Library Classes, Implicitly and Explicitly Shared Classes, and Non-GUI Classes. - -


        Member Function Documentation

        -

        TQValueStack::TQValueStack () -

        - -

        Constructs an empty stack. - -

        TQValueStack::~TQValueStack () -

        - -

        Destroys the stack. References to the values in the stack and all -iterators of this stack become invalidated. Because TQValueStack is -highly tuned for performance, you won't see warnings if you use -invalid iterators because it is impossible for an iterator to -check whether or not it is valid. - -

        T TQValueStack::pop () -

        - -

        Removes the top item from the stack and returns it. -

        See also top() and push(). - -

        void TQValueStack::push ( const T & d ) -

        - -

        Adds element, d, to the top of the stack. Last in, first out. -

        This function is equivalent to append(). -

        See also pop() and top(). - -

        T & TQValueStack::top () -

        - -

        Returns a reference to the top item of the stack or the item -referenced by end() if no such item exists. Note that you must not -change the value the end() iterator points to. -

        This function is equivalent to last(). -

        See also pop(), push(), and TQValueList::fromLast(). - -

        const T & TQValueStack::top () const -

        - -

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

        Returns a reference to the top item of the stack or the item -referenced by end() if no such item exists. -

        This function is equivalent to last(). -

        See also pop(), push(), and TQValueList::fromLast(). - - -


        -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/ntqvaluevector.html b/doc/html/ntqvaluevector.html deleted file mode 100644 index c7a6e49b2..000000000 --- a/doc/html/ntqvaluevector.html +++ /dev/null @@ -1,666 +0,0 @@ - - - - - -TQValueVector Class - - - - - - - -
        - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

        TQValueVector Class Reference

        - -

        The TQValueVector class is a value-based template class that provides a dynamic array. -More... -

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

        -

        #include <ntqvaluevector.h> -

        List of all member functions. -

        Public Members

        - -

        Detailed Description

        - - -The TQValueVector class is a value-based template class that provides a dynamic array. -

        - - - - -

        TQValueVector is a TQt implementation of an STL-like vector -container. It can be used in your application if the standard vector is not available for your target platforms. TQValueVector is -part of the TQt Template Library. -

        TQValueVector<T> defines a template instance to create a vector -of values that all have the class T. TQValueVector does not store -pointers to the members of the vector; it holds a copy of every -member. TQValueVector is said to be value based; in contrast, -TQPtrList and TQDict are pointer based. -

        TQValueVector contains and manages a collection of objects of type -T and provides random access iterators that allow the contained -objects to be addressed. TQValueVector owns the contained -elements. For more relaxed ownership semantics, see TQPtrCollection -and friends, which are pointer-based containers. -

        TQValueVector provides good performance if you append or remove -elements from the end of the vector. If you insert or remove -elements from anywhere but the end, performance is very bad. The -reason for this is that elements must to be copied into new -positions. -

        Some classes cannot be used within a TQValueVector: for example, -all classes derived from TQObject and thus all classes that -implement widgets. Only values can be used in a TQValueVector. To -qualify as a value the class must provide: -

          -
        • a copy constructor; -
        • an assignment operator; -
        • a default constructor, i.e., a constructor that does not take any arguments. -
        -

        Note that C++ defaults to field-by-field assignment operators and -copy constructors if no explicit version is supplied. In many -cases this is sufficient. -

        TQValueVector uses an STL-like syntax to manipulate and address the -objects it contains. See this document for -more information. -

        Example: -

        -    #include <ntqvaluevector.h>
        -    #include <ntqstring.h>
        -    #include <stdio.h>
        -
        -    class Employee
        -    {
        -    public:
        -        Employee(): s(0) {}
        -        Employee( const TQString& name, int salary )
        -            : n( name ), s( salary )
        -        { }
        -
        -        TQString name()   const          { return n; }
        -        int     salary() const          { return s; }
        -        void    setSalary( int salary ) { s = salary; }
        -    private:
        -        TQString n;
        -        int     s;
        -    };
        -
        -    int main()
        -    {
        -        typedef TQValueVector<Employee> EmployeeVector;
        -        EmployeeVector vec( 3 );  // vector of 3 Employees
        -
        -        vec[0] = Employee( "Bill", 50000 );
        -        vec[1] = Employee( "Steve", 80000 );
        -        vec[2] = Employee( "Ron", 60000 );
        -
        -        Employee joe( "Joe", 50000 );
        -        vec.push_back( joe );  // vector expands to accommodate 4 Employees
        -        joe.setSalary( 70000 );
        -        
        -        EmployeeVector::iterator it;
        -        for( it = vec.begin(); it != vec.end(); ++it )
        -            printf( "%s earns %d\n", (*it).name().latin1(), (*it).salary() );
        -
        -        return 0;
        -    }
        -    
        - -

        Program output: -

        -        Bill earns 50000
        -        Steve earns 80000
        -        Ron earns 60000
        -        Joe earns 50000
        -    
        - -

        As you can see, the most recent change to Joe's salary did not -affect the value in the vector because the vector created a copy -of Joe's entry. -

        Many TQt functions return const value vectors; to iterate over -these you should make a copy and iterate over the copy. -

        There are several ways to find items in the vector. The begin() -and end() functions return iterators to the beginning and end of -the vector. The advantage of getting an iterator is that you can -move forward or backward from this position by -incrementing/decrementing the iterator. The iterator returned by -end() points to the element which is one past the last element in -the container. The past-the-end iterator is still associated with -the vector it belongs to, however it is not dereferenceable; -operator*() will not return a well-defined value. If the vector is -empty(), the iterator returned by begin() will equal the iterator -returned by end(). -

        The fastest way to access an element of a vector is by using -operator[]. This function provides random access and will return -a reference to the element located at the specified index. Thus, -you can access every element directly, in constant time, providing -you know the location of the element. It is undefined to access -an element that does not exist (your application will probably -crash). For example: -

        -    TQValueVector<int> vec1;  // an empty vector
        -    vec1[10] = 4;  // WARNING: undefined, probably a crash
        -
        -    TQValueVector<TQString> vec2(25); // initialize with 25 elements
        -    vec2[10] = "Dave";  // OK
        -    
        - -

        Whenever inserting, removing or referencing elements in a vector, -always make sure you are referring to valid positions. For -example: -

        -    void func( TQValueVector<int>& vec )
        -    {
        -        if ( vec.size() > 10 ) {
        -            vec[9] = 99; // OK
        -        }
        -    };
        -    
        - -

        The iterators provided by vector are random access iterators, -therefore you can use them with many generic algorithms, for -example, algorithms provided by the STL or the TQTL. -

        Another way to find an element in the vector is by using the -std::find() or tqFind() algorithms. -For example: -

        -    TQValueVector<int> vec;
        -    ...
        -    TQValueVector<int>::const_iterator it = tqFind( vec.begin(), vec.end(), 3 );
        -    if ( it != vector.end() )
        -        // 'it' points to the found element
        -    
        - -

        It is safe to have multiple iterators on the vector at the same -time. Since TQValueVector manages memory dynamically, all iterators -can become invalid if a memory reallocation occurs. For example, -if some member of the vector is removed, iterators that point to -the removed element and to all following elements become -invalidated. Inserting into the middle of the vector will -invalidate all iterators. For convenience, the function back() -returns a reference to the last element in the vector, and front() -returns a reference to the first element. If the vector is -empty(), both back() and front() have undefined behavior (your -application will crash or do unpredictable things). Use back() and -front() with caution, for example: -

        -    TQValueVector<int> vec( 3 );
        -    vec.push_back( 1 );
        -    vec.push_back( 2 );
        -    vec.push_back( 3 );
        -    ...
        -    if ( !vec.empty() ) {
        -        // OK: modify the first element
        -        int& i = vec.front();
        -        i = 18;
        -    }
        -    ...
        -    TQValueVector<double> dvec;
        -    double d = dvec.back(); // undefined behavior
        -    
        - -

        Because TQValueVector manages memory dynamically, it is recommended -that you contruct a vector with an initial size. Inserting and -removing elements happens fastest when: -

          -
        • Inserting or removing elements happens at the end() of the -vector; -
        • The vector does not need to allocate additional memory. -
        -

        By creating a TQValueVector with a sufficiently large initial size, -there will be less memory allocations. Do not use an initial size -that is too big, since it will still take time to construct all -the empty entries, and the extra space will be wasted if it is -never used. -

        Because TQValueVector is value-based there is no need to be careful -about deleting elements in the vector. The vector holds its own -copies and will free them if the corresponding member or the -vector itself is deleted. You can force the vector to free all of -its items with clear(). -

        TQValueVector is shared implicitly, which means it can be copied in -constant time. If multiple TQValueVector instances share the same -data and one needs to modify its contents, this modifying instance -makes a copy and modifies its private copy; it thus does not -affect the other instances. This is often called "copy on write". -If a TQValueVector is being used in a multi-threaded program, you -must protect all access to the vector. See TQMutex. -

        There are several ways to insert elements into the vector. The -push_back() function insert elements into the end of the vector, -and is usually fastest. The insert() function can be used to add -elements at specific positions within the vector. -

        Items can be also be removed from the vector in several ways. -There are several variants of the erase() function which removes a -specific element, or range of elements, from the vector. -

        Vectors can be also sorted with various STL algorithms , or it can -be sorted using the TQt Template Library. -For example with qHeapSort(): -

        Example: -

        -    TQValueVector<int> v( 4 );
        -    v.push_back( 5 );
        -    v.push_back( 8 );
        -    v.push_back( 3 );
        -    v.push_back( 4 );
        -    qHeapSort( v );
        -    
        - -

        TQValueVector stores its elements in contiguous memory. This means -that you can use a TQValueVector in any situation that requires an -array. -

        See also TQt Template Library Classes, Implicitly and Explicitly Shared Classes, and Non-GUI Classes. - -


        Member Type Documentation

        -

        TQValueVector::ConstIterator

        -The vector's const iterator type. -

        TQValueVector::Iterator

        -The vector's iterator type. -

        TQValueVector::ValueType

        -The type of the object stored in the vector. -

        TQValueVector::const_iterator

        -The vector's const iterator type. -

        TQValueVector::const_pointer

        -The const pointer to T type. -

        TQValueVector::const_reference

        -The const reference to T type. -

        TQValueVector::difference_type

        -A signed integral type used to represent the distance between two iterators. -

        TQValueVector::iterator

        -The vector's iterator type. -

        TQValueVector::pointer

        -The pointer to T type. -

        TQValueVector::reference

        -The reference to T type. -

        TQValueVector::size_type

        -An unsigned integral type, used to represent various sizes. -

        TQValueVector::value_type

        -The type of the object stored in the vector. -

        Member Function Documentation

        -

        TQValueVector::TQValueVector () -

        - -

        Constructs an empty vector without any elements. To create a -vector which reserves an initial amount of space for elements, use -TQValueVector(size_type n). - -

        TQValueVector::TQValueVector ( const TQValueVector<T> & v ) -

        - -

        Constructs a copy of v. -

        This operation costs O(1) time because TQValueVector is implicitly shared. -

        The first modification to the vector does takes O(n) time, because -the elements must be copied. - -

        TQValueVector::TQValueVector ( size_type n, const T & val = T ( ) ) -

        - -

        Constructs a vector with an initial size of n elements. Each -element is initialized with the value of val. - -

        TQValueVector::TQValueVector ( std::vector<T> & v ) -

        - -

        Constructs a copy of v. - -

        TQValueVector::TQValueVector ( const std::vector<T> & v ) -

        - -

        This operation costs O(n) time because v is copied. - -

        TQValueVector::~TQValueVector () -

        - -

        Destroys the vector, destroying all elements and freeing the -allocated memory. References to the values in the vector and all -iterators of this vector become invalidated. Note that it is -impossible for an iterator to check whether or not it is valid: -TQValueVector is tuned for performance, not for error checking. - -

        void TQValueVector::append ( const T & x ) -

        - -

        Appends a copy of x to the end of the vector. -

        See also push_back() and insert(). - -

        reference TQValueVector::at ( size_type i, bool * ok = 0 ) -

        - -

        Returns a reference to the element with index i. If ok is -non-null, and the index i is out of range, *ok is set to -FALSE and the returned reference is undefined. If the index i -is within the range of the vector, and ok is non-null, *ok -is set to TRUE and the returned reference is well defined. - -

        const_reference TQValueVector::at ( size_type i, bool * ok = 0 ) const -

        - -

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

        Returns a const reference to the element with index i. If ok -is non-null, and the index i is out of range, *ok is set to -FALSE and the returned reference is undefined. If the index i -is within the range of the vector, and ok is non-null, *ok -is set to TRUE and the returned reference is well defined. - -

        reference TQValueVector::back () -

        - -

        Returns a reference to the last element in the vector. If there is -no last element, this function has undefined behavior. -

        See also empty() and front(). - -

        const_reference TQValueVector::back () const -

        - -

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

        Returns a const reference to the last element in the vector. If -there is no last element, this function has undefined behavior. -

        See also empty() and front(). - -

        iterator TQValueVector::begin () -

        - -

        Returns an iterator pointing to the beginning of the vector. If -the vector is empty(), the returned iterator will equal end(). - -

        const_iterator TQValueVector::begin () const -

        - -

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

        Returns a const iterator pointing to the beginning of the vector. -If the vector is empty(), the returned iterator will equal end(). - -

        size_type TQValueVector::capacity () const -

        - -

        Returns the maximum number of elements that can be stored in the -vector without forcing memory reallocation. If memory reallocation -takes place, some or all iterators may become invalidated. - -

        void TQValueVector::clear () -

        - -

        Removes all the elements from the vector. - -

        const_iterator TQValueVector::constBegin () const -

        - -

        Returns a const iterator pointing to the beginning of the vector. -If the vector is empty(), the returned iterator will equal end(). -

        See also constEnd(). - -

        const_iterator TQValueVector::constEnd () const -

        - -

        Returns a const iterator pointing behind the last element of the -vector. -

        See also constBegin(). - -

        size_type TQValueVector::count () const -

        - -

        Returns the number of items in the vector. -

        See also isEmpty(). - -

        bool TQValueVector::empty () const -

        - -

        Returns TRUE if the vector is empty; otherwise returns FALSE. -Equivalent to size()==0, only faster. -

        This function is provided for STL compatibility. It is equivalent -to isEmpty(). -

        See also size(). - -

        iterator TQValueVector::end () -

        - -

        Returns an iterator pointing behind the last element of the -vector. - -

        const_iterator TQValueVector::end () const -

        - -

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

        Returns a const iterator pointing behind the last element of the -vector. - -

        iterator TQValueVector::erase ( iterator pos ) -

        - -

        Removes the element at position pos and returns the position of -the next element. - -

        iterator TQValueVector::erase ( iterator first, iterator last ) -

        - -

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

        Removes all elements from first up to but not including last -and returns the position of the next element. - -

        reference TQValueVector::first () -

        - -

        Returns a reference to the first item in the vector. If there is -no first item, this function has undefined behavior. -

        See also empty() and last(). - -

        const_reference TQValueVector::first () const -

        - -

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

        -

        reference TQValueVector::front () -

        - -

        Returns a reference to the first element in the vector. If there -is no first element, this function has undefined behavior. -

        See also empty() and back(). - -

        const_reference TQValueVector::front () const -

        - -

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

        Returns a const reference to the first element in the vector. If -there is no first element, this function has undefined behavior. -

        See also empty() and back(). - -

        iterator TQValueVector::insert ( iterator pos, const T & x ) -

        - -

        Inserts a copy of x at the position immediately before pos. -

        See also push_back(). - -

        iterator TQValueVector::insert ( iterator pos, size_type n, const T & x ) -

        - -

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

        Inserts n copies of x immediately before position x. -

        See also push_back(). - -

        bool TQValueVector::isEmpty () const -

        - -

        Returns TRUE if the vector is empty; returns FALSE otherwise. -

        See also count(). - -

        reference TQValueVector::last () -

        - -

        Returns a reference to the last item in the vector. If there is no -last item, this function has undefined behavior. -

        See also empty() and first(). - -

        const_reference TQValueVector::last () const -

        - -

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

        -

        TQValueVector<T> & TQValueVector::operator= ( const TQValueVector<T> & v ) -

        - -

        Assigns v to this vector and returns a reference to this vector. -

        All iterators of the current vector become invalidated by this -operation. The cost of such an assignment is O(1) since -TQValueVector is implicitly shared. - -

        TQValueVector<T> & TQValueVector::operator= ( const std::vector<T> & v ) -

        - -

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

        Assigns v to this vector and returns a reference to this vector. -

        All iterators of the current vector become invalidated by this -operation. The cost of this assignment is O(n) since v is -copied. - -

        bool TQValueVector::operator== ( const TQValueVector<T> & x ) const -

        - -

        Returns TRUE if each element in this vector equals each -corresponding element in x; otherwise returns FALSE. - -

        bool TQValueVector::operator== ( const TQValueVector<T> & x ) -

        - -

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

        Returns TRUE if each element in this vector equals each -corresponding element in x; otherwise returns FALSE. - -

        reference TQValueVector::operator[] ( size_type i ) -

        - -

        Returns a reference to the element at index i. If i is out -of range, this function has undefined behavior. -

        See also at(). - -

        const_reference TQValueVector::operator[] ( size_type i ) const -

        - -

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

        Returns a const reference to the element at index i. If i is -out of range, this function has undefined behavior. -

        See also at(). - -

        void TQValueVector::pop_back () -

        - -

        Removes the last item from the vector. -

        This function is provided for STL compatibility. - -

        void TQValueVector::push_back ( const T & x ) -

        - -

        Appends a copy of x to the end of the vector. This is the -fastest way to add new elements. -

        This function is provided for STL compatibility. It is equivalent -to append(). -

        See also insert(). - -

        void TQValueVector::reserve ( size_type n ) -

        - -

        Increases the vector's capacity. If n is less than or equal to -capacity(), nothing happens. Otherwise, additional memory is -allocated so that capacity() will be increased to a value greater -than or equal to n. All iterators will then become invalidated. -Note that the vector's size() and the values of existing elements -remain unchanged. - -

        void TQValueVector::resize ( size_type n, const T & val = T ( ) ) -

        - -

        Changes the size of the vector to n. If n is greater than -the current size(), elements are added to the end and initialized -with the value of val. If n is less than size(), elements -are removed from the end. If n is equal to size() nothing -happens. - -

        size_type TQValueVector::size () const -

        - -

        Returns the number of elements in the vector. -

        This function is provided for STL compatibility. It is equivalent -to count(). -

        See also empty(). - - -


        -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/ntqvariant.html b/doc/html/ntqvariant.html index 47f9b7434..7ee8ef8a3 100644 --- a/doc/html/ntqvariant.html +++ b/doc/html/ntqvariant.html @@ -222,8 +222,8 @@ return a reference to the new contents of the variant. v.asStringList().append( "Hello" );
        -

        You can even store TQValueLists and -TQMaps in a variant, so you can easily construct +

        You can even store TQValueLists and +TQMaps in a variant, so you can easily construct arbitrarily complex data structures of arbitrary types. This is very powerful and versatile, but may prove less memory and speed efficient than storing specific types in standard data structures. @@ -261,10 +261,10 @@ contain.

      • TQVariant::Image - a TQImage
      • TQVariant::Int - an int
      • TQVariant::KeySequence - a TQKeySequence -
      • TQVariant::List - a TQValueList +
      • TQVariant::List - a TQValueList
      • TQVariant::LongLong - a long long
      • TQVariant::ULongLong - an unsigned long long -
      • TQVariant::Map - a TQMap +
      • TQVariant::Map - a TQMap
      • TQVariant::Palette - a TQPalette
      • TQVariant::Pen - a TQPen
      • TQVariant::Pixmap - a TQPixmap @@ -426,11 +426,11 @@ Constructs a new variant with a key sequence value, val. Constructs a new variant with a pen value, val. -

        TQVariant::TQVariant ( const TQValueList<TQVariant> & val ) +

        TQVariant::TQVariant ( const TQValueList<TQVariant> & val )

        Constructs a new variant with a list value, val. -

        TQVariant::TQVariant ( const TQMap<TQString, TQVariant> & val ) +

        TQVariant::TQVariant ( const TQMap<TQString, TQVariant> & val )

        Constructs a new variant with a map of TQVariants, val. @@ -583,15 +583,15 @@ is not possible then the variant is set to an empty key sequence.

        Returns a reference to the stored key sequence.

        See also toKeySequence(). -

        TQValueList<TQVariant> & TQVariant::asList () +

        TQValueList<TQVariant> & TQVariant::asList ()

        Returns the variant's value as variant list reference.

        Note that if you want to iterate over the list, you should iterate over a copy, e.g.

        -    TQValueList<TQVariant> list = myVariant.asList();
        -    TQValueList<TQVariant>::Iterator it = list.begin();
        -    while( it != list.end() ) {
        +    TQValueList<TQVariant> list = myVariant.asList();
        +    TQValueList<TQVariant>::Iterator it = list.begin();
        +    while( it != list.end() ) {
                 myProcessing( *it );
                 ++it;
             }
        @@ -602,15 +602,15 @@ over a copy, e.g.
         
         Returns the variant's value as long long reference.
         
        -

        TQMap<TQString, TQVariant> & TQVariant::asMap () +

        TQMap<TQString, TQVariant> & TQVariant::asMap ()

        Returns the variant's value as variant map reference.

        Note that if you want to iterate over the map, you should iterate over a copy, e.g.

        -    TQMap<TQString, TQVariant> map = myVariant.asMap();
        -    TQMap<TQString, TQVariant>::Iterator it = map.begin();
        -    while( it != map.end() ) {
        +    TQMap<TQString, TQVariant> map = myVariant.asMap();
        +    TQMap<TQString, TQVariant>::Iterator it = map.begin();
        +    while( it != map.end() ) {
                 myProcessing( *it );
                 ++it;
             }
        @@ -704,8 +704,8 @@ is not possible the variant is set to an empty string list.
         iterate over a copy, e.g.
         
             TQStringList list = myVariant.asStringList();
        -    TQStringList::Iterator it = list.begin();
        -    while( it != list.end() ) {
        +    TQStringList::Iterator it = list.begin();
        +    while( it != list.end() ) {
                 myProcessing( *it );
                 ++it;
             }
        @@ -783,35 +783,35 @@ Returns TRUE if this is a NULL variant, FALSE otherwise.
         

        Returns TRUE if the storage type of this variant is not TQVariant::Invalid; otherwise returns FALSE. -

        TQValueListConstIterator<TQVariant> TQVariant::listBegin () const +

        TQValueListConstIterator<TQVariant> TQVariant::listBegin () const

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

        Returns an iterator to the first item in the list if the variant's type is appropriate; otherwise returns a null iterator. -

        TQValueListConstIterator<TQVariant> TQVariant::listEnd () const +

        TQValueListConstIterator<TQVariant> TQVariant::listEnd () const

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

        Returns the end iterator for the list if the variant's type is appropriate; otherwise returns a null iterator. -

        TQMapConstIterator<TQString, TQVariant> TQVariant::mapBegin () const +

        TQMapConstIterator<TQString, TQVariant> TQVariant::mapBegin () const

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

        Returns an iterator to the first item in the map, if the variant's type is appropriate; otherwise returns a null iterator. -

        TQMapConstIterator<TQString, TQVariant> TQVariant::mapEnd () const +

        TQMapConstIterator<TQString, TQVariant> TQVariant::mapEnd () const

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

        Returns the end iterator for the map, if the variant's type is appropriate; otherwise returns a null iterator. -

        TQMapConstIterator<TQString, TQVariant> TQVariant::mapFind ( const TQString & key ) const +

        TQMapConstIterator<TQString, TQVariant> TQVariant::mapFind ( const TQString & key ) const

        This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. @@ -842,14 +842,14 @@ performed. Compares this TQVariant with v and returns TRUE if they are equal; otherwise returns FALSE. -

        TQValueListConstIterator<TQString> TQVariant::stringListBegin () const +

        TQValueListConstIterator<TQString> TQVariant::stringListBegin () const

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

        Returns an iterator to the first string in the list if the variant's type is StringList; otherwise returns a null iterator. -

        TQValueListConstIterator<TQString> TQVariant::stringListEnd () const +

        TQValueListConstIterator<TQString> TQVariant::stringListEnd () const

        This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. @@ -972,16 +972,16 @@ Returns the variant as a TQKeySequence if the to a KeySequence; otherwise returns an empty key sequence.

        See also asKeySequence() and canCast(). -

        const TQValueList<TQVariant> TQVariant::toList () const +

        const TQValueList<TQVariant> TQVariant::toList () const

        -Returns the variant as a TQValueList if the variant has +Returns the variant as a TQValueList if the variant has type() List or StringList; otherwise returns an empty list.

        Note that if you want to iterate over the list, you should iterate over a copy, e.g.

        -    TQValueList<TQVariant> list = myVariant.toList();
        -    TQValueList<TQVariant>::Iterator it = list.begin();
        -    while( it != list.end() ) {
        +    TQValueList<TQVariant> list = myVariant.toList();
        +    TQValueList<TQVariant>::Iterator it = list.begin();
        +    while( it != list.end() ) {
                 myProcessing( *it );
                 ++it;
             }
        @@ -997,16 +997,16 @@ to LongLong; otherwise returns 0.
         converted to an int; otherwise *ok is set to FALSE.
         

        See also asLongLong() and canCast(). -

        const TQMap<TQString, TQVariant> TQVariant::toMap () const +

        const TQMap<TQString, TQVariant> TQVariant::toMap () const

        -Returns the variant as a TQMap if the variant has +Returns the variant as a TQMap if the variant has type() Map; otherwise returns an empty map.

        Note that if you want to iterate over the map, you should iterate over a copy, e.g.

        -    TQMap<TQString, TQVariant> map = myVariant.toMap();
        -    TQMap<TQString, TQVariant>::Iterator it = map.begin();
        -    while( it != map.end() ) {
        +    TQMap<TQString, TQVariant> map = myVariant.toMap();
        +    TQMap<TQString, TQVariant>::Iterator it = map.begin();
        +    while( it != map.end() ) {
                 myProcessing( *it );
                 ++it;
             }
        @@ -1083,8 +1083,8 @@ otherwise returns an empty list.
         over a copy, e.g.
         
             TQStringList list = myVariant.toStringList();
        -    TQStringList::Iterator it = list.begin();
        -    while( it != list.end() ) {
        +    TQStringList::Iterator it = list.begin();
        +    while( it != list.end() ) {
                 myProcessing( *it );
                 ++it;
             }
        diff --git a/doc/html/porting.html b/doc/html/porting.html
        index f663d5c13..e0850be85 100644
        --- a/doc/html/porting.html
        +++ b/doc/html/porting.html
        @@ -177,7 +177,7 @@ the top of the file giving the error.
         
      • <ntqregexp.h>
      • <ntqstrlist.h>
      • <ntqstyle.h> -
      • <ntqvaluelist.h> +
      • <tqvaluelist.h>

      Namespace

      @@ -649,7 +649,7 @@ without breaking source compatibility. modal dialog instead.

      TQSortedList

      -

      The TQSortedList class is now obsolete. Consider using a TQDict, a TQMap +

      The TQSortedList class is now obsolete. Consider using a TQDict, a TQMap or a plain TQPtrList instead.

      TQTableView

      diff --git a/doc/html/properties.html b/doc/html/properties.html index cc7fcb559..aee2a5ba5 100644 --- a/doc/html/properties.html +++ b/doc/html/properties.html @@ -117,15 +117,15 @@ enumeration type declared in the class itself. Since MyClass uses the enumeration type Priority for the property, this type must be registered with the property system as well.

      There are two exceptions to the above: The type of a property can also -be either TQValueList<TQVariant> or TQMap<TQString,TQVariant>. In -these cases the type must be specified as TQValueList or as TQMap +be either TQValueList<TQVariant> or TQMap<TQString,TQVariant>. In +these cases the type must be specified as TQValueList or as TQMap (i.e. without their template parameters).

      It is possible to set a value by name, like this:

           obj->setProperty( "priority", "VeryHigh" );
       
      -In the case of TQValueList and TQMap properties the value passes +In the case of TQValueList and TQMap properties the value passes is a TQVariant whose value is the entire list or map.

      Enumeration types are registered with the TQ_ENUMS macro. Here's the final class declaration including the property related declarations: diff --git a/doc/html/propertydocs b/doc/html/propertydocs index fe702dcc9..555610418 100644 --- a/doc/html/propertydocs +++ b/doc/html/propertydocs @@ -642,8 +642,8 @@ the form 'fieldname order', e.g. 'id ASC', 'surname DESC'. over a copy, e.g. <pre> <a href="ntqstringlist.html">QStringList</a> list = myDataBrowser.sort(); - QStringList::Iterator it = list.<a href="ntqvaluelist.html#begin">begin</a>(); - while( it != list.<a href="ntqvaluelist.html#end">end</a>() ) { + QStringList::Iterator it = list.<a href="tqvaluelist.html#begin">begin</a>(); + while( it != list.<a href="tqvaluelist.html#end">end</a>() ) { myProcessing( *it ); ++it; } @@ -806,8 +806,8 @@ each item having the form 'fieldname order' (e.g., 'id ASC', iterate over a copy, e.g. <pre> <a href="ntqstringlist.html">QStringList</a> list = myDataTable.sort(); - QStringList::Iterator it = list.<a href="ntqvaluelist.html#begin">begin</a>(); - while( it != list.<a href="ntqvaluelist.html#end">end</a>() ) { + QStringList::Iterator it = list.<a href="tqvaluelist.html#begin">begin</a>(); + while( it != list.<a href="tqvaluelist.html#end">end</a>() ) { myProcessing( *it ); ++it; } @@ -1282,14 +1282,14 @@ the mode isn't ExistingFiles selectedFiles is an empty list. iterate over a copy, e.g. <pre> <a href="ntqstringlist.html">QStringList</a> list = myFileDialog.selectedFiles(); - QStringList::Iterator it = list.<a href="ntqvaluelist.html#begin">begin</a>(); - while( it != list.<a href="ntqvaluelist.html#end">end</a>() ) { + QStringList::Iterator it = list.<a href="tqvaluelist.html#begin">begin</a>(); + while( it != list.<a href="tqvaluelist.html#end">end</a>() ) { myProcessing( *it ); ++it; } </pre> -<p> <p>See also <a href="ntqfiledialog.html#selectedFile-prop">selectedFile</a>, <a href="ntqfiledialog.html#selectedFilter-prop">selectedFilter</a>, and <a href="ntqvaluelist.html#empty">QValueList::empty</a>(). +<p> <p>See also <a href="ntqfiledialog.html#selectedFile-prop">selectedFile</a>, <a href="ntqfiledialog.html#selectedFilter-prop">selectedFilter</a>, and <a href="tqvaluelist.html#empty">TQValueList::empty</a>(). <p>Get this property's value with <a href="ntqfiledialog.html#selectedFiles">selectedFiles</a>(). diff --git a/doc/html/qaxbase.html b/doc/html/qaxbase.html index 574fc1c1e..f93e46113 100644 --- a/doc/html/qaxbase.html +++ b/doc/html/qaxbase.html @@ -176,7 +176,7 @@ type that is used in the prototype of signals and slots for out-parameters. SAFEARRAY(VARIANT) TQValueList<TQVariant> -const TQValueList<TQVariant>& +const TQValueList<TQVariant>& TQValueList<TQVariant>& SAFEARRAY(BYTE) @@ -246,15 +246,15 @@ use the TQAxBase API like this: connect( this, TQ_SIGNAL(clicked(int)), &object, TQ_SLOT(showColumn(int)) ); bool ok = object.dynamicCall( "addColumn(const TQString&)", "Column 1" ).toBool(); - TQValueList<TQVariant> varlist; - TQValueList<TQVariant> parameters; + TQValueList<TQVariant> varlist; + TQValueList<TQVariant> parameters; parameters << TQVariant( varlist ); int n = object.dynamicCall( "fillList(TQValueList<TQVariant>&)", parameters ).toInt(); TQAxObject *item = object.querySubItem( "item(int)", 5 );

      -

      Note that the TQValueList the object should fill has to be provided as an +

      Note that the TQValueList the object should fill has to be provided as an element in the parameter list of TQVariants.

      If you need to access properties or pass parameters of unsupported datatypes you must access the COM object directly through its @@ -281,7 +281,7 @@ data as provided by the COM event.


      Member Type Documentation

      TQAxBase::PropertyBag

      -

      A TQMap that can store properties as name:value pairs. +

      A TQMap that can store properties as name:value pairs.


      Member Function Documentation

      TQAxBase::TQAxBase ( IUnknown * iface = 0 ) @@ -396,7 +396,7 @@ use the function directly.

      This is also more efficient.

      Example: qutlook/centralwidget.cpp. -

      TQVariant TQAxBase::dynamicCall ( const TQCString & function, TQValueList<TQVariant> & vars ) +

      TQVariant TQAxBase::dynamicCall ( const TQCString & function, TQValueList<TQVariant> & vars )

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

      Calls the COM object's method function, passing the diff --git a/doc/html/qaxobject.html b/doc/html/qaxobject.html index 8f4800927..a40da7967 100644 --- a/doc/html/qaxobject.html +++ b/doc/html/qaxobject.html @@ -151,7 +151,7 @@ use the function directly.

      This is also more efficient.

      Example: qutlook/centralwidget.cpp. -

      TQVariant TQAxBase::dynamicCall ( const TQCString & function, TQValueList<TQVariant> & vars ) +

      TQVariant TQAxBase::dynamicCall ( const TQCString & function, TQValueList<TQVariant> & vars )

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

      Calls the COM object's method function, passing the diff --git a/doc/html/qaxscript.html b/doc/html/qaxscript.html index 88385d109..50d90a2f1 100644 --- a/doc/html/qaxscript.html +++ b/doc/html/qaxscript.html @@ -110,7 +110,7 @@ the function call failed.

      See TQAxScriptManager::call() for more information about how to call script functions. -

      TQVariant TQAxScript::call ( const TQString & function, TQValueList<TQVariant> & arguments ) +

      TQVariant TQAxScript::call ( const TQString & function, TQValueList<TQVariant> & arguments )

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

      Calls function passing arguments as parameters, and returns diff --git a/doc/html/qaxscriptmanager.html b/doc/html/qaxscriptmanager.html index 7e6beb1c3..dbe0702e7 100644 --- a/doc/html/qaxscriptmanager.html +++ b/doc/html/qaxscriptmanager.html @@ -124,7 +124,7 @@ TQVariant&", for example, to call a JavaScript function use

      -    TQValueList args;
      +    TQValueList args;
           args << 5;
           script->call("setNumber(const TQVariant&)", args);
           
      @@ -142,7 +142,7 @@ using TQAxScript::call() on the respective Note that calling this function can be significantely slower than using call() on the respective TQAxScript directly. -

      TQVariant TQAxScriptManager::call ( const TQString & function, TQValueList<TQVariant> & arguments ) +

      TQVariant TQAxScriptManager::call ( const TQString & function, TQValueList<TQVariant> & arguments )

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

      Calls function passing arguments as parameters, and returns the result. Returns when the script's execution has finished. diff --git a/doc/html/qaxserver.html b/doc/html/qaxserver.html index 754d122ad..542e0a6b2 100644 --- a/doc/html/qaxserver.html +++ b/doc/html/qaxserver.html @@ -562,7 +562,7 @@ slots are: TQPixmap& [in, out] IPictureDisp** -TQValueList<TQVariant>, const TQValueList<TQVariant>& +TQValueList<TQVariant>, const TQValueList<TQVariant>& [in] SAFEARRAY(VARIANT) TQValueList<TQVariant>& diff --git a/doc/html/qaxwidget.html b/doc/html/qaxwidget.html index 0ede19499..283b04741 100644 --- a/doc/html/qaxwidget.html +++ b/doc/html/qaxwidget.html @@ -168,7 +168,7 @@ use the function directly.

      This is also more efficient.

      Example: qutlook/centralwidget.cpp. -

      TQVariant TQAxBase::dynamicCall ( const TQCString & function, TQValueList<TQVariant> & vars ) +

      TQVariant TQAxBase::dynamicCall ( const TQCString & function, TQValueList<TQVariant> & vars )

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

      Calls the COM object's method function, passing the diff --git a/doc/html/qdockarea-h.html b/doc/html/qdockarea-h.html index 0ebe86323..50d7c1133 100644 --- a/doc/html/qdockarea-h.html +++ b/doc/html/qdockarea-h.html @@ -82,7 +82,7 @@ body { background: #ffffff; color: black; } #include "ntqptrlist.h" #include "ntqdockwindow.h" #include "ntqlayout.h" -#include "ntqvaluelist.h" +#include "tqvaluelist.h" #include "ntqguardedptr.h" #include "ntqtextstream.h" #endif // QT_H diff --git a/doc/html/qevent-h.html b/doc/html/qevent-h.html index ca644045e..ca6636d9b 100644 --- a/doc/html/qevent-h.html +++ b/doc/html/qevent-h.html @@ -82,7 +82,7 @@ body { background: #ffffff; color: black; } #include "ntqregion.h" #include "ntqnamespace.h" #include "ntqmime.h" -#include "ntqpair.h" +#include "tqpair.h" #endif // QT_H class TQ_EXPORT TQEvent: public TQt // event base class diff --git a/doc/html/qfontdatabase-h.html b/doc/html/qfontdatabase-h.html index f9ccb7d73..af51f39e0 100644 --- a/doc/html/qfontdatabase-h.html +++ b/doc/html/qfontdatabase-h.html @@ -82,7 +82,7 @@ body { background: #ffffff; color: black; } #include "ntqstring.h" #include "ntqstringlist.h" #include "ntqfont.h" -#include "ntqvaluelist.h" +#include "tqvaluelist.h" #endif // QT_H diff --git a/doc/html/qiconviewitem.html b/doc/html/qiconviewitem.html index 3fe8a34ed..8bba32bed 100644 --- a/doc/html/qiconviewitem.html +++ b/doc/html/qiconviewitem.html @@ -277,7 +277,7 @@ Returns TRUE if the user is allowed to drop something onto the item; otherwise returns FALSE.

      See also setDropEnabled(). -

      void TQIconViewItem::dropped ( TQDropEvent * e, const TQValueList<TQIconDragItem> & lst ) [virtual protected] +

      void TQIconViewItem::dropped ( TQDropEvent * e, const TQValueList<TQIconDragItem> & lst ) [virtual protected]

      This function is called when something is dropped on the item. e provides all the information about the drop. If the drag object diff --git a/doc/html/qmacmime.html b/doc/html/qmacmime.html index 4ac2d7c66..03ccf64e5 100644 --- a/doc/html/qmacmime.html +++ b/doc/html/qmacmime.html @@ -107,7 +107,7 @@ Returns a list of all currently defined TQMacMime objects of type t. mime and flav; otherwise returns FALSE.

      All subclasses must reimplement this pure virtual function. -

      TQValueList<TQByteArray> TQMacMime::convertFromMime ( TQByteArray data, const char * mime, int flav ) [pure virtual] +

      TQValueList<TQByteArray> TQMacMime::convertFromMime ( TQByteArray data, const char * mime, int flav ) [pure virtual]

      Returns data converted from MIME type mime @@ -116,7 +116,7 @@ to Mac flavor flav. value may contain trailing data.

      All subclasses must reimplement this pure virtual function. -

      TQByteArray TQMacMime::convertToMime ( TQValueList<TQByteArray> data, const char * mime, int flav ) [pure virtual] +

      TQByteArray TQMacMime::convertToMime ( TQValueList<TQByteArray> data, const char * mime, int flav ) [pure virtual]

      Returns data converted from Mac flavor flav to MIME type mime. diff --git a/doc/html/qmap-h.html b/doc/html/qmap-h.html deleted file mode 100644 index 044433441..000000000 --- a/doc/html/qmap-h.html +++ /dev/null @@ -1,921 +0,0 @@ - - - - - -ntqmap.h Include File - - - - - - - -
      - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

      ntqmap.h

      - -

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


      -
      -/****************************************************************************
      -** $Id: qt/ntqmap.h   3.3.8   edited Jan 11 14:38 $
      -**
      -** Definition of TQMap class
      -**
      -** Created : 990406
      -**
      -** 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 TQMAP_H
      -#define TQMAP_H
      -
      -#ifndef QT_H
      -#include "ntqglobal.h"
      -#include "ntqshared.h"
      -#include "ntqdatastream.h"
      -#include "ntqpair.h"
      -#include "ntqvaluelist.h"
      -#endif // QT_H
      -
      -#ifndef TQT_NO_STL
      -#include <iterator>
      -#include <map>
      -#endif
      -
      -//#define QT_CHECK_MAP_RANGE
      -
      -struct TQ_EXPORT TQMapNodeBase
      -{
      -    enum Color { Red, Black };
      -
      -    TQMapNodeBase* left;
      -    TQMapNodeBase* right;
      -    TQMapNodeBase* parent;
      -
      -    Color color;
      -
      -    TQMapNodeBase* minimum() {
      -	TQMapNodeBase* x = this;
      -	while ( x->left )
      -	    x = x->left;
      -	return x;
      -    }
      -
      -    TQMapNodeBase* maximum() {
      -	TQMapNodeBase* x = this;
      -	while ( x->right )
      -	    x = x->right;
      -	return x;
      -    }
      -};
      -
      -
      -template <class K, class T>
      -struct TQMapNode : public TQMapNodeBase
      -{
      -    TQMapNode( const K& _key, const T& _data ) { data = _data; key = _key; }
      -    TQMapNode( const K& _key )	   { key = _key; }
      -    TQMapNode( const TQMapNode<K,T>& _n ) { key = _n.key; data = _n.data; }
      -    TQMapNode() { }
      -    T data;
      -    K key;
      -};
      -
      -
      -template<class K, class T>
      -class TQMapIterator
      -{
      - public:
      -    /**
      -     * Typedefs
      -     */
      -    typedef TQMapNode< K, T >* NodePtr;
      -#ifndef TQT_NO_STL
      -    typedef std::bidirectional_iterator_tag  iterator_category;
      -#endif
      -    typedef T          value_type;
      -#ifndef TQT_NO_STL
      -    typedef ptrdiff_t  difference_type;
      -#else
      -    typedef int difference_type;
      -#endif
      -    typedef T*         pointer;
      -    typedef T&         reference;
      -
      -    /**
      -     * Variables
      -     */
      -    TQMapNode<K,T>* node;
      -
      -    /**
      -     * Functions
      -     */
      -    TQMapIterator() : node( 0 ) {}
      -    TQMapIterator( TQMapNode<K,T>* p ) : node( p ) {}
      -    TQMapIterator( const TQMapIterator<K,T>& it ) : node( it.node ) {}
      -
      -    bool operator==( const TQMapIterator<K,T>& it ) const { return node == it.node; }
      -    bool operator!=( const TQMapIterator<K,T>& it ) const { return node != it.node; }
      -    T& operator*() { return node->data; }
      -    const T& operator*() const { return node->data; }
      -    // UDT for T = x*
      -    // T* operator->() const { return &node->data; }
      -
      -    const K& key() const { return node->key; }
      -    T& data() { return node->data; }
      -    const T& data() const { return node->data; }
      -
      -private:
      -    int inc();
      -    int dec();
      -
      -public:
      -    TQMapIterator<K,T>& operator++() {
      -	inc();
      -	return *this;
      -    }
      -
      -    TQMapIterator<K,T> operator++(int) {
      -	TQMapIterator<K,T> tmp = *this;
      -	inc();
      -	return tmp;
      -    }
      -
      -    TQMapIterator<K,T>& operator--() {
      -	dec();
      -	return *this;
      -    }
      -
      -    TQMapIterator<K,T> operator--(int) {
      -	TQMapIterator<K,T> tmp = *this;
      -	dec();
      -	return tmp;
      -    }
      -};
      -
      -template <class K, class T>
      -TQ_INLINE_TEMPLATES int TQMapIterator<K,T>::inc()
      -{
      -    TQMapNodeBase* tmp = node;
      -    if ( tmp->right ) {
      -	tmp = tmp->right;
      -	while ( tmp->left )
      -	    tmp = tmp->left;
      -    } else {
      -	TQMapNodeBase* y = tmp->parent;
      -	while (tmp == y->right) {
      -	    tmp = y;
      -	    y = y->parent;
      -	}
      -	if (tmp->right != y)
      -	    tmp = y;
      -    }
      -    node = (NodePtr)tmp;
      -    return 0;
      -}
      -
      -template <class K, class T>
      -TQ_INLINE_TEMPLATES int TQMapIterator<K,T>::dec()
      -{
      -    TQMapNodeBase* tmp = node;
      -    if (tmp->color == TQMapNodeBase::Red &&
      -	tmp->parent->parent == tmp ) {
      -	tmp = tmp->right;
      -    } else if (tmp->left != 0) {
      -	TQMapNodeBase* y = tmp->left;
      -	while ( y->right )
      -	    y = y->right;
      -	tmp = y;
      -    } else {
      -	TQMapNodeBase* y = tmp->parent;
      -	while (tmp == y->left) {
      -	    tmp = y;
      -	    y = y->parent;
      -	}
      -	tmp = y;
      -    }
      -    node = (NodePtr)tmp;
      -    return 0;
      -}
      -
      -template<class K, class T>
      -class TQMapConstIterator
      -{
      - public:
      -    /**
      -     * Typedefs
      -     */
      -    typedef TQMapNode< K, T >* NodePtr;
      -#ifndef TQT_NO_STL
      -    typedef std::bidirectional_iterator_tag  iterator_category;
      -#endif
      -    typedef T          value_type;
      -#ifndef TQT_NO_STL
      -    typedef ptrdiff_t  difference_type;
      -#else
      -    typedef int difference_type;
      -#endif
      -    typedef const T*   pointer;
      -    typedef const T&   reference;
      -
      -
      -    /**
      -     * Variables
      -     */
      -    TQMapNode<K,T>* node;
      -
      -    /**
      -     * Functions
      -     */
      -    TQMapConstIterator() : node( 0 ) {}
      -    TQMapConstIterator( TQMapNode<K,T>* p ) : node( p ) {}
      -    TQMapConstIterator( const TQMapConstIterator<K,T>& it ) : node( it.node ) {}
      -    TQMapConstIterator( const TQMapIterator<K,T>& it ) : node( it.node ) {}
      -
      -    bool operator==( const TQMapConstIterator<K,T>& it ) const { return node == it.node; }
      -    bool operator!=( const TQMapConstIterator<K,T>& it ) const { return node != it.node; }
      -    const T& operator*()  const { return node->data; }
      -    // UDT for T = x*
      -    // const T* operator->() const { return &node->data; }
      -
      -    const K& key() const { return node->key; }
      -    const T& data() const { return node->data; }
      -
      -private:
      -    int inc();
      -    int dec();
      -
      -public:
      -    TQMapConstIterator<K,T>& operator++() {
      -	inc();
      -	return *this;
      -    }
      -
      -    TQMapConstIterator<K,T> operator++(int) {
      -	TQMapConstIterator<K,T> tmp = *this;
      -	inc();
      -	return tmp;
      -    }
      -
      -    TQMapConstIterator<K,T>& operator--() {
      -	dec();
      -	return *this;
      -    }
      -
      -    TQMapConstIterator<K,T> operator--(int) {
      -	TQMapConstIterator<K,T> tmp = *this;
      -	dec();
      -	return tmp;
      -    }
      -};
      -
      -template <class K, class T>
      -TQ_INLINE_TEMPLATES int TQMapConstIterator<K,T>::inc()
      -{
      -    TQMapNodeBase* tmp = node;
      -    if ( tmp->right ) {
      -	tmp = tmp->right;
      -	while ( tmp->left )
      -	    tmp = tmp->left;
      -    } else {
      -	TQMapNodeBase* y = tmp->parent;
      -	while (tmp == y->right) {
      -	    tmp = y;
      -	    y = y->parent;
      -	}
      -	if (tmp->right != y)
      -	    tmp = y;
      -    }
      -    node = (NodePtr)tmp;
      -    return 0;
      -}
      -
      -template <class K, class T>
      -TQ_INLINE_TEMPLATES int TQMapConstIterator<K,T>::dec()
      -{
      -    TQMapNodeBase* tmp = node;
      -    if (tmp->color == TQMapNodeBase::Red &&
      -	tmp->parent->parent == tmp ) {
      -	tmp = tmp->right;
      -    } else if (tmp->left != 0) {
      -	TQMapNodeBase* y = tmp->left;
      -	while ( y->right )
      -	    y = y->right;
      -	tmp = y;
      -    } else {
      -	TQMapNodeBase* y = tmp->parent;
      -	while (tmp == y->left) {
      -	    tmp = y;
      -	    y = y->parent;
      -	}
      -	tmp = y;
      -    }
      -    node = (NodePtr)tmp;
      -    return 0;
      -}
      -
      -// ### 4.0: rename to something without Private in it. Not really internal.
      -class TQ_EXPORT TQMapPrivateBase : public TQShared
      -{
      -public:
      -    TQMapPrivateBase() {
      -	node_count = 0;
      -    }
      -    TQMapPrivateBase( const TQMapPrivateBase* _map) {
      -	node_count = _map->node_count;
      -    }
      -
      -    /**
      -     * Implementations of basic tree algorithms
      -     */
      -    void rotateLeft( TQMapNodeBase* x, TQMapNodeBase*& root);
      -    void rotateRight( TQMapNodeBase* x, TQMapNodeBase*& root );
      -    void rebalance( TQMapNodeBase* x, TQMapNodeBase*& root );
      -    TQMapNodeBase* removeAndRebalance( TQMapNodeBase* z, TQMapNodeBase*& root,
      -				      TQMapNodeBase*& leftmost,
      -				      TQMapNodeBase*& rightmost );
      -
      -    /**
      -     * Variables
      -     */
      -    int node_count;
      -};
      -
      -
      -template <class Key, class T>
      -class TQMapPrivate : public TQMapPrivateBase
      -{
      -public:
      -    /**
      -     * Typedefs
      -     */
      -    typedef TQMapIterator< Key, T > Iterator;
      -    typedef TQMapConstIterator< Key, T > ConstIterator;
      -    typedef TQMapNode< Key, T > Node;
      -    typedef TQMapNode< Key, T >* NodePtr;
      -
      -    /**
      -     * Functions
      -     */
      -    TQMapPrivate();
      -    TQMapPrivate( const TQMapPrivate< Key, T >* _map );
      -    ~TQMapPrivate() { clear(); delete header; }
      -
      -    NodePtr copy( NodePtr p );
      -    void clear();
      -    void clear( NodePtr p );
      -
      -    Iterator begin()	{ return Iterator( (NodePtr)(header->left ) ); }
      -    Iterator end()	{ return Iterator( header ); }
      -    ConstIterator begin() const { return ConstIterator( (NodePtr)(header->left ) ); }
      -    ConstIterator end() const { return ConstIterator( header ); }
      -
      -    ConstIterator find(const Key& k) const;
      -
      -    void remove( Iterator it ) {
      -	NodePtr del = (NodePtr) removeAndRebalance( it.node, header->parent, header->left, header->right );
      -	delete del;
      -	--node_count;
      -    }
      -
      -#ifdef QT_QMAP_DEBUG
      -    void inorder( TQMapNodeBase* x = 0, int level = 0 ){
      -	if ( !x )
      -	    x = header->parent;
      -	if ( x->left )
      -	    inorder( x->left, level + 1 );
      -    //cout << level << " Key=" << key(x) << " Value=" << ((NodePtr)x)->data << endl;
      -	if ( x->right )
      -	    inorder( x->right, level + 1 );
      -    }
      -#endif
      -
      -#if 0
      -    Iterator insertMulti(const Key& v){
      -	TQMapNodeBase* y = header;
      -	TQMapNodeBase* x = header->parent;
      -	while (x != 0){
      -	    y = x;
      -	    x = ( v < key(x) ) ? x->left : x->right;
      -	}
      -	return insert(x, y, v);
      -    }
      -#endif
      -
      -    Iterator insertSingle( const Key& k );
      -    Iterator insert( TQMapNodeBase* x, TQMapNodeBase* y, const Key& k );
      -
      -protected:
      -    /**
      -     * Helpers
      -     */
      -    const Key& key( TQMapNodeBase* b ) const { return ((NodePtr)b)->key; }
      -
      -    /**
      -     * Variables
      -     */
      -    NodePtr header;
      -};
      -
      -
      -template <class Key, class T>
      -TQ_INLINE_TEMPLATES TQMapPrivate<Key,T>::TQMapPrivate() {
      -    header = new Node;
      -    header->color = TQMapNodeBase::Red; // Mark the header
      -    header->parent = 0;
      -    header->left = header->right = header;
      -}
      -template <class Key, class T>
      -TQ_INLINE_TEMPLATES TQMapPrivate<Key,T>::TQMapPrivate( const TQMapPrivate< Key, T >* _map ) : TQMapPrivateBase( _map ) {
      -    header = new Node;
      -    header->color = TQMapNodeBase::Red; // Mark the header
      -    if ( _map->header->parent == 0 ) {
      -	header->parent = 0;
      -	header->left = header->right = header;
      -    } else {
      -	header->parent = copy( (NodePtr)(_map->header->parent) );
      -	header->parent->parent = header;
      -	header->left = header->parent->minimum();
      -	header->right = header->parent->maximum();
      -    }
      -}
      -
      -template <class Key, class T>
      -TQ_INLINE_TEMPLATES TQ_TYPENAME TQMapPrivate<Key,T>::NodePtr TQMapPrivate<Key,T>::copy( TQ_TYPENAME TQMapPrivate<Key,T>::NodePtr p )
      -{
      -    if ( !p )
      -	return 0;
      -    NodePtr n = new Node( *p );
      -    n->color = p->color;
      -    if ( p->left ) {
      -	n->left = copy( (NodePtr)(p->left) );
      -	n->left->parent = n;
      -    } else {
      -	n->left = 0;
      -    }
      -    if ( p->right ) {
      -	n->right = copy( (NodePtr)(p->right) );
      -	n->right->parent = n;
      -    } else {
      -	n->right = 0;
      -    }
      -    return n;
      -}
      -
      -template <class Key, class T>
      -TQ_INLINE_TEMPLATES void TQMapPrivate<Key,T>::clear()
      -{
      -    clear( (NodePtr)(header->parent) );
      -    header->color = TQMapNodeBase::Red;
      -    header->parent = 0;
      -    header->left = header->right = header;
      -    node_count = 0;
      -}
      -
      -template <class Key, class T>
      -TQ_INLINE_TEMPLATES void TQMapPrivate<Key,T>::clear( TQ_TYPENAME TQMapPrivate<Key,T>::NodePtr p )
      -{
      -    while ( p != 0 ) {
      -	clear( (NodePtr)p->right );
      -	NodePtr y = (NodePtr)p->left;
      -	delete p;
      -	p = y;
      -    }
      -}
      -
      -template <class Key, class T>
      -TQ_INLINE_TEMPLATES TQ_TYPENAME TQMapPrivate<Key,T>::ConstIterator TQMapPrivate<Key,T>::find(const Key& k) const
      -{
      -    TQMapNodeBase* y = header;        // Last node
      -    TQMapNodeBase* x = header->parent; // Root node.
      -
      -    while ( x != 0 ) {
      -	// If as k <= key(x) go left
      -	if ( !( key(x) < k ) ) {
      -	    y = x;
      -	    x = x->left;
      -	} else {
      -	    x = x->right;
      -	}
      -    }
      -
      -    // Was k bigger/smaller then the biggest/smallest
      -    // element of the tree ? Return end()
      -    if ( y == header || k < key(y) )
      -	return ConstIterator( header );
      -    return ConstIterator( (NodePtr)y );
      -}
      -
      -template <class Key, class T>
      -TQ_INLINE_TEMPLATES TQ_TYPENAME TQMapPrivate<Key,T>::Iterator TQMapPrivate<Key,T>::insertSingle( const Key& k )
      -{
      -    // Search correct position in the tree
      -    TQMapNodeBase* y = header;
      -    TQMapNodeBase* x = header->parent;
      -    bool result = TRUE;
      -    while ( x != 0 ) {
      -	result = ( k < key(x) );
      -	y = x;
      -	x = result ? x->left : x->right;
      -    }
      -    // Get iterator on the last not empty one
      -    Iterator j( (NodePtr)y );
      -    if ( result ) {
      -	// Smaller then the leftmost one ?
      -	if ( j == begin() ) {
      -	    return insert(x, y, k );
      -	} else {
      -	    // Perhaps daddy is the right one ?
      -	    --j;
      -	}
      -    }
      -    // Really bigger ?
      -    if ( (j.node->key) < k )
      -	return insert(x, y, k );
      -    // We are going to replace a node
      -    return j;
      -}
      -
      -
      -template <class Key, class T>
      -TQ_INLINE_TEMPLATES TQ_TYPENAME TQMapPrivate<Key,T>::Iterator TQMapPrivate<Key,T>::insert( TQMapNodeBase* x, TQMapNodeBase* y, const Key& k )
      -{
      -    NodePtr z = new Node( k );
      -    if (y == header || x != 0 || k < key(y) ) {
      -	y->left = z;                // also makes leftmost = z when y == header
      -	if ( y == header ) {
      -	    header->parent = z;
      -	    header->right = z;
      -	} else if ( y == header->left )
      -	    header->left = z;           // maintain leftmost pointing to min node
      -    } else {
      -	y->right = z;
      -	if ( y == header->right )
      -	    header->right = z;          // maintain rightmost pointing to max node
      -    }
      -    z->parent = y;
      -    z->left = 0;
      -    z->right = 0;
      -    rebalance( z, header->parent );
      -    ++node_count;
      -    return Iterator(z);
      -}
      -
      -
      -#ifdef QT_CHECK_RANGE
      -# if !defined( TQT_NO_DEBUG ) && defined( QT_CHECK_MAP_RANGE )
      -#  define TQT_CHECK_INVALID_MAP_ELEMENT if ( empty() ) tqWarning( "TQMap: Warning invalid element" )
      -#  define TQT_CHECK_INVALID_MAP_ELEMENT_FATAL Q_ASSERT( !empty() );
      -# else
      -#  define TQT_CHECK_INVALID_MAP_ELEMENT
      -#  define TQT_CHECK_INVALID_MAP_ELEMENT_FATAL
      -# endif
      -#else
      -# define TQT_CHECK_INVALID_MAP_ELEMENT
      -# define TQT_CHECK_INVALID_MAP_ELEMENT_FATAL
      -#endif
      -
      -template <class T> class TQDeepCopy;
      -
      -template<class Key, class T>
      -class TQMap
      -{
      -public:
      -    /**
      -     * Typedefs
      -     */
      -    typedef Key key_type;
      -    typedef T mapped_type;
      -    typedef TQPair<const key_type, mapped_type> value_type;
      -    typedef value_type* pointer;
      -    typedef const value_type* const_pointer;
      -    typedef value_type& reference;
      -    typedef const value_type& const_reference;
      -#ifndef TQT_NO_STL
      -    typedef ptrdiff_t  difference_type;
      -#else
      -    typedef int difference_type;
      -#endif
      -    typedef size_t      size_type;
      -    typedef TQMapIterator<Key,T> iterator;
      -    typedef TQMapConstIterator<Key,T> const_iterator;
      -    typedef TQPair<iterator,bool> insert_pair;
      -
      -    typedef TQMapIterator< Key, T > Iterator;
      -    typedef TQMapConstIterator< Key, T > ConstIterator;
      -    typedef T ValueType;
      -    typedef TQMapPrivate< Key, T > Priv;
      -
      -    /**
      -     * API
      -     */
      -    TQMap()
      -    {
      -	sh = new TQMapPrivate< Key, T >;
      -    }
      -    TQMap( const TQMap<Key,T>& m )
      -    {
      -	sh = m.sh; sh->ref();
      -    }
      -
      -#ifndef TQT_NO_STL
      -    TQMap( const std::map<Key,T>& m )
      -    {
      -	sh = new TQMapPrivate<Key,T>;
      -	TQ_TYPENAME std::map<Key,T>::const_iterator it = m.begin();
      -	for ( ; it != m.end(); ++it ) {
      -	    value_type p( (*it).first, (*it).second );
      -	    insert( p );
      -	}
      -    }
      -#endif
      -    ~TQMap()
      -    {
      -	if ( sh->deref() )
      -	    delete sh;
      -    }
      -    TQMap<Key,T>& operator= ( const TQMap<Key,T>& m );
      -#ifndef TQT_NO_STL
      -    TQMap<Key,T>& operator= ( const std::map<Key,T>& m )
      -    {
      -	clear();
      -	TQ_TYPENAME std::map<Key,T>::const_iterator it = m.begin();
      -	for ( ; it != m.end(); ++it ) {
      -	    value_type p( (*it).first, (*it).second );
      -	    insert( p );
      -	}
      -	return *this;
      -    }
      -#endif
      -
      -    iterator begin() { detach(); return sh->begin(); }
      -    iterator end() { detach(); return sh->end(); }
      -    const_iterator begin() const { return ((const Priv*)sh)->begin(); }
      -    const_iterator end() const { return ((const Priv*)sh)->end(); }
      -    const_iterator constBegin() const { return begin(); }
      -    const_iterator constEnd() const { return end(); }
      -
      -    iterator replace( const Key& k, const T& v )
      -    {
      -	remove( k );
      -	return insert( k, v );
      -    }
      -
      -    size_type size() const
      -    {
      -	return sh->node_count;
      -    }
      -    bool empty() const
      -    {
      -	return sh->node_count == 0;
      -    }
      -    TQPair<iterator,bool> insert( const value_type& x );
      -
      -    void erase( iterator it )
      -    {
      -	detach();
      -	sh->remove( it );
      -    }
      -    void erase( const key_type& k );
      -    size_type count( const key_type& k ) const;
      -    T& operator[] ( const Key& k );
      -    void clear();
      -
      -    iterator find ( const Key& k )
      -    {
      -	detach();
      -	return iterator( sh->find( k ).node );
      -    }
      -    const_iterator find ( const Key& k ) const {	return sh->find( k ); }
      -
      -    const T& operator[] ( const Key& k ) const
      -	{ TQT_CHECK_INVALID_MAP_ELEMENT; return sh->find( k ).data(); }
      -    bool contains ( const Key& k ) const
      -	{ return find( k ) != end(); }
      -	//{ return sh->find( k ) != ((const Priv*)sh)->end(); }
      -
      -    size_type count() const { return sh->node_count; }
      -
      -    TQValueList<Key> keys() const {
      -	TQValueList<Key> r;
      -	for (const_iterator i=begin(); i!=end(); ++i)
      -	    r.append(i.key());
      -	return r;
      -    }
      -
      -    TQValueList<T> values() const {
      -	TQValueList<T> r;
      -	for (const_iterator i=begin(); i!=end(); ++i)
      -	    r.append(*i);
      -	return r;
      -    }
      -
      -    bool isEmpty() const { return sh->node_count == 0; }
      -
      -    iterator insert( const Key& key, const T& value, bool overwrite = TRUE );
      -    void remove( iterator it ) { detach(); sh->remove( it ); }
      -    void remove( const Key& k );
      -
      -#if defined(TQ_FULL_TEMPLATE_INSTANTIATION)
      -    bool operator==( const TQMap<Key,T>& ) const { return FALSE; }
      -#ifndef TQT_NO_STL
      -    bool operator==( const std::map<Key,T>& ) const { return FALSE; }
      -#endif
      -#endif
      -
      -protected:
      -    /**
      -     * Helpers
      -     */
      -    void detach() {  if ( sh->count > 1 ) detachInternal(); }
      -
      -    Priv* sh;
      -private:
      -    void detachInternal();
      -
      -    friend class TQDeepCopy< TQMap<Key,T> >;
      -};
      -
      -template<class Key, class T>
      -TQ_INLINE_TEMPLATES TQMap<Key,T>& TQMap<Key,T>::operator= ( const TQMap<Key,T>& m )
      -{
      -    m.sh->ref();
      -    if ( sh->deref() )
      -	delete sh;
      -    sh = m.sh;
      -    return *this;
      -}
      -
      -template<class Key, class T>
      -TQ_INLINE_TEMPLATES TQ_TYPENAME TQMap<Key,T>::insert_pair TQMap<Key,T>::insert( const TQ_TYPENAME TQMap<Key,T>::value_type& x )
      -{
      -    detach();
      -    size_type n = size();
      -    iterator it = sh->insertSingle( x.first );
      -    bool inserted = FALSE;
      -    if ( n < size() ) {
      -	inserted = TRUE;
      -	it.data() = x.second;
      -    }
      -    return TQPair<iterator,bool>( it, inserted );
      -}
      -
      -template<class Key, class T>
      -TQ_INLINE_TEMPLATES void TQMap<Key,T>::erase( const Key& k )
      -{
      -    detach();
      -    iterator it( sh->find( k ).node );
      -    if ( it != end() )
      -	sh->remove( it );
      -}
      -
      -template<class Key, class T>
      -TQ_INLINE_TEMPLATES TQ_TYPENAME TQMap<Key,T>::size_type TQMap<Key,T>::count( const Key& k ) const
      -{
      -    const_iterator it( sh->find( k ).node );
      -    if ( it != end() ) {
      -	size_type c = 0;
      -	while ( it != end() ) {
      -	    ++it;
      -	    ++c;
      -	}
      -	return c;
      -    }
      -    return 0;
      -}
      -
      -template<class Key, class T>
      -TQ_INLINE_TEMPLATES T& TQMap<Key,T>::operator[] ( const Key& k )
      -{
      -    detach();
      -    TQMapNode<Key,T>* p = sh->find( k ).node;
      -    if ( p != sh->end().node )
      -	return p->data;
      -    return insert( k, T() ).data();
      -}
      -
      -template<class Key, class T>
      -TQ_INLINE_TEMPLATES void TQMap<Key,T>::clear()
      -{
      -    if ( sh->count == 1 )
      -	sh->clear();
      -    else {
      -	sh->deref();
      -	sh = new TQMapPrivate<Key,T>;
      -    }
      -}
      -
      -template<class Key, class T>
      -TQ_INLINE_TEMPLATES TQ_TYPENAME TQMap<Key,T>::iterator TQMap<Key,T>::insert( const Key& key, const T& value, bool overwrite )
      -{
      -    detach();
      -    size_type n = size();
      -    iterator it = sh->insertSingle( key );
      -    if ( overwrite || n < size() )
      -	it.data() = value;
      -    return it;
      -}
      -
      -template<class Key, class T>
      -TQ_INLINE_TEMPLATES void TQMap<Key,T>::remove( const Key& k )
      -{
      -    detach();
      -    iterator it( sh->find( k ).node );
      -    if ( it != end() )
      -	sh->remove( it );
      -}
      -
      -template<class Key, class T>
      -TQ_INLINE_TEMPLATES void TQMap<Key,T>::detachInternal()
      -{
      -    sh->deref(); sh = new TQMapPrivate<Key,T>( sh );
      -}
      -
      -
      -#ifndef TQT_NO_DATASTREAM
      -template<class Key, class T>
      -TQ_INLINE_TEMPLATES TQDataStream& operator>>( TQDataStream& s, TQMap<Key,T>& m ) {
      -    m.clear();
      -    TQ_UINT32 c;
      -    s >> c;
      -    for( TQ_UINT32 i = 0; i < c; ++i ) {
      -	Key k; T t;
      -	s >> k >> t;
      -	m.insert( k, t );
      -	if ( s.atEnd() )
      -	    break;
      -    }
      -    return s;
      -}
      -
      -
      -template<class Key, class T>
      -TQ_INLINE_TEMPLATES TQDataStream& operator<<( TQDataStream& s, const TQMap<Key,T>& m ) {
      -    s << (TQ_UINT32)m.size();
      -    TQMapConstIterator<Key,T> it = m.begin();
      -    for( ; it != m.end(); ++it )
      -	s << it.key() << it.data();
      -    return s;
      -}
      -#endif
      -
      -#define Q_DEFINED_QMAP
      -#include "ntqwinexport.h"
      -#endif // TQMAP_H
      -
      - -


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

      Complete Member List for TQMap

      - -

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

      - -


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

      Complete Member List for TQMapConstIterator

      - -

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

      - -


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

      TQMapConstIterator Class Reference

      - -

      The TQMapConstIterator class provides an iterator for TQMap. -More... -

      #include <ntqmap.h> -

      List of all member functions. -

      Public Members

      - -

      Detailed Description

      - - -The TQMapConstIterator class provides an iterator for TQMap. -

      - -

      In contrast to TQMapIterator, this class is used to iterate over a -const map. It does not allow you to modify the values of the map -because this would break the const semantics. -

      For more information on TQMap iterators, see TQMapIterator and -the TQMap example. -

      See also TQMap, TQMapIterator, TQt Template Library Classes, and Non-GUI Classes. - -


      Member Type Documentation

      -

      TQMapConstIterator::iterator_category

      -The type of iterator category, std::bidirectional_iterator_tag. -

      TQMapConstIterator::pointer

      -Const pointer to value_type. -

      TQMapConstIterator::reference

      -Const reference to value_type. -

      TQMapConstIterator::value_type

      -The type of const value. -

      Member Function Documentation

      -

      TQMapConstIterator::TQMapConstIterator () -

      - -

      Constructs an uninitialized iterator. - -

      TQMapConstIterator::TQMapConstIterator ( TQMapNode<K, T> * p ) -

      - -

      Constructs an iterator starting at node p. - -

      TQMapConstIterator::TQMapConstIterator ( const TQMapConstIterator<K, T> & it ) -

      - -

      Constructs a copy of the iterator, it. - -

      TQMapConstIterator::TQMapConstIterator ( const TQMapIterator<K, T> & it ) -

      - -

      Constructs a copy of the iterator, it. - -

      const T & TQMapConstIterator::data () const -

      - -

      Returns a const reference to the current item's data. - -

      const K & TQMapConstIterator::key () const -

      - -

      Returns a const reference to the current item's key. - -

      bool TQMapConstIterator::operator!= ( const TQMapConstIterator<K, T> & it ) const -

      - -

      Compares the iterator to the it iterator and returns FALSE if -they point to the same item; otherwise returns TRUE. - -

      const T & TQMapConstIterator::operator* () const -

      - -

      Dereference operator. Returns a const reference to the current -item's data. The same as data(). - -

      TQMapConstIterator<K, T> & TQMapConstIterator::operator++ () -

      - -

      Prefix ++ makes the succeeding item current and returns an -iterator pointing to the new current item. The iterator cannot -check whether it reached the end of the map. Incrementing the -iterator returned by end() causes undefined results. - -

      TQMapConstIterator<K, T> TQMapConstIterator::operator++ ( int ) -

      - -

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

      Postfix ++ makes the succeeding item current and returns an -iterator pointing to the new current item. The iterator cannot -check whether it reached the end of the map. Incrementing the -iterator returned by end() causes undefined results. - -

      TQMapConstIterator<K, T> & TQMapConstIterator::operator-- () -

      - -

      Prefix -- makes the previous item current and returns an iterator -pointing to the new current item. The iterator cannot check -whether it reached the beginning of the map. Decrementing the -iterator returned by begin() causes undefined results. - -

      TQMapConstIterator<K, T> TQMapConstIterator::operator-- ( int ) -

      - -

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

      Postfix -- makes the previous item current and returns an iterator -pointing to the new current item. The iterator cannot check -whether it reached the beginning of the map. Decrementing the -iterator returned by begin() causes undefined results. - -

      bool TQMapConstIterator::operator== ( const TQMapConstIterator<K, T> & it ) const -

      - -

      Compares the iterator to the it iterator and returns TRUE if -they point to the same item; 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/qmapiterator-members.html b/doc/html/qmapiterator-members.html deleted file mode 100644 index 306fabd2f..000000000 --- a/doc/html/qmapiterator-members.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - -TQMapIterator Member List - - - - - - - -
      - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

      Complete Member List for TQMapIterator

      - -

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

      - -


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

      TQMapIterator Class Reference

      - -

      The TQMapIterator class provides an iterator for TQMap. -More... -

      #include <ntqmap.h> -

      List of all member functions. -

      Public Members

      - -

      Detailed Description

      - - -The TQMapIterator class provides an iterator for TQMap. -

      - -

      You cannot create an iterator by yourself. Instead, you must ask a -map to give you one. An iterator is as big as a pointer; on 32-bit -machines that means 4 bytes, on 64-bit machines, 8 bytes. That -makes copying iterators very fast. Iterators behave in a similar -way to pointers, and they are almost as fast as pointers. See the -TQMap example. -

      TQMap is highly optimized for performance and memory usage, but the -trade-off is that you must be more careful. The only way to -traverse a map is to use iterators. TQMap does not know about its -iterators, and the iterators don't even know to which map they -belong. That makes things fast but a bit dangerous because it is -up to you to make sure that the iterators you are using are still -valid. TQDictIterator will be able to give warnings, whereas -TQMapIterator may end up in an undefined state. -

      For every Iterator there is also a ConstIterator. You must use the -ConstIterator to access a TQMap in a const environment or if the -reference or pointer to the map is itself const. Its semantics are -the same, but it only returns const references to the item it -points to. -

      See also TQMap, TQMapConstIterator, TQt Template Library Classes, and Non-GUI Classes. - -


      Member Type Documentation

      -

      TQMapIterator::iterator_category

      -The type of iterator category, std::bidirectional_iterator_tag. -

      TQMapIterator::pointer

      -Pointer to value_type. -

      TQMapIterator::reference

      -Reference to value_type. -

      TQMapIterator::value_type

      -The type of value. -

      Member Function Documentation

      -

      TQMapIterator::TQMapIterator () -

      - -

      Creates an uninitialized iterator. - -

      TQMapIterator::TQMapIterator ( TQMapNode<K, T> * p ) -

      - -

      Constructs an iterator starting at node p. - -

      TQMapIterator::TQMapIterator ( const TQMapIterator<K, T> & it ) -

      - -

      Constructs a copy of the iterator, it. - -

      T & TQMapIterator::data () -

      - -

      Returns a reference to the current item's data. - -

      const T & TQMapIterator::data () const -

      - -

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

      Returns a const reference to the current item's data. - -

      const K & TQMapIterator::key () const -

      - -

      Returns a const reference to the current item's key. - -

      bool TQMapIterator::operator!= ( const TQMapIterator<K, T> & it ) const -

      - -

      Compares the iterator to the it iterator and returns FALSE if -they point to the same item; otherwise returns TRUE. - -

      T & TQMapIterator::operator* () -

      - -

      Dereference operator. Returns a reference to the current item's -data. The same as data(). - -

      const T & TQMapIterator::operator* () const -

      - -

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

      Dereference operator. Returns a const reference to the current -item's data. The same as data(). - -

      TQMapIterator<K, T> & TQMapIterator::operator++ () -

      - -

      Prefix ++ makes the succeeding item current and returns an -iterator pointing to the new current item. The iterator cannot -check whether it reached the end of the map. Incrementing the -iterator returned by end() causes undefined results. - -

      TQMapIterator<K, T> TQMapIterator::operator++ ( int ) -

      - -

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

      Postfix ++ makes the succeeding item current and returns an -iterator pointing to the new current item. The iterator cannot -check whether it reached the end of the map. Incrementing the -iterator returned by end() causes undefined results. - -

      TQMapIterator<K, T> & TQMapIterator::operator-- () -

      - -

      Prefix -- makes the previous item current and returns an iterator -pointing to the new current item. The iterator cannot check -whether it reached the beginning of the map. Decrementing the -iterator returned by begin() causes undefined results. - -

      TQMapIterator<K, T> TQMapIterator::operator-- ( int ) -

      - -

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

      Postfix -- makes the previous item current and returns an iterator -pointing to the new current item. The iterator cannot check -whether it reached the beginning of the map. Decrementing the -iterator returned by begin() causes undefined results. - -

      bool TQMapIterator::operator== ( const TQMapIterator<K, T> & it ) const -

      - -

      Compares the iterator to the it iterator and returns TRUE if -they point to the same item; 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/qmime-h.html b/doc/html/qmime-h.html index 4cd89fa28..015b91e5f 100644 --- a/doc/html/qmime-h.html +++ b/doc/html/qmime-h.html @@ -79,7 +79,7 @@ body { background: #ffffff; color: black; } #ifndef QT_H #include "ntqwindowdefs.h" -#include "ntqmap.h" +#include "tqmap.h" #endif // QT_H #ifndef TQT_NO_MIME diff --git a/doc/html/qpair-h.html b/doc/html/qpair-h.html deleted file mode 100644 index fdaf6fff1..000000000 --- a/doc/html/qpair-h.html +++ /dev/null @@ -1,153 +0,0 @@ - - - - - -ntqpair.h Include File - - - - - - - -
      - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

      ntqpair.h

      - -

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


      -
      -/****************************************************************************
      -**
      -** Definition of TQPair 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 TQPAIR_H
      -#define TQPAIR_H
      -
      -#ifndef QT_H
      -#include "ntqglobal.h"
      -#include "ntqdatastream.h"
      -#endif // QT_H
      -
      -template <class T1, class T2>
      -struct TQPair
      -{
      -    typedef T1 first_type;
      -    typedef T2 second_type;
      -
      -    TQPair()
      -	: first( T1() ), second( T2() )
      -    {}
      -    TQPair( const T1& t1, const T2& t2 )
      -	: first( t1 ), second( t2 )
      -    {}
      -
      -    TQPair<T1, T2>& operator=(const TQPair<T1, T2>& other)
      -    {
      -	if (this != &other) {
      -	    first = other.first;
      -	    second = other.second;
      -	}
      -	return *this;
      -    }
      -
      -    T1 first;
      -    T2 second;
      -};
      -
      -template <class T1, class T2>
      -TQ_INLINE_TEMPLATES bool operator==( const TQPair<T1, T2>& x, const TQPair<T1, T2>& y )
      -{
      -    return x.first == y.first && x.second == y.second;
      -}
      -
      -template <class T1, class T2>
      -TQ_INLINE_TEMPLATES bool operator<( const TQPair<T1, T2>& x, const TQPair<T1, T2>& y )
      -{
      -    return x.first < y.first ||
      -	   ( !( y.first < x.first ) && x.second < y.second );
      -}
      -
      -template <class T1, class T2>
      -TQ_INLINE_TEMPLATES TQPair<T1, T2> qMakePair( const T1& x, const T2& y )
      -{
      -    return TQPair<T1, T2>( x, y );
      -}
      -
      -#ifndef TQT_NO_DATASTREAM
      -template <class T1, class T2>
      -inline TQDataStream& operator>>( TQDataStream& s, TQPair<T1, T2>& p )
      -{
      -    s >> p.first >> p.second;
      -    return s;
      -}
      -
      -template <class T1, class T2>
      -inline TQDataStream& operator<<( TQDataStream& s, const TQPair<T1, T2>& p )
      -{
      -    s << p.first << p.second;
      -    return s;
      -}
      -#endif
      -
      -#endif
      -
      - -


      - -
      Copyright © 2007 -TrolltechTrademarks -
      TQt 3.3.8
      -
      - diff --git a/doc/html/qpair-members.html b/doc/html/qpair-members.html deleted file mode 100644 index 89bc7a31f..000000000 --- a/doc/html/qpair-members.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - - -TQPair Member List - - - - - - - -
      - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

      Complete Member List for TQPair

      - -

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

      - -


      - -
      Copyright © 2007 -TrolltechTrademarks -
      TQt 3.3.8
      -
      - diff --git a/doc/html/qsplitter-h.html b/doc/html/qsplitter-h.html index 01e61ef0f..3aaf65f18 100644 --- a/doc/html/qsplitter-h.html +++ b/doc/html/qsplitter-h.html @@ -79,7 +79,7 @@ body { background: #ffffff; color: black; } #ifndef QT_H #include "ntqframe.h" -#include "ntqvaluelist.h" +#include "tqvaluelist.h" #endif // QT_H #ifndef TQT_NO_SPLITTER diff --git a/doc/html/qstringlist-h.html b/doc/html/qstringlist-h.html index 3b7fe84d5..5242fa63e 100644 --- a/doc/html/qstringlist-h.html +++ b/doc/html/qstringlist-h.html @@ -78,7 +78,7 @@ body { background: #ffffff; color: black; } #define TQSTRINGLIST_H #ifndef QT_H -#include "ntqvaluelist.h" +#include "tqvaluelist.h" #include "ntqstring.h" #include "ntqstrlist.h" #endif // QT_H diff --git a/doc/html/qstringlist-members.html b/doc/html/qstringlist-members.html index 09734f84c..aa126437b 100644 --- a/doc/html/qstringlist-members.html +++ b/doc/html/qstringlist-members.html @@ -36,44 +36,44 @@ body { background: #ffffff; color: black; } diff --git a/doc/html/qstylesheet-h.html b/doc/html/qstylesheet-h.html index cbc69c786..09f042485 100644 --- a/doc/html/qstylesheet-h.html +++ b/doc/html/qstylesheet-h.html @@ -79,7 +79,7 @@ body { background: #ffffff; color: black; } #ifndef QT_H #include "ntqstring.h" -#include "ntqvaluelist.h" +#include "tqvaluelist.h" #include "ntqptrvector.h" #include "ntqdict.h" #include "tqobject.h" diff --git a/doc/html/qt-template-lib.html b/doc/html/qt-template-lib.html index e5971533d..296778444 100644 --- a/doc/html/qt-template-lib.html +++ b/doc/html/qt-template-lib.html @@ -55,7 +55,7 @@ use TQPtrCollection and friends, all of whic rather than values. This applies, for example, to all classes derived from TQObject. A TQObject does not have a copy constructor, so using it as value is impossible. You may choose to store pointers to -TQObjects in a TQValueList, but using TQPtrList directly seems to be the +TQObjects in a TQValueList, but using TQPtrList directly seems to be the better choice for this kind of application domain. TQPtrList, like all other TQPtrCollection based containers, provides far more sanity checking than a speed-optimized value based container. @@ -171,13 +171,13 @@ your data's class.

      The tqCount() template function counts the number of occurrences of a value within a container. For example:

      -    TQValueList<int> list;
      -    list.push_back( 1 );               
      -    list.push_back( 1 );               
      -    list.push_back( 1 );               
      -    list.push_back( 2 );               
      +    TQValueList<int> list;
      +    list.push_back( 1 );               
      +    list.push_back( 1 );               
      +    list.push_back( 1 );               
      +    list.push_back( 2 );               
           int c = 0;
      -    tqCount( list.begin(), list.end(), 1, c ); // c == 3
      +    tqCount( list.begin(), list.end(), 1, c ); // c == 3
       

      @@ -186,12 +186,12 @@ value within a container. For example:

      The tqFind() template function finds the first occurrence of a value within a container. For example:

      -    TQValueList<int> list;
      -    list.push_back( 1 );               
      -    list.push_back( 1 );               
      -    list.push_back( 1 );               
      -    list.push_back( 2 );               
      -    TQValueListIterator<int> it = tqFind( list.begin(), list.end(), 2 );
      +    TQValueList<int> list;
      +    list.push_back( 1 );               
      +    list.push_back( 1 );               
      +    list.push_back( 1 );               
      +    list.push_back( 2 );               
      +    TQValueListIterator<int> it = tqFind( list.begin(), list.end(), 2 );
       

      @@ -200,8 +200,8 @@ within a container. For example:

      The tqFill() template function fills a range with copies of a value. For example:

      -    TQValueVector<int> vec(3);
      -    tqFill( vec.begin(), vec.end(), 99 ); // vec contains 99, 99, 99
      +    TQValueVector<int> vec(3);
      +    tqFill( vec.begin(), vec.end(), 99 ); // vec contains 99, 99, 99
       

      @@ -213,19 +213,19 @@ considered, only if the elements in the first range are equal to the corresponding elements in the second range (consequently, both ranges must be valid). For example:

      -    TQValueVector<int> v1(3);
      +    TQValueVector<int> v1(3);
           v1[0] = 1;
           v1[2] = 2;
           v1[3] = 3;
       
      -    TQValueVector<int> v2(5);
      +    TQValueVector<int> v2(5);
           v2[0] = 1;
           v2[2] = 2;
           v2[3] = 3;
           v2[4] = 4;
           v2[5] = 5;
       
      -    bool b = tqEqual( v1.begin(), v2.end(), v2.begin() );
      +    bool b = tqEqual( v1.begin(), v2.end(), v2.begin() );
           // b == TRUE
       
      @@ -235,12 +235,12 @@ must be valid). For example:

      The tqCopy() template function copies a range of elements to an OutputIterator, in this case a TQTextOStreamIterator:

      -    TQValueList<int> list;
      -    list.push_back( 100 );
      -    list.push_back( 200 );
      -    list.push_back( 300 );
      +    TQValueList<int> list;
      +    list.push_back( 100 );
      +    list.push_back( 200 );
      +    list.push_back( 300 );
           TQTextOStream str( stdout );
      -    tqCopy( list.begin(), list.end(), TQTextOStreamIterator(str) );
      +    tqCopy( list.begin(), list.end(), TQTextOStreamIterator(str) );
       

      @@ -250,12 +250,12 @@ OutputIterator, in this case a TQTextOStreamIterator:

      The tqCopyBackward() template function copies a container or a slice of a container to an OutputIterator, but in reverse order, for example:

      -    TQValueVector<int> vec(3);
      -    vec.push_back( 100 );
      -    vec.push_back( 200 );
      -    vec.push_back( 300 );
      -    TQValueVector<int> another;
      -    tqCopyBackward( vec.begin(), vec.end(), another.begin() );
      +    TQValueVector<int> vec(3);
      +    vec.push_back( 100 );
      +    vec.push_back( 200 );
      +    vec.push_back( 300 );
      +    TQValueVector<int> another;
      +    tqCopyBackward( vec.begin(), vec.end(), another.begin() );
           // 'another' now contains 100, 200, 300
           // however the elements are copied one at a time 
           // in reverse order (300, 200, then 100)
      @@ -271,10 +271,10 @@ illustrates this:
           TQStringList list1, list2;
           list1 << "Weis" << "Ettrich" << "Arnt" << "Sue";
           list2 << "Torben" << "Matthias";
      -    tqCopy( list2.begin(), list2.end(), list1.begin() );
      +    tqCopy( list2.begin(), list2.end(), list1.begin() );
       
      -    TQValueVector<TQString> vec( list1.size(), "Dave" );
      -    tqCopy( list2.begin(), list2.end(), vec.begin() );
      +    TQValueVector<TQString> vec( list1.size(), "Dave" );
      +    tqCopy( list2.begin(), list2.end(), vec.begin() );
       

      At the end of this code fragment, the list list1 contains "Torben", @@ -297,18 +297,18 @@ a standard C++ array with tqCopy(): appropriate streaming operators. Here is an example.

           TQDataStream str(...);
      -    TQValueList<TQRect> list;
      +    TQValueList<TQRect> list;
           // ... fill the list here
           str << list;
       

      The container can be read in again with:

      -    TQValueList<TQRect> list;
      +    TQValueList<TQRect> list;
           str >> list;
       
      -

      The same applies to TQStringList, TQValueStack and TQMap. +

      The same applies to TQStringList, TQValueStack and TQMap.


      diff --git a/doc/html/qt.dcf b/doc/html/qt.dcf index 94848a4fc..e6530294d 100644 --- a/doc/html/qt.dcf +++ b/doc/html/qt.dcf @@ -4646,78 +4646,78 @@
      -
      - QMap - ConstIterator - Iterator - ValueType - begin - clear - constBegin - constEnd - const_iterator - const_pointer - const_reference - contains - count - detach - empty - end - erase - find - insert - isEmpty - iterator - key_type - keys - mapped_type - operator= - operator[] - pointer - reference - remove - replace - size - size_type - value_type - values - ~QMap - operator<< - operator>> -
      -
      -
      -
      - QMapConstIterator - data - iterator_category - key - operator!= - operator* - operator++ - operator-- - operator== - pointer - reference - value_type -
      -
      -
      -
      - QMapIterator - data - iterator_category - key - operator!= - operator* - operator++ - operator-- - operator== - pointer - reference - value_type -
      -
      +
      + TQMap + ConstIterator + Iterator + ValueType + begin + clear + constBegin + constEnd + const_iterator + const_pointer + const_reference + contains + count + detach + empty + end + erase + find + insert + isEmpty + iterator + key_type + keys + mapped_type + operator= + operator[] + pointer + reference + remove + replace + size + size_type + value_type + values + ~TQMap + operator<< + operator>> +
      +
      +
      +
      + TQMapConstIterator + data + iterator_category + key + operator!= + operator* + operator++ + operator-- + operator== + pointer + reference + value_type +
      +
      +
      +
      + TQMapIterator + data + iterator_category + key + operator!= + operator* + operator++ + operator-- + operator== + pointer + reference + value_type +
      +
      QMemArray @@ -5429,13 +5429,13 @@
      -
      - TQPair - first_type - second_type - qMakePair -
      -
      +
      + TQPair + first_type + second_type + qMakePair +
      +
      QPalette @@ -8612,137 +8612,137 @@
      -
      - QValueList - ConstIterator - Iterator - append - at - back - begin - clear - constBegin - constEnd - const_iterator - const_pointer - const_reference - contains - count - empty - end - erase - find - findIndex - first - fromLast - front - insert - isEmpty - iterator - last - operator!= - operator+ - operator+= - operator<< - operator= - operator== - operator[] - pointer - pop_back - pop_front - prepend - push_back - push_front - reference - remove - size - size_type - value_type - ~QValueList - operator<< - operator>> -
      -
      -
      -
      - QValueListConstIterator - operator!= - operator* - operator++ - operator-- - operator== - pointer - reference - value_type -
      -
      -
      -
      - QValueListIterator - operator!= - operator* - operator++ - operator+= - operator-- - operator-= - operator== - pointer - reference - value_type -
      -
      -
      -
      - QValueStack - pop - push - top - ~QValueStack -
      -
      -
      -
      - QValueVector - ConstIterator - Iterator - ValueType - append - at - back - begin - capacity - clear - constBegin - constEnd - const_iterator - const_pointer - const_reference - count - difference_type - empty - end - erase - first - front - insert - isEmpty - iterator - last - operator= - operator== - operator[] - pointer - pop_back - push_back - reference - reserve - resize - size - size_type - value_type - ~QValueVector -
      -
      +
      + TQValueList + ConstIterator + Iterator + append + at + back + begin + clear + constBegin + constEnd + const_iterator + const_pointer + const_reference + contains + count + empty + end + erase + find + findIndex + first + fromLast + front + insert + isEmpty + iterator + last + operator!= + operator+ + operator+= + operator<< + operator= + operator== + operator[] + pointer + pop_back + pop_front + prepend + push_back + push_front + reference + remove + size + size_type + value_type + ~TQValueList + operator<< + operator>> +
      +
      +
      +
      + TQValueListConstIterator + operator!= + operator* + operator++ + operator-- + operator== + pointer + reference + value_type +
      +
      +
      +
      + TQValueListIterator + operator!= + operator* + operator++ + operator+= + operator-- + operator-= + operator== + pointer + reference + value_type +
      +
      +
      +
      + TQValueStack + pop + push + top + ~TQValueStack +
      +
      +
      +
      + TQValueVector + ConstIterator + Iterator + ValueType + append + at + back + begin + capacity + clear + constBegin + constEnd + const_iterator + const_pointer + const_reference + count + difference_type + empty + end + erase + first + front + insert + isEmpty + iterator + last + operator= + operator== + operator[] + pointer + pop_back + push_back + reference + reserve + resize + size + size_type + value_type + ~TQValueVector +
      +
      QVariant @@ -9678,8 +9678,8 @@
      A Tiny Example Featuring a Toggle Action
      -
      - A Tiny QTL Example +
      + A Tiny QTL Example
      A tiny SAX2 parser diff --git a/doc/html/qtabletevent.html b/doc/html/qtabletevent.html index 850ec6bab..8ac6a3a20 100644 --- a/doc/html/qtabletevent.html +++ b/doc/html/qtabletevent.html @@ -97,7 +97,7 @@ a transparent circle with cross-hairs).
    390. TQTabletEvent::Eraser - An Eraser (the broad end of the pen).

      Member Function Documentation

      -

      TQTabletEvent::TQTabletEvent ( Type t, const TQPoint & pos, const TQPoint & globalPos, int device, int pressure, int xTilt, int yTilt, const TQPair<int, int> & uId ) +

      TQTabletEvent::TQTabletEvent ( Type t, const TQPoint & pos, const TQPoint & globalPos, int device, int pressure, int xTilt, int yTilt, const TQPair<int, int> & uId )

      Construct a tablet event of type t. The position of when the event occurred is given @@ -109,7 +109,7 @@ event id. tablet device driver, instead of from the windowing system.

      See also pos(), globalPos(), device(), pressure(), xTilt(), and yTilt(). -

      TQTabletEvent::TQTabletEvent ( const TQPoint & pos, const TQPoint & globalPos, int device, int pressure, int xTilt, int yTilt, const TQPair<int, int> & uId ) +

      TQTabletEvent::TQTabletEvent ( const TQPoint & pos, const TQPoint & globalPos, int device, int pressure, int xTilt, int yTilt, const TQPair<int, int> & uId )

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

      @@ -196,7 +196,7 @@ a value from 0 (no pressure) to 255 (maximum pressure). The pressure is always scaled to be within this range no matter how many pressure levels the underlying hardware supports. -

      TQPair<int, int> TQTabletEvent::uniqueId () +

      TQPair<int, int> TQTabletEvent::uniqueId ()

      Returns a unique ID for the current device. It is possible to diff --git a/doc/html/qtextedit-h.html b/doc/html/qtextedit-h.html index a34a8c4f1..8cda9e170 100644 --- a/doc/html/qtextedit-h.html +++ b/doc/html/qtextedit-h.html @@ -81,7 +81,7 @@ body { background: #ffffff; color: black; } #include "ntqscrollview.h" #include "ntqstylesheet.h" #include "ntqptrvector.h" -#include "ntqvaluelist.h" +#include "tqvaluelist.h" #include "ntqptrlist.h" #endif // QT_H diff --git a/doc/html/qtl-qvaluelist-example.html b/doc/html/qtl-qvaluelist-example.html index d69ab3d10..f42d0300b 100644 --- a/doc/html/qtl-qvaluelist-example.html +++ b/doc/html/qtl-qvaluelist-example.html @@ -1,5 +1,5 @@ - + @@ -33,11 +33,11 @@ body { background: #ffffff; color: black; }

      -This tiny example shows a TQValueListIterator. +This tiny example shows a TQValueListIterator.


      Implementation:

      /****************************************************************************
      -** $Id: qt/qvaluelistiterator.cpp   3.3.8   edited Jan 11 14:37 $
      +** $Id: qt/tqvaluelistiterator.cpp   3.3.8   edited Jan 11 14:37 $
       **
       ** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
       **
      @@ -46,7 +46,7 @@ This tiny example shows a TQValueListIterator<
       **
       *****************************************************************************/
       
      -#include <ntqvaluelist.h>
      +#include <tqvaluelist.h>
       #include <ntqstring.h>
       #include <ntqwindowdefs.h>
       #include <stdio.h>
      diff --git a/doc/html/qtranslator-h.html b/doc/html/qtranslator-h.html
      index 4c67998a2..504c24d64 100644
      --- a/doc/html/qtranslator-h.html
      +++ b/doc/html/qtranslator-h.html
      @@ -80,7 +80,7 @@ body { background: #ffffff; color: black; }
       
       #ifndef QT_H
       #include "tqobject.h"
      -#include "ntqvaluelist.h"
      +#include "tqvaluelist.h"
       #endif // QT_H
       
       #ifndef TQT_NO_TRANSLATION
      diff --git a/doc/html/qvaluelist-h.html b/doc/html/qvaluelist-h.html
      deleted file mode 100644
      index 9fb12791f..000000000
      --- a/doc/html/qvaluelist-h.html
      +++ /dev/null
      @@ -1,714 +0,0 @@
      -
      -
      -
      -
      -
      -ntqvaluelist.h Include File
      -
      -
      -
      -
      -
      -
      -
      -
      - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

      ntqvaluelist.h

      - -

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


      -
      -/****************************************************************************
      -** $Id: qt/ntqvaluelist.h   3.3.8   edited Jan 11 14:38 $
      -**
      -** Definition of TQValueList class
      -**
      -** Created : 990406
      -**
      -** 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 TQVALUELIST_H
      -#define TQVALUELIST_H
      -
      -#ifndef QT_H
      -#include "ntqtl.h"
      -#include "ntqshared.h"
      -#include "ntqdatastream.h"
      -#endif // QT_H
      -
      -#ifndef TQT_NO_STL
      -#include <iterator>
      -#include <list>
      -#endif
      -
      -//#define QT_CHECK_VALUELIST_RANGE
      -
      -#if defined(Q_CC_MSVC)
      -#pragma warning(disable:4284) // "return type for operator -> is not a UDT"
      -#endif
      -
      -template <class T>
      -class TQValueListNode
      -{
      -public:
      -    TQValueListNode( const T& t ) : data( t ) { }
      -    TQValueListNode() { }
      -#if defined(Q_TEMPLATEDLL)
      -    // Workaround MS bug in memory de/allocation in DLL vs. EXE
      -    virtual ~TQValueListNode() { }
      -#endif
      -
      -    TQValueListNode<T>* next;
      -    TQValueListNode<T>* prev;
      -    T data;
      -};
      -
      -template<class T>
      -class TQValueListIterator
      -{
      - public:
      -    /**
      -     * Typedefs
      -     */
      -    typedef TQValueListNode<T>* NodePtr;
      -#ifndef TQT_NO_STL
      -    typedef std::bidirectional_iterator_tag  iterator_category;
      -#endif
      -    typedef T        value_type;
      -    typedef size_t size_type;
      -#ifndef TQT_NO_STL
      -    typedef ptrdiff_t  difference_type;
      -#else
      -    typedef int difference_type;
      -#endif
      -    typedef T*   pointer;
      -    typedef T& reference;
      -
      -    /**
      -     * Variables
      -     */
      -    NodePtr node;
      -
      -    /**
      -     * Functions
      -     */
      -    TQValueListIterator() : node( 0 ) {}
      -    TQValueListIterator( NodePtr p ) : node( p ) {}
      -    TQValueListIterator( const TQValueListIterator<T>& it ) : node( it.node ) {}
      -
      -    bool operator==( const TQValueListIterator<T>& it ) const { return node == it.node; }
      -    bool operator!=( const TQValueListIterator<T>& it ) const { return node != it.node; }
      -    const T& operator*() const { return node->data; }
      -    T& operator*() { return node->data; }
      -    // UDT for T = x*
      -    // T* operator->() const { return &node->data; }
      -
      -    TQValueListIterator<T>& operator++() {
      -	node = node->next;
      -	return *this;
      -    }
      -
      -    TQValueListIterator<T> operator++(int) {
      -	TQValueListIterator<T> tmp = *this;
      -	node = node->next;
      -	return tmp;
      -    }
      -
      -    TQValueListIterator<T>& operator--() {
      -	node = node->prev;
      -	return *this;
      -    }
      -
      -    TQValueListIterator<T> operator--(int) {
      -	TQValueListIterator<T> tmp = *this;
      -	node = node->prev;
      -	return tmp;
      -    }
      -
      -    TQValueListIterator<T>& operator+=( int j ) {
      -	while ( j-- )
      -	    node = node->next;
      -	return *this;
      -    }
      -
      -    TQValueListIterator<T>& operator-=( int j ) {
      -	while ( j-- )
      -	    node = node->prev;
      -	return *this;
      -    }
      -
      -};
      -
      -template<class T>
      -class TQValueListConstIterator
      -{
      - public:
      -    /**
      -     * Typedefs
      -     */
      -    typedef TQValueListNode<T>* NodePtr;
      -#ifndef TQT_NO_STL
      -    typedef std::bidirectional_iterator_tag  iterator_category;
      -#endif
      -    typedef T        value_type;
      -    typedef size_t size_type;
      -#ifndef TQT_NO_STL
      -    typedef ptrdiff_t  difference_type;
      -#else
      -    typedef int difference_type;
      -#endif
      -    typedef const T*   pointer;
      -    typedef const T& reference;
      -
      -    /**
      -     * Variables
      -     */
      -    NodePtr node;
      -
      -    /**
      -     * Functions
      -     */
      -    TQValueListConstIterator() : node( 0 ) {}
      -    TQValueListConstIterator( NodePtr p ) : node( p ) {}
      -    TQValueListConstIterator( const TQValueListConstIterator<T>& it ) : node( it.node ) {}
      -    TQValueListConstIterator( const TQValueListIterator<T>& it ) : node( it.node ) {}
      -
      -    bool operator==( const TQValueListConstIterator<T>& it ) const { return node == it.node; }
      -    bool operator!=( const TQValueListConstIterator<T>& it ) const { return node != it.node; }
      -    const T& operator*() const { return node->data; }
      -    // UDT for T = x*
      -    // const T* operator->() const { return &node->data; }
      -
      -    TQValueListConstIterator<T>& operator++() {
      -	node = node->next;
      -	return *this;
      -    }
      -
      -    TQValueListConstIterator<T> operator++(int) {
      -	TQValueListConstIterator<T> tmp = *this;
      -	node = node->next;
      -	return tmp;
      -    }
      -
      -    TQValueListConstIterator<T>& operator--() {
      -	node = node->prev;
      -	return *this;
      -    }
      -
      -    TQValueListConstIterator<T> operator--(int) {
      -	TQValueListConstIterator<T> tmp = *this;
      -	node = node->prev;
      -	return tmp;
      -    }
      -};
      -
      -template <class T>
      -class TQValueListPrivate : public TQShared
      -{
      -public:
      -    /**
      -     * Typedefs
      -     */
      -    typedef TQValueListIterator<T> Iterator;
      -    typedef TQValueListConstIterator<T> ConstIterator;
      -    typedef TQValueListNode<T> Node;
      -    typedef TQValueListNode<T>* NodePtr;
      -    typedef size_t size_type;
      -
      -    /**
      -     * Functions
      -     */
      -    TQValueListPrivate();
      -    TQValueListPrivate( const TQValueListPrivate<T>& _p );
      -
      -    void derefAndDelete() // ### hack to get around hp-cc brain damage
      -    {
      -	if ( deref() )
      -	    delete this;
      -    }
      -
      -#if defined(Q_TEMPLATEDLL)
      -    // Workaround MS bug in memory de/allocation in DLL vs. EXE
      -    virtual
      -#endif
      -    ~TQValueListPrivate();
      -
      -    Iterator insert( Iterator it, const T& x );
      -    Iterator remove( Iterator it );
      -    NodePtr find( NodePtr start, const T& x ) const;
      -    int findIndex( NodePtr start, const T& x ) const;
      -    uint contains( const T& x ) const;
      -    uint remove( const T& x );
      -    NodePtr at( size_type i ) const;
      -    void clear();
      -
      -    NodePtr node;
      -    size_type nodes;
      -};
      -
      -template <class T>
      -TQ_INLINE_TEMPLATES TQValueListPrivate<T>::TQValueListPrivate()
      -{
      -    node = new Node; node->next = node->prev = node; nodes = 0;
      -}
      -
      -template <class T>
      -TQ_INLINE_TEMPLATES TQValueListPrivate<T>::TQValueListPrivate( const TQValueListPrivate<T>& _p )
      -    : TQShared()
      -{
      -    node = new Node; node->next = node->prev = node; nodes = 0;
      -    Iterator b( _p.node->next );
      -    Iterator e( _p.node );
      -    Iterator i( node );
      -    while( b != e )
      -	insert( i, *b++ );
      -}
      -
      -template <class T>
      -TQ_INLINE_TEMPLATES TQValueListPrivate<T>::~TQValueListPrivate() {
      -    NodePtr p = node->next;
      -    while( p != node ) {
      -	NodePtr x = p->next;
      -	delete p;
      -	p = x;
      -    }
      -    delete node;
      -}
      -
      -template <class T>
      -TQ_INLINE_TEMPLATES TQ_TYPENAME TQValueListPrivate<T>::Iterator TQValueListPrivate<T>::insert( TQ_TYPENAME TQValueListPrivate<T>::Iterator it, const T& x )
      -{
      -    NodePtr p = new Node( x );
      -    p->next = it.node;
      -    p->prev = it.node->prev;
      -    it.node->prev->next = p;
      -    it.node->prev = p;
      -    nodes++;
      -    return p;
      -}
      -
      -template <class T>
      -TQ_INLINE_TEMPLATES TQ_TYPENAME TQValueListPrivate<T>::Iterator TQValueListPrivate<T>::remove( TQ_TYPENAME TQValueListPrivate<T>::Iterator it )
      -{
      -    Q_ASSERT ( it.node != node );
      -    NodePtr next = it.node->next;
      -    NodePtr prev = it.node->prev;
      -    prev->next = next;
      -    next->prev = prev;
      -    delete it.node;
      -    nodes--;
      -    return Iterator( next );
      -}
      -
      -template <class T>
      -TQ_INLINE_TEMPLATES TQ_TYPENAME TQValueListPrivate<T>::NodePtr TQValueListPrivate<T>::find( TQ_TYPENAME TQValueListPrivate<T>::NodePtr start, const T& x ) const
      -{
      -    ConstIterator first( start );
      -    ConstIterator last( node );
      -    while( first != last) {
      -	if ( *first == x )
      -	    return first.node;
      -	++first;
      -    }
      -    return last.node;
      -}
      -
      -template <class T>
      -TQ_INLINE_TEMPLATES int TQValueListPrivate<T>::findIndex( TQ_TYPENAME TQValueListPrivate<T>::NodePtr start, const T& x ) const
      -{
      -    ConstIterator first( start );
      -    ConstIterator last( node );
      -    int pos = 0;
      -    while( first != last) {
      -	if ( *first == x )
      -	    return pos;
      -	++first;
      -	++pos;
      -    }
      -    return -1;
      -}
      -
      -template <class T>
      -TQ_INLINE_TEMPLATES uint TQValueListPrivate<T>::contains( const T& x ) const
      -{
      -    uint result = 0;
      -    Iterator first = Iterator( node->next );
      -    Iterator last = Iterator( node );
      -    while( first != last) {
      -	if ( *first == x )
      -	    ++result;
      -	++first;
      -    }
      -    return result;
      -}
      -
      -template <class T>
      -TQ_INLINE_TEMPLATES uint TQValueListPrivate<T>::remove( const T& _x )
      -{
      -    const T x = _x;
      -    uint result = 0;
      -    Iterator first = Iterator( node->next );
      -    Iterator last = Iterator( node );
      -    while( first != last) {
      -	if ( *first == x ) {
      -	    first = remove( first );
      -	    ++result;
      -	} else
      -	    ++first;
      -    }
      -    return result;
      -}
      -
      -template <class T>
      -TQ_INLINE_TEMPLATES TQ_TYPENAME TQValueListPrivate<T>::NodePtr TQValueListPrivate<T>::at( size_type i ) const
      -{
      -    Q_ASSERT( i <= nodes );
      -    NodePtr p = node->next;
      -    for( size_type x = 0; x < i; ++x )
      -	p = p->next;
      -    return p;
      -}
      -
      -template <class T>
      -TQ_INLINE_TEMPLATES void TQValueListPrivate<T>::clear()
      -{
      -    nodes = 0;
      -    NodePtr p = node->next;
      -    while( p != node ) {
      -	NodePtr next = p->next;
      -	delete p;
      -	p = next;
      -    }
      -    node->next = node->prev = node;
      -}
      -
      -#ifdef QT_CHECK_RANGE
      -# if !defined( TQT_NO_DEBUG ) && defined( QT_CHECK_VALUELIST_RANGE )
      -#  define QT_CHECK_INVALID_LIST_ELEMENT if ( empty() ) tqWarning( "TQValueList: Warning invalid element" )
      -#  define QT_CHECK_INVALID_LIST_ELEMENT_FATAL Q_ASSERT( !empty() );
      -# else
      -#  define QT_CHECK_INVALID_LIST_ELEMENT
      -#  define QT_CHECK_INVALID_LIST_ELEMENT_FATAL
      -# endif
      -#else
      -# define QT_CHECK_INVALID_LIST_ELEMENT
      -# define QT_CHECK_INVALID_LIST_ELEMENT_FATAL
      -#endif
      -
      -template <class T> class TQDeepCopy;
      -
      -template <class T>
      -class TQValueList
      -{
      -public:
      -    /**
      -     * Typedefs
      -     */
      -    typedef TQValueListIterator<T> iterator;
      -    typedef TQValueListConstIterator<T> const_iterator;
      -    typedef T value_type;
      -    typedef value_type* pointer;
      -    typedef const value_type* const_pointer;
      -    typedef value_type& reference;
      -    typedef const value_type& const_reference;
      -    typedef size_t size_type;
      -#ifndef TQT_NO_STL
      -    typedef ptrdiff_t  difference_type;
      -#else
      -    typedef int difference_type;
      -#endif
      -
      -    /**
      -     * API
      -     */
      -    TQValueList() { sh = new TQValueListPrivate<T>; }
      -    TQValueList( const TQValueList<T>& l ) { sh = l.sh; sh->ref(); }
      -#ifndef TQT_NO_STL
      -    TQValueList( const std::list<T>& l )
      -    {
      -	sh = new TQValueListPrivate<T>;
      -	tqCopy( l.begin(), l.end(), std::back_inserter( *this ) );
      -    }
      -#endif
      -    ~TQValueList() { sh->derefAndDelete(); }
      -
      -    TQValueList<T>& operator= ( const TQValueList<T>& l )
      -    {
      -	l.sh->ref();
      -	sh->derefAndDelete();
      -	sh = l.sh;
      -	return *this;
      -    }
      -#ifndef TQT_NO_STL
      -    TQValueList<T>& operator= ( const std::list<T>& l )
      -    {
      -	detach();
      -	tqCopy( l.begin(), l.end(), std::back_inserter( *this ) );
      -	return *this;
      -    }
      -    bool operator== ( const std::list<T>& l ) const
      -    {
      -	if ( size() != l.size() )
      -	    return FALSE;
      -	const_iterator it2 = begin();
      -#if !defined(Q_CC_MIPS)
      -	typename
      -#endif
      -	std::list<T>::const_iterator it = l.begin();
      -	for ( ; it2 != end(); ++it2, ++it )
      -	if ( !((*it2) == (*it)) )
      -	    return FALSE;
      -	return TRUE;
      -    }
      -#endif
      -    bool operator== ( const TQValueList<T>& l ) const;
      -    bool operator!= ( const TQValueList<T>& l ) const { return !( *this == l ); }
      -    iterator begin() { detach(); return iterator( sh->node->next ); }
      -    const_iterator begin() const { return const_iterator( sh->node->next ); }
      -    const_iterator constBegin() const { return const_iterator( sh->node->next ); }
      -    iterator end() { detach(); return iterator( sh->node ); }
      -    const_iterator end() const { return const_iterator( sh->node ); }
      -    const_iterator constEnd() const { return const_iterator( sh->node ); }
      -    iterator insert( iterator it, const T& x ) { detach(); return sh->insert( it, x ); }
      -    uint remove( const T& x ) { detach(); return sh->remove( x ); }
      -    void clear();
      -
      -    // ### 4.0: move out of class
      -    TQValueList<T>& operator<< ( const T& x )
      -    {
      -	append( x );
      -	return *this;
      -    }
      -
      -    size_type size() const { return sh->nodes; }
      -    bool empty() const { return sh->nodes == 0; }
      -    void push_front( const T& x ) { detach(); sh->insert( begin(), x ); }
      -    void push_back( const T& x ) { detach(); sh->insert( end(), x ); }
      -    iterator erase( iterator pos ) { detach(); return sh->remove( pos ); }
      -    iterator erase( iterator first, iterator last );
      -    reference front() { QT_CHECK_INVALID_LIST_ELEMENT_FATAL; return *begin(); }
      -    const_reference front() const { QT_CHECK_INVALID_LIST_ELEMENT_FATAL; return *begin(); }
      -    reference back() { QT_CHECK_INVALID_LIST_ELEMENT_FATAL; return *(--end()); }
      -    const_reference back() const { QT_CHECK_INVALID_LIST_ELEMENT_FATAL; return *(--end()); }
      -    void pop_front() { QT_CHECK_INVALID_LIST_ELEMENT; erase( begin() ); }
      -    void pop_back() {
      -	QT_CHECK_INVALID_LIST_ELEMENT;
      -	iterator tmp = end();
      -	erase( --tmp );
      -    }
      -    void insert( iterator pos, size_type n, const T& x );
      -    // Some compilers (incl. vc++) would instantiate this function even if
      -    // it is not used; this would constrain TQValueList to classes that provide
      -    // an operator<
      -    /*
      -    void sort()
      -    {
      -	qHeapSort( *this );
      -    }
      -    */
      -
      -    TQValueList<T> operator+ ( const TQValueList<T>& l ) const;
      -    TQValueList<T>& operator+= ( const TQValueList<T>& l );
      -
      -    iterator fromLast() { detach(); return iterator( sh->node->prev ); }
      -    const_iterator fromLast() const { return const_iterator( sh->node->prev ); }
      -
      -    bool isEmpty() const { return ( sh->nodes == 0 ); }
      -
      -    iterator append( const T& x ) { detach(); return sh->insert( end(), x ); }
      -    iterator prepend( const T& x ) { detach(); return sh->insert( begin(), x ); }
      -
      -    iterator remove( iterator it ) { detach(); return sh->remove( it ); }
      -
      -    T& first() { QT_CHECK_INVALID_LIST_ELEMENT; detach(); return sh->node->next->data; }
      -    const T& first() const { QT_CHECK_INVALID_LIST_ELEMENT; return sh->node->next->data; }
      -    T& last() { QT_CHECK_INVALID_LIST_ELEMENT; detach(); return sh->node->prev->data; }
      -    const T& last() const { QT_CHECK_INVALID_LIST_ELEMENT; return sh->node->prev->data; }
      -
      -    T& operator[] ( size_type i ) { QT_CHECK_INVALID_LIST_ELEMENT; detach(); return sh->at(i)->data; }
      -    const T& operator[] ( size_type i ) const { QT_CHECK_INVALID_LIST_ELEMENT; return sh->at(i)->data; }
      -    iterator at( size_type i ) { QT_CHECK_INVALID_LIST_ELEMENT; detach(); return iterator( sh->at(i) ); }
      -    const_iterator at( size_type i ) const { QT_CHECK_INVALID_LIST_ELEMENT; return const_iterator( sh->at(i) ); }
      -    iterator find ( const T& x ) { detach(); return iterator( sh->find( sh->node->next, x) ); }
      -    const_iterator find ( const T& x ) const { return const_iterator( sh->find( sh->node->next, x) ); }
      -    iterator find ( iterator it, const T& x ) { detach(); return iterator( sh->find( it.node, x ) ); }
      -    const_iterator find ( const_iterator it, const T& x ) const { return const_iterator( sh->find( it.node, x ) ); }
      -    int findIndex( const T& x ) const { return sh->findIndex( sh->node->next, x) ; }
      -    size_type contains( const T& x ) const { return sh->contains( x ); }
      -
      -    size_type count() const { return sh->nodes; }
      -
      -    TQValueList<T>& operator+= ( const T& x )
      -    {
      -	append( x );
      -	return *this;
      -    }
      -    typedef TQValueListIterator<T> Iterator;
      -    typedef TQValueListConstIterator<T> ConstIterator;
      -    typedef T ValueType;
      -
      -protected:
      -    /**
      -     * Helpers
      -     */
      -    void detach() { if ( sh->count > 1 ) detachInternal(); }
      -
      -    /**
      -     * Variables
      -     */
      -    TQValueListPrivate<T>* sh;
      -
      -private:
      -    void detachInternal();
      -
      -    friend class TQDeepCopy< TQValueList<T> >;
      -};
      -
      -template <class T>
      -TQ_INLINE_TEMPLATES bool TQValueList<T>::operator== ( const TQValueList<T>& l ) const
      -{
      -    if ( size() != l.size() )
      -	return FALSE;
      -    const_iterator it2 = begin();
      -    const_iterator it = l.begin();
      -    for( ; it != l.end(); ++it, ++it2 )
      -	if ( !( *it == *it2 ) )
      -	    return FALSE;
      -    return TRUE;
      -}
      -
      -template <class T>
      -TQ_INLINE_TEMPLATES void TQValueList<T>::clear()
      -{
      -    if ( sh->count == 1 ) sh->clear(); else { sh->deref(); sh = new TQValueListPrivate<T>; }
      -}
      -
      -template <class T>
      -TQ_INLINE_TEMPLATES TQ_TYPENAME TQValueList<T>::iterator TQValueList<T>::erase( TQ_TYPENAME TQValueList<T>::iterator first, TQ_TYPENAME TQValueList<T>::iterator last )
      -{
      -    while ( first != last )
      -	erase( first++ );
      -    return last;
      -}
      -
      -
      -template <class T>
      -TQ_INLINE_TEMPLATES void TQValueList<T>::insert( TQ_TYPENAME TQValueList<T>::iterator pos, size_type n, const T& x )
      -{
      -    for ( ; n > 0; --n )
      -	insert( pos, x );
      -}
      -
      -template <class T>
      -TQ_INLINE_TEMPLATES TQValueList<T> TQValueList<T>::operator+ ( const TQValueList<T>& l ) const
      -{
      -    TQValueList<T> l2( *this );
      -    for( const_iterator it = l.begin(); it != l.end(); ++it )
      -	l2.append( *it );
      -    return l2;
      -}
      -
      -template <class T>
      -TQ_INLINE_TEMPLATES TQValueList<T>& TQValueList<T>::operator+= ( const TQValueList<T>& l )
      -{
      -    TQValueList<T> copy = l;
      -    for( const_iterator it = copy.begin(); it != copy.end(); ++it )
      -	append( *it );
      -    return *this;
      -}
      -
      -template <class T>
      -TQ_INLINE_TEMPLATES void TQValueList<T>::detachInternal()
      -{
      -    sh->deref(); sh = new TQValueListPrivate<T>( *sh );
      -}
      -
      -#ifndef TQT_NO_DATASTREAM
      -template <class T>
      -TQ_INLINE_TEMPLATES TQDataStream& operator>>( TQDataStream& s, TQValueList<T>& l )
      -{
      -    l.clear();
      -    TQ_UINT32 c;
      -    s >> c;
      -    for( TQ_UINT32 i = 0; i < c; ++i )
      -    {
      -	T t;
      -	s >> t;
      -	l.append( t );
      -	if ( s.atEnd() )
      -	    break;
      -    }
      -    return s;
      -}
      -
      -template <class T>
      -TQ_INLINE_TEMPLATES TQDataStream& operator<<( TQDataStream& s, const TQValueList<T>& l )
      -{
      -    s << (TQ_UINT32)l.size();
      -    TQValueListConstIterator<T> it = l.begin();
      -    for( ; it != l.end(); ++it )
      -	s << *it;
      -    return s;
      -}
      -#endif // TQT_NO_DATASTREAM
      -
      -#define Q_DEFINED_QVALUELIST
      -#define Q_DEFINED_QVALUELIST
      -#include "ntqwinexport.h"
      -#endif // TQVALUELIST_H
      -
      - -


      - -
      Copyright © 2007 -TrolltechTrademarks -
      TQt 3.3.8
      -
      - diff --git a/doc/html/qvaluelist-members.html b/doc/html/qvaluelist-members.html deleted file mode 100644 index 3ab738fdf..000000000 --- a/doc/html/qvaluelist-members.html +++ /dev/null @@ -1,82 +0,0 @@ - - - - - -TQValueList Member List - - - - - - - -
      - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

      Complete Member List for TQValueList

      - -

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

      - -


      - -
      Copyright © 2007 -TrolltechTrademarks -
      TQt 3.3.8
      -
      - diff --git a/doc/html/qvaluelistconstiterator-members.html b/doc/html/qvaluelistconstiterator-members.html deleted file mode 100644 index 64fa123a6..000000000 --- a/doc/html/qvaluelistconstiterator-members.html +++ /dev/null @@ -1,52 +0,0 @@ - - - - - -TQValueListConstIterator Member List - - - - - - - -
      - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

      Complete Member List for TQValueListConstIterator

      - -

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

      - -


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

      TQValueListConstIterator Class Reference

      - -

      The TQValueListConstIterator class provides a const iterator -for TQValueList. -More... -

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

      -

      #include <ntqvaluelist.h> -

      List of all member functions. -

      Public Members

      - -

      Detailed Description

      - - -The TQValueListConstIterator class provides a const iterator -for TQValueList. -

      - - -

      In contrast to TQValueListIterator, this class is used to iterate -over a const list. It does not allow modification of the values of -the list since that would break const semantics. -

      You can create the appropriate const iterator type by using the const_iterator typedef provided by TQValueList. -

      For more information on TQValueList iterators, see -TQValueListIterator. -

      See also TQValueListIterator, TQValueList, TQt Template Library Classes, and Non-GUI Classes. - -


      Member Type Documentation

      -

      TQValueListConstIterator::pointer

      -Pointer to value_type. -

      TQValueListConstIterator::reference

      -Reference to value_type. -

      TQValueListConstIterator::value_type

      -The type of value. -

      Member Function Documentation

      -

      TQValueListConstIterator::TQValueListConstIterator () -

      - -

      Creates un uninitialized iterator. - -

      TQValueListConstIterator::TQValueListConstIterator ( const TQValueListConstIterator<T> & it ) -

      - -

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

      Constructs a copy of the iterator it. - -

      TQValueListConstIterator::TQValueListConstIterator ( const TQValueListIterator<T> & it ) -

      - -

      Constructs a copy of the iterator it. - -

      bool TQValueListConstIterator::operator!= ( const TQValueListConstIterator<T> & it ) const -

      - -

      Compares this iterator with it and returns TRUE if they point -to different items; otherwise returns FALSE. - -

      const T & TQValueListConstIterator::operator* () const -

      - -

      Asterisk operator. Returns a reference to the current iterator item. - -

      TQValueListConstIterator<T> & TQValueListConstIterator::operator++ () -

      - -

      Prefix ++ makes the succeeding item current and returns an -iterator pointing to the new current item. The iterator cannot -check whether it reached the end of the list. Incrementing the -iterator returned by end() causes undefined results. - -

      TQValueListConstIterator<T> TQValueListConstIterator::operator++ ( int ) -

      - -

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

      Postfix ++ makes the succeeding item current and returns an -iterator pointing to the new current item. The iterator cannot -check whether it reached the end of the list. Incrementing the -iterator returned by end() causes undefined results. - -

      TQValueListConstIterator<T> & TQValueListConstIterator::operator-- () -

      - -

      Prefix -- makes the previous item current and returns an iterator -pointing to the new current item. The iterator cannot check -whether it reached the beginning of the list. Decrementing the -iterator returned by begin() causes undefined results. - -

      TQValueListConstIterator<T> TQValueListConstIterator::operator-- ( int ) -

      - -

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

      Postfix -- makes the previous item current and returns an iterator -pointing to the new current item. The iterator cannot check -whether it reached the beginning of the list. Decrementing the -iterator returned by begin() causes undefined results. - -

      bool TQValueListConstIterator::operator== ( const TQValueListConstIterator<T> & it ) const -

      - -

      Compares this iterator with it and returns TRUE if they point -to the same item; 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/qvaluelistiterator-members.html b/doc/html/qvaluelistiterator-members.html deleted file mode 100644 index 766337c73..000000000 --- a/doc/html/qvaluelistiterator-members.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - -TQValueListIterator Member List - - - - - - - -
      - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

      Complete Member List for TQValueListIterator

      - -

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

      - -


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

      TQValueListIterator Class Reference

      - -

      The TQValueListIterator class provides an iterator for TQValueList. -More... -

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

      -

      #include <ntqvaluelist.h> -

      List of all member functions. -

      Public Members

      - -

      Detailed Description

      - - -The TQValueListIterator class provides an iterator for TQValueList. -

      - - -

      An iterator is a class for accessing the items of a container -class: a generalization of the index in an array. A pointer -into a "const char *" and an index into an "int[]" are both -iterators, and the general idea is to provide that functionality -for any data structure. -

      The TQValueListIterator class is an iterator for TQValueList -instantiations. You can create the appropriate iterator type by -using the iterator typedef provided by TQValueList. -

      The only way to access the items in a TQValueList is to use an -iterator. -

      Example (see TQValueList for the complete code): -

      -    EmployeeList::iterator it;
      -    for ( it = list.begin(); it != list.end(); ++it )
      -        cout << (*it).surname().latin1() << ", " <<
      -                (*it).forename().latin1() << " earns " <<
      -                (*it).salary() << endl;
      -
      -    // Output:
      -    // Doe, John earns 50000
      -    // Williams, Jane earns 80000
      -    // Hawthorne, Mary earns 90000
      -    // Jones, Tom earns 60000
      -    
      - -

      TQValueList is highly optimized for performance and memory usage. -This means that you must be careful: TQValueList does not know -about all its iterators and the iterators don't know to which list -they belong. This makes things very fast, but if you're not -careful, you can get spectacular bugs. Always make sure iterators -are valid before dereferencing them or using them as parameters to -generic algorithms in the STL or the TQTL. -

      Using an invalid iterator is undefined (your application will -probably crash). Many TQt functions return const value lists; to -iterate over these you should make a copy and iterate over the -copy. -

      For every Iterator there is a ConstIterator. When accessing a -TQValueList in a const environment or if the reference or pointer -to the list is itself const, then you must use the ConstIterator. -Its semantics are the same as the Iterator, but it only returns -const references. -

      See also TQValueList, TQValueListConstIterator, TQt Template Library Classes, and Non-GUI Classes. - -


      Member Type Documentation

      -

      TQValueListIterator::pointer

      -Pointer to value_type. -

      TQValueListIterator::reference

      -Reference to value_type. -

      TQValueListIterator::value_type

      -The type of value, T. -

      Member Function Documentation

      -

      TQValueListIterator::TQValueListIterator () -

      - -

      Creates un uninitialized iterator. - -

      TQValueListIterator::TQValueListIterator ( const TQValueListIterator<T> & it ) -

      - -

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

      Constructs a copy of the iterator it. - -

      bool TQValueListIterator::operator!= ( const TQValueListIterator<T> & it ) const -

      - -

      Compares this iterator and it and returns TRUE if they point to -different items; otherwise returns FALSE. - -

      T & TQValueListIterator::operator* () -

      - -

      Asterisk operator. Returns a reference to the current iterator item. - -

      const T & TQValueListIterator::operator* () const -

      - -

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

      Asterisk operator. Returns a reference to the current iterator item. - -

      TQValueListIterator<T> & TQValueListIterator::operator++ () -

      - -

      Prefix ++ makes the succeeding item current and returns an -iterator pointing to the new current item. The iterator cannot -check whether it reached the end of the list. Incrementing the -iterator returned by end() causes undefined results. - -

      TQValueListIterator<T> TQValueListIterator::operator++ ( int ) -

      - -

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

      Postfix ++ makes the succeeding item current and returns an -iterator pointing to the new current item. The iterator cannot -check whether it reached the end of the list. Incrementing the -iterator returned by end() causes undefined results. - -

      TQValueListIterator<T> & TQValueListIterator::operator+= ( int j ) -

      - -

      Postfix -- jumps j steps forward in the list. The iterator -cannot check whether it reached the end of the list. Jumping past -the end() causes undefined results. - -

      TQValueListIterator<T> & TQValueListIterator::operator-- () -

      - -

      Prefix -- makes the previous item current and returns an iterator -pointing to the new current item. The iterator cannot check -whether it reached the beginning of the list. Decrementing the -iterator returned by begin() causes undefined results. - -

      TQValueListIterator<T> TQValueListIterator::operator-- ( int ) -

      - -

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

      Postfix -- makes the previous item current and returns an iterator -pointing to the new current item. The iterator cannot check -whether it reached the beginning of the list. Decrementing the -iterator returned by begin() causes undefined results. - -

      TQValueListIterator<T> & TQValueListIterator::operator-= ( int j ) -

      - -

      Postfix -- jumps j steps backward in the list. The iterator -cannot check whether it reached the beginning of the list. Jumping -past begin() causes undefined results. - -

      bool TQValueListIterator::operator== ( const TQValueListIterator<T> & it ) const -

      - -

      Compares this iterator and it and returns TRUE if they point to -the same item; 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/qvaluestack-h.html b/doc/html/qvaluestack-h.html deleted file mode 100644 index c3c7eb49f..000000000 --- a/doc/html/qvaluestack-h.html +++ /dev/null @@ -1,112 +0,0 @@ - - - - - -ntqvaluestack.h Include File - - - - - - - -
      - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

      ntqvaluestack.h

      - -

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


      -
      -/****************************************************************************
      -** $Id: qt/ntqvaluestack.h   3.3.8   edited Jan 11 14:38 $
      -**
      -** Definition of TQValueStack class
      -**
      -** Created : 990925
      -**
      -** 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 TQVALUESTACK_H
      -#define TQVALUESTACK_H
      -
      -#ifndef QT_H
      -#include "ntqvaluelist.h"
      -#endif // QT_H
      -
      -
      -template<class T>
      -class TQValueStack : public TQValueList<T>
      -{
      -public:
      -    TQValueStack() {}
      -   ~TQValueStack() {}
      -    void  push( const T& d ) { this->append(d); }
      -    T pop()
      -    {
      -	T elem( this->last() );
      -	if ( !this->isEmpty() )
      -	    this->remove( this->fromLast() );
      -	return elem;
      -    }
      -    T& top() { return this->last(); }
      -    const T& top() const { return this->last(); }
      -};
      -
      -#endif
      -
      - -


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

      Complete Member List for TQValueStack

      - -

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

      - -


      - -
      Copyright © 2007 -TrolltechTrademarks -
      TQt 3.3.8
      -
      - diff --git a/doc/html/qvaluevector-h.html b/doc/html/qvaluevector-h.html deleted file mode 100644 index 413fe3aa7..000000000 --- a/doc/html/qvaluevector-h.html +++ /dev/null @@ -1,620 +0,0 @@ - - - - - -ntqvaluevector.h Include File - - - - - - - -
      - -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

      ntqvaluevector.h

      - -

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


      -
      -/****************************************************************************
      -** $Id: qt/ntqvaluevector.h   3.3.8   edited Jan 11 14:38 $
      -**
      -** Definition of TQValueVector 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 TQVALUEVECTOR_H
      -#define TQVALUEVECTOR_H
      -
      -#ifndef QT_H
      -#include "ntqtl.h"
      -#include "ntqshared.h"
      -#include "ntqdatastream.h"
      -#endif // QT_H
      -
      -#ifndef TQT_NO_STL
      -#include <vector>
      -#endif
      -
      -template <class T>
      -class TQValueVectorPrivate : public TQShared
      -{
      -public:
      -    typedef T value_type;
      -    typedef T* pointer;
      -
      -    TQValueVectorPrivate()
      -	: start( 0 ), finish( 0 ), end( 0 )
      -    {
      -    }
      -
      -    TQValueVectorPrivate( const TQValueVectorPrivate<T>& x );
      -    TQValueVectorPrivate( size_t size );
      -
      -    void derefAndDelete() // work-around for hp-cc
      -    {
      -	if ( deref() )
      -	    delete this;
      -    }
      -
      -#if defined(Q_TEMPLATEDLL)
      -    // Workaround MS bug in memory de/allocation in DLL vs. EXE
      -    virtual
      -#endif
      -    ~TQValueVectorPrivate()
      -    {
      -	delete[] start;
      -    }
      -
      -    size_t size() const
      -    {
      -	return finish - start;
      -    }
      -
      -    bool empty() const
      -    {
      -	return start == finish;
      -    }
      -
      -    size_t capacity() const
      -    {
      -	return end - start;
      -    }
      -
      -    void insert( pointer pos, const T& x );
      -    void insert( pointer pos, size_t n, const T& x );
      -    void reserve( size_t n );
      -
      -    void clear()
      -    {
      -	delete[] start;
      -	start = 0;
      -	finish = 0;
      -	end = 0;
      -    }
      -
      -
      -    pointer start;
      -    pointer finish;
      -    pointer end;
      -
      -private:
      -    pointer growAndCopy( size_t n, pointer s, pointer f );
      -
      -    TQValueVectorPrivate<T>& operator=( const TQValueVectorPrivate<T>& x );
      -
      -};
      -
      -template <class T>
      -TQ_INLINE_TEMPLATES TQValueVectorPrivate<T>::TQValueVectorPrivate( const TQValueVectorPrivate<T>& x )
      -    : TQShared()
      -{
      -    size_t i = x.size();
      -    if ( i > 0 ) {
      -	start = new T[ i ];
      -	finish = start + i;
      -	end = start + i;
      -#if defined(__xlC__) && __xlC__ < 0x400 // xlC 3.6 confused by const
      -	tqCopy( (pointer)x.start, (pointer)x.finish, start );
      -#else
      -	tqCopy( x.start, x.finish, start );
      -#endif
      -    } else {
      -	start = 0;
      -	finish = 0;
      -	end = 0;
      -    }
      -}
      -
      -template <class T>
      -TQ_INLINE_TEMPLATES TQValueVectorPrivate<T>::TQValueVectorPrivate( size_t size )
      -{
      -    if ( size > 0 ) {
      -	start = new T[size];
      -	finish = start + size;
      -	end = start + size;
      -    } else {
      -	start = 0;
      -	finish = 0;
      -	end = 0;
      -    }
      -}
      -
      -template <class T>
      -TQ_INLINE_TEMPLATES void TQValueVectorPrivate<T>::insert( pointer pos, const T& x )
      -{
      -    const size_t lastSize = size();
      -    const size_t n = lastSize !=0 ? 2*lastSize : 1;
      -    const size_t offset = pos - start;
      -    pointer newStart = new T[n];
      -    pointer newFinish = newStart + offset;
      -    tqCopy( start, pos, newStart );
      -    *newFinish = x;
      -    tqCopy( pos, finish, ++newFinish );
      -    delete[] start;
      -    start = newStart;
      -    finish = newStart + lastSize + 1;
      -    end = newStart + n;
      -}
      -
      -template <class T>
      -TQ_INLINE_TEMPLATES void TQValueVectorPrivate<T>::insert( pointer pos, size_t n, const T& x )
      -{
      -    if ( size_t( end - finish ) >= n ) {
      -	// enough room
      -	const size_t elems_after = finish - pos;
      -	pointer old_finish = finish;
      -	if ( elems_after > n ) {
      -	    tqCopy( finish - n, finish, finish );
      -	    finish += n;
      -	    tqCopyBackward( pos, old_finish - n, old_finish );
      -	    tqFill( pos, pos + n, x );
      -	} else {
      -	    pointer filler = finish;
      -	    size_t i = n - elems_after;
      -	    for ( ; i > 0; --i, ++filler )
      -		*filler = x;
      -	    finish += n - elems_after;
      -	    tqCopy( pos, old_finish, finish );
      -	    finish += elems_after;
      -	    tqFill( pos, old_finish, x );
      -	}
      -    } else {
      -	// not enough room
      -	const size_t lastSize = size();
      -	const size_t len = lastSize + TQMAX( lastSize, n );
      -	pointer newStart = new T[len];
      -	pointer newFinish = tqCopy( start, pos, newStart );
      -	// fill up inserted space
      -	size_t i = n;
      -	for ( ; i > 0; --i, ++newFinish )
      -	    *newFinish = x;
      -	newFinish = tqCopy( pos, finish, newFinish );
      -	delete[] start;
      -	start = newStart;
      -	finish = newFinish;
      -	end = newStart + len;
      -    }
      -}
      -
      -template <class T>
      -TQ_INLINE_TEMPLATES void TQValueVectorPrivate<T>::reserve( size_t n )
      -{
      -    const size_t lastSize = size();
      -    pointer tmp = growAndCopy( n, start, finish );
      -    start = tmp;
      -    finish = tmp + lastSize;
      -    end = start + n;
      -}
      -
      -template <class T>
      -TQ_INLINE_TEMPLATES TQ_TYPENAME TQValueVectorPrivate<T>::pointer TQValueVectorPrivate<T>::growAndCopy( size_t n, pointer s, pointer f )
      -{
      -    pointer newStart = new T[n];
      -    tqCopy( s, f, newStart );
      -    delete[] start;
      -    return newStart;
      -}
      -
      -template <class T> class TQDeepCopy;
      -
      -template <class T>
      -class TQValueVector
      -{
      -public:
      -    typedef T value_type;
      -    typedef value_type* pointer;
      -    typedef const value_type* const_pointer;
      -    typedef value_type* iterator;
      -    typedef const value_type* const_iterator;
      -    typedef value_type& reference;
      -    typedef const value_type& const_reference;
      -    typedef size_t size_type;
      -#ifndef TQT_NO_STL
      -    typedef ptrdiff_t difference_type;
      -#else
      -    typedef int difference_type;
      -#endif
      -
      -    TQValueVector()
      -    {
      -	sh = new TQValueVectorPrivate<T>;
      -    }
      -
      -    TQValueVector( const TQValueVector<T>& v )
      -    {
      -	sh = v.sh;
      -	sh->ref();
      -    }
      -
      -    TQValueVector( size_type n, const T& val = T() );
      -
      -#ifndef TQT_NO_STL
      -    TQValueVector( std::vector<T>& v ) // ### remove in 4.0
      -    {
      -	sh = new TQValueVectorPrivate<T>( v.size() );
      -	tqCopy( v.begin(), v.end(), begin() );
      -    }
      -
      -    TQValueVector( const std::vector<T>& v )
      -    {
      -	sh = new TQValueVectorPrivate<T>( v.size() );
      -	tqCopy( v.begin(), v.end(), begin() );
      -    }
      -#endif
      -
      -    ~TQValueVector()
      -    {
      -	sh->derefAndDelete();
      -    }
      -
      -    TQValueVector<T>& operator= ( const TQValueVector<T>& v )
      -    {
      -	v.sh->ref();
      -	sh->derefAndDelete();
      -	sh = v.sh;
      -	return *this;
      -    }
      -
      -#ifndef TQT_NO_STL
      -    TQValueVector<T>& operator= ( const std::vector<T>& v )
      -    {
      -	clear();
      -	resize( v.size() );
      -	tqCopy( v.begin(), v.end(), begin() );
      -	return *this;
      -    }
      -#endif
      -
      -    size_type size() const { return sh->size(); }
      -
      -    bool empty() const { return sh->empty(); }
      -
      -    size_type capacity() const
      -    {
      -	return size_type( sh->capacity() );
      -    }
      -
      -    iterator begin()
      -    {
      -	detach();
      -	return sh->start;
      -    }
      -
      -    const_iterator begin() const
      -    {
      -	return sh->start;
      -    }
      -
      -    const_iterator constBegin() const
      -    {
      -	return sh->start;
      -    }
      -
      -    iterator end()
      -    {
      -	detach();
      -	return sh->finish;
      -    }
      -
      -    const_iterator end() const
      -    {
      -	return sh->finish;
      -    }
      -
      -    const_iterator constEnd() const
      -    {
      -	return sh->finish;
      -    }
      -
      -    reference at( size_type i, bool* ok = 0 )
      -    {
      -	detach();
      -	if ( ok )
      -	    *ok = ( i < size() );
      -	return *( begin() + i );
      -    }
      -
      -    const_reference at( size_type i, bool* ok = 0 ) const
      -    {
      -	if ( ok )
      -	    *ok = ( i < size() );
      -	return *( begin() + i );
      -    }
      -
      -    reference operator[]( size_type i )
      -    {
      -	detach();
      -	return *( begin() + i );
      -    }
      -
      -    const_reference operator[]( size_type i ) const
      -    {
      -	return *( begin() + i );
      -    }
      -
      -    reference front()
      -    {
      -	Q_ASSERT( !empty() );
      -	detach();
      -	return *begin();
      -    }
      -
      -    const_reference front() const
      -    {
      -	Q_ASSERT( !empty() );
      -	return *begin();
      -    }
      -
      -    reference back()
      -    {
      -	Q_ASSERT( !empty() );
      -	detach();
      -	return *( end() - 1 );
      -    }
      -
      -    const_reference back() const
      -    {
      -	Q_ASSERT( !empty() );
      -	return *( end() - 1 );
      -    }
      -
      -    void push_back( const T& x )
      -    {
      -	detach();
      -	if ( sh->finish == sh->end ) {
      -	    sh->reserve( size()+size()/2+1 );
      -	}
      -	*sh->finish = x;
      -	++sh->finish;
      -    }
      -
      -    void pop_back()
      -    {
      -	detach();
      -	if ( empty() )
      -	    return;
      -	--sh->finish;
      -    }
      -
      -    iterator insert( iterator pos, const T& x );
      -    iterator insert( iterator pos, size_type n, const T& x );
      -
      -    void reserve( size_type n )
      -    {
      -	if ( capacity() < n ) {
      -	    detach();
      -	    sh->reserve( n );
      -	}
      -    }
      -
      -    void resize( size_type n, const T& val = T() )
      -    {
      -	if ( n < size() )
      -	    erase( begin() + n, end() );
      -	else
      -	    insert( end(), n - size(), val );
      -    }
      -
      -    void clear()
      -    {
      -	detach();
      -	sh->clear();
      -    }
      -
      -    iterator erase( iterator pos )
      -    {
      -	detach();
      -	if ( pos + 1 != end() )
      -	    tqCopy( pos + 1, sh->finish, pos );
      -	--sh->finish;
      -	return pos;
      -    }
      -
      -    iterator erase( iterator first, iterator last )
      -    {
      -	detach();
      -	tqCopy( last, sh->finish, first );
      -	sh->finish = sh->finish - ( last - first );
      -	return first;
      -    }
      -
      -    // ### remove in TQt 4.0
      -    bool operator==( const TQValueVector<T>& x )
      -    {
      -	return size()==x.size() ? tqEqual( constBegin(), constEnd(), x.begin()) : FALSE;
      -    }
      -
      -    bool operator==( const TQValueVector<T>& x ) const
      -    {
      -	return size()==x.size() ? tqEqual( begin(), end(), x.begin() ) : FALSE;
      -    }
      -
      -    typedef T ValueType;
      -    typedef ValueType *Iterator;
      -    typedef const ValueType *ConstIterator;
      -
      -    size_type count() const { return size(); }
      -    bool isEmpty() const { return empty(); }
      -
      -    reference first() { return front(); }
      -    const_reference first() const { return front(); }
      -    reference last() { return back(); }
      -    const_reference last() const { return back(); }
      -    void append( const T& x ) { push_back( x ); }
      -
      -protected:
      -    void detach()
      -    {
      -	if ( sh->count > 1 ) { detachInternal(); }
      -    }
      -    void detachInternal();
      -    TQValueVectorPrivate<T>* sh;
      -
      -private:
      -    friend class TQDeepCopy< TQValueVector<T> >;
      -};
      -
      -template <class T>
      -TQ_INLINE_TEMPLATES TQValueVector<T>::TQValueVector( size_type n, const T& val )
      -{
      -    sh = new TQValueVectorPrivate<T>( n );
      -    tqFill( begin(), end(), val );
      -}
      -
      -template <class T>
      -TQ_INLINE_TEMPLATES void TQValueVector<T>::detachInternal()
      -{
      -    sh->deref();
      -    sh = new TQValueVectorPrivate<T>( *sh );
      -}
      -
      -template <class T>
      -TQ_INLINE_TEMPLATES TQ_TYPENAME TQValueVector<T>::iterator TQValueVector<T>::insert( iterator pos, const T& x )
      -{
      -    size_type offset = pos - sh->start;
      -    detach();
      -    if ( pos == end() ) {
      -	if ( sh->finish == sh->end )
      -	    push_back( x );
      -	else {
      -	    *sh->finish = x;
      -	    ++sh->finish;
      -	}
      -    } else {
      -	if ( sh->finish == sh->end ) {
      -	    sh->insert( pos, x );
      -	} else {
      -	    *sh->finish = *(sh->finish - 1);
      -	    ++sh->finish;
      -	    tqCopyBackward( pos, sh->finish - 2, sh->finish - 1 );
      -	    *pos = x;
      -	}
      -    }
      -    return begin() + offset;
      -}
      -
      -template <class T>
      -TQ_INLINE_TEMPLATES TQ_TYPENAME TQValueVector<T>::iterator TQValueVector<T>::insert( iterator pos, size_type n, const T& x )
      -{
      -    if ( n != 0 ) {
      -	size_type offset = pos - sh->start;
      -	detach();
      -	pos = begin() + offset;
      -	sh->insert( pos, n, x );
      -    }
      -    return pos;
      -}
      -
      -
      -#ifndef TQT_NO_DATASTREAM
      -template<class T>
      -TQ_INLINE_TEMPLATES TQDataStream& operator>>( TQDataStream& s, TQValueVector<T>& v )
      -{
      -    v.clear();
      -    TQ_UINT32 c;
      -    s >> c;
      -    v.resize( c );
      -    for( TQ_UINT32 i = 0; i < c; ++i )
      -    {
      -	T t;
      -	s >> t;
      -	v[i] = t;
      -    }
      -    return s;
      -}
      -
      -template<class T>
      -TQ_INLINE_TEMPLATES TQDataStream& operator<<( TQDataStream& s, const TQValueVector<T>& v )
      -{
      -    s << (TQ_UINT32)v.size();
      -    // ### use typename TQValueVector<T>::const_iterator once all supported
      -    // ### compilers know about the 'typename' keyword.
      -    const T* it = v.begin();
      -    for( ; it != v.end(); ++it )
      -	s << *it;
      -    return s;
      -}
      -#endif // TQT_NO_DATASTREAM
      -
      -#define Q_DEFINED_QVALUEVECTOR
      -#include "ntqwinexport.h"
      -#endif // TQVALUEVECTOR_H
      -
      - -


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

      Complete Member List for TQValueVector

      - -

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

      - -


      - -
      Copyright © 2007 -TrolltechTrademarks -
      TQt 3.3.8
      -
      - diff --git a/doc/html/qvariant-h.html b/doc/html/qvariant-h.html index 7b8783753..be99da79c 100644 --- a/doc/html/qvariant-h.html +++ b/doc/html/qvariant-h.html @@ -355,9 +355,9 @@ public: // down here for GCC 2.7.* compatibility #ifndef QT_H -#include "ntqvaluelist.h" +#include "tqvaluelist.h" #include "ntqstringlist.h" -#include "ntqmap.h" +#include "tqmap.h" #endif // QT_H inline TQVariant::Type TQVariant::type() const diff --git a/doc/html/qwindowsystem_qws-h.html b/doc/html/qwindowsystem_qws-h.html index b88d5282c..998606cdd 100644 --- a/doc/html/qwindowsystem_qws-h.html +++ b/doc/html/qwindowsystem_qws-h.html @@ -77,7 +77,7 @@ body { background: #ffffff; color: black; } #ifndef QT_H #include "qwssocket_qws.h" -#include "ntqmap.h" +#include "tqmap.h" #include "ntqdatetime.h" #include "ntqptrlist.h" #include "ntqimage.h" diff --git a/doc/html/shared.html b/doc/html/shared.html index 83e7af815..ef13d55fb 100644 --- a/doc/html/shared.html +++ b/doc/html/shared.html @@ -51,8 +51,8 @@ seem heavyweight. TQFontMetricsFont metrics information TQIconSetSet of icons with different styles and sizes TQImageHardware-independent pixmap representation with direct access to the pixel data -TQMapValue-based template class that provides a dictionary -TQPairValue-based template class that provides a pair of elements +TQMapValue-based template class that provides a dictionary +TQPairValue-based template class that provides a pair of elements TQPaletteColor groups for each widget state TQPenDefines how a TQPainter should draw lines and outlines of shapes TQPicturePaint device that records and replays TQPainter commands @@ -61,9 +61,9 @@ seem heavyweight. TQRegExpPattern matching using regular expressions TQStringAbstraction of Unicode text and the classic C '\0'-terminated char array TQStringListList of strings -TQValueListValue-based template class that provides lists -TQValueStackValue-based template class that provides a stack -TQValueVectorValue-based template class that provides a dynamic array +TQValueListValue-based template class that provides lists +TQValueStackValue-based template class that provides a stack +TQValueVectorValue-based template class that provides a dynamic array


      diff --git a/doc/html/shclass.html b/doc/html/shclass.html index 814b32674..9e3a51bf6 100644 --- a/doc/html/shclass.html +++ b/doc/html/shclass.html @@ -182,7 +182,7 @@ copy().
    391. TQFontInfo
    392. TQFontMetrics
    393. TQIconSet -
    394. TQMap +
    395. TQMap
    396. TQPalette
    397. TQPen
    398. TQPicture @@ -191,8 +191,8 @@ copy().
    399. TQRegExp
    400. TQString
    401. TQStringList -
    402. TQValueList -
    403. TQValueStack +
    404. TQValueList +
    405. TQValueStack

      These classes automatically detach from common data if an object is about to be changed. The programmer will not even notice that the @@ -216,8 +216,8 @@ functions by value without concern for the copying overhead. called for p2, because painting a pixmap will modify it. The same also happens if anything is bitBlt()'ed into p2. -

      Warning: Do not copy an implicitly shared container (TQMap, -TQValueVector, etc.) while you are iterating over it. +

      Warning: Do not copy an implicitly shared container (TQMap, +TQValueVector, etc.) while you are iterating over it.

      TQCString: implicit or explicit?

      TQCString uses a mixture of implicit and explicit sharing. Functions diff --git a/doc/html/simple-font-demo-example.html b/doc/html/simple-font-demo-example.html index ad605e7fc..7cceac830 100644 --- a/doc/html/simple-font-demo-example.html +++ b/doc/html/simple-font-demo-example.html @@ -176,12 +176,12 @@ void Viewer::showFontInfo( TQFont TQStringList substitutions = TQFont::substitutes( font.family() ); - if ( ! substitutions.isEmpty() ){ + if ( ! substitutions.isEmpty() ){ messageText += "The following substitutions exist for " + \ font.family() + ":<UL>"; - TQStringList::Iterator i = substitutions.begin(); - while ( i != substitutions.end() ){ + TQStringList::Iterator i = substitutions.begin(); + while ( i != substitutions.end() ){ messageText += "<LI>\"" + (* i) + "\""; i++; } @@ -197,7 +197,7 @@ void Viewer::showFontInfo( TQFont void Viewer::setFontSubstitutions() { TQStringList substitutes; - substitutes.append( "Times" ); + substitutes.append( "Times" ); substitutes += "Mincho", substitutes << "Arabic Newspaper" << "crox"; diff --git a/doc/html/simple_dd-example.html b/doc/html/simple_dd-example.html index a80df70c7..d3b7f31c7 100644 --- a/doc/html/simple_dd-example.html +++ b/doc/html/simple_dd-example.html @@ -83,7 +83,7 @@ public: TQIconViewItem( parent, text ) {} // High-level drag and drop bool acceptDrop( const TQMimeSource *mime ) const; - void dropped( TQDropEvent *evt, const TQValueList<TQIconDragItem>& ); + void dropped( TQDropEvent *evt, const TQValueList<TQIconDragItem>& ); }; @@ -96,7 +96,7 @@ public: // High-level drag and drop TQDragObject *dragObject(); public slots: - void slotNewItem( TQDropEvent *evt, const TQValueList<TQIconDragItem>& list ); + void slotNewItem( TQDropEvent *evt, const TQValueList<TQIconDragItem>& list ); };

    406. @@ -233,7 +233,7 @@ const char* green_icon[]={ } -void DDIconViewItem::dropped( TQDropEvent *evt, const TQValueList<TQIconDragItem>& ) +void DDIconViewItem::dropped( TQDropEvent *evt, const TQValueList<TQIconDragItem>& ) { TQString label; @@ -249,7 +249,7 @@ const char* green_icon[]={ return new TQTextDrag( currentItem()->text(), this ); } -void DDIconView::slotNewItem( TQDropEvent *evt, const TQValueList<TQIconDragItem>& ) +void DDIconView::slotNewItem( TQDropEvent *evt, const TQValueList<TQIconDragItem>& ) { TQString label; @@ -275,8 +275,8 @@ int main( int argc, char *argv[] ) // Set up the connection so that we can drop items into the icon view TQObject::connect( - iv, TQ_SIGNAL(dropped(TQDropEvent*, const TQValueList<TQIconDragItem>&)), - iv, TQ_SLOT(slotNewItem(TQDropEvent*, const TQValueList<TQIconDragItem>&))); + iv, TQ_SIGNAL(dropped(TQDropEvent*, const TQValueList<TQIconDragItem>&)), + iv, TQ_SLOT(slotNewItem(TQDropEvent*, const TQValueList<TQIconDragItem>&))); // Populate the TQIconView with icons DDIconViewItem *item; diff --git a/doc/html/sql-overview-insert-main-cpp.html b/doc/html/sql-overview-insert-main-cpp.html index 42ddf63a7..6b72e2ad8 100644 --- a/doc/html/sql-overview-insert-main-cpp.html +++ b/doc/html/sql-overview-insert-main-cpp.html @@ -57,8 +57,8 @@ int main( int argc, char *argv[] ) TQStringList names = TQStringList() << "Screwdriver" << "Hammer" << "Wrench" << "Saw"; int id = 20; - for ( TQStringList::Iterator name = names.begin(); - name != names.end(); ++name ) { + for ( TQStringList::Iterator name = names.begin(); + name != names.end(); ++name ) { TQSqlRecord *buffer = cur.primeInsert(); buffer->setValue( "id", id ); buffer->setValue( "name", *name ); diff --git a/doc/html/sql-overview-table3-main-h.html b/doc/html/sql-overview-table3-main-h.html index 398c91be4..352004991 100644 --- a/doc/html/sql-overview-table3-main-h.html +++ b/doc/html/sql-overview-table3-main-h.html @@ -44,7 +44,7 @@ body { background: #ffffff; color: black; } #include <ntqapplication.h> #include <ntqcombobox.h> -#include <ntqmap.h> +#include <tqmap.h> #include <tqsqldatabase.h> #include <tqsqlcursor.h> #include <tqsqleditorfactory.h> @@ -60,7 +60,7 @@ class StatusPicker : public TQComboBox int statusId() const; void setStatusId( int id ); private: - TQMap< int, int > index2id; + TQMap< int, int > index2id; }; diff --git a/doc/html/sql-overview-table4-main-h.html b/doc/html/sql-overview-table4-main-h.html index d281c7225..7e5bd6b92 100644 --- a/doc/html/sql-overview-table4-main-h.html +++ b/doc/html/sql-overview-table4-main-h.html @@ -44,7 +44,7 @@ body { background: #ffffff; color: black; } #include <ntqapplication.h> #include <ntqcombobox.h> -#include <ntqmap.h> +#include <tqmap.h> #include <ntqpainter.h> #include <tqsqldatabase.h> #include <tqsqlcursor.h> @@ -62,7 +62,7 @@ public: int statusId() const; void setStatusId( int id ); private: - TQMap< int, int > index2id; + TQMap< int, int > index2id; }; diff --git a/doc/html/sql.html b/doc/html/sql.html index 6b5687d42..ed5a06248 100644 --- a/doc/html/sql.html +++ b/doc/html/sql.html @@ -857,8 +857,8 @@ changes to the database are accurately reflected in the cursor. TQStringList names = TQStringList() << "Screwdriver" << "Hammer" << "Wrench" << "Saw"; int id = 20; - for ( TQStringList::Iterator name = names.begin(); - name != names.end(); ++name ) { + for ( TQStringList::Iterator name = names.begin(); + name != names.end(); ++name ) { TQSqlRecord *buffer = cur.primeInsert(); buffer->setValue( "id", id ); buffer->setValue( "name", *name ); @@ -1304,13 +1304,13 @@ can use a custom editor. int statusId() const; void setStatusId( int id ); private: - TQMap< int, int > index2id; + TQMap< int, int > index2id; };
    407. From sql/overview/table3/main.h

      We create a property, statusid, and define our READ and WRITE methods for it. The statusid's in the status table will probably be different -from the combobox's indexes so we create a TQMap to map combobox indexes +from the combobox's indexes so we create a TQMap to map combobox indexes to/from the statusids that we will list in the combobox.

          class CustomSqlEditorFactory : public TQSqlEditorFactory
           {
      @@ -1340,7 +1340,7 @@ function since that is the only function we need to reimplement.
       

      In the StatusPicker's constructor we create a cursor over the status table indexed by the name field. We then iterate over each record in the status table inserting each name into the combobox. We store the -statusid for each name in the index2id TQMap using the same TQMap index as +statusid for each name in the index2id TQMap using the same TQMap index as the combobox index.

          int StatusPicker::statusId() const
           {
      diff --git a/doc/html/statistics-example.html b/doc/html/statistics-example.html
      index b35fcc0ff..a22fe1dcb 100644
      --- a/doc/html/statistics-example.html
      +++ b/doc/html/statistics-example.html
      @@ -148,7 +148,7 @@ void Table::initTable()
           while ( dirs[ i ] ) {
               TQDir dir( srcdir + dirs[ i ] );
               TQStringList lst = dir.entryList( "*.cpp; *.h" );
      -        for ( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) {
      +        for ( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) {
                   if ( ( *it ).contains( "moc" ) )
                       continue;
                   all << (TQString( dirs[ i ] ) + "/" + *it);
      @@ -157,12 +157,12 @@ void Table::initTable()
           }
       
           // set the number of rows we'll need for the table
      -    setNumRows( all.count() + 1 );
      +    setNumRows( all.count() + 1 );
           i = 0;
           int sum = 0;
       
           // insert the data into the table
      -    for ( TQStringList::Iterator it = all.begin(); it != all.end(); ++it ) {
      +    for ( TQStringList::Iterator it = all.begin(); it != all.end(); ++it ) {
               setText( i, 0, *it );
               TQFile f( srcdir + *it );
               setText( i, 1, TQString::number( (ulong)f.size() ) );
      diff --git a/doc/html/table-statistics-statistics-cpp.html b/doc/html/table-statistics-statistics-cpp.html
      index 65ef3b049..594ecbc1e 100644
      --- a/doc/html/table-statistics-statistics-cpp.html
      +++ b/doc/html/table-statistics-statistics-cpp.html
      @@ -87,7 +87,7 @@ void Table::initTable()
           while ( dirs[ i ] ) {
               TQDir dir( srcdir + dirs[ i ] );
               TQStringList lst = dir.entryList( "*.cpp; *.h" );
      -        for ( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) {
      +        for ( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) {
                   if ( ( *it ).contains( "moc" ) )
                       continue;
                   all << (TQString( dirs[ i ] ) + "/" + *it);
      @@ -96,12 +96,12 @@ void Table::initTable()
           }
       
           // set the number of rows we'll need for the table
      -    setNumRows( all.count() + 1 );
      +    setNumRows( all.count() + 1 );
           i = 0;
           int sum = 0;
       
           // insert the data into the table
      -    for ( TQStringList::Iterator it = all.begin(); it != all.end(); ++it ) {
      +    for ( TQStringList::Iterator it = all.begin(); it != all.end(); ++it ) {
               setText( i, 0, *it );
               TQFile f( srcdir + *it );
               setText( i, 1, TQString::number( (ulong)f.size() ) );
      diff --git a/doc/html/themes-example.html b/doc/html/themes-example.html
      index 1ab5e80a6..4f73df27c 100644
      --- a/doc/html/themes-example.html
      +++ b/doc/html/themes-example.html
      @@ -2228,11 +2228,11 @@ private:
           TQStringList list = TQStyleFactory::keys();
           list.sort();
       #ifndef TQT_NO_STYLE_WINDOWS
      -    list.insert(list.begin(), "Norwegian Wood");
      -    list.insert(list.begin(), "Metal");
      +    list.insert(list.begin(), "Norwegian Wood");
      +    list.insert(list.begin(), "Metal");
       #endif
           TQDict<int> stylesDict( 17, FALSE );
      -    for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) {
      +    for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) {
               TQString styleStr = *it;
               TQString styleAccel = styleStr;
               if ( stylesDict[styleAccel.left(1)] ) {
      diff --git a/doc/html/titleindex b/doc/html/titleindex
      index bb33e5f8e..fcb74f45e 100644
      --- a/doc/html/titleindex
      +++ b/doc/html/titleindex
      @@ -8,7 +8,7 @@ A TQt example as a scriptable ActiveX control (executable) | qaxserver-example-t
       A Rectangle Draw "Benchmark" | forever-example.html
       A Small Application for Testing Regular Expressions | regexptester-example.html
       A Tiny Example Featuring a Toggle Action | toggleaction-example.html
      -A Tiny QTL Example | qtl-qvaluelist-example.html
      +A Tiny QTL Example | qtl-tqvaluelist-example.html
       A Web Browser | qaxcontainer-example-webbrowser.html
       A qt-interest mail archive search | archivesearch-example.html
       A simple ActiveQt control (executable) | qaxserver-example-simple.html
      @@ -589,12 +589,12 @@ QMacStyle Member List | qmacstyle-members.html
       QMag | qmag-example.html
       QMainWindow Class | ntqmainwindow.html
       QMainWindow Member List | qmainwindow-members.html
      -QMap Class | ntqmap.html
      -QMap Member List | qmap-members.html
      -QMapConstIterator Class | qmapconstiterator.html
      -QMapConstIterator Member List | qmapconstiterator-members.html
      -QMapIterator Class | qmapiterator.html
      -QMapIterator Member List | qmapiterator-members.html
      +TQMap Class | tqmap.html
      +TQMap Member List | tqmap-members.html
      +TQMapConstIterator Class | tqmapconstiterator.html
      +TQMapConstIterator Member List | tqmapconstiterator-members.html
      +TQMapIterator Class | tqmapiterator.html
      +TQMapIterator Member List | tqmapiterator-members.html
       QMemArray Class | ntqmemarray.html
       QMemArray Member List | qmemarray-members.html
       QMenuBar Class | ntqmenubar.html
      @@ -668,8 +668,8 @@ QPaintEvent Class | qpaintevent.html
       QPaintEvent Member List | qpaintevent-members.html
       QPainter Class | ntqpainter.html
       QPainter Member List | qpainter-members.html
      -TQPair Class | ntqpair.html
      -TQPair Member List | qpair-members.html
      +TQPair Class | tqpair.html
      +TQPair Member List | tqpair-members.html
       QPalette Class | ntqpalette.html
       QPalette Member List | qpalette-members.html
       QPen Class | ntqpen.html
      @@ -927,16 +927,16 @@ QVGroupBox Class | ntqvgroupbox.html
       QVGroupBox Member List | qvgroupbox-members.html
       QValidator Class | ntqvalidator.html
       QValidator Member List | qvalidator-members.html
      -QValueList Class | ntqvaluelist.html
      -QValueList Member List | qvaluelist-members.html
      -QValueListConstIterator Class | qvaluelistconstiterator.html
      -QValueListConstIterator Member List | qvaluelistconstiterator-members.html
      -QValueListIterator Class | qvaluelistiterator.html
      -QValueListIterator Member List | qvaluelistiterator-members.html
      -QValueStack Class | ntqvaluestack.html
      -QValueStack Member List | qvaluestack-members.html
      -QValueVector Class | ntqvaluevector.html
      -QValueVector Member List | qvaluevector-members.html
      +TQValueList Class | tqvaluelist.html
      +TQValueList Member List | tqvaluelist-members.html
      +TQValueListConstIterator Class | tqvaluelistconstiterator.html
      +TQValueListConstIterator Member List | tqvaluelistconstiterator-members.html
      +TQValueListIterator Class | tqvaluelistiterator.html
      +TQValueListIterator Member List | tqvaluelistiterator-members.html
      +TQValueStack Class | tqvaluestack.html
      +TQValueStack Member List | tqvaluestack-members.html
      +TQValueVector Class | tqvaluevector.html
      +TQValueVector Member List | tqvaluevector-members.html
       QVariant Class | ntqvariant.html
       QVariant Member List | qvariant-members.html
       QWMatrix Class | ntqwmatrix.html
      @@ -1278,7 +1278,7 @@ ntqlocale.h Include File | qlocale-h.html
       ntqlocalfs.h Include File | qlocalfs-h.html
       qmacstyle_mac.h Include File | qmacstyle_mac-h.html
       ntqmainwindow.h Include File | qmainwindow-h.html
      -ntqmap.h Include File | qmap-h.html
      +tqmap.h Include File | tqmap-h.html
       ntqmemarray.h Include File | qmemarray-h.html
       ntqmenubar.h Include File | qmenubar-h.html
       ntqmenudata.h Include File | qmenudata-h.html
      @@ -1306,7 +1306,7 @@ tqobjectlist.h Include File | tqobjectlist-h.html
       ntqpaintdevice.h Include File | qpaintdevice-h.html
       ntqpaintdevicemetrics.h Include File | qpaintdevicemetrics-h.html
       ntqpainter.h Include File | qpainter-h.html
      -ntqpair.h Include File | qpair-h.html
      +tqpair.h Include File | tqpair-h.html
       ntqpalette.h Include File | qpalette-h.html
       ntqpen.h Include File | qpen-h.html
       ntqpicture.h Include File | qpicture-h.html
      @@ -1404,9 +1404,9 @@ ntqurlinfo.h Include File | qurlinfo-h.html
       ntqurloperator.h Include File | qurloperator-h.html
       ntquuid.h Include File | quuid-h.html
       ntqvalidator.h Include File | qvalidator-h.html
      -ntqvaluelist.h Include File | qvaluelist-h.html
      -ntqvaluestack.h Include File | qvaluestack-h.html
      -ntqvaluevector.h Include File | qvaluevector-h.html
      +tqvaluelist.h Include File | tqvaluelist-h.html
      +tqvaluestack.h Include File | tqvaluestack-h.html
      +tqvaluevector.h Include File | tqvaluevector-h.html
       ntqvariant.h Include File | qvariant-h.html
       ntqvbox.h Include File | qvbox-h.html
       ntqvbuttongroup.h Include File | qvbuttongroup-h.html
      diff --git a/doc/html/tools.html b/doc/html/tools.html
      index ef4044b5e..7a2969da0 100644
      --- a/doc/html/tools.html
      +++ b/doc/html/tools.html
      @@ -56,13 +56,13 @@ classes.
       TQIntCacheIteratorIterator for TQIntCache collections
       TQIntDictTemplate class that provides a dictionary based on long keys
       TQIntDictIteratorIterator for TQIntDict collections
      -TQMapValue-based template class that provides a dictionary
      -TQMapConstIteratorIterator for TQMap
      -TQMapIteratorIterator for TQMap
      +TQMapValue-based template class that provides a dictionary
      +TQMapConstIteratorIterator for TQMap
      +TQMapIteratorIterator for TQMap
       TQMemArrayTemplate class that provides arrays of simple types
       TQObjectListTQPtrList of TQObjects
       TQObjectListIteratorIterator for TQObjectLists
      -TQPairValue-based template class that provides a pair of elements
      +TQPairValue-based template class that provides a pair of elements
       TQPtrCollectionThe base class of most pointer-based TQt collections
       TQPtrDictTemplate class that provides a dictionary based on void* keys
       TQPtrDictIteratorIterator for TQPtrDict collections
      @@ -77,11 +77,11 @@ classes.
       TQStringListList of strings
       TQStrListDoubly-linked list of char*
       TQStrListIteratorIterator for the TQStrList and TQStrIList classes
      -TQValueListValue-based template class that provides lists
      -TQValueListConstIteratorConst iterator for TQValueList
      -TQValueListIteratorIterator for TQValueList
      -TQValueStackValue-based template class that provides a stack
      -TQValueVectorValue-based template class that provides a dynamic array
      +TQValueListValue-based template class that provides lists
      +TQValueListConstIteratorConst iterator for TQValueList
      +TQValueListIteratorIterator for TQValueList
      +TQValueStackValue-based template class that provides a stack
      +TQValueVectorValue-based template class that provides a dynamic array
       
       
       


      diff --git a/doc/html/toplevel-example.html b/doc/html/toplevel-example.html index 6bcd36fe4..e6a1f8eae 100644 --- a/doc/html/toplevel-example.html +++ b/doc/html/toplevel-example.html @@ -176,7 +176,7 @@ flag. } if (wstyle) - flagList.push_front("WStyle_Customize"); + flagList.push_front("WStyle_Customize");
      A tool window will never have a task bar entry (even if it has no parent widget), and often has a smaller window decoration. Tool windows are frequently used instead of diff --git a/doc/html/tqcanvas-h.html b/doc/html/tqcanvas-h.html index 85b997e9a..477dc2c0e 100644 --- a/doc/html/tqcanvas-h.html +++ b/doc/html/tqcanvas-h.html @@ -83,7 +83,7 @@ body { background: #ffffff; color: black; } #include "ntqptrlist.h" #include "ntqbrush.h" #include "ntqpen.h" -#include "ntqvaluelist.h" +#include "tqvaluelist.h" #include "ntqpointarray.h" #endif // QT_H diff --git a/doc/html/tqcanvasitemlist-members.html b/doc/html/tqcanvasitemlist-members.html index d01f249b0..3fe976849 100644 --- a/doc/html/tqcanvasitemlist-members.html +++ b/doc/html/tqcanvasitemlist-members.html @@ -35,40 +35,40 @@ body { background: #ffffff; color: black; } TQCanvasItemList, including inherited members.


      diff --git a/doc/html/tqcanvasitemlist.html b/doc/html/tqcanvasitemlist.html index 4a94dce81..af502abb7 100644 --- a/doc/html/tqcanvasitemlist.html +++ b/doc/html/tqcanvasitemlist.html @@ -34,7 +34,7 @@ body { background: #ffffff; color: black; }

      The TQCanvasItemList class is a list of TQCanvasItems. More...

      #include <tqcanvas.h> -

      Inherits TQValueList<TQCanvasItem * >. +

      Inherits TQValueList<TQCanvasItem * >.

      List of all member functions.

      Public Members

        @@ -48,10 +48,10 @@ The TQCanvasItemList class is a list of TQCanvasItems.

        -

        TQCanvasItemList is a TQValueList of pointers to TQCanvasItems. +

        TQCanvasItemList is a TQValueList of pointers to TQCanvasItems. This class is used by some methods in TQCanvas that need to return a list of canvas items. -

        The TQValueList documentation describes how to use this list. +

        The TQValueList documentation describes how to use this list.

        See also Graphics Classes and Image Processing Classes.


        Member Function Documentation

        diff --git a/doc/html/tqcanvaspixmaparray.html b/doc/html/tqcanvaspixmaparray.html index 4af61946b..d7c259678 100644 --- a/doc/html/tqcanvaspixmaparray.html +++ b/doc/html/tqcanvaspixmaparray.html @@ -99,11 +99,11 @@ an image, or some other error occurs, the array ends up empty and

        TQCanvasPixmapArray::TQCanvasPixmapArray ( TQPtrList<TQPixmap> list, TQPtrList<TQPoint> hotspots )

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

        Use TQCanvasPixmapArray::TQCanvasPixmapArray( TQValueList, TQPointArray ) +

        Use TQCanvasPixmapArray::TQCanvasPixmapArray( TQValueList, TQPointArray ) instead.

        Constructs a TQCanvasPixmapArray from the list of TQPixmaps list. The hotspots list has to be of the same size as list. -

        TQCanvasPixmapArray::TQCanvasPixmapArray ( TQValueList<TQPixmap> list, TQPointArray hotspots = TQPointArray ( ) ) +

        TQCanvasPixmapArray::TQCanvasPixmapArray ( TQValueList<TQPixmap> list, TQPointArray hotspots = TQPointArray ( ) )

        Constructs a TQCanvasPixmapArray from the list of TQPixmaps in the list. Each pixmap will get a hotspot according to the hotspots array. If no hotspots are specified, each one is set to diff --git a/doc/html/tqcanvasview.html b/doc/html/tqcanvasview.html index f07d914ad..042a0fb72 100644 --- a/doc/html/tqcanvasview.html +++ b/doc/html/tqcanvasview.html @@ -69,7 +69,7 @@ subclass TQCanvasView. You might then reimplement void MyCanvasView::contentsMousePressEvent( TQMouseEvent* e ) { TQCanvasItemList l = canvas()->collisions(e->pos()); - for (TQCanvasItemList::Iterator it=l.begin(); it!=l.end(); ++it) { + for (TQCanvasItemList::Iterator it=l.begin(); it!=l.end(); ++it) { if ( (*it)->rtti() == TQCanvasRectangle::RTTI ) tqDebug("A TQCanvasRectangle lies somewhere at this point"); } diff --git a/doc/html/tqdatabrowser.html b/doc/html/tqdatabrowser.html index 2050c66b6..5619d9624 100644 --- a/doc/html/tqdatabrowser.html +++ b/doc/html/tqdatabrowser.html @@ -693,8 +693,8 @@ the form 'fieldname order', e.g. 'id ASC', 'surname DESC'. over a copy, e.g.
             TQStringList list = myDataBrowser.sort();
        -    TQStringList::Iterator it = list.begin();
        -    while( it != list.end() ) {
        +    TQStringList::Iterator it = list.begin();
        +    while( it != list.end() ) {
                 myProcessing( *it );
                 ++it;
             }
        diff --git a/doc/html/tqdatatable.html b/doc/html/tqdatatable.html
        index a064507db..85f97277c 100644
        --- a/doc/html/tqdatatable.html
        +++ b/doc/html/tqdatatable.html
        @@ -780,8 +780,8 @@ each item having the form 'fieldname order' (e.g., 'id ASC',
         iterate over a copy, e.g.
         
             TQStringList list = myDataTable.sort();
        -    TQStringList::Iterator it = list.begin();
        -    while( it != list.end() ) {
        +    TQStringList::Iterator it = list.begin();
        +    while( it != list.end() ) {
                 myProcessing( *it );
                 ++it;
             }
        diff --git a/doc/html/tqmap-h.html b/doc/html/tqmap-h.html
        new file mode 100644
        index 000000000..2561cdecc
        --- /dev/null
        +++ b/doc/html/tqmap-h.html
        @@ -0,0 +1,921 @@
        +
        +
        +
        +
        +
        +tqmap.h Include File
        +
        +
        +
        +
        +
        +
        +
        +
        + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

        tqmap.h

        + +

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


        +
        +/****************************************************************************
        +** $Id: qt/tqmap.h   3.3.8   edited Jan 11 14:38 $
        +**
        +** Definition of TQMap class
        +**
        +** Created : 990406
        +**
        +** 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 TQMAP_H
        +#define TQMAP_H
        +
        +#ifndef QT_H
        +#include "ntqglobal.h"
        +#include "ntqshared.h"
        +#include "ntqdatastream.h"
        +#include "tqpair.h"
        +#include "tqvaluelist.h"
        +#endif // QT_H
        +
        +#ifndef TQT_NO_STL
        +#include <iterator>
        +#include <map>
        +#endif
        +
        +//#define QT_CHECK_MAP_RANGE
        +
        +struct TQ_EXPORT TQMapNodeBase
        +{
        +    enum Color { Red, Black };
        +
        +    TQMapNodeBase* left;
        +    TQMapNodeBase* right;
        +    TQMapNodeBase* parent;
        +
        +    Color color;
        +
        +    TQMapNodeBase* minimum() {
        +	TQMapNodeBase* x = this;
        +	while ( x->left )
        +	    x = x->left;
        +	return x;
        +    }
        +
        +    TQMapNodeBase* maximum() {
        +	TQMapNodeBase* x = this;
        +	while ( x->right )
        +	    x = x->right;
        +	return x;
        +    }
        +};
        +
        +
        +template <class K, class T>
        +struct TQMapNode : public TQMapNodeBase
        +{
        +    TQMapNode( const K& _key, const T& _data ) { data = _data; key = _key; }
        +    TQMapNode( const K& _key )	   { key = _key; }
        +    TQMapNode( const TQMapNode<K,T>& _n ) { key = _n.key; data = _n.data; }
        +    TQMapNode() { }
        +    T data;
        +    K key;
        +};
        +
        +
        +template<class K, class T>
        +class TQMapIterator
        +{
        + public:
        +    /**
        +     * Typedefs
        +     */
        +    typedef TQMapNode< K, T >* NodePtr;
        +#ifndef TQT_NO_STL
        +    typedef std::bidirectional_iterator_tag  iterator_category;
        +#endif
        +    typedef T          value_type;
        +#ifndef TQT_NO_STL
        +    typedef ptrdiff_t  difference_type;
        +#else
        +    typedef int difference_type;
        +#endif
        +    typedef T*         pointer;
        +    typedef T&         reference;
        +
        +    /**
        +     * Variables
        +     */
        +    TQMapNode<K,T>* node;
        +
        +    /**
        +     * Functions
        +     */
        +    TQMapIterator() : node( 0 ) {}
        +    TQMapIterator( TQMapNode<K,T>* p ) : node( p ) {}
        +    TQMapIterator( const TQMapIterator<K,T>& it ) : node( it.node ) {}
        +
        +    bool operator==( const TQMapIterator<K,T>& it ) const { return node == it.node; }
        +    bool operator!=( const TQMapIterator<K,T>& it ) const { return node != it.node; }
        +    T& operator*() { return node->data; }
        +    const T& operator*() const { return node->data; }
        +    // UDT for T = x*
        +    // T* operator->() const { return &node->data; }
        +
        +    const K& key() const { return node->key; }
        +    T& data() { return node->data; }
        +    const T& data() const { return node->data; }
        +
        +private:
        +    int inc();
        +    int dec();
        +
        +public:
        +    TQMapIterator<K,T>& operator++() {
        +	inc();
        +	return *this;
        +    }
        +
        +    TQMapIterator<K,T> operator++(int) {
        +	TQMapIterator<K,T> tmp = *this;
        +	inc();
        +	return tmp;
        +    }
        +
        +    TQMapIterator<K,T>& operator--() {
        +	dec();
        +	return *this;
        +    }
        +
        +    TQMapIterator<K,T> operator--(int) {
        +	TQMapIterator<K,T> tmp = *this;
        +	dec();
        +	return tmp;
        +    }
        +};
        +
        +template <class K, class T>
        +TQ_INLINE_TEMPLATES int TQMapIterator<K,T>::inc()
        +{
        +    TQMapNodeBase* tmp = node;
        +    if ( tmp->right ) {
        +	tmp = tmp->right;
        +	while ( tmp->left )
        +	    tmp = tmp->left;
        +    } else {
        +	TQMapNodeBase* y = tmp->parent;
        +	while (tmp == y->right) {
        +	    tmp = y;
        +	    y = y->parent;
        +	}
        +	if (tmp->right != y)
        +	    tmp = y;
        +    }
        +    node = (NodePtr)tmp;
        +    return 0;
        +}
        +
        +template <class K, class T>
        +TQ_INLINE_TEMPLATES int TQMapIterator<K,T>::dec()
        +{
        +    TQMapNodeBase* tmp = node;
        +    if (tmp->color == TQMapNodeBase::Red &&
        +	tmp->parent->parent == tmp ) {
        +	tmp = tmp->right;
        +    } else if (tmp->left != 0) {
        +	TQMapNodeBase* y = tmp->left;
        +	while ( y->right )
        +	    y = y->right;
        +	tmp = y;
        +    } else {
        +	TQMapNodeBase* y = tmp->parent;
        +	while (tmp == y->left) {
        +	    tmp = y;
        +	    y = y->parent;
        +	}
        +	tmp = y;
        +    }
        +    node = (NodePtr)tmp;
        +    return 0;
        +}
        +
        +template<class K, class T>
        +class TQMapConstIterator
        +{
        + public:
        +    /**
        +     * Typedefs
        +     */
        +    typedef TQMapNode< K, T >* NodePtr;
        +#ifndef TQT_NO_STL
        +    typedef std::bidirectional_iterator_tag  iterator_category;
        +#endif
        +    typedef T          value_type;
        +#ifndef TQT_NO_STL
        +    typedef ptrdiff_t  difference_type;
        +#else
        +    typedef int difference_type;
        +#endif
        +    typedef const T*   pointer;
        +    typedef const T&   reference;
        +
        +
        +    /**
        +     * Variables
        +     */
        +    TQMapNode<K,T>* node;
        +
        +    /**
        +     * Functions
        +     */
        +    TQMapConstIterator() : node( 0 ) {}
        +    TQMapConstIterator( TQMapNode<K,T>* p ) : node( p ) {}
        +    TQMapConstIterator( const TQMapConstIterator<K,T>& it ) : node( it.node ) {}
        +    TQMapConstIterator( const TQMapIterator<K,T>& it ) : node( it.node ) {}
        +
        +    bool operator==( const TQMapConstIterator<K,T>& it ) const { return node == it.node; }
        +    bool operator!=( const TQMapConstIterator<K,T>& it ) const { return node != it.node; }
        +    const T& operator*()  const { return node->data; }
        +    // UDT for T = x*
        +    // const T* operator->() const { return &node->data; }
        +
        +    const K& key() const { return node->key; }
        +    const T& data() const { return node->data; }
        +
        +private:
        +    int inc();
        +    int dec();
        +
        +public:
        +    TQMapConstIterator<K,T>& operator++() {
        +	inc();
        +	return *this;
        +    }
        +
        +    TQMapConstIterator<K,T> operator++(int) {
        +	TQMapConstIterator<K,T> tmp = *this;
        +	inc();
        +	return tmp;
        +    }
        +
        +    TQMapConstIterator<K,T>& operator--() {
        +	dec();
        +	return *this;
        +    }
        +
        +    TQMapConstIterator<K,T> operator--(int) {
        +	TQMapConstIterator<K,T> tmp = *this;
        +	dec();
        +	return tmp;
        +    }
        +};
        +
        +template <class K, class T>
        +TQ_INLINE_TEMPLATES int TQMapConstIterator<K,T>::inc()
        +{
        +    TQMapNodeBase* tmp = node;
        +    if ( tmp->right ) {
        +	tmp = tmp->right;
        +	while ( tmp->left )
        +	    tmp = tmp->left;
        +    } else {
        +	TQMapNodeBase* y = tmp->parent;
        +	while (tmp == y->right) {
        +	    tmp = y;
        +	    y = y->parent;
        +	}
        +	if (tmp->right != y)
        +	    tmp = y;
        +    }
        +    node = (NodePtr)tmp;
        +    return 0;
        +}
        +
        +template <class K, class T>
        +TQ_INLINE_TEMPLATES int TQMapConstIterator<K,T>::dec()
        +{
        +    TQMapNodeBase* tmp = node;
        +    if (tmp->color == TQMapNodeBase::Red &&
        +	tmp->parent->parent == tmp ) {
        +	tmp = tmp->right;
        +    } else if (tmp->left != 0) {
        +	TQMapNodeBase* y = tmp->left;
        +	while ( y->right )
        +	    y = y->right;
        +	tmp = y;
        +    } else {
        +	TQMapNodeBase* y = tmp->parent;
        +	while (tmp == y->left) {
        +	    tmp = y;
        +	    y = y->parent;
        +	}
        +	tmp = y;
        +    }
        +    node = (NodePtr)tmp;
        +    return 0;
        +}
        +
        +// ### 4.0: rename to something without Private in it. Not really internal.
        +class TQ_EXPORT TQMapPrivateBase : public TQShared
        +{
        +public:
        +    TQMapPrivateBase() {
        +	node_count = 0;
        +    }
        +    TQMapPrivateBase( const TQMapPrivateBase* _map) {
        +	node_count = _map->node_count;
        +    }
        +
        +    /**
        +     * Implementations of basic tree algorithms
        +     */
        +    void rotateLeft( TQMapNodeBase* x, TQMapNodeBase*& root);
        +    void rotateRight( TQMapNodeBase* x, TQMapNodeBase*& root );
        +    void rebalance( TQMapNodeBase* x, TQMapNodeBase*& root );
        +    TQMapNodeBase* removeAndRebalance( TQMapNodeBase* z, TQMapNodeBase*& root,
        +				      TQMapNodeBase*& leftmost,
        +				      TQMapNodeBase*& rightmost );
        +
        +    /**
        +     * Variables
        +     */
        +    int node_count;
        +};
        +
        +
        +template <class Key, class T>
        +class TQMapPrivate : public TQMapPrivateBase
        +{
        +public:
        +    /**
        +     * Typedefs
        +     */
        +    typedef TQMapIterator< Key, T > Iterator;
        +    typedef TQMapConstIterator< Key, T > ConstIterator;
        +    typedef TQMapNode< Key, T > Node;
        +    typedef TQMapNode< Key, T >* NodePtr;
        +
        +    /**
        +     * Functions
        +     */
        +    TQMapPrivate();
        +    TQMapPrivate( const TQMapPrivate< Key, T >* _map );
        +    ~TQMapPrivate() { clear(); delete header; }
        +
        +    NodePtr copy( NodePtr p );
        +    void clear();
        +    void clear( NodePtr p );
        +
        +    Iterator begin()	{ return Iterator( (NodePtr)(header->left ) ); }
        +    Iterator end()	{ return Iterator( header ); }
        +    ConstIterator begin() const { return ConstIterator( (NodePtr)(header->left ) ); }
        +    ConstIterator end() const { return ConstIterator( header ); }
        +
        +    ConstIterator find(const Key& k) const;
        +
        +    void remove( Iterator it ) {
        +	NodePtr del = (NodePtr) removeAndRebalance( it.node, header->parent, header->left, header->right );
        +	delete del;
        +	--node_count;
        +    }
        +
        +#ifdef QT_QMAP_DEBUG
        +    void inorder( TQMapNodeBase* x = 0, int level = 0 ){
        +	if ( !x )
        +	    x = header->parent;
        +	if ( x->left )
        +	    inorder( x->left, level + 1 );
        +    //cout << level << " Key=" << key(x) << " Value=" << ((NodePtr)x)->data << endl;
        +	if ( x->right )
        +	    inorder( x->right, level + 1 );
        +    }
        +#endif
        +
        +#if 0
        +    Iterator insertMulti(const Key& v){
        +	TQMapNodeBase* y = header;
        +	TQMapNodeBase* x = header->parent;
        +	while (x != 0){
        +	    y = x;
        +	    x = ( v < key(x) ) ? x->left : x->right;
        +	}
        +	return insert(x, y, v);
        +    }
        +#endif
        +
        +    Iterator insertSingle( const Key& k );
        +    Iterator insert( TQMapNodeBase* x, TQMapNodeBase* y, const Key& k );
        +
        +protected:
        +    /**
        +     * Helpers
        +     */
        +    const Key& key( TQMapNodeBase* b ) const { return ((NodePtr)b)->key; }
        +
        +    /**
        +     * Variables
        +     */
        +    NodePtr header;
        +};
        +
        +
        +template <class Key, class T>
        +TQ_INLINE_TEMPLATES TQMapPrivate<Key,T>::TQMapPrivate() {
        +    header = new Node;
        +    header->color = TQMapNodeBase::Red; // Mark the header
        +    header->parent = 0;
        +    header->left = header->right = header;
        +}
        +template <class Key, class T>
        +TQ_INLINE_TEMPLATES TQMapPrivate<Key,T>::TQMapPrivate( const TQMapPrivate< Key, T >* _map ) : TQMapPrivateBase( _map ) {
        +    header = new Node;
        +    header->color = TQMapNodeBase::Red; // Mark the header
        +    if ( _map->header->parent == 0 ) {
        +	header->parent = 0;
        +	header->left = header->right = header;
        +    } else {
        +	header->parent = copy( (NodePtr)(_map->header->parent) );
        +	header->parent->parent = header;
        +	header->left = header->parent->minimum();
        +	header->right = header->parent->maximum();
        +    }
        +}
        +
        +template <class Key, class T>
        +TQ_INLINE_TEMPLATES TQ_TYPENAME TQMapPrivate<Key,T>::NodePtr TQMapPrivate<Key,T>::copy( TQ_TYPENAME TQMapPrivate<Key,T>::NodePtr p )
        +{
        +    if ( !p )
        +	return 0;
        +    NodePtr n = new Node( *p );
        +    n->color = p->color;
        +    if ( p->left ) {
        +	n->left = copy( (NodePtr)(p->left) );
        +	n->left->parent = n;
        +    } else {
        +	n->left = 0;
        +    }
        +    if ( p->right ) {
        +	n->right = copy( (NodePtr)(p->right) );
        +	n->right->parent = n;
        +    } else {
        +	n->right = 0;
        +    }
        +    return n;
        +}
        +
        +template <class Key, class T>
        +TQ_INLINE_TEMPLATES void TQMapPrivate<Key,T>::clear()
        +{
        +    clear( (NodePtr)(header->parent) );
        +    header->color = TQMapNodeBase::Red;
        +    header->parent = 0;
        +    header->left = header->right = header;
        +    node_count = 0;
        +}
        +
        +template <class Key, class T>
        +TQ_INLINE_TEMPLATES void TQMapPrivate<Key,T>::clear( TQ_TYPENAME TQMapPrivate<Key,T>::NodePtr p )
        +{
        +    while ( p != 0 ) {
        +	clear( (NodePtr)p->right );
        +	NodePtr y = (NodePtr)p->left;
        +	delete p;
        +	p = y;
        +    }
        +}
        +
        +template <class Key, class T>
        +TQ_INLINE_TEMPLATES TQ_TYPENAME TQMapPrivate<Key,T>::ConstIterator TQMapPrivate<Key,T>::find(const Key& k) const
        +{
        +    TQMapNodeBase* y = header;        // Last node
        +    TQMapNodeBase* x = header->parent; // Root node.
        +
        +    while ( x != 0 ) {
        +	// If as k <= key(x) go left
        +	if ( !( key(x) < k ) ) {
        +	    y = x;
        +	    x = x->left;
        +	} else {
        +	    x = x->right;
        +	}
        +    }
        +
        +    // Was k bigger/smaller then the biggest/smallest
        +    // element of the tree ? Return end()
        +    if ( y == header || k < key(y) )
        +	return ConstIterator( header );
        +    return ConstIterator( (NodePtr)y );
        +}
        +
        +template <class Key, class T>
        +TQ_INLINE_TEMPLATES TQ_TYPENAME TQMapPrivate<Key,T>::Iterator TQMapPrivate<Key,T>::insertSingle( const Key& k )
        +{
        +    // Search correct position in the tree
        +    TQMapNodeBase* y = header;
        +    TQMapNodeBase* x = header->parent;
        +    bool result = TRUE;
        +    while ( x != 0 ) {
        +	result = ( k < key(x) );
        +	y = x;
        +	x = result ? x->left : x->right;
        +    }
        +    // Get iterator on the last not empty one
        +    Iterator j( (NodePtr)y );
        +    if ( result ) {
        +	// Smaller then the leftmost one ?
        +	if ( j == begin() ) {
        +	    return insert(x, y, k );
        +	} else {
        +	    // Perhaps daddy is the right one ?
        +	    --j;
        +	}
        +    }
        +    // Really bigger ?
        +    if ( (j.node->key) < k )
        +	return insert(x, y, k );
        +    // We are going to replace a node
        +    return j;
        +}
        +
        +
        +template <class Key, class T>
        +TQ_INLINE_TEMPLATES TQ_TYPENAME TQMapPrivate<Key,T>::Iterator TQMapPrivate<Key,T>::insert( TQMapNodeBase* x, TQMapNodeBase* y, const Key& k )
        +{
        +    NodePtr z = new Node( k );
        +    if (y == header || x != 0 || k < key(y) ) {
        +	y->left = z;                // also makes leftmost = z when y == header
        +	if ( y == header ) {
        +	    header->parent = z;
        +	    header->right = z;
        +	} else if ( y == header->left )
        +	    header->left = z;           // maintain leftmost pointing to min node
        +    } else {
        +	y->right = z;
        +	if ( y == header->right )
        +	    header->right = z;          // maintain rightmost pointing to max node
        +    }
        +    z->parent = y;
        +    z->left = 0;
        +    z->right = 0;
        +    rebalance( z, header->parent );
        +    ++node_count;
        +    return Iterator(z);
        +}
        +
        +
        +#ifdef QT_CHECK_RANGE
        +# if !defined( TQT_NO_DEBUG ) && defined( QT_CHECK_MAP_RANGE )
        +#  define TQT_CHECK_INVALID_MAP_ELEMENT if ( empty() ) tqWarning( "TQMap: Warning invalid element" )
        +#  define TQT_CHECK_INVALID_MAP_ELEMENT_FATAL Q_ASSERT( !empty() );
        +# else
        +#  define TQT_CHECK_INVALID_MAP_ELEMENT
        +#  define TQT_CHECK_INVALID_MAP_ELEMENT_FATAL
        +# endif
        +#else
        +# define TQT_CHECK_INVALID_MAP_ELEMENT
        +# define TQT_CHECK_INVALID_MAP_ELEMENT_FATAL
        +#endif
        +
        +template <class T> class TQDeepCopy;
        +
        +template<class Key, class T>
        +class TQMap
        +{
        +public:
        +    /**
        +     * Typedefs
        +     */
        +    typedef Key key_type;
        +    typedef T mapped_type;
        +    typedef TQPair<const key_type, mapped_type> value_type;
        +    typedef value_type* pointer;
        +    typedef const value_type* const_pointer;
        +    typedef value_type& reference;
        +    typedef const value_type& const_reference;
        +#ifndef TQT_NO_STL
        +    typedef ptrdiff_t  difference_type;
        +#else
        +    typedef int difference_type;
        +#endif
        +    typedef size_t      size_type;
        +    typedef TQMapIterator<Key,T> iterator;
        +    typedef TQMapConstIterator<Key,T> const_iterator;
        +    typedef TQPair<iterator,bool> insert_pair;
        +
        +    typedef TQMapIterator< Key, T > Iterator;
        +    typedef TQMapConstIterator< Key, T > ConstIterator;
        +    typedef T ValueType;
        +    typedef TQMapPrivate< Key, T > Priv;
        +
        +    /**
        +     * API
        +     */
        +    TQMap()
        +    {
        +	sh = new TQMapPrivate< Key, T >;
        +    }
        +    TQMap( const TQMap<Key,T>& m )
        +    {
        +	sh = m.sh; sh->ref();
        +    }
        +
        +#ifndef TQT_NO_STL
        +    TQMap( const std::map<Key,T>& m )
        +    {
        +	sh = new TQMapPrivate<Key,T>;
        +	TQ_TYPENAME std::map<Key,T>::const_iterator it = m.begin();
        +	for ( ; it != m.end(); ++it ) {
        +	    value_type p( (*it).first, (*it).second );
        +	    insert( p );
        +	}
        +    }
        +#endif
        +    ~TQMap()
        +    {
        +	if ( sh->deref() )
        +	    delete sh;
        +    }
        +    TQMap<Key,T>& operator= ( const TQMap<Key,T>& m );
        +#ifndef TQT_NO_STL
        +    TQMap<Key,T>& operator= ( const std::map<Key,T>& m )
        +    {
        +	clear();
        +	TQ_TYPENAME std::map<Key,T>::const_iterator it = m.begin();
        +	for ( ; it != m.end(); ++it ) {
        +	    value_type p( (*it).first, (*it).second );
        +	    insert( p );
        +	}
        +	return *this;
        +    }
        +#endif
        +
        +    iterator begin() { detach(); return sh->begin(); }
        +    iterator end() { detach(); return sh->end(); }
        +    const_iterator begin() const { return ((const Priv*)sh)->begin(); }
        +    const_iterator end() const { return ((const Priv*)sh)->end(); }
        +    const_iterator constBegin() const { return begin(); }
        +    const_iterator constEnd() const { return end(); }
        +
        +    iterator replace( const Key& k, const T& v )
        +    {
        +	remove( k );
        +	return insert( k, v );
        +    }
        +
        +    size_type size() const
        +    {
        +	return sh->node_count;
        +    }
        +    bool empty() const
        +    {
        +	return sh->node_count == 0;
        +    }
        +    TQPair<iterator,bool> insert( const value_type& x );
        +
        +    void erase( iterator it )
        +    {
        +	detach();
        +	sh->remove( it );
        +    }
        +    void erase( const key_type& k );
        +    size_type count( const key_type& k ) const;
        +    T& operator[] ( const Key& k );
        +    void clear();
        +
        +    iterator find ( const Key& k )
        +    {
        +	detach();
        +	return iterator( sh->find( k ).node );
        +    }
        +    const_iterator find ( const Key& k ) const {	return sh->find( k ); }
        +
        +    const T& operator[] ( const Key& k ) const
        +	{ TQT_CHECK_INVALID_MAP_ELEMENT; return sh->find( k ).data(); }
        +    bool contains ( const Key& k ) const
        +	{ return find( k ) != end(); }
        +	//{ return sh->find( k ) != ((const Priv*)sh)->end(); }
        +
        +    size_type count() const { return sh->node_count; }
        +
        +    TQValueList<Key> keys() const {
        +	TQValueList<Key> r;
        +	for (const_iterator i=begin(); i!=end(); ++i)
        +	    r.append(i.key());
        +	return r;
        +    }
        +
        +    TQValueList<T> values() const {
        +	TQValueList<T> r;
        +	for (const_iterator i=begin(); i!=end(); ++i)
        +	    r.append(*i);
        +	return r;
        +    }
        +
        +    bool isEmpty() const { return sh->node_count == 0; }
        +
        +    iterator insert( const Key& key, const T& value, bool overwrite = TRUE );
        +    void remove( iterator it ) { detach(); sh->remove( it ); }
        +    void remove( const Key& k );
        +
        +#if defined(TQ_FULL_TEMPLATE_INSTANTIATION)
        +    bool operator==( const TQMap<Key,T>& ) const { return FALSE; }
        +#ifndef TQT_NO_STL
        +    bool operator==( const std::map<Key,T>& ) const { return FALSE; }
        +#endif
        +#endif
        +
        +protected:
        +    /**
        +     * Helpers
        +     */
        +    void detach() {  if ( sh->count > 1 ) detachInternal(); }
        +
        +    Priv* sh;
        +private:
        +    void detachInternal();
        +
        +    friend class TQDeepCopy< TQMap<Key,T> >;
        +};
        +
        +template<class Key, class T>
        +TQ_INLINE_TEMPLATES TQMap<Key,T>& TQMap<Key,T>::operator= ( const TQMap<Key,T>& m )
        +{
        +    m.sh->ref();
        +    if ( sh->deref() )
        +	delete sh;
        +    sh = m.sh;
        +    return *this;
        +}
        +
        +template<class Key, class T>
        +TQ_INLINE_TEMPLATES TQ_TYPENAME TQMap<Key,T>::insert_pair TQMap<Key,T>::insert( const TQ_TYPENAME TQMap<Key,T>::value_type& x )
        +{
        +    detach();
        +    size_type n = size();
        +    iterator it = sh->insertSingle( x.first );
        +    bool inserted = FALSE;
        +    if ( n < size() ) {
        +	inserted = TRUE;
        +	it.data() = x.second;
        +    }
        +    return TQPair<iterator,bool>( it, inserted );
        +}
        +
        +template<class Key, class T>
        +TQ_INLINE_TEMPLATES void TQMap<Key,T>::erase( const Key& k )
        +{
        +    detach();
        +    iterator it( sh->find( k ).node );
        +    if ( it != end() )
        +	sh->remove( it );
        +}
        +
        +template<class Key, class T>
        +TQ_INLINE_TEMPLATES TQ_TYPENAME TQMap<Key,T>::size_type TQMap<Key,T>::count( const Key& k ) const
        +{
        +    const_iterator it( sh->find( k ).node );
        +    if ( it != end() ) {
        +	size_type c = 0;
        +	while ( it != end() ) {
        +	    ++it;
        +	    ++c;
        +	}
        +	return c;
        +    }
        +    return 0;
        +}
        +
        +template<class Key, class T>
        +TQ_INLINE_TEMPLATES T& TQMap<Key,T>::operator[] ( const Key& k )
        +{
        +    detach();
        +    TQMapNode<Key,T>* p = sh->find( k ).node;
        +    if ( p != sh->end().node )
        +	return p->data;
        +    return insert( k, T() ).data();
        +}
        +
        +template<class Key, class T>
        +TQ_INLINE_TEMPLATES void TQMap<Key,T>::clear()
        +{
        +    if ( sh->count == 1 )
        +	sh->clear();
        +    else {
        +	sh->deref();
        +	sh = new TQMapPrivate<Key,T>;
        +    }
        +}
        +
        +template<class Key, class T>
        +TQ_INLINE_TEMPLATES TQ_TYPENAME TQMap<Key,T>::iterator TQMap<Key,T>::insert( const Key& key, const T& value, bool overwrite )
        +{
        +    detach();
        +    size_type n = size();
        +    iterator it = sh->insertSingle( key );
        +    if ( overwrite || n < size() )
        +	it.data() = value;
        +    return it;
        +}
        +
        +template<class Key, class T>
        +TQ_INLINE_TEMPLATES void TQMap<Key,T>::remove( const Key& k )
        +{
        +    detach();
        +    iterator it( sh->find( k ).node );
        +    if ( it != end() )
        +	sh->remove( it );
        +}
        +
        +template<class Key, class T>
        +TQ_INLINE_TEMPLATES void TQMap<Key,T>::detachInternal()
        +{
        +    sh->deref(); sh = new TQMapPrivate<Key,T>( sh );
        +}
        +
        +
        +#ifndef TQT_NO_DATASTREAM
        +template<class Key, class T>
        +TQ_INLINE_TEMPLATES TQDataStream& operator>>( TQDataStream& s, TQMap<Key,T>& m ) {
        +    m.clear();
        +    TQ_UINT32 c;
        +    s >> c;
        +    for( TQ_UINT32 i = 0; i < c; ++i ) {
        +	Key k; T t;
        +	s >> k >> t;
        +	m.insert( k, t );
        +	if ( s.atEnd() )
        +	    break;
        +    }
        +    return s;
        +}
        +
        +
        +template<class Key, class T>
        +TQ_INLINE_TEMPLATES TQDataStream& operator<<( TQDataStream& s, const TQMap<Key,T>& m ) {
        +    s << (TQ_UINT32)m.size();
        +    TQMapConstIterator<Key,T> it = m.begin();
        +    for( ; it != m.end(); ++it )
        +	s << it.key() << it.data();
        +    return s;
        +}
        +#endif
        +
        +#define Q_DEFINED_QMAP
        +#include "ntqwinexport.h"
        +#endif // TQMAP_H
        +
        + +


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

        Complete Member List for TQMap

        + +

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

        + +


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

        TQMap Class Reference

        + +

        The TQMap class is a value-based template class that +provides a dictionary. +More... +

        #include <tqmap.h> +

        List of all member functions. +

        Public Members

        +
          +
        • typedef Key key_type
        • +
        • typedef T mapped_type
        • +
        • typedef TQPair<const key_type, mapped_type> value_type
        • +
        • typedef value_type * pointer
        • +
        • typedef const value_type * const_pointer
        • +
        • typedef value_type & reference
        • +
        • typedef const value_type & const_reference
        • +
        • typedef size_t size_type
        • +
        • typedef TQMapIterator<Key, T> iterator
        • +
        • typedef TQMapConstIterator<Key, T> const_iterator
        • +
        • typedef TQPair<iterator, bool> insert_pair
        • +
        • typedef TQMapIterator<Key, T> Iterator
        • +
        • typedef TQMapConstIterator<Key, T> ConstIterator
        • +
        • typedef T ValueType
        • +
        • TQMap ()
        • +
        • TQMap ( const TQMap<Key, T> & m )
        • +
        • TQMap ( const std::map<Key, T> & m )
        • +
        • ~TQMap ()
        • +
        • TQMap<Key, T> & operator= ( const TQMap<Key, T> & m )
        • +
        • TQMap<Key, T> & operator= ( const std::map<Key, T> & m )
        • +
        • iterator begin ()
        • +
        • iterator end ()
        • +
        • const_iterator begin () const
        • +
        • const_iterator end () const
        • +
        • const_iterator constBegin () const
        • +
        • const_iterator constEnd () const
        • +
        • iterator replace ( const Key & k, const T & v )
        • +
        • size_type size () const
        • +
        • bool empty () const
        • +
        • TQPair<iterator, bool> insert ( const value_type & x )
        • +
        • void erase ( iterator it )
        • +
        • void erase ( const key_type & k )
        • +
        • size_type count ( const key_type & k ) const
        • +
        • T & operator[] ( const Key & k )
        • +
        • void clear ()
        • +
        • iterator find ( const Key & k )
        • +
        • const_iterator find ( const Key & k ) const
        • +
        • const T & operator[] ( const Key & k ) const
        • +
        • bool contains ( const Key & k ) const
        • +
        • size_type count () const
        • +
        • TQValueList<Key> keys () const
        • +
        • TQValueList<T> values () const
        • +
        • bool isEmpty () const
        • +
        • iterator insert ( const Key & key, const T & value, bool overwrite = TRUE )
        • +
        • void remove ( iterator it )
        • +
        • void remove ( const Key & k )
        • +
        +

        Protected Members

        + +

        Related Functions

        +
          +
        • TQDataStream & operator>> ( TQDataStream & s, TQMap<Key, T> & m )
        • +
        • TQDataStream & operator<< ( TQDataStream & s, const TQMap<Key, T> & m )
        • +
        +

        Detailed Description

        + + +The TQMap class is a value-based template class that +provides a dictionary. +

        + + + +

        TQMap is a TQt implementation of an STL-like map container. It can +be used in your application if the standard map is not +available on all your target platforms. TQMap is part of the TQt Template Library. +

        TQMap<Key, Data> defines a template instance to create a +dictionary with keys of type Key and values of type Data. TQMap +does not store pointers to the members of the map; instead, it +holds a copy of every member. For this reason, TQMap is +value-based, whereas TQPtrList and TQDict are pointer-based. +

        TQMap contains and manages a collection of objects of type Data +with associated key values of type Key and provides iterators that +allow the contained objects to be addressed. TQMap owns the +contained items. +

        Some classes cannot be used within a TQMap. For example everything +derived from TQObject and thus all classes that implement widgets. +Only values can be used in a TQMap. To qualify as a value, the +class must provide +

          +
        • A copy constructor +
        • An assignment operator +
        • A default constructor, i.e. a constructor that does not take +any arguments. +
        +

        Note that C++ defaults to field-by-field assignment operators and +copy constructors if no explicit version is supplied. In many +cases, this is sufficient. +

        The class used for the key requires that the operator< is +implemented to define ordering of the keys. +

        TQMap's function naming is consistent with the other TQt classes +(e.g., count(), isEmpty()). TQMap also provides extra functions for +compatibility with STL algorithms, such as size() and empty(). +Programmers already familiar with the STL map can use these +the STL-like functions if preferred. +

        Example: + +

        +    #include <ntqstring.h>
        +    #include <tqmap.h>
        +    #include <ntqstring.h>
        +
        +    class Employee
        +    {
        +    public:
        +        Employee(): sn(0) {}
        +        Employee( const TQString& forename, const TQString& surname, int salary )
        +            : fn(forename), sn(surname), sal(salary)
        +        { }
        +
        +        TQString forename() const { return fn; }
        +        TQString surname() const { return sn; }
        +        int salary() const { return sal; }
        +        void setSalary( int salary ) { sal = salary; }
        +
        +    private:
        +        TQString fn;
        +        TQString sn;
        +        int sal;
        +    };
        +
        +    int main(int argc, char **argv)
        +    {
        +        TQApplication app( argc, argv );
        +
        +        typedef TQMap<TQString, Employee> EmployeeMap;
        +        EmployeeMap map;
        +
        +        map["JD001"] = Employee("John", "Doe", 50000);
        +        map["JW002"] = Employee("Jane", "Williams", 80000);
        +        map["TJ001"] = Employee("Tom", "Jones", 60000);
        +
        +        Employee sasha( "Sasha", "Hind", 50000 );
        +        map["SH001"] = sasha;
        +        sasha.setSalary( 40000 );
        +
        +        EmployeeMap::Iterator it;
        +        for ( it = map.begin(); it != map.end(); ++it ) {
        +            printf( "%s: %s, %s earns %d\n",
        +                    it.key().latin1(),
        +                    it.data().surname().latin1(),
        +                    it.data().forename().latin1(),
        +                    it.data().salary() );
        +        }
        +        return 0;
        +    }
        +    
        + +

        Program output: +

        +    JD001: Doe, John earns 50000
        +    JW002: Williams, Jane earns 80000
        +    SH001: Hind, Sasha earns 50000
        +    TJ001: Jones, Tom earns 60000
        +    
        + +

        The latest changes to Sasha's salary did not affect the value in +the list because the map created a copy of Sasha's entry. In +addition, notice that the items are sorted alphabetically (by key) +when iterating over the map. +

        There are several ways to find items in a map. The begin() and +end() functions return iterators to the beginning and end of the +map. The advantage of using an iterator is that you can move +forward or backward by incrementing/decrementing the iterator. +The iterator returned by end() points to the element which is one +past the last element in the container. The past-the-end iterator +is still associated with the map it belongs to, however it is not dereferenceable; operator*() will not return a well-defined +value. If the map is empty, the iterator returned by begin() will +equal the iterator returned by end(). +

        Another way to find an element in the map is by using the find() +function. This returns an iterator pointing to the desired item or +to the end() iterator if no such element exists. +

        Another approach uses the operator[]. But be warned: if the map +does not contain an entry for the element you are looking for, +operator[] inserts a default value. If you do not know that the +element you are searching for is really in the list, you should +not use operator[]. The following example illustrates this: +

        +        TQMap<TQString,TQString> map;
        +        map["Clinton"] = "Bill";
        +        str << map["Clinton"] << map["Bush"] << endl;
        +    
        + +

        The code fragment will print out "Clinton", "". Since the value +associated with the "Bush" key did not exist, the map inserted a +default value (in this case, an empty string). If you are not +sure whether a certain element is in the map, you should use +find() and iterators instead. +

        If you just want to know whether a certain key is contained in the +map, use the contains() function. In addition, count() tells you +how many keys are in the map. +

        It is safe to have multiple iterators at the same time. If some +member of the map is removed, only iterators pointing to the +removed member become invalid; inserting in the map does not +invalidate any iterators. +

        Since TQMap is value-based, there is no need to be concerned about +deleting items in the map. The map holds its own copies and will +free them if the corresponding member or the map itself is +deleted. +

        TQMap is implicitly shared. This means you can just make copies of +the map in time O(1). If multiple TQMap instances share the same +data and one is modifying the map's data, this modifying instance +makes a copy and modifies its private copy: so it does not affect +other instances. If a TQMap is being used in a multi-threaded +program, you must protect all access to the map. See TQMutex. +

        There are a couple of ways of inserting new items into the map. +One uses the insert() method; the other uses operator[]: +

        +    TQMap<TQString, TQString> map;
        +    map["Clinton"] = "Bill";
        +    map.insert( "Bush", "George" );
        +    
        + +

        Items can also be removed from the map in several ways. One way is +to pass an iterator to remove(). Another way is to pass a key +value to remove(), which will delete the entry with the requested +key. In addition you can clear the entire map using the clear() +method. +

        See also TQMapIterator, TQt Template Library Classes, Implicitly and Explicitly Shared Classes, and Non-GUI Classes. + +


        Member Type Documentation

        +

        TQMap::ConstIterator

        +The map's const iterator type, TQt style. +

        TQMap::Iterator

        +The map's iterator type, TQt style. +

        TQMap::ValueType

        +Corresponds to TQPair<key_type, mapped_type>, TQt style. +

        TQMap::const_iterator

        +The map's const iterator type. +

        TQMap::const_pointer

        +Const pointer to value_type. +

        TQMap::const_reference

        +Const reference to value_type. +

        TQMap::iterator

        +The map's iterator type. +

        TQMap::key_type

        +The map's key type. +

        TQMap::mapped_type

        +The map's data type. +

        TQMap::pointer

        +Pointer to value_type. +

        TQMap::reference

        +Reference to value_type. +

        TQMap::size_type

        +An unsigned integral type, used to represent various sizes. +

        TQMap::value_type

        +Corresponds to TQPair<key_type, mapped_type>. +

        Member Function Documentation

        +

        TQMap::TQMap () +

        + +

        Constructs an empty map. + +

        TQMap::TQMap ( const TQMap<Key, T> & m ) +

        + +

        Constructs a copy of m. +

        This operation costs O(1) time because TQMap is implicitly shared. +This makes returning a TQMap from a function very fast. If a shared +instance is modified, it will be copied (copy-on-write), and this +takes O(n) time. + +

        TQMap::TQMap ( const std::map<Key, T> & m ) +

        + +

        Constructs a copy of m. + +

        TQMap::~TQMap () +

        + +

        Destroys the map. References to the values in the map and all +iterators of this map become invalidated. Since TQMap is highly +tuned for performance you won't see warnings if you use invalid +iterators, because it is not possible for an iterator to check +whether it is valid or not. + +

        iterator TQMap::begin () +

        + +

        Returns an iterator pointing to the first element in the map. This +iterator equals end() if the map is empty. +

        The items in the map are traversed in the order defined by +operator<(Key, Key). +

        See also end() and TQMapIterator. + +

        const_iterator TQMap::begin () const +

        + +

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

        See also end() and TQMapConstIterator. + +

        void TQMap::clear () +

        + +

        Removes all items from the map. +

        See also remove(). + +

        const_iterator TQMap::constBegin () const +

        + +

        Returns an iterator pointing to the first element in the map. This +iterator equals end() if the map is empty. +

        The items in the map are traversed in the order defined by +operator<(Key, Key). +

        See also constEnd() and TQMapConstIterator. + +

        const_iterator TQMap::constEnd () const +

        + +

        The iterator returned by end() points to the element which is one +past the last element in the container. The past-the-end iterator +is still associated with the map it belongs to, but it is not +dereferenceable; operator*() will not return a well-defined value. +

        This iterator equals constBegin() if the map is empty. +

        See also constBegin() and TQMapConstIterator. + +

        bool TQMap::contains ( const Key & k ) const +

        + +

        Returns TRUE if the map contains an item with key k; otherwise +returns FALSE. + +

        size_type TQMap::count ( const key_type & k ) const +

        + +

        Returns the number of items whose key is k. Since TQMap does not +allow duplicate keys, the return value is always 0 or 1. +

        This function is provided for STL compatibility. + +

        size_type TQMap::count () const +

        + +

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

        Returns the number of items in the map. +

        See also isEmpty(). + +

        void TQMap::detach () [protected] +

        + +

        If the map does not share its data with another TQMap instance, +nothing happens; otherwise the function creates a new copy of this +map and detaches from the shared one. This function is called +whenever the map is modified. The implicit sharing mechanism is +implemented this way. + +

        bool TQMap::empty () const +

        + +

        Returns TRUE if the map contains no items; otherwise returns +FALSE. +

        This function is provided for STL compatibility. It is equivalent +to isEmpty(). +

        See also size(). + +

        iterator TQMap::end () +

        + +

        The iterator returned by end() points to the element which is one +past the last element in the container. The past-the-end iterator +is still associated with the map it belongs to, but it is not +dereferenceable; operator*() will not return a well-defined value. +

        This iterator equals begin() if the map is empty. +

        See also begin() and TQMapIterator. + +

        const_iterator TQMap::end () const +

        + +

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

        +

        void TQMap::erase ( iterator it ) +

        + +

        Removes the item associated with the iterator it from the map. +

        This function is provided for STL compatibility. It is equivalent +to remove(). +

        See also clear(). + +

        void TQMap::erase ( const key_type & k ) +

        + +

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

        Removes the item with the key k from the map. + +

        iterator TQMap::find ( const Key & k ) +

        + +

        Returns an iterator pointing to the element with key k in the +map. +

        Returns end() if no key matched. +

        See also TQMapIterator. + +

        const_iterator TQMap::find ( const Key & k ) const +

        + +

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

        Returns an iterator pointing to the element with key k in the +map. +

        Returns end() if no key matched. +

        See also TQMapConstIterator. + +

        iterator TQMap::insert ( const Key & key, const T & value, bool overwrite = TRUE ) +

        + +

        Inserts a new item with the key, key, and a value of value. +If there is already an item whose key is key, that item's value +is replaced with value, unless overwrite is FALSE (it is +TRUE by default). In this case an iterator to this item is +returned, else an iterator to the new item is returned. +

        +

        TQPair<iterator, bool> TQMap::insert ( const value_type & x ) +

        + +

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

        Inserts the (key, value) pair x into the map. x is a TQPair +whose first element is a key to be inserted and whose second +element is the associated value to be inserted. Returns a pair +whose first element is an iterator pointing to the inserted +item and whose second element is a bool indicating TRUE if x +was inserted and FALSE if it was not inserted, e.g. because it was +already present. +

        See also replace(). + +

        bool TQMap::isEmpty () const +

        + +

        Returns TRUE if the map contains no items; otherwise returns +FALSE. +

        See also count(). + +

        TQValueList<Key> TQMap::keys () const +

        + +

        Returns a list of all the keys in the map, in order. + +

        TQMap<Key, T> & TQMap::operator= ( const TQMap<Key, T> & m ) +

        + +

        Assigns m to this map and returns a reference to this map. +

        All iterators of the current map become invalidated by this +operation. The cost of such an assignment is O(1), because TQMap is +implicitly shared. + +

        TQMap<Key, T> & TQMap::operator= ( const std::map<Key, T> & m ) +

        + +

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

        Assigns m to this map and returns a reference to this map. +

        All iterators of the current map become invalidated by this +operation. + +

        T & TQMap::operator[] ( const Key & k ) +

        + +

        Returns the value associated with the key k. If no such key is +present, an empty item is inserted with this key and a reference +to the empty item is returned. +

        You can use this operator both for reading and writing: +

        +    TQMap<TQString, TQString> map;
        +    map["Clinton"] = "Bill";
        +    stream << map["Clinton"];
        +    
        + + +

        const T & TQMap::operator[] ( const Key & k ) const +

        + +

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

        Warning: This function differs from the non-const version of the +same function. It will not insert an empty value if the key k does not exist. This may lead to logic errors in your program. +You should check if the element exists before calling this +function. +

        Returns the value associated with the key k. If no such key is +present, a reference to an empty item is returned. + +

        void TQMap::remove ( iterator it ) +

        + +

        Removes the item associated with the iterator it from the map. +

        See also clear(). + +

        void TQMap::remove ( const Key & k ) +

        + +

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

        Removes the item with the key k from the map. + +

        iterator TQMap::replace ( const Key & k, const T & v ) +

        + +

        Replaces the value of the element with key k, with the value v. +

        See also insert() and remove(). + +

        size_type TQMap::size () const +

        + +

        Returns the number of items in the map. +

        This function is provided for STL compatibility. It is equivalent +to count(). +

        See also empty(). + +

        TQValueList<T> TQMap::values () const +

        + +

        Returns a list of all the values in the map, in key order. + +


        Related Functions

        +

        TQDataStream & operator<< ( TQDataStream & s, const TQMap<Key, T> & m ) +

        + +

        +

        Writes the map m to the stream s. The types Key and T +must implement the streaming operator as well. + +

        TQDataStream & operator>> ( TQDataStream & s, TQMap<Key, T> & m ) +

        + +

        +

        Reads the map m from the stream s. The types Key and T +must implement the streaming operator as well. + + +


        +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/tqmapconstiterator-members.html b/doc/html/tqmapconstiterator-members.html new file mode 100644 index 000000000..c4078fb6b --- /dev/null +++ b/doc/html/tqmapconstiterator-members.html @@ -0,0 +1,54 @@ + + + + + +TQMapConstIterator Member List + + + + + + + +
        + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

        Complete Member List for TQMapConstIterator

        + +

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

        + +


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

        TQMapConstIterator Class Reference

        + +

        The TQMapConstIterator class provides an iterator for TQMap. +More... +

        #include <tqmap.h> +

        List of all member functions. +

        Public Members

        + +

        Detailed Description

        + + +The TQMapConstIterator class provides an iterator for TQMap. +

        + +

        In contrast to TQMapIterator, this class is used to iterate over a +const map. It does not allow you to modify the values of the map +because this would break the const semantics. +

        For more information on TQMap iterators, see TQMapIterator and +the TQMap example. +

        See also TQMap, TQMapIterator, TQt Template Library Classes, and Non-GUI Classes. + +


        Member Type Documentation

        +

        TQMapConstIterator::iterator_category

        +The type of iterator category, std::bidirectional_iterator_tag. +

        TQMapConstIterator::pointer

        +Const pointer to value_type. +

        TQMapConstIterator::reference

        +Const reference to value_type. +

        TQMapConstIterator::value_type

        +The type of const value. +

        Member Function Documentation

        +

        TQMapConstIterator::TQMapConstIterator () +

        + +

        Constructs an uninitialized iterator. + +

        TQMapConstIterator::TQMapConstIterator ( TQMapNode<K, T> * p ) +

        + +

        Constructs an iterator starting at node p. + +

        TQMapConstIterator::TQMapConstIterator ( const TQMapConstIterator<K, T> & it ) +

        + +

        Constructs a copy of the iterator, it. + +

        TQMapConstIterator::TQMapConstIterator ( const TQMapIterator<K, T> & it ) +

        + +

        Constructs a copy of the iterator, it. + +

        const T & TQMapConstIterator::data () const +

        + +

        Returns a const reference to the current item's data. + +

        const K & TQMapConstIterator::key () const +

        + +

        Returns a const reference to the current item's key. + +

        bool TQMapConstIterator::operator!= ( const TQMapConstIterator<K, T> & it ) const +

        + +

        Compares the iterator to the it iterator and returns FALSE if +they point to the same item; otherwise returns TRUE. + +

        const T & TQMapConstIterator::operator* () const +

        + +

        Dereference operator. Returns a const reference to the current +item's data. The same as data(). + +

        TQMapConstIterator<K, T> & TQMapConstIterator::operator++ () +

        + +

        Prefix ++ makes the succeeding item current and returns an +iterator pointing to the new current item. The iterator cannot +check whether it reached the end of the map. Incrementing the +iterator returned by end() causes undefined results. + +

        TQMapConstIterator<K, T> TQMapConstIterator::operator++ ( int ) +

        + +

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

        Postfix ++ makes the succeeding item current and returns an +iterator pointing to the new current item. The iterator cannot +check whether it reached the end of the map. Incrementing the +iterator returned by end() causes undefined results. + +

        TQMapConstIterator<K, T> & TQMapConstIterator::operator-- () +

        + +

        Prefix -- makes the previous item current and returns an iterator +pointing to the new current item. The iterator cannot check +whether it reached the beginning of the map. Decrementing the +iterator returned by begin() causes undefined results. + +

        TQMapConstIterator<K, T> TQMapConstIterator::operator-- ( int ) +

        + +

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

        Postfix -- makes the previous item current and returns an iterator +pointing to the new current item. The iterator cannot check +whether it reached the beginning of the map. Decrementing the +iterator returned by begin() causes undefined results. + +

        bool TQMapConstIterator::operator== ( const TQMapConstIterator<K, T> & it ) const +

        + +

        Compares the iterator to the it iterator and returns TRUE if +they point to the same item; 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/tqmapiterator-members.html b/doc/html/tqmapiterator-members.html new file mode 100644 index 000000000..a0fd21aa6 --- /dev/null +++ b/doc/html/tqmapiterator-members.html @@ -0,0 +1,54 @@ + + + + + +TQMapIterator Member List + + + + + + + +
        + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

        Complete Member List for TQMapIterator

        + +

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

        + +


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

        TQMapIterator Class Reference

        + +

        The TQMapIterator class provides an iterator for TQMap. +More... +

        #include <tqmap.h> +

        List of all member functions. +

        Public Members

        + +

        Detailed Description

        + + +The TQMapIterator class provides an iterator for TQMap. +

        + +

        You cannot create an iterator by yourself. Instead, you must ask a +map to give you one. An iterator is as big as a pointer; on 32-bit +machines that means 4 bytes, on 64-bit machines, 8 bytes. That +makes copying iterators very fast. Iterators behave in a similar +way to pointers, and they are almost as fast as pointers. See the +TQMap example. +

        TQMap is highly optimized for performance and memory usage, but the +trade-off is that you must be more careful. The only way to +traverse a map is to use iterators. TQMap does not know about its +iterators, and the iterators don't even know to which map they +belong. That makes things fast but a bit dangerous because it is +up to you to make sure that the iterators you are using are still +valid. TQDictIterator will be able to give warnings, whereas +TQMapIterator may end up in an undefined state. +

        For every Iterator there is also a ConstIterator. You must use the +ConstIterator to access a TQMap in a const environment or if the +reference or pointer to the map is itself const. Its semantics are +the same, but it only returns const references to the item it +points to. +

        See also TQMap, TQMapConstIterator, TQt Template Library Classes, and Non-GUI Classes. + +


        Member Type Documentation

        +

        TQMapIterator::iterator_category

        +The type of iterator category, std::bidirectional_iterator_tag. +

        TQMapIterator::pointer

        +Pointer to value_type. +

        TQMapIterator::reference

        +Reference to value_type. +

        TQMapIterator::value_type

        +The type of value. +

        Member Function Documentation

        +

        TQMapIterator::TQMapIterator () +

        + +

        Creates an uninitialized iterator. + +

        TQMapIterator::TQMapIterator ( TQMapNode<K, T> * p ) +

        + +

        Constructs an iterator starting at node p. + +

        TQMapIterator::TQMapIterator ( const TQMapIterator<K, T> & it ) +

        + +

        Constructs a copy of the iterator, it. + +

        T & TQMapIterator::data () +

        + +

        Returns a reference to the current item's data. + +

        const T & TQMapIterator::data () const +

        + +

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

        Returns a const reference to the current item's data. + +

        const K & TQMapIterator::key () const +

        + +

        Returns a const reference to the current item's key. + +

        bool TQMapIterator::operator!= ( const TQMapIterator<K, T> & it ) const +

        + +

        Compares the iterator to the it iterator and returns FALSE if +they point to the same item; otherwise returns TRUE. + +

        T & TQMapIterator::operator* () +

        + +

        Dereference operator. Returns a reference to the current item's +data. The same as data(). + +

        const T & TQMapIterator::operator* () const +

        + +

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

        Dereference operator. Returns a const reference to the current +item's data. The same as data(). + +

        TQMapIterator<K, T> & TQMapIterator::operator++ () +

        + +

        Prefix ++ makes the succeeding item current and returns an +iterator pointing to the new current item. The iterator cannot +check whether it reached the end of the map. Incrementing the +iterator returned by end() causes undefined results. + +

        TQMapIterator<K, T> TQMapIterator::operator++ ( int ) +

        + +

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

        Postfix ++ makes the succeeding item current and returns an +iterator pointing to the new current item. The iterator cannot +check whether it reached the end of the map. Incrementing the +iterator returned by end() causes undefined results. + +

        TQMapIterator<K, T> & TQMapIterator::operator-- () +

        + +

        Prefix -- makes the previous item current and returns an iterator +pointing to the new current item. The iterator cannot check +whether it reached the beginning of the map. Decrementing the +iterator returned by begin() causes undefined results. + +

        TQMapIterator<K, T> TQMapIterator::operator-- ( int ) +

        + +

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

        Postfix -- makes the previous item current and returns an iterator +pointing to the new current item. The iterator cannot check +whether it reached the beginning of the map. Decrementing the +iterator returned by begin() causes undefined results. + +

        bool TQMapIterator::operator== ( const TQMapIterator<K, T> & it ) const +

        + +

        Compares the iterator to the it iterator and returns TRUE if +they point to the same item; 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/tqpair-h.html b/doc/html/tqpair-h.html new file mode 100644 index 000000000..8555108a5 --- /dev/null +++ b/doc/html/tqpair-h.html @@ -0,0 +1,153 @@ + + + + + +tqpair.h Include File + + + + + + + +
        + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

        tqpair.h

        + +

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


        +
        +/****************************************************************************
        +**
        +** Definition of TQPair 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 TQPAIR_H
        +#define TQPAIR_H
        +
        +#ifndef QT_H
        +#include "ntqglobal.h"
        +#include "ntqdatastream.h"
        +#endif // QT_H
        +
        +template <class T1, class T2>
        +struct TQPair
        +{
        +    typedef T1 first_type;
        +    typedef T2 second_type;
        +
        +    TQPair()
        +	: first( T1() ), second( T2() )
        +    {}
        +    TQPair( const T1& t1, const T2& t2 )
        +	: first( t1 ), second( t2 )
        +    {}
        +
        +    TQPair<T1, T2>& operator=(const TQPair<T1, T2>& other)
        +    {
        +	if (this != &other) {
        +	    first = other.first;
        +	    second = other.second;
        +	}
        +	return *this;
        +    }
        +
        +    T1 first;
        +    T2 second;
        +};
        +
        +template <class T1, class T2>
        +TQ_INLINE_TEMPLATES bool operator==( const TQPair<T1, T2>& x, const TQPair<T1, T2>& y )
        +{
        +    return x.first == y.first && x.second == y.second;
        +}
        +
        +template <class T1, class T2>
        +TQ_INLINE_TEMPLATES bool operator<( const TQPair<T1, T2>& x, const TQPair<T1, T2>& y )
        +{
        +    return x.first < y.first ||
        +	   ( !( y.first < x.first ) && x.second < y.second );
        +}
        +
        +template <class T1, class T2>
        +TQ_INLINE_TEMPLATES TQPair<T1, T2> qMakePair( const T1& x, const T2& y )
        +{
        +    return TQPair<T1, T2>( x, y );
        +}
        +
        +#ifndef TQT_NO_DATASTREAM
        +template <class T1, class T2>
        +inline TQDataStream& operator>>( TQDataStream& s, TQPair<T1, T2>& p )
        +{
        +    s >> p.first >> p.second;
        +    return s;
        +}
        +
        +template <class T1, class T2>
        +inline TQDataStream& operator<<( TQDataStream& s, const TQPair<T1, T2>& p )
        +{
        +    s << p.first << p.second;
        +    return s;
        +}
        +#endif
        +
        +#endif
        +
        + +


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

        Complete Member List for TQPair

        + +

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

        + +


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

        TQPair Class Reference

        + +

        The TQPair class is a value-based template class that provides a pair of elements. +More... +

        #include <tqpair.h> +

        List of all member functions. +

        Public Members

        +
          +
        • typedef T1 first_type
        • +
        • typedef T2 second_type
        • +
        • TQPair ()
        • +
        • TQPair ( const T1 & t1, const T2 & t2 )
        • +
        • TQPair<T1, T2> & operator= ( const TQPair<T1, T2> & other )
        • +
        +

        Related Functions

        + +

        Detailed Description

        + + +The TQPair class is a value-based template class that provides a pair of elements. +

        + + +

        TQPair is a TQt implementation of an STL-like pair. It can be used +in your application if the standard pair<> is not available on +your target platforms. +

        TQPair<T1, T2> defines a template instance to create a pair of +values that contains two values of type T1 and T2. Please note +that TQPair does not store pointers to the two elements; it holds a +copy of every member. This is why these kinds of classes are +called value based. If you're interested in pointer based +classes see, for example, TQPtrList and TQDict. +

        TQPair holds one copy of type T1 and one copy of type T2, but does +not provide iterators to access these elements. Instead, the two +elements (first and second) are public member variables of +the pair. TQPair owns the contained elements. For more relaxed +ownership semantics, see TQPtrCollection and friends which are +pointer-based containers. +

        Some classes cannot be used within a TQPair: for example, all +classes derived from TQObject and thus all classes that implement +widgets. Only "values" can be used in a TQPair. To qualify as a +value the class must provide: +

          +
        • A copy constructor +
        • An assignment operator +
        • A constructor that takes no arguments +
        +

        Note that C++ defaults to field-by-field assignment operators and +copy constructors if no explicit version is supplied. In many +cases this is sufficient. +

        TQPair uses an STL-like syntax to manipulate and address the +objects it contains. See the TQTL + documentation for more information. +

        Functions that need to return two values can use a TQPair. +

        See also TQt Template Library Classes, Implicitly and Explicitly Shared Classes, and Non-GUI Classes. + +


        Member Type Documentation

        +

        TQPair::first_type

        +The type of the first element in the pair. +

        TQPair::second_type

        +The type of the second element in the pair. +

        Member Function Documentation

        +

        TQPair::TQPair () +

        + +

        Constructs an empty pair. The first and second elements are +default constructed. + +

        TQPair::TQPair ( const T1 & t1, const T2 & t2 ) +

        + +

        Constructs a pair and initializes the first element with t1 +and the second element with t2. + +


        Related Functions

        +

        TQPair qMakePair ( T1 t1, T2 t2 ) +

        + +

        +

        This is a template convenience function. It is used to create a +TQPair<> object that contains t1 and t2. + + +


        +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/tqsqldatabase.html b/doc/html/tqsqldatabase.html index b7f6315ed..57846d91d 100644 --- a/doc/html/tqsqldatabase.html +++ b/doc/html/tqsqldatabase.html @@ -320,8 +320,8 @@ Returns a list of all the available database drivers. over a copy, e.g.
             TQStringList list = TQSqlDatabase::drivers();
        -    TQStringList::Iterator it = list.begin();
        -    while( it != list.end() ) {
        +    TQStringList::Iterator it = list.begin();
        +    while( it != list.end() ) {
                 myProcessing( *it );
                 ++it;
             }
        @@ -490,8 +490,8 @@ as specified by the parameter type.
         over a copy, e.g.
         
             TQStringList list = myDatabase.tables( TQSql::Tables | TQSql::Views );
        -    TQStringList::Iterator it = list.begin();
        -    while( it != list.end() ) {
        +    TQStringList::Iterator it = list.begin();
        +    while( it != list.end() ) {
                 myProcessing( *it );
                 ++it;
             }
        @@ -509,8 +509,8 @@ function that takes a table type parameter.
         over a copy, e.g.
         
             TQStringList list = myDatabase.tables();
        -    TQStringList::Iterator it = list.begin();
        -    while( it != list.end() ) {
        +    TQStringList::Iterator it = list.begin();
        +    while( it != list.end() ) {
                 myProcessing( *it );
                 ++it;
             }
        diff --git a/doc/html/tqsqldriver-h.html b/doc/html/tqsqldriver-h.html
        index 0854508ac..de499fb11 100644
        --- a/doc/html/tqsqldriver-h.html
        +++ b/doc/html/tqsqldriver-h.html
        @@ -85,7 +85,7 @@ body { background: #ffffff; color: black; }
         #include "tqsqlfield.h"
         #include "tqsqlindex.h"
         #include "ntqstringlist.h"
        -#include "ntqmap.h"
        +#include "tqmap.h"
         #endif // QT_H
         
         #if !defined( TQT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
        diff --git a/doc/html/tqsqlform-h.html b/doc/html/tqsqlform-h.html
        index 984cd209c..b0f183e67 100644
        --- a/doc/html/tqsqlform-h.html
        +++ b/doc/html/tqsqlform-h.html
        @@ -78,7 +78,7 @@ body { background: #ffffff; color: black; }
         
         #ifndef QT_H
         #include "tqobject.h"
        -#include "ntqmap.h"
        +#include "tqmap.h"
         #endif // QT_H
         
         #if !defined( TQT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
        diff --git a/doc/html/tqsqlquery-h.html b/doc/html/tqsqlquery-h.html
        index f012751b8..06b6e7023 100644
        --- a/doc/html/tqsqlquery-h.html
        +++ b/doc/html/tqsqlquery-h.html
        @@ -80,7 +80,7 @@ body { background: #ffffff; color: black; }
         #include "tqobject.h"
         #include "ntqstring.h"
         #include "ntqvariant.h"
        -#include "ntqvaluelist.h"
        +#include "tqvaluelist.h"
         #include "tqsqlerror.h"
         #include "tqsqlfield.h"
         #include "tqsql.h"
        diff --git a/doc/html/tqsqlquery.html b/doc/html/tqsqlquery.html
        index 56e8929f5..d6624bbd3 100644
        --- a/doc/html/tqsqlquery.html
        +++ b/doc/html/tqsqlquery.html
        @@ -313,7 +313,7 @@ Returns the value for the placeholder.
         This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
         

        Returns the value for the placeholder at position pos. -

        TQMap<TQString, TQVariant> TQSqlQuery::boundValues () const +

        TQMap<TQString, TQVariant> TQSqlQuery::boundValues () const

        Returns a map of the bound values.

        The bound values can be examined in the following way: @@ -322,16 +322,16 @@ Returns a map of the bound values. ... // Examine the bound values - bound using named binding TQMap<TQString, TQVariant>::ConstIterator it; - TQMap<TQString, TQVariant> vals = query.boundValues(); - for ( it = vals.begin(); it != vals.end(); ++it ) + TQMap<TQString, TQVariant> vals = query.boundValues(); + for ( it = vals.begin(); it != vals.end(); ++it ) tqWarning( "Placeholder: " + it.key() + ", Value: " + (*it).toString() ); ... // Examine the bound values - bound using positional binding TQValueList<TQVariant>::ConstIterator it; - TQValueList<TQVariant> list = query.boundValues().values(); + TQValueList<TQVariant> list = query.boundValues().values(); int i = 0; - for ( it = list.begin(); it != list.end(); ++it ) + for ( it = list.begin(); it != list.end(); ++it ) tqWarning( "Placeholder pos: %d, Value: " + (*it).toString(), i++ ); ... diff --git a/doc/html/tqsqlrecordinfo.html b/doc/html/tqsqlrecordinfo.html index 4c4dac0c7..8dadf7d3a 100644 --- a/doc/html/tqsqlrecordinfo.html +++ b/doc/html/tqsqlrecordinfo.html @@ -50,11 +50,11 @@ body { background: #ffffff; color: black; } The TQSqlRecordInfo class encapsulates a set of database field meta data.

        -

        This class is a TQValueList that holds a set of database field meta +

        This class is a TQValueList that holds a set of database field meta data. Use contains() to see if a given field name exists in the record, and use find() to get a TQSqlFieldInfo record for a named field. -

        See also TQValueList, TQSqlFieldInfo, and Database Classes. +

        See also TQValueList, TQSqlFieldInfo, and Database Classes.


        Member Function Documentation

        TQSqlRecordInfo::TQSqlRecordInfo () diff --git a/doc/html/tqvaluelist-h.html b/doc/html/tqvaluelist-h.html new file mode 100644 index 000000000..eee70f64b --- /dev/null +++ b/doc/html/tqvaluelist-h.html @@ -0,0 +1,714 @@ + + + + + +tqvaluelist.h Include File + + + + + + + +
        + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

        tqvaluelist.h

        + +

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


        +
        +/****************************************************************************
        +** $Id: qt/tqvaluelist.h   3.3.8   edited Jan 11 14:38 $
        +**
        +** Definition of TQValueList class
        +**
        +** Created : 990406
        +**
        +** 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 TQVALUELIST_H
        +#define TQVALUELIST_H
        +
        +#ifndef QT_H
        +#include "ntqtl.h"
        +#include "ntqshared.h"
        +#include "ntqdatastream.h"
        +#endif // QT_H
        +
        +#ifndef TQT_NO_STL
        +#include <iterator>
        +#include <list>
        +#endif
        +
        +//#define QT_CHECK_VALUELIST_RANGE
        +
        +#if defined(Q_CC_MSVC)
        +#pragma warning(disable:4284) // "return type for operator -> is not a UDT"
        +#endif
        +
        +template <class T>
        +class TQValueListNode
        +{
        +public:
        +    TQValueListNode( const T& t ) : data( t ) { }
        +    TQValueListNode() { }
        +#if defined(Q_TEMPLATEDLL)
        +    // Workaround MS bug in memory de/allocation in DLL vs. EXE
        +    virtual ~TQValueListNode() { }
        +#endif
        +
        +    TQValueListNode<T>* next;
        +    TQValueListNode<T>* prev;
        +    T data;
        +};
        +
        +template<class T>
        +class TQValueListIterator
        +{
        + public:
        +    /**
        +     * Typedefs
        +     */
        +    typedef TQValueListNode<T>* NodePtr;
        +#ifndef TQT_NO_STL
        +    typedef std::bidirectional_iterator_tag  iterator_category;
        +#endif
        +    typedef T        value_type;
        +    typedef size_t size_type;
        +#ifndef TQT_NO_STL
        +    typedef ptrdiff_t  difference_type;
        +#else
        +    typedef int difference_type;
        +#endif
        +    typedef T*   pointer;
        +    typedef T& reference;
        +
        +    /**
        +     * Variables
        +     */
        +    NodePtr node;
        +
        +    /**
        +     * Functions
        +     */
        +    TQValueListIterator() : node( 0 ) {}
        +    TQValueListIterator( NodePtr p ) : node( p ) {}
        +    TQValueListIterator( const TQValueListIterator<T>& it ) : node( it.node ) {}
        +
        +    bool operator==( const TQValueListIterator<T>& it ) const { return node == it.node; }
        +    bool operator!=( const TQValueListIterator<T>& it ) const { return node != it.node; }
        +    const T& operator*() const { return node->data; }
        +    T& operator*() { return node->data; }
        +    // UDT for T = x*
        +    // T* operator->() const { return &node->data; }
        +
        +    TQValueListIterator<T>& operator++() {
        +	node = node->next;
        +	return *this;
        +    }
        +
        +    TQValueListIterator<T> operator++(int) {
        +	TQValueListIterator<T> tmp = *this;
        +	node = node->next;
        +	return tmp;
        +    }
        +
        +    TQValueListIterator<T>& operator--() {
        +	node = node->prev;
        +	return *this;
        +    }
        +
        +    TQValueListIterator<T> operator--(int) {
        +	TQValueListIterator<T> tmp = *this;
        +	node = node->prev;
        +	return tmp;
        +    }
        +
        +    TQValueListIterator<T>& operator+=( int j ) {
        +	while ( j-- )
        +	    node = node->next;
        +	return *this;
        +    }
        +
        +    TQValueListIterator<T>& operator-=( int j ) {
        +	while ( j-- )
        +	    node = node->prev;
        +	return *this;
        +    }
        +
        +};
        +
        +template<class T>
        +class TQValueListConstIterator
        +{
        + public:
        +    /**
        +     * Typedefs
        +     */
        +    typedef TQValueListNode<T>* NodePtr;
        +#ifndef TQT_NO_STL
        +    typedef std::bidirectional_iterator_tag  iterator_category;
        +#endif
        +    typedef T        value_type;
        +    typedef size_t size_type;
        +#ifndef TQT_NO_STL
        +    typedef ptrdiff_t  difference_type;
        +#else
        +    typedef int difference_type;
        +#endif
        +    typedef const T*   pointer;
        +    typedef const T& reference;
        +
        +    /**
        +     * Variables
        +     */
        +    NodePtr node;
        +
        +    /**
        +     * Functions
        +     */
        +    TQValueListConstIterator() : node( 0 ) {}
        +    TQValueListConstIterator( NodePtr p ) : node( p ) {}
        +    TQValueListConstIterator( const TQValueListConstIterator<T>& it ) : node( it.node ) {}
        +    TQValueListConstIterator( const TQValueListIterator<T>& it ) : node( it.node ) {}
        +
        +    bool operator==( const TQValueListConstIterator<T>& it ) const { return node == it.node; }
        +    bool operator!=( const TQValueListConstIterator<T>& it ) const { return node != it.node; }
        +    const T& operator*() const { return node->data; }
        +    // UDT for T = x*
        +    // const T* operator->() const { return &node->data; }
        +
        +    TQValueListConstIterator<T>& operator++() {
        +	node = node->next;
        +	return *this;
        +    }
        +
        +    TQValueListConstIterator<T> operator++(int) {
        +	TQValueListConstIterator<T> tmp = *this;
        +	node = node->next;
        +	return tmp;
        +    }
        +
        +    TQValueListConstIterator<T>& operator--() {
        +	node = node->prev;
        +	return *this;
        +    }
        +
        +    TQValueListConstIterator<T> operator--(int) {
        +	TQValueListConstIterator<T> tmp = *this;
        +	node = node->prev;
        +	return tmp;
        +    }
        +};
        +
        +template <class T>
        +class TQValueListPrivate : public TQShared
        +{
        +public:
        +    /**
        +     * Typedefs
        +     */
        +    typedef TQValueListIterator<T> Iterator;
        +    typedef TQValueListConstIterator<T> ConstIterator;
        +    typedef TQValueListNode<T> Node;
        +    typedef TQValueListNode<T>* NodePtr;
        +    typedef size_t size_type;
        +
        +    /**
        +     * Functions
        +     */
        +    TQValueListPrivate();
        +    TQValueListPrivate( const TQValueListPrivate<T>& _p );
        +
        +    void derefAndDelete() // ### hack to get around hp-cc brain damage
        +    {
        +	if ( deref() )
        +	    delete this;
        +    }
        +
        +#if defined(Q_TEMPLATEDLL)
        +    // Workaround MS bug in memory de/allocation in DLL vs. EXE
        +    virtual
        +#endif
        +    ~TQValueListPrivate();
        +
        +    Iterator insert( Iterator it, const T& x );
        +    Iterator remove( Iterator it );
        +    NodePtr find( NodePtr start, const T& x ) const;
        +    int findIndex( NodePtr start, const T& x ) const;
        +    uint contains( const T& x ) const;
        +    uint remove( const T& x );
        +    NodePtr at( size_type i ) const;
        +    void clear();
        +
        +    NodePtr node;
        +    size_type nodes;
        +};
        +
        +template <class T>
        +TQ_INLINE_TEMPLATES TQValueListPrivate<T>::TQValueListPrivate()
        +{
        +    node = new Node; node->next = node->prev = node; nodes = 0;
        +}
        +
        +template <class T>
        +TQ_INLINE_TEMPLATES TQValueListPrivate<T>::TQValueListPrivate( const TQValueListPrivate<T>& _p )
        +    : TQShared()
        +{
        +    node = new Node; node->next = node->prev = node; nodes = 0;
        +    Iterator b( _p.node->next );
        +    Iterator e( _p.node );
        +    Iterator i( node );
        +    while( b != e )
        +	insert( i, *b++ );
        +}
        +
        +template <class T>
        +TQ_INLINE_TEMPLATES TQValueListPrivate<T>::~TQValueListPrivate() {
        +    NodePtr p = node->next;
        +    while( p != node ) {
        +	NodePtr x = p->next;
        +	delete p;
        +	p = x;
        +    }
        +    delete node;
        +}
        +
        +template <class T>
        +TQ_INLINE_TEMPLATES TQ_TYPENAME TQValueListPrivate<T>::Iterator TQValueListPrivate<T>::insert( TQ_TYPENAME TQValueListPrivate<T>::Iterator it, const T& x )
        +{
        +    NodePtr p = new Node( x );
        +    p->next = it.node;
        +    p->prev = it.node->prev;
        +    it.node->prev->next = p;
        +    it.node->prev = p;
        +    nodes++;
        +    return p;
        +}
        +
        +template <class T>
        +TQ_INLINE_TEMPLATES TQ_TYPENAME TQValueListPrivate<T>::Iterator TQValueListPrivate<T>::remove( TQ_TYPENAME TQValueListPrivate<T>::Iterator it )
        +{
        +    Q_ASSERT ( it.node != node );
        +    NodePtr next = it.node->next;
        +    NodePtr prev = it.node->prev;
        +    prev->next = next;
        +    next->prev = prev;
        +    delete it.node;
        +    nodes--;
        +    return Iterator( next );
        +}
        +
        +template <class T>
        +TQ_INLINE_TEMPLATES TQ_TYPENAME TQValueListPrivate<T>::NodePtr TQValueListPrivate<T>::find( TQ_TYPENAME TQValueListPrivate<T>::NodePtr start, const T& x ) const
        +{
        +    ConstIterator first( start );
        +    ConstIterator last( node );
        +    while( first != last) {
        +	if ( *first == x )
        +	    return first.node;
        +	++first;
        +    }
        +    return last.node;
        +}
        +
        +template <class T>
        +TQ_INLINE_TEMPLATES int TQValueListPrivate<T>::findIndex( TQ_TYPENAME TQValueListPrivate<T>::NodePtr start, const T& x ) const
        +{
        +    ConstIterator first( start );
        +    ConstIterator last( node );
        +    int pos = 0;
        +    while( first != last) {
        +	if ( *first == x )
        +	    return pos;
        +	++first;
        +	++pos;
        +    }
        +    return -1;
        +}
        +
        +template <class T>
        +TQ_INLINE_TEMPLATES uint TQValueListPrivate<T>::contains( const T& x ) const
        +{
        +    uint result = 0;
        +    Iterator first = Iterator( node->next );
        +    Iterator last = Iterator( node );
        +    while( first != last) {
        +	if ( *first == x )
        +	    ++result;
        +	++first;
        +    }
        +    return result;
        +}
        +
        +template <class T>
        +TQ_INLINE_TEMPLATES uint TQValueListPrivate<T>::remove( const T& _x )
        +{
        +    const T x = _x;
        +    uint result = 0;
        +    Iterator first = Iterator( node->next );
        +    Iterator last = Iterator( node );
        +    while( first != last) {
        +	if ( *first == x ) {
        +	    first = remove( first );
        +	    ++result;
        +	} else
        +	    ++first;
        +    }
        +    return result;
        +}
        +
        +template <class T>
        +TQ_INLINE_TEMPLATES TQ_TYPENAME TQValueListPrivate<T>::NodePtr TQValueListPrivate<T>::at( size_type i ) const
        +{
        +    Q_ASSERT( i <= nodes );
        +    NodePtr p = node->next;
        +    for( size_type x = 0; x < i; ++x )
        +	p = p->next;
        +    return p;
        +}
        +
        +template <class T>
        +TQ_INLINE_TEMPLATES void TQValueListPrivate<T>::clear()
        +{
        +    nodes = 0;
        +    NodePtr p = node->next;
        +    while( p != node ) {
        +	NodePtr next = p->next;
        +	delete p;
        +	p = next;
        +    }
        +    node->next = node->prev = node;
        +}
        +
        +#ifdef QT_CHECK_RANGE
        +# if !defined( TQT_NO_DEBUG ) && defined( QT_CHECK_VALUELIST_RANGE )
        +#  define QT_CHECK_INVALID_LIST_ELEMENT if ( empty() ) tqWarning( "TQValueList: Warning invalid element" )
        +#  define QT_CHECK_INVALID_LIST_ELEMENT_FATAL Q_ASSERT( !empty() );
        +# else
        +#  define QT_CHECK_INVALID_LIST_ELEMENT
        +#  define QT_CHECK_INVALID_LIST_ELEMENT_FATAL
        +# endif
        +#else
        +# define QT_CHECK_INVALID_LIST_ELEMENT
        +# define QT_CHECK_INVALID_LIST_ELEMENT_FATAL
        +#endif
        +
        +template <class T> class TQDeepCopy;
        +
        +template <class T>
        +class TQValueList
        +{
        +public:
        +    /**
        +     * Typedefs
        +     */
        +    typedef TQValueListIterator<T> iterator;
        +    typedef TQValueListConstIterator<T> const_iterator;
        +    typedef T value_type;
        +    typedef value_type* pointer;
        +    typedef const value_type* const_pointer;
        +    typedef value_type& reference;
        +    typedef const value_type& const_reference;
        +    typedef size_t size_type;
        +#ifndef TQT_NO_STL
        +    typedef ptrdiff_t  difference_type;
        +#else
        +    typedef int difference_type;
        +#endif
        +
        +    /**
        +     * API
        +     */
        +    TQValueList() { sh = new TQValueListPrivate<T>; }
        +    TQValueList( const TQValueList<T>& l ) { sh = l.sh; sh->ref(); }
        +#ifndef TQT_NO_STL
        +    TQValueList( const std::list<T>& l )
        +    {
        +	sh = new TQValueListPrivate<T>;
        +	tqCopy( l.begin(), l.end(), std::back_inserter( *this ) );
        +    }
        +#endif
        +    ~TQValueList() { sh->derefAndDelete(); }
        +
        +    TQValueList<T>& operator= ( const TQValueList<T>& l )
        +    {
        +	l.sh->ref();
        +	sh->derefAndDelete();
        +	sh = l.sh;
        +	return *this;
        +    }
        +#ifndef TQT_NO_STL
        +    TQValueList<T>& operator= ( const std::list<T>& l )
        +    {
        +	detach();
        +	tqCopy( l.begin(), l.end(), std::back_inserter( *this ) );
        +	return *this;
        +    }
        +    bool operator== ( const std::list<T>& l ) const
        +    {
        +	if ( size() != l.size() )
        +	    return FALSE;
        +	const_iterator it2 = begin();
        +#if !defined(Q_CC_MIPS)
        +	typename
        +#endif
        +	std::list<T>::const_iterator it = l.begin();
        +	for ( ; it2 != end(); ++it2, ++it )
        +	if ( !((*it2) == (*it)) )
        +	    return FALSE;
        +	return TRUE;
        +    }
        +#endif
        +    bool operator== ( const TQValueList<T>& l ) const;
        +    bool operator!= ( const TQValueList<T>& l ) const { return !( *this == l ); }
        +    iterator begin() { detach(); return iterator( sh->node->next ); }
        +    const_iterator begin() const { return const_iterator( sh->node->next ); }
        +    const_iterator constBegin() const { return const_iterator( sh->node->next ); }
        +    iterator end() { detach(); return iterator( sh->node ); }
        +    const_iterator end() const { return const_iterator( sh->node ); }
        +    const_iterator constEnd() const { return const_iterator( sh->node ); }
        +    iterator insert( iterator it, const T& x ) { detach(); return sh->insert( it, x ); }
        +    uint remove( const T& x ) { detach(); return sh->remove( x ); }
        +    void clear();
        +
        +    // ### 4.0: move out of class
        +    TQValueList<T>& operator<< ( const T& x )
        +    {
        +	append( x );
        +	return *this;
        +    }
        +
        +    size_type size() const { return sh->nodes; }
        +    bool empty() const { return sh->nodes == 0; }
        +    void push_front( const T& x ) { detach(); sh->insert( begin(), x ); }
        +    void push_back( const T& x ) { detach(); sh->insert( end(), x ); }
        +    iterator erase( iterator pos ) { detach(); return sh->remove( pos ); }
        +    iterator erase( iterator first, iterator last );
        +    reference front() { QT_CHECK_INVALID_LIST_ELEMENT_FATAL; return *begin(); }
        +    const_reference front() const { QT_CHECK_INVALID_LIST_ELEMENT_FATAL; return *begin(); }
        +    reference back() { QT_CHECK_INVALID_LIST_ELEMENT_FATAL; return *(--end()); }
        +    const_reference back() const { QT_CHECK_INVALID_LIST_ELEMENT_FATAL; return *(--end()); }
        +    void pop_front() { QT_CHECK_INVALID_LIST_ELEMENT; erase( begin() ); }
        +    void pop_back() {
        +	QT_CHECK_INVALID_LIST_ELEMENT;
        +	iterator tmp = end();
        +	erase( --tmp );
        +    }
        +    void insert( iterator pos, size_type n, const T& x );
        +    // Some compilers (incl. vc++) would instantiate this function even if
        +    // it is not used; this would constrain TQValueList to classes that provide
        +    // an operator<
        +    /*
        +    void sort()
        +    {
        +	qHeapSort( *this );
        +    }
        +    */
        +
        +    TQValueList<T> operator+ ( const TQValueList<T>& l ) const;
        +    TQValueList<T>& operator+= ( const TQValueList<T>& l );
        +
        +    iterator fromLast() { detach(); return iterator( sh->node->prev ); }
        +    const_iterator fromLast() const { return const_iterator( sh->node->prev ); }
        +
        +    bool isEmpty() const { return ( sh->nodes == 0 ); }
        +
        +    iterator append( const T& x ) { detach(); return sh->insert( end(), x ); }
        +    iterator prepend( const T& x ) { detach(); return sh->insert( begin(), x ); }
        +
        +    iterator remove( iterator it ) { detach(); return sh->remove( it ); }
        +
        +    T& first() { QT_CHECK_INVALID_LIST_ELEMENT; detach(); return sh->node->next->data; }
        +    const T& first() const { QT_CHECK_INVALID_LIST_ELEMENT; return sh->node->next->data; }
        +    T& last() { QT_CHECK_INVALID_LIST_ELEMENT; detach(); return sh->node->prev->data; }
        +    const T& last() const { QT_CHECK_INVALID_LIST_ELEMENT; return sh->node->prev->data; }
        +
        +    T& operator[] ( size_type i ) { QT_CHECK_INVALID_LIST_ELEMENT; detach(); return sh->at(i)->data; }
        +    const T& operator[] ( size_type i ) const { QT_CHECK_INVALID_LIST_ELEMENT; return sh->at(i)->data; }
        +    iterator at( size_type i ) { QT_CHECK_INVALID_LIST_ELEMENT; detach(); return iterator( sh->at(i) ); }
        +    const_iterator at( size_type i ) const { QT_CHECK_INVALID_LIST_ELEMENT; return const_iterator( sh->at(i) ); }
        +    iterator find ( const T& x ) { detach(); return iterator( sh->find( sh->node->next, x) ); }
        +    const_iterator find ( const T& x ) const { return const_iterator( sh->find( sh->node->next, x) ); }
        +    iterator find ( iterator it, const T& x ) { detach(); return iterator( sh->find( it.node, x ) ); }
        +    const_iterator find ( const_iterator it, const T& x ) const { return const_iterator( sh->find( it.node, x ) ); }
        +    int findIndex( const T& x ) const { return sh->findIndex( sh->node->next, x) ; }
        +    size_type contains( const T& x ) const { return sh->contains( x ); }
        +
        +    size_type count() const { return sh->nodes; }
        +
        +    TQValueList<T>& operator+= ( const T& x )
        +    {
        +	append( x );
        +	return *this;
        +    }
        +    typedef TQValueListIterator<T> Iterator;
        +    typedef TQValueListConstIterator<T> ConstIterator;
        +    typedef T ValueType;
        +
        +protected:
        +    /**
        +     * Helpers
        +     */
        +    void detach() { if ( sh->count > 1 ) detachInternal(); }
        +
        +    /**
        +     * Variables
        +     */
        +    TQValueListPrivate<T>* sh;
        +
        +private:
        +    void detachInternal();
        +
        +    friend class TQDeepCopy< TQValueList<T> >;
        +};
        +
        +template <class T>
        +TQ_INLINE_TEMPLATES bool TQValueList<T>::operator== ( const TQValueList<T>& l ) const
        +{
        +    if ( size() != l.size() )
        +	return FALSE;
        +    const_iterator it2 = begin();
        +    const_iterator it = l.begin();
        +    for( ; it != l.end(); ++it, ++it2 )
        +	if ( !( *it == *it2 ) )
        +	    return FALSE;
        +    return TRUE;
        +}
        +
        +template <class T>
        +TQ_INLINE_TEMPLATES void TQValueList<T>::clear()
        +{
        +    if ( sh->count == 1 ) sh->clear(); else { sh->deref(); sh = new TQValueListPrivate<T>; }
        +}
        +
        +template <class T>
        +TQ_INLINE_TEMPLATES TQ_TYPENAME TQValueList<T>::iterator TQValueList<T>::erase( TQ_TYPENAME TQValueList<T>::iterator first, TQ_TYPENAME TQValueList<T>::iterator last )
        +{
        +    while ( first != last )
        +	erase( first++ );
        +    return last;
        +}
        +
        +
        +template <class T>
        +TQ_INLINE_TEMPLATES void TQValueList<T>::insert( TQ_TYPENAME TQValueList<T>::iterator pos, size_type n, const T& x )
        +{
        +    for ( ; n > 0; --n )
        +	insert( pos, x );
        +}
        +
        +template <class T>
        +TQ_INLINE_TEMPLATES TQValueList<T> TQValueList<T>::operator+ ( const TQValueList<T>& l ) const
        +{
        +    TQValueList<T> l2( *this );
        +    for( const_iterator it = l.begin(); it != l.end(); ++it )
        +	l2.append( *it );
        +    return l2;
        +}
        +
        +template <class T>
        +TQ_INLINE_TEMPLATES TQValueList<T>& TQValueList<T>::operator+= ( const TQValueList<T>& l )
        +{
        +    TQValueList<T> copy = l;
        +    for( const_iterator it = copy.begin(); it != copy.end(); ++it )
        +	append( *it );
        +    return *this;
        +}
        +
        +template <class T>
        +TQ_INLINE_TEMPLATES void TQValueList<T>::detachInternal()
        +{
        +    sh->deref(); sh = new TQValueListPrivate<T>( *sh );
        +}
        +
        +#ifndef TQT_NO_DATASTREAM
        +template <class T>
        +TQ_INLINE_TEMPLATES TQDataStream& operator>>( TQDataStream& s, TQValueList<T>& l )
        +{
        +    l.clear();
        +    TQ_UINT32 c;
        +    s >> c;
        +    for( TQ_UINT32 i = 0; i < c; ++i )
        +    {
        +	T t;
        +	s >> t;
        +	l.append( t );
        +	if ( s.atEnd() )
        +	    break;
        +    }
        +    return s;
        +}
        +
        +template <class T>
        +TQ_INLINE_TEMPLATES TQDataStream& operator<<( TQDataStream& s, const TQValueList<T>& l )
        +{
        +    s << (TQ_UINT32)l.size();
        +    TQValueListConstIterator<T> it = l.begin();
        +    for( ; it != l.end(); ++it )
        +	s << *it;
        +    return s;
        +}
        +#endif // TQT_NO_DATASTREAM
        +
        +#define Q_DEFINED_QVALUELIST
        +#define Q_DEFINED_QVALUELIST
        +#include "ntqwinexport.h"
        +#endif // TQVALUELIST_H
        +
        + +


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

        Complete Member List for TQValueList

        + +

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

        + +


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

        TQValueList Class Reference

        + +

        The TQValueList class is a value-based template class that +provides lists. +More... +

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

        +

        #include <tqvaluelist.h> +

        Inherited by TQCanvasItemList, TQStringList, and TQValueStack. +

        List of all member functions. +

        Public Members

        + +

        Related Functions

        +
          +
        • TQDataStream & operator>> ( TQDataStream & s, TQValueList<T> & l )
        • +
        • TQDataStream & operator<< ( TQDataStream & s, const TQValueList<T> & l )
        • +
        +

        Detailed Description

        + + +The TQValueList class is a value-based template class that +provides lists. +

        + + + + +

        TQValueList is a TQt implementation of an STL-like list container. +It can be used in your application if the standard list is not +available for your target platform(s). TQValueList is part of the +TQt Template Library. +

        TQValueList<T> defines a template instance to create a list of +values that all have the class T. Note that TQValueList does not +store pointers to the members of the list; it holds a copy of +every member. This is why these kinds of classes are called "value +based"; TQPtrList and TQDict are "pointer based". +

        TQValueList contains and manages a collection of objects of type T +and provides iterators that allow the contained objects to be +addressed. TQValueList owns the contained items. For more relaxed +ownership semantics, see TQPtrCollection and friends which are +pointer-based containers. +

        Some classes cannot be used within a TQValueList, for example, all +classes derived from TQObject and thus all classes that implement +widgets. Only values can be used in a TQValueList. To qualify as a +value the class must provide: +

          +
        • a copy constructor; +
        • an assignment operator; +
        • a default constructor, i.e. a constructor that does not take any arguments. +
        +

        Note that C++ defaults to field-by-field assignment operators and +copy constructors if no explicit version is supplied. In many +cases this is sufficient. +

        In addition, some compilers (e.g. Sun CC) might require that the +class provides an equality operator (operator==()). +

        TQValueList's function naming is consistent with the other TQt +classes (e.g. count(), isEmpty()). TQValueList also provides extra +functions for compatibility with STL algorithms, such as size() +and empty(). Programmers already familiar with the STL list may +prefer to use the STL-compatible functions. +

        Example: +

        +    class Employee
        +    {
        +    public:
        +        Employee(): sn(0) {}
        +        Employee( const TQString& forename, const TQString& surname, int salary )
        +            : fn(forename), sn(surname), sal(salary)
        +        {}
        +
        +        TQString forename() const { return fn; }
        +        TQString surname() const { return sn; }
        +        int salary() const { return sal; }
        +        void setSalary( int salary ) { sal = salary; }
        +
        +    private:
        +        TQString fn;
        +        TQString sn;
        +        int sal;
        +    };
        +
        +    typedef TQValueList<Employee> EmployeeList;
        +    EmployeeList list;
        +
        +    list.append( Employee("John", "Doe", 50000) );
        +    list.append( Employee("Jane", "Williams", 80000) );
        +    list.append( Employee("Tom", "Jones", 60000) );
        +
        +    Employee mary( "Mary", "Hawthorne", 90000 );
        +    list.append( mary );
        +    mary.setSalary( 100000 );
        +
        +    EmployeeList::iterator it;
        +    for ( it = list.begin(); it != list.end(); ++it )
        +        cout << (*it).surname().latin1() << ", " <<
        +                (*it).forename().latin1() << " earns " <<
        +                (*it).salary() << endl;
        +
        +    // Output:
        +    // Doe, John earns 50000
        +    // Williams, Jane earns 80000
        +    // Hawthorne, Mary earns 90000
        +    // Jones, Tom earns 60000
        +    
        + +

        Notice that the latest changes to Mary's salary did not affect the +value in the list because the list created a copy of Mary's entry. +

        There are several ways to find items in the list. The begin() and +end() functions return iterators to the beginning and end of the +list. The advantage of getting an iterator is that you can move +forward or backward from this position by +incrementing/decrementing the iterator. The iterator returned by +end() points to the item which is one past the last item in the +container. The past-the-end iterator is still associated with the +list it belongs to, however it is not dereferenceable; +operator*() will not return a well-defined value. If the list is +empty(), the iterator returned by begin() will equal the iterator +returned by end(). +

        Another way to find an item in the list is by using the tqFind() algorithm. For example: +

        +    TQValueList<int> list;
        +    ...
        +    TQValueList<int>::iterator it = tqFind( list.begin(), list.end(), 3 );
        +    if ( it != list.end() )
        +        // it points to the found item
        +    
        + +

        It is safe to have multiple iterators a the list at the same +time. If some member of the list is removed, only iterators +pointing to the removed member become invalid. Inserting into the +list does not invalidate any iterator. For convenience, the +function last() returns a reference to the last item in the list, +and first() returns a reference to the the first item. If the +list is empty(), both last() and first() have undefined behavior +(your application will crash or do unpredictable things). Use +last() and first() with caution, for example: +

        +    TQValueList<int> list;
        +    list.append( 1 );
        +    list.append( 2 );
        +    list.append( 3 );
        +    ...
        +    if ( !list.empty() ) {
        +        // OK, modify the first item
        +        int& i = list.first();
        +        i = 18;
        +    }
        +    ...
        +    TQValueList<double> dlist;
        +    double d = dlist.last(); // undefined
        +    
        + +

        Because TQValueList is value-based there is no need to be careful +about deleting items in the list. The list holds its own copies +and will free them if the corresponding member or the list itself +is deleted. You can force the list to free all of its items with +clear(). +

        TQValueList is shared implicitly, which means it can be copied in +constant time, i.e. O(1). If multiple TQValueList instances share +the same data and one needs to modify its contents, this modifying +instance makes a copy and modifies its private copy; therefore it +does not affect the other instances; this takes O(n) time. This is +often called "copy on write". If a TQValueList is being used in a +multi-threaded program, you must protect all access to the list. +See TQMutex. +

        There are several ways to insert items into the list. The +prepend() and append() functions insert items at the beginning and +the end of the list respectively. The insert() function comes in +several flavors and can be used to add one or more items at +specific positions within the list. +

        Items can also be removed from the list in several ways. There +are several variants of the remove() function, which removes a +specific item from the list. The remove() function will find and +remove items according to a specific item value. +

        Lists can also be sorted using the TQt Template + Library. For example with qHeapSort(): +

        Example: +

        +    TQValueList<int> list;
        +    list.append( 5 );
        +    list.append( 8 );
        +    list.append( 3 );
        +    list.append( 4 );
        +    qHeapSort( list );
        +    
        + +

        See also TQValueListIterator, TQt Template Library Classes, Implicitly and Explicitly Shared Classes, and Non-GUI Classes. + +


        Member Type Documentation

        +

        TQValueList::ConstIterator

        + +

        This iterator is an instantiation of TQValueListConstIterator for +the same type as this TQValueList. In other words, if you +instantiate TQValueList, ConstIterator is a +TQValueListConstIterator. Several member function use it, such +as TQValueList::begin(), which returns an iterator pointing to the +first item in the list. +

        Functionally, this is almost the same as Iterator. The only +difference is you cannot use ConstIterator for non-const +operations, and that the compiler can often generate better code +if you use ConstIterator. +

        See also TQValueListIterator and Iterator. + +

        TQValueList::Iterator

        + +

        This iterator is an instantiation of TQValueListIterator for the +same type as this TQValueList. In other words, if you instantiate +TQValueList, Iterator is a TQValueListIterator. Several +member function use it, such as TQValueList::begin(), which returns +an iterator pointing to the first item in the list. +

        Functionally, this is almost the same as ConstIterator. The only +difference is that you cannot use ConstIterator for non-const +operations, and that the compiler can often generate better code +if you use ConstIterator. +

        See also TQValueListIterator and ConstIterator. + +

        TQValueList::const_iterator

        +The list's const iterator type, TQValueListConstIterator. +

        TQValueList::const_pointer

        +The const pointer to T type. +

        TQValueList::const_reference

        +The const reference to T type. +

        TQValueList::iterator

        +The list's iterator type, TQValueListIterator. +

        TQValueList::pointer

        +The pointer to T type. +

        TQValueList::reference

        +The reference to T type. +

        TQValueList::size_type

        +An unsigned integral type, used to represent various sizes. +

        TQValueList::value_type

        +The type of the object stored in the list, T. +

        Member Function Documentation

        +

        TQValueList::TQValueList () +

        + +

        Constructs an empty list. + +

        TQValueList::TQValueList ( const TQValueList<T> & l ) +

        + +

        Constructs a copy of l. +

        This operation takes O(1) time because TQValueList is implicitly shared. +

        The first modification to a list will take O(n) time. + +

        TQValueList::TQValueList ( const std::list<T> & l ) +

        + +

        Contructs a copy of l. +

        This constructor is provided for compatibility with STL +containers. + +

        TQValueList::~TQValueList () +

        + +

        Destroys the list. References to the values in the list and all +iterators of this list become invalidated. Note that it is +impossible for an iterator to check whether or not it is valid: +TQValueList is highly tuned for performance, not for error +checking. + +

        iterator TQValueList::append ( const T & x ) +

        + +

        Inserts x at the end of the list. +

        See also insert() and prepend(). + +

        Examples: checklists/checklists.cpp and fonts/simple-qfont-demo/viewer.cpp. +

        const_iterator TQValueList::at ( size_type i ) const +

        + +

        Returns an iterator pointing to the item at position i in the +list, or an undefined value if the index is out of range. +

        Warning: This function uses a linear search and can be extremely +slow for large lists. TQValueList is not optimized for random item +access. If you need random access use a different container, such +as TQValueVector. + +

        iterator TQValueList::at ( size_type i ) +

        + +

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

        Returns an iterator pointing to the item at position i in the +list, or an undefined value if the index is out of range. +

        +

        reference TQValueList::back () +

        + +

        Returns a reference to the last item. If the list contains no last +item (i.e. empty() returns TRUE), the return value is undefined. +

        This function is provided for STL compatibility. It is equivalent +to last(). +

        See also front(). + +

        const_reference TQValueList::back () const +

        + +

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

        +

        const_iterator TQValueList::begin () const +

        + +

        Returns an iterator pointing to the first item in the list. This +iterator equals end() if the list is empty. +

        See also first(), end(), and constBegin(). + +

        Examples: canvas/canvas.cpp, chart/canvasview.cpp, chart/element.cpp, checklists/checklists.cpp, sql/overview/insert/main.cpp, table/statistics/statistics.cpp, and themes/themes.cpp. +

        iterator TQValueList::begin () +

        + +

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

        Returns an iterator pointing to the first item in the list. This +iterator equals end() if the list is empty. +

        See also first() and end(). + +

        void TQValueList::clear () +

        + +

        Removes all items from the list. +

        See also remove(). + +

        const_iterator TQValueList::constBegin () const +

        + +

        Returns an iterator pointing to the first item in the list. This +iterator equals constEnd() if the list is empty. +

        See also begin(). + +

        const_iterator TQValueList::constEnd () const +

        + +

        Returns an iterator pointing past the last item in the list. +This iterator equals constBegin() if the list is empty. +

        See also end(). + +

        size_type TQValueList::contains ( const T & x ) const +

        + +

        Returns the number of occurrences of the value x in the list. + +

        size_type TQValueList::count () const +

        + +

        Returns the number of items in the list. +

        See also isEmpty(). + +

        Examples: chart/element.cpp, fileiconview/qfileiconview.cpp, and table/statistics/statistics.cpp. +

        bool TQValueList::empty () const +

        + +

        Returns TRUE if the list contains no items; otherwise returns +FALSE. +

        See also size(). + +

        iterator TQValueList::end () +

        + +

        Returns an iterator pointing past the last item in the list. +This iterator equals begin() if the list is empty. +

        See also last(), begin(), and constEnd(). + +

        Examples: canvas/canvas.cpp, chart/canvasview.cpp, chart/element.cpp, checklists/checklists.cpp, sql/overview/insert/main.cpp, table/statistics/statistics.cpp, and themes/themes.cpp. +

        const_iterator TQValueList::end () const +

        + +

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

        Returns an iterator pointing past the last item in the list. +This iterator equals begin() if the list is empty. +

        See also last() and begin(). + +

        iterator TQValueList::erase ( iterator it ) +

        + +

        Removes the item pointed to by it from the list. No iterators +other than it or other iterators pointing at the same item as +it are invalidated. Returns an iterator to the next item after +it, or end() if there is no such item. +

        This function is provided for STL compatibility. It is equivalent +to remove(). + +

        iterator TQValueList::erase ( iterator first, iterator last ) +

        + +

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

        Deletes all items from first to last (not including last). No iterators are invalidated, except those pointing to the +removed items themselves. Returns last. + +

        iterator TQValueList::find ( const T & x ) +

        + +

        Returns an iterator pointing to the first occurrence of x in +the list. +

        Returns end() is no item matched. + +

        const_iterator TQValueList::find ( const T & x ) const +

        + +

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

        Returns an iterator pointing to the first occurrence of x in +the list. +

        Returns end() if no item matched. + +

        iterator TQValueList::find ( iterator it, const T & x ) +

        + +

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

        Finds the first occurrence of x in the list starting at the +position given by it. +

        Returns end() if no item matched. + +

        const_iterator TQValueList::find ( const_iterator it, const T & x ) const +

        + +

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

        Finds the first occurrence of x in the list starting at the +position given by it. +

        Returns end() if no item matched. + +

        int TQValueList::findIndex ( const T & x ) const +

        + +

        Returns the index of the first occurrence of the value x. +Returns -1 if no item matched. + +

        T & TQValueList::first () +

        + +

        Returns a reference to the first item. If the list contains no +first item (i.e. isEmpty() returns TRUE), the return value is +undefined. +

        See also last(). + +

        Example: network/mail/smtp.cpp. +

        const T & TQValueList::first () const +

        + +

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

        +

        const_iterator TQValueList::fromLast () const +

        + +

        Returns an iterator to the last item in the list, or end() if +there is no last item. +

        Use the end() function instead. For example: +

        +    TQValueList<int> l;
        +    ...
        +    TQValueList<int>::iterator it = l.end();
        +    --it;
        +    if ( it != end() )
        +        // ...
        +    
        + +

        +

        iterator TQValueList::fromLast () +

        + +

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

        Returns an iterator to the last item in the list, or end() if +there is no last item. +

        Use the end() function instead. For example: +

        +    TQValueList<int> l;
        +    ...
        +    TQValueList<int>::iterator it = l.end();
        +    --it;
        +    if ( it != end() )
        +        // ...
        +    
        + +

        +

        reference TQValueList::front () +

        + +

        Returns a reference to the first item. If the list contains no +first item (i.e. empty() returns TRUE), the return value is +undefined. +

        This function is provided for STL compatibility. It is equivalent +to first(). +

        See also back(). + +

        const_reference TQValueList::front () const +

        + +

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

        +

        iterator TQValueList::insert ( iterator it, const T & x ) +

        + +

        Inserts the value x in front of the item pointed to by the +iterator, it. +

        Returns an iterator pointing at the inserted item. +

        See also append() and prepend(). + +

        Example: themes/themes.cpp. +

        void TQValueList::insert ( iterator pos, size_type n, const T & x ) +

        + +

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

        Inserts n copies of x before position pos. + +

        bool TQValueList::isEmpty () const +

        + +

        Returns TRUE if the list contains no items; otherwise returns +FALSE. +

        See also count(). + +

        Examples: fonts/simple-qfont-demo/viewer.cpp and network/mail/smtp.cpp. +

        T & TQValueList::last () +

        + +

        Returns a reference to the last item. If the list contains no last +item (i.e. empty() returns TRUE), the return value is undefined. + +

        const T & TQValueList::last () const +

        + +

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

        +

        bool TQValueList::operator!= ( const TQValueList<T> & l ) const +

        + +

        Compares both lists. +

        Returns TRUE if this list and l are unequal; otherwise returns +FALSE. + +

        TQValueList<T> TQValueList::operator+ ( const TQValueList<T> & l ) const +

        + +

        Creates a new list and fills it with the items of this list. Then +the items of l are appended. Returns the new list. + +

        TQValueList<T> & TQValueList::operator+= ( const TQValueList<T> & l ) +

        + +

        Appends the items of l to this list. Returns a reference to +this list. + +

        TQValueList<T> & TQValueList::operator+= ( const T & x ) +

        + +

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

        Appends the value x to the list. Returns a reference to the +list. + +

        TQValueList<T> & TQValueList::operator<< ( const T & x ) +

        + +

        Adds the value x to the end of the list. +

        Returns a reference to the list. + +

        TQValueList<T> & TQValueList::operator= ( const TQValueList<T> & l ) +

        + +

        Assigns l to this list and returns a reference to this list. +

        All iterators of the current list become invalidated by this +operation. The cost of such an assignment is O(1) since TQValueList +is implicitly shared. + +

        TQValueList<T> & TQValueList::operator= ( const std::list<T> & l ) +

        + +

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

        Assigns the contents of l to the list. +

        All iterators of the current list become invalidated by this +operation. + +

        bool TQValueList::operator== ( const TQValueList<T> & l ) const +

        + +

        Compares both lists. +

        Returns TRUE if this list and l are equal; otherwise returns +FALSE. + +

        bool TQValueList::operator== ( const std::list<T> & l ) const +

        + +

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

        Returns TRUE if this list and l are equal; otherwise returns +FALSE. +

        This operator is provided for compatibility with STL containers. + +

        const T & TQValueList::operator[] ( size_type i ) const +

        + +

        Returns a const reference to the item with index i in the list. +It is up to you to check whether this item really exists. You can +do that easily with the count() function. However this operator +does not check whether i is in range and will deliver undefined +results if it does not exist. +

        Warning: This function uses a linear search and can be extremely +slow for large lists. TQValueList is not optimized for random item +access. If you need random access use a different container, such +as TQValueVector. + +

        T & TQValueList::operator[] ( size_type i ) +

        + +

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

        Returns a non-const reference to the item with index i. + +

        void TQValueList::pop_back () +

        + +

        Removes the last item. If there is no last item, this operation is +undefined. +

        This function is provided for STL compatibility. + +

        void TQValueList::pop_front () +

        + +

        Removes the first item. If there is no first item, this operation +is undefined. +

        This function is provided for STL compatibility. + +

        iterator TQValueList::prepend ( const T & x ) +

        + +

        Inserts x at the beginning of the list. +

        See also insert() and append(). + +

        void TQValueList::push_back ( const T & x ) +

        + +

        Inserts x at the end of the list. +

        This function is provided for STL compatibility. It is equivalent +to append(). + +

        void TQValueList::push_front ( const T & x ) +

        + +

        Inserts x at the beginning of the list. +

        This function is provided for STL compatibility. It is equivalent +to prepend(). + +

        Example: toplevel/options.ui.h. +

        iterator TQValueList::remove ( iterator it ) +

        + +

        Removes the item pointed to by it from the list. No iterators +other than it or other iterators pointing at the same item as +it are invalidated. Returns an iterator to the next item after +it, or end() if there is no such item. +

        See also clear(). + +

        uint TQValueList::remove ( const T & x ) +

        + +

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

        Removes all items that have value x and returns the number of +removed items. + +

        size_type TQValueList::size () const +

        + +

        Returns the number of items in the list. +

        This function is provided for STL compatibility. It is equivalent +to count(). +

        See also empty(). + +


        Related Functions

        +

        TQDataStream & operator<< ( TQDataStream & s, const TQValueList<T> & l ) +

        + +

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

        +

        Writes a list, l, to the stream s. The type T stored in the +list must implement the streaming operator. + +

        TQDataStream & operator>> ( TQDataStream & s, TQValueList<T> & l ) +

        + +

        +

        Reads a list, l, from the stream s. The type T stored in the +list must implement the streaming operator. + + +


        +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/tqvaluelistconstiterator-members.html b/doc/html/tqvaluelistconstiterator-members.html new file mode 100644 index 000000000..b32253d17 --- /dev/null +++ b/doc/html/tqvaluelistconstiterator-members.html @@ -0,0 +1,52 @@ + + + + + +TQValueListConstIterator Member List + + + + + + + +
        + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

        Complete Member List for TQValueListConstIterator

        + +

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

        + +


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

        TQValueListConstIterator Class Reference

        + +

        The TQValueListConstIterator class provides a const iterator +for TQValueList. +More... +

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

        +

        #include <tqvaluelist.h> +

        List of all member functions. +

        Public Members

        + +

        Detailed Description

        + + +The TQValueListConstIterator class provides a const iterator +for TQValueList. +

        + + +

        In contrast to TQValueListIterator, this class is used to iterate +over a const list. It does not allow modification of the values of +the list since that would break const semantics. +

        You can create the appropriate const iterator type by using the const_iterator typedef provided by TQValueList. +

        For more information on TQValueList iterators, see +TQValueListIterator. +

        See also TQValueListIterator, TQValueList, TQt Template Library Classes, and Non-GUI Classes. + +


        Member Type Documentation

        +

        TQValueListConstIterator::pointer

        +Pointer to value_type. +

        TQValueListConstIterator::reference

        +Reference to value_type. +

        TQValueListConstIterator::value_type

        +The type of value. +

        Member Function Documentation

        +

        TQValueListConstIterator::TQValueListConstIterator () +

        + +

        Creates un uninitialized iterator. + +

        TQValueListConstIterator::TQValueListConstIterator ( const TQValueListConstIterator<T> & it ) +

        + +

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

        Constructs a copy of the iterator it. + +

        TQValueListConstIterator::TQValueListConstIterator ( const TQValueListIterator<T> & it ) +

        + +

        Constructs a copy of the iterator it. + +

        bool TQValueListConstIterator::operator!= ( const TQValueListConstIterator<T> & it ) const +

        + +

        Compares this iterator with it and returns TRUE if they point +to different items; otherwise returns FALSE. + +

        const T & TQValueListConstIterator::operator* () const +

        + +

        Asterisk operator. Returns a reference to the current iterator item. + +

        TQValueListConstIterator<T> & TQValueListConstIterator::operator++ () +

        + +

        Prefix ++ makes the succeeding item current and returns an +iterator pointing to the new current item. The iterator cannot +check whether it reached the end of the list. Incrementing the +iterator returned by end() causes undefined results. + +

        TQValueListConstIterator<T> TQValueListConstIterator::operator++ ( int ) +

        + +

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

        Postfix ++ makes the succeeding item current and returns an +iterator pointing to the new current item. The iterator cannot +check whether it reached the end of the list. Incrementing the +iterator returned by end() causes undefined results. + +

        TQValueListConstIterator<T> & TQValueListConstIterator::operator-- () +

        + +

        Prefix -- makes the previous item current and returns an iterator +pointing to the new current item. The iterator cannot check +whether it reached the beginning of the list. Decrementing the +iterator returned by begin() causes undefined results. + +

        TQValueListConstIterator<T> TQValueListConstIterator::operator-- ( int ) +

        + +

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

        Postfix -- makes the previous item current and returns an iterator +pointing to the new current item. The iterator cannot check +whether it reached the beginning of the list. Decrementing the +iterator returned by begin() causes undefined results. + +

        bool TQValueListConstIterator::operator== ( const TQValueListConstIterator<T> & it ) const +

        + +

        Compares this iterator with it and returns TRUE if they point +to the same item; 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/tqvaluelistiterator-members.html b/doc/html/tqvaluelistiterator-members.html new file mode 100644 index 000000000..e0d195bcb --- /dev/null +++ b/doc/html/tqvaluelistiterator-members.html @@ -0,0 +1,54 @@ + + + + + +TQValueListIterator Member List + + + + + + + +
        + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

        Complete Member List for TQValueListIterator

        + +

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

        + +


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

        TQValueListIterator Class Reference

        + +

        The TQValueListIterator class provides an iterator for TQValueList. +More... +

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

        +

        #include <tqvaluelist.h> +

        List of all member functions. +

        Public Members

        + +

        Detailed Description

        + + +The TQValueListIterator class provides an iterator for TQValueList. +

        + + +

        An iterator is a class for accessing the items of a container +class: a generalization of the index in an array. A pointer +into a "const char *" and an index into an "int[]" are both +iterators, and the general idea is to provide that functionality +for any data structure. +

        The TQValueListIterator class is an iterator for TQValueList +instantiations. You can create the appropriate iterator type by +using the iterator typedef provided by TQValueList. +

        The only way to access the items in a TQValueList is to use an +iterator. +

        Example (see TQValueList for the complete code): +

        +    EmployeeList::iterator it;
        +    for ( it = list.begin(); it != list.end(); ++it )
        +        cout << (*it).surname().latin1() << ", " <<
        +                (*it).forename().latin1() << " earns " <<
        +                (*it).salary() << endl;
        +
        +    // Output:
        +    // Doe, John earns 50000
        +    // Williams, Jane earns 80000
        +    // Hawthorne, Mary earns 90000
        +    // Jones, Tom earns 60000
        +    
        + +

        TQValueList is highly optimized for performance and memory usage. +This means that you must be careful: TQValueList does not know +about all its iterators and the iterators don't know to which list +they belong. This makes things very fast, but if you're not +careful, you can get spectacular bugs. Always make sure iterators +are valid before dereferencing them or using them as parameters to +generic algorithms in the STL or the TQTL. +

        Using an invalid iterator is undefined (your application will +probably crash). Many TQt functions return const value lists; to +iterate over these you should make a copy and iterate over the +copy. +

        For every Iterator there is a ConstIterator. When accessing a +TQValueList in a const environment or if the reference or pointer +to the list is itself const, then you must use the ConstIterator. +Its semantics are the same as the Iterator, but it only returns +const references. +

        See also TQValueList, TQValueListConstIterator, TQt Template Library Classes, and Non-GUI Classes. + +


        Member Type Documentation

        +

        TQValueListIterator::pointer

        +Pointer to value_type. +

        TQValueListIterator::reference

        +Reference to value_type. +

        TQValueListIterator::value_type

        +The type of value, T. +

        Member Function Documentation

        +

        TQValueListIterator::TQValueListIterator () +

        + +

        Creates un uninitialized iterator. + +

        TQValueListIterator::TQValueListIterator ( const TQValueListIterator<T> & it ) +

        + +

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

        Constructs a copy of the iterator it. + +

        bool TQValueListIterator::operator!= ( const TQValueListIterator<T> & it ) const +

        + +

        Compares this iterator and it and returns TRUE if they point to +different items; otherwise returns FALSE. + +

        T & TQValueListIterator::operator* () +

        + +

        Asterisk operator. Returns a reference to the current iterator item. + +

        const T & TQValueListIterator::operator* () const +

        + +

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

        Asterisk operator. Returns a reference to the current iterator item. + +

        TQValueListIterator<T> & TQValueListIterator::operator++ () +

        + +

        Prefix ++ makes the succeeding item current and returns an +iterator pointing to the new current item. The iterator cannot +check whether it reached the end of the list. Incrementing the +iterator returned by end() causes undefined results. + +

        TQValueListIterator<T> TQValueListIterator::operator++ ( int ) +

        + +

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

        Postfix ++ makes the succeeding item current and returns an +iterator pointing to the new current item. The iterator cannot +check whether it reached the end of the list. Incrementing the +iterator returned by end() causes undefined results. + +

        TQValueListIterator<T> & TQValueListIterator::operator+= ( int j ) +

        + +

        Postfix -- jumps j steps forward in the list. The iterator +cannot check whether it reached the end of the list. Jumping past +the end() causes undefined results. + +

        TQValueListIterator<T> & TQValueListIterator::operator-- () +

        + +

        Prefix -- makes the previous item current and returns an iterator +pointing to the new current item. The iterator cannot check +whether it reached the beginning of the list. Decrementing the +iterator returned by begin() causes undefined results. + +

        TQValueListIterator<T> TQValueListIterator::operator-- ( int ) +

        + +

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

        Postfix -- makes the previous item current and returns an iterator +pointing to the new current item. The iterator cannot check +whether it reached the beginning of the list. Decrementing the +iterator returned by begin() causes undefined results. + +

        TQValueListIterator<T> & TQValueListIterator::operator-= ( int j ) +

        + +

        Postfix -- jumps j steps backward in the list. The iterator +cannot check whether it reached the beginning of the list. Jumping +past begin() causes undefined results. + +

        bool TQValueListIterator::operator== ( const TQValueListIterator<T> & it ) const +

        + +

        Compares this iterator and it and returns TRUE if they point to +the same item; 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/tqvaluestack-h.html b/doc/html/tqvaluestack-h.html new file mode 100644 index 000000000..4f307afbf --- /dev/null +++ b/doc/html/tqvaluestack-h.html @@ -0,0 +1,112 @@ + + + + + +tqvaluestack.h Include File + + + + + + + +
        + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

        tqvaluestack.h

        + +

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


        +
        +/****************************************************************************
        +** $Id: qt/tqvaluestack.h   3.3.8   edited Jan 11 14:38 $
        +**
        +** Definition of TQValueStack class
        +**
        +** Created : 990925
        +**
        +** 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 TQVALUESTACK_H
        +#define TQVALUESTACK_H
        +
        +#ifndef QT_H
        +#include "tqvaluelist.h"
        +#endif // QT_H
        +
        +
        +template<class T>
        +class TQValueStack : public TQValueList<T>
        +{
        +public:
        +    TQValueStack() {}
        +   ~TQValueStack() {}
        +    void  push( const T& d ) { this->append(d); }
        +    T pop()
        +    {
        +	T elem( this->last() );
        +	if ( !this->isEmpty() )
        +	    this->remove( this->fromLast() );
        +	return elem;
        +    }
        +    T& top() { return this->last(); }
        +    const T& top() const { return this->last(); }
        +};
        +
        +#endif
        +
        + +


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

        Complete Member List for TQValueStack

        + +

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

        + +


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

        TQValueStack Class Reference

        + +

        The TQValueStack class is a value-based template class that provides a stack. +More... +

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

        +

        #include <tqvaluestack.h> +

        Inherits TQValueList<T>. +

        List of all member functions. +

        Public Members

        + +

        Detailed Description

        + + +The TQValueStack class is a value-based template class that provides a stack. +

        + + + + +

        Define a template instance TQValueStack<X> to create a stack of +values that all have the class X. TQValueStack is part of the TQt Template Library. +

        Note that TQValueStack does not store pointers to the members of +the stack; it holds a copy of every member. That is why these +kinds of classes are called "value based"; TQPtrStack, TQPtrList, +TQDict, etc., are "pointer based". +

        A stack is a last in, first out (LIFO) structure. Items are added +to the top of the stack with push() and retrieved from the top +with pop(). The top() function provides access to the topmost item +without removing it. +

        Example: +

        +        TQValueStack<int> stack;
        +        stack.push( 1 );
        +        stack.push( 2 );
        +        stack.push( 3 );
        +        while ( ! stack.isEmpty() )
        +            cout << "Item: " << stack.pop() << endl;
        +
        +        // Output:
        +        //      Item: 3
        +        //      Item: 2
        +        //      Item: 1
        +    
        + +

        TQValueStack is a specialized TQValueList provided for convenience. +All of TQValueList's functionality also applies to TQPtrStack, for +example the facility to iterate over all elements using +TQValueStack::Iterator. See TQValueListIterator for further +details. +

        Some classes cannot be used within a TQValueStack, for example +everything derived from TQObject and thus all classes that +implement widgets. Only values can be used in a TQValueStack. To +qualify as a value, the class must provide +

          +
        • a copy constructor; +
        • an assignment operator; +
        • a default constructor, i.e. a constructor that does not take any arguments. +
        +

        Note that C++ defaults to field-by-field assignment operators and +copy constructors if no explicit version is supplied. In many +cases this is sufficient. +

        See also TQt Template Library Classes, Implicitly and Explicitly Shared Classes, and Non-GUI Classes. + +


        Member Function Documentation

        +

        TQValueStack::TQValueStack () +

        + +

        Constructs an empty stack. + +

        TQValueStack::~TQValueStack () +

        + +

        Destroys the stack. References to the values in the stack and all +iterators of this stack become invalidated. Because TQValueStack is +highly tuned for performance, you won't see warnings if you use +invalid iterators because it is impossible for an iterator to +check whether or not it is valid. + +

        T TQValueStack::pop () +

        + +

        Removes the top item from the stack and returns it. +

        See also top() and push(). + +

        void TQValueStack::push ( const T & d ) +

        + +

        Adds element, d, to the top of the stack. Last in, first out. +

        This function is equivalent to append(). +

        See also pop() and top(). + +

        T & TQValueStack::top () +

        + +

        Returns a reference to the top item of the stack or the item +referenced by end() if no such item exists. Note that you must not +change the value the end() iterator points to. +

        This function is equivalent to last(). +

        See also pop(), push(), and TQValueList::fromLast(). + +

        const T & TQValueStack::top () const +

        + +

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

        Returns a reference to the top item of the stack or the item +referenced by end() if no such item exists. +

        This function is equivalent to last(). +

        See also pop(), push(), and TQValueList::fromLast(). + + +


        +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/tqvaluevector-h.html b/doc/html/tqvaluevector-h.html new file mode 100644 index 000000000..b0be7c3f0 --- /dev/null +++ b/doc/html/tqvaluevector-h.html @@ -0,0 +1,620 @@ + + + + + +tqvaluevector.h Include File + + + + + + + +
        + +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

        tqvaluevector.h

        + +

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


        +
        +/****************************************************************************
        +** $Id: qt/tqvaluevector.h   3.3.8   edited Jan 11 14:38 $
        +**
        +** Definition of TQValueVector 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 TQVALUEVECTOR_H
        +#define TQVALUEVECTOR_H
        +
        +#ifndef QT_H
        +#include "ntqtl.h"
        +#include "ntqshared.h"
        +#include "ntqdatastream.h"
        +#endif // QT_H
        +
        +#ifndef TQT_NO_STL
        +#include <vector>
        +#endif
        +
        +template <class T>
        +class TQValueVectorPrivate : public TQShared
        +{
        +public:
        +    typedef T value_type;
        +    typedef T* pointer;
        +
        +    TQValueVectorPrivate()
        +	: start( 0 ), finish( 0 ), end( 0 )
        +    {
        +    }
        +
        +    TQValueVectorPrivate( const TQValueVectorPrivate<T>& x );
        +    TQValueVectorPrivate( size_t size );
        +
        +    void derefAndDelete() // work-around for hp-cc
        +    {
        +	if ( deref() )
        +	    delete this;
        +    }
        +
        +#if defined(Q_TEMPLATEDLL)
        +    // Workaround MS bug in memory de/allocation in DLL vs. EXE
        +    virtual
        +#endif
        +    ~TQValueVectorPrivate()
        +    {
        +	delete[] start;
        +    }
        +
        +    size_t size() const
        +    {
        +	return finish - start;
        +    }
        +
        +    bool empty() const
        +    {
        +	return start == finish;
        +    }
        +
        +    size_t capacity() const
        +    {
        +	return end - start;
        +    }
        +
        +    void insert( pointer pos, const T& x );
        +    void insert( pointer pos, size_t n, const T& x );
        +    void reserve( size_t n );
        +
        +    void clear()
        +    {
        +	delete[] start;
        +	start = 0;
        +	finish = 0;
        +	end = 0;
        +    }
        +
        +
        +    pointer start;
        +    pointer finish;
        +    pointer end;
        +
        +private:
        +    pointer growAndCopy( size_t n, pointer s, pointer f );
        +
        +    TQValueVectorPrivate<T>& operator=( const TQValueVectorPrivate<T>& x );
        +
        +};
        +
        +template <class T>
        +TQ_INLINE_TEMPLATES TQValueVectorPrivate<T>::TQValueVectorPrivate( const TQValueVectorPrivate<T>& x )
        +    : TQShared()
        +{
        +    size_t i = x.size();
        +    if ( i > 0 ) {
        +	start = new T[ i ];
        +	finish = start + i;
        +	end = start + i;
        +#if defined(__xlC__) && __xlC__ < 0x400 // xlC 3.6 confused by const
        +	tqCopy( (pointer)x.start, (pointer)x.finish, start );
        +#else
        +	tqCopy( x.start, x.finish, start );
        +#endif
        +    } else {
        +	start = 0;
        +	finish = 0;
        +	end = 0;
        +    }
        +}
        +
        +template <class T>
        +TQ_INLINE_TEMPLATES TQValueVectorPrivate<T>::TQValueVectorPrivate( size_t size )
        +{
        +    if ( size > 0 ) {
        +	start = new T[size];
        +	finish = start + size;
        +	end = start + size;
        +    } else {
        +	start = 0;
        +	finish = 0;
        +	end = 0;
        +    }
        +}
        +
        +template <class T>
        +TQ_INLINE_TEMPLATES void TQValueVectorPrivate<T>::insert( pointer pos, const T& x )
        +{
        +    const size_t lastSize = size();
        +    const size_t n = lastSize !=0 ? 2*lastSize : 1;
        +    const size_t offset = pos - start;
        +    pointer newStart = new T[n];
        +    pointer newFinish = newStart + offset;
        +    tqCopy( start, pos, newStart );
        +    *newFinish = x;
        +    tqCopy( pos, finish, ++newFinish );
        +    delete[] start;
        +    start = newStart;
        +    finish = newStart + lastSize + 1;
        +    end = newStart + n;
        +}
        +
        +template <class T>
        +TQ_INLINE_TEMPLATES void TQValueVectorPrivate<T>::insert( pointer pos, size_t n, const T& x )
        +{
        +    if ( size_t( end - finish ) >= n ) {
        +	// enough room
        +	const size_t elems_after = finish - pos;
        +	pointer old_finish = finish;
        +	if ( elems_after > n ) {
        +	    tqCopy( finish - n, finish, finish );
        +	    finish += n;
        +	    tqCopyBackward( pos, old_finish - n, old_finish );
        +	    tqFill( pos, pos + n, x );
        +	} else {
        +	    pointer filler = finish;
        +	    size_t i = n - elems_after;
        +	    for ( ; i > 0; --i, ++filler )
        +		*filler = x;
        +	    finish += n - elems_after;
        +	    tqCopy( pos, old_finish, finish );
        +	    finish += elems_after;
        +	    tqFill( pos, old_finish, x );
        +	}
        +    } else {
        +	// not enough room
        +	const size_t lastSize = size();
        +	const size_t len = lastSize + TQMAX( lastSize, n );
        +	pointer newStart = new T[len];
        +	pointer newFinish = tqCopy( start, pos, newStart );
        +	// fill up inserted space
        +	size_t i = n;
        +	for ( ; i > 0; --i, ++newFinish )
        +	    *newFinish = x;
        +	newFinish = tqCopy( pos, finish, newFinish );
        +	delete[] start;
        +	start = newStart;
        +	finish = newFinish;
        +	end = newStart + len;
        +    }
        +}
        +
        +template <class T>
        +TQ_INLINE_TEMPLATES void TQValueVectorPrivate<T>::reserve( size_t n )
        +{
        +    const size_t lastSize = size();
        +    pointer tmp = growAndCopy( n, start, finish );
        +    start = tmp;
        +    finish = tmp + lastSize;
        +    end = start + n;
        +}
        +
        +template <class T>
        +TQ_INLINE_TEMPLATES TQ_TYPENAME TQValueVectorPrivate<T>::pointer TQValueVectorPrivate<T>::growAndCopy( size_t n, pointer s, pointer f )
        +{
        +    pointer newStart = new T[n];
        +    tqCopy( s, f, newStart );
        +    delete[] start;
        +    return newStart;
        +}
        +
        +template <class T> class TQDeepCopy;
        +
        +template <class T>
        +class TQValueVector
        +{
        +public:
        +    typedef T value_type;
        +    typedef value_type* pointer;
        +    typedef const value_type* const_pointer;
        +    typedef value_type* iterator;
        +    typedef const value_type* const_iterator;
        +    typedef value_type& reference;
        +    typedef const value_type& const_reference;
        +    typedef size_t size_type;
        +#ifndef TQT_NO_STL
        +    typedef ptrdiff_t difference_type;
        +#else
        +    typedef int difference_type;
        +#endif
        +
        +    TQValueVector()
        +    {
        +	sh = new TQValueVectorPrivate<T>;
        +    }
        +
        +    TQValueVector( const TQValueVector<T>& v )
        +    {
        +	sh = v.sh;
        +	sh->ref();
        +    }
        +
        +    TQValueVector( size_type n, const T& val = T() );
        +
        +#ifndef TQT_NO_STL
        +    TQValueVector( std::vector<T>& v ) // ### remove in 4.0
        +    {
        +	sh = new TQValueVectorPrivate<T>( v.size() );
        +	tqCopy( v.begin(), v.end(), begin() );
        +    }
        +
        +    TQValueVector( const std::vector<T>& v )
        +    {
        +	sh = new TQValueVectorPrivate<T>( v.size() );
        +	tqCopy( v.begin(), v.end(), begin() );
        +    }
        +#endif
        +
        +    ~TQValueVector()
        +    {
        +	sh->derefAndDelete();
        +    }
        +
        +    TQValueVector<T>& operator= ( const TQValueVector<T>& v )
        +    {
        +	v.sh->ref();
        +	sh->derefAndDelete();
        +	sh = v.sh;
        +	return *this;
        +    }
        +
        +#ifndef TQT_NO_STL
        +    TQValueVector<T>& operator= ( const std::vector<T>& v )
        +    {
        +	clear();
        +	resize( v.size() );
        +	tqCopy( v.begin(), v.end(), begin() );
        +	return *this;
        +    }
        +#endif
        +
        +    size_type size() const { return sh->size(); }
        +
        +    bool empty() const { return sh->empty(); }
        +
        +    size_type capacity() const
        +    {
        +	return size_type( sh->capacity() );
        +    }
        +
        +    iterator begin()
        +    {
        +	detach();
        +	return sh->start;
        +    }
        +
        +    const_iterator begin() const
        +    {
        +	return sh->start;
        +    }
        +
        +    const_iterator constBegin() const
        +    {
        +	return sh->start;
        +    }
        +
        +    iterator end()
        +    {
        +	detach();
        +	return sh->finish;
        +    }
        +
        +    const_iterator end() const
        +    {
        +	return sh->finish;
        +    }
        +
        +    const_iterator constEnd() const
        +    {
        +	return sh->finish;
        +    }
        +
        +    reference at( size_type i, bool* ok = 0 )
        +    {
        +	detach();
        +	if ( ok )
        +	    *ok = ( i < size() );
        +	return *( begin() + i );
        +    }
        +
        +    const_reference at( size_type i, bool* ok = 0 ) const
        +    {
        +	if ( ok )
        +	    *ok = ( i < size() );
        +	return *( begin() + i );
        +    }
        +
        +    reference operator[]( size_type i )
        +    {
        +	detach();
        +	return *( begin() + i );
        +    }
        +
        +    const_reference operator[]( size_type i ) const
        +    {
        +	return *( begin() + i );
        +    }
        +
        +    reference front()
        +    {
        +	Q_ASSERT( !empty() );
        +	detach();
        +	return *begin();
        +    }
        +
        +    const_reference front() const
        +    {
        +	Q_ASSERT( !empty() );
        +	return *begin();
        +    }
        +
        +    reference back()
        +    {
        +	Q_ASSERT( !empty() );
        +	detach();
        +	return *( end() - 1 );
        +    }
        +
        +    const_reference back() const
        +    {
        +	Q_ASSERT( !empty() );
        +	return *( end() - 1 );
        +    }
        +
        +    void push_back( const T& x )
        +    {
        +	detach();
        +	if ( sh->finish == sh->end ) {
        +	    sh->reserve( size()+size()/2+1 );
        +	}
        +	*sh->finish = x;
        +	++sh->finish;
        +    }
        +
        +    void pop_back()
        +    {
        +	detach();
        +	if ( empty() )
        +	    return;
        +	--sh->finish;
        +    }
        +
        +    iterator insert( iterator pos, const T& x );
        +    iterator insert( iterator pos, size_type n, const T& x );
        +
        +    void reserve( size_type n )
        +    {
        +	if ( capacity() < n ) {
        +	    detach();
        +	    sh->reserve( n );
        +	}
        +    }
        +
        +    void resize( size_type n, const T& val = T() )
        +    {
        +	if ( n < size() )
        +	    erase( begin() + n, end() );
        +	else
        +	    insert( end(), n - size(), val );
        +    }
        +
        +    void clear()
        +    {
        +	detach();
        +	sh->clear();
        +    }
        +
        +    iterator erase( iterator pos )
        +    {
        +	detach();
        +	if ( pos + 1 != end() )
        +	    tqCopy( pos + 1, sh->finish, pos );
        +	--sh->finish;
        +	return pos;
        +    }
        +
        +    iterator erase( iterator first, iterator last )
        +    {
        +	detach();
        +	tqCopy( last, sh->finish, first );
        +	sh->finish = sh->finish - ( last - first );
        +	return first;
        +    }
        +
        +    // ### remove in TQt 4.0
        +    bool operator==( const TQValueVector<T>& x )
        +    {
        +	return size()==x.size() ? tqEqual( constBegin(), constEnd(), x.begin()) : FALSE;
        +    }
        +
        +    bool operator==( const TQValueVector<T>& x ) const
        +    {
        +	return size()==x.size() ? tqEqual( begin(), end(), x.begin() ) : FALSE;
        +    }
        +
        +    typedef T ValueType;
        +    typedef ValueType *Iterator;
        +    typedef const ValueType *ConstIterator;
        +
        +    size_type count() const { return size(); }
        +    bool isEmpty() const { return empty(); }
        +
        +    reference first() { return front(); }
        +    const_reference first() const { return front(); }
        +    reference last() { return back(); }
        +    const_reference last() const { return back(); }
        +    void append( const T& x ) { push_back( x ); }
        +
        +protected:
        +    void detach()
        +    {
        +	if ( sh->count > 1 ) { detachInternal(); }
        +    }
        +    void detachInternal();
        +    TQValueVectorPrivate<T>* sh;
        +
        +private:
        +    friend class TQDeepCopy< TQValueVector<T> >;
        +};
        +
        +template <class T>
        +TQ_INLINE_TEMPLATES TQValueVector<T>::TQValueVector( size_type n, const T& val )
        +{
        +    sh = new TQValueVectorPrivate<T>( n );
        +    tqFill( begin(), end(), val );
        +}
        +
        +template <class T>
        +TQ_INLINE_TEMPLATES void TQValueVector<T>::detachInternal()
        +{
        +    sh->deref();
        +    sh = new TQValueVectorPrivate<T>( *sh );
        +}
        +
        +template <class T>
        +TQ_INLINE_TEMPLATES TQ_TYPENAME TQValueVector<T>::iterator TQValueVector<T>::insert( iterator pos, const T& x )
        +{
        +    size_type offset = pos - sh->start;
        +    detach();
        +    if ( pos == end() ) {
        +	if ( sh->finish == sh->end )
        +	    push_back( x );
        +	else {
        +	    *sh->finish = x;
        +	    ++sh->finish;
        +	}
        +    } else {
        +	if ( sh->finish == sh->end ) {
        +	    sh->insert( pos, x );
        +	} else {
        +	    *sh->finish = *(sh->finish - 1);
        +	    ++sh->finish;
        +	    tqCopyBackward( pos, sh->finish - 2, sh->finish - 1 );
        +	    *pos = x;
        +	}
        +    }
        +    return begin() + offset;
        +}
        +
        +template <class T>
        +TQ_INLINE_TEMPLATES TQ_TYPENAME TQValueVector<T>::iterator TQValueVector<T>::insert( iterator pos, size_type n, const T& x )
        +{
        +    if ( n != 0 ) {
        +	size_type offset = pos - sh->start;
        +	detach();
        +	pos = begin() + offset;
        +	sh->insert( pos, n, x );
        +    }
        +    return pos;
        +}
        +
        +
        +#ifndef TQT_NO_DATASTREAM
        +template<class T>
        +TQ_INLINE_TEMPLATES TQDataStream& operator>>( TQDataStream& s, TQValueVector<T>& v )
        +{
        +    v.clear();
        +    TQ_UINT32 c;
        +    s >> c;
        +    v.resize( c );
        +    for( TQ_UINT32 i = 0; i < c; ++i )
        +    {
        +	T t;
        +	s >> t;
        +	v[i] = t;
        +    }
        +    return s;
        +}
        +
        +template<class T>
        +TQ_INLINE_TEMPLATES TQDataStream& operator<<( TQDataStream& s, const TQValueVector<T>& v )
        +{
        +    s << (TQ_UINT32)v.size();
        +    // ### use typename TQValueVector<T>::const_iterator once all supported
        +    // ### compilers know about the 'typename' keyword.
        +    const T* it = v.begin();
        +    for( ; it != v.end(); ++it )
        +	s << *it;
        +    return s;
        +}
        +#endif // TQT_NO_DATASTREAM
        +
        +#define Q_DEFINED_QVALUEVECTOR
        +#include "ntqwinexport.h"
        +#endif // TQVALUEVECTOR_H
        +
        + +


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

        Complete Member List for TQValueVector

        + +

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

        + +


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

        TQValueVector Class Reference

        + +

        The TQValueVector class is a value-based template class that provides a dynamic array. +More... +

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

        +

        #include <tqvaluevector.h> +

        List of all member functions. +

        Public Members

        + +

        Detailed Description

        + + +The TQValueVector class is a value-based template class that provides a dynamic array. +

        + + + + +

        TQValueVector is a TQt implementation of an STL-like vector +container. It can be used in your application if the standard vector is not available for your target platforms. TQValueVector is +part of the TQt Template Library. +

        TQValueVector<T> defines a template instance to create a vector +of values that all have the class T. TQValueVector does not store +pointers to the members of the vector; it holds a copy of every +member. TQValueVector is said to be value based; in contrast, +TQPtrList and TQDict are pointer based. +

        TQValueVector contains and manages a collection of objects of type +T and provides random access iterators that allow the contained +objects to be addressed. TQValueVector owns the contained +elements. For more relaxed ownership semantics, see TQPtrCollection +and friends, which are pointer-based containers. +

        TQValueVector provides good performance if you append or remove +elements from the end of the vector. If you insert or remove +elements from anywhere but the end, performance is very bad. The +reason for this is that elements must to be copied into new +positions. +

        Some classes cannot be used within a TQValueVector: for example, +all classes derived from TQObject and thus all classes that +implement widgets. Only values can be used in a TQValueVector. To +qualify as a value the class must provide: +

          +
        • a copy constructor; +
        • an assignment operator; +
        • a default constructor, i.e., a constructor that does not take any arguments. +
        +

        Note that C++ defaults to field-by-field assignment operators and +copy constructors if no explicit version is supplied. In many +cases this is sufficient. +

        TQValueVector uses an STL-like syntax to manipulate and address the +objects it contains. See this document for +more information. +

        Example: +

        +    #include <tqvaluevector.h>
        +    #include <ntqstring.h>
        +    #include <stdio.h>
        +
        +    class Employee
        +    {
        +    public:
        +        Employee(): s(0) {}
        +        Employee( const TQString& name, int salary )
        +            : n( name ), s( salary )
        +        { }
        +
        +        TQString name()   const          { return n; }
        +        int     salary() const          { return s; }
        +        void    setSalary( int salary ) { s = salary; }
        +    private:
        +        TQString n;
        +        int     s;
        +    };
        +
        +    int main()
        +    {
        +        typedef TQValueVector<Employee> EmployeeVector;
        +        EmployeeVector vec( 3 );  // vector of 3 Employees
        +
        +        vec[0] = Employee( "Bill", 50000 );
        +        vec[1] = Employee( "Steve", 80000 );
        +        vec[2] = Employee( "Ron", 60000 );
        +
        +        Employee joe( "Joe", 50000 );
        +        vec.push_back( joe );  // vector expands to accommodate 4 Employees
        +        joe.setSalary( 70000 );
        +        
        +        EmployeeVector::iterator it;
        +        for( it = vec.begin(); it != vec.end(); ++it )
        +            printf( "%s earns %d\n", (*it).name().latin1(), (*it).salary() );
        +
        +        return 0;
        +    }
        +    
        + +

        Program output: +

        +        Bill earns 50000
        +        Steve earns 80000
        +        Ron earns 60000
        +        Joe earns 50000
        +    
        + +

        As you can see, the most recent change to Joe's salary did not +affect the value in the vector because the vector created a copy +of Joe's entry. +

        Many TQt functions return const value vectors; to iterate over +these you should make a copy and iterate over the copy. +

        There are several ways to find items in the vector. The begin() +and end() functions return iterators to the beginning and end of +the vector. The advantage of getting an iterator is that you can +move forward or backward from this position by +incrementing/decrementing the iterator. The iterator returned by +end() points to the element which is one past the last element in +the container. The past-the-end iterator is still associated with +the vector it belongs to, however it is not dereferenceable; +operator*() will not return a well-defined value. If the vector is +empty(), the iterator returned by begin() will equal the iterator +returned by end(). +

        The fastest way to access an element of a vector is by using +operator[]. This function provides random access and will return +a reference to the element located at the specified index. Thus, +you can access every element directly, in constant time, providing +you know the location of the element. It is undefined to access +an element that does not exist (your application will probably +crash). For example: +

        +    TQValueVector<int> vec1;  // an empty vector
        +    vec1[10] = 4;  // WARNING: undefined, probably a crash
        +
        +    TQValueVector<TQString> vec2(25); // initialize with 25 elements
        +    vec2[10] = "Dave";  // OK
        +    
        + +

        Whenever inserting, removing or referencing elements in a vector, +always make sure you are referring to valid positions. For +example: +

        +    void func( TQValueVector<int>& vec )
        +    {
        +        if ( vec.size() > 10 ) {
        +            vec[9] = 99; // OK
        +        }
        +    };
        +    
        + +

        The iterators provided by vector are random access iterators, +therefore you can use them with many generic algorithms, for +example, algorithms provided by the STL or the TQTL. +

        Another way to find an element in the vector is by using the +std::find() or tqFind() algorithms. +For example: +

        +    TQValueVector<int> vec;
        +    ...
        +    TQValueVector<int>::const_iterator it = tqFind( vec.begin(), vec.end(), 3 );
        +    if ( it != vector.end() )
        +        // 'it' points to the found element
        +    
        + +

        It is safe to have multiple iterators on the vector at the same +time. Since TQValueVector manages memory dynamically, all iterators +can become invalid if a memory reallocation occurs. For example, +if some member of the vector is removed, iterators that point to +the removed element and to all following elements become +invalidated. Inserting into the middle of the vector will +invalidate all iterators. For convenience, the function back() +returns a reference to the last element in the vector, and front() +returns a reference to the first element. If the vector is +empty(), both back() and front() have undefined behavior (your +application will crash or do unpredictable things). Use back() and +front() with caution, for example: +

        +    TQValueVector<int> vec( 3 );
        +    vec.push_back( 1 );
        +    vec.push_back( 2 );
        +    vec.push_back( 3 );
        +    ...
        +    if ( !vec.empty() ) {
        +        // OK: modify the first element
        +        int& i = vec.front();
        +        i = 18;
        +    }
        +    ...
        +    TQValueVector<double> dvec;
        +    double d = dvec.back(); // undefined behavior
        +    
        + +

        Because TQValueVector manages memory dynamically, it is recommended +that you contruct a vector with an initial size. Inserting and +removing elements happens fastest when: +

          +
        • Inserting or removing elements happens at the end() of the +vector; +
        • The vector does not need to allocate additional memory. +
        +

        By creating a TQValueVector with a sufficiently large initial size, +there will be less memory allocations. Do not use an initial size +that is too big, since it will still take time to construct all +the empty entries, and the extra space will be wasted if it is +never used. +

        Because TQValueVector is value-based there is no need to be careful +about deleting elements in the vector. The vector holds its own +copies and will free them if the corresponding member or the +vector itself is deleted. You can force the vector to free all of +its items with clear(). +

        TQValueVector is shared implicitly, which means it can be copied in +constant time. If multiple TQValueVector instances share the same +data and one needs to modify its contents, this modifying instance +makes a copy and modifies its private copy; it thus does not +affect the other instances. This is often called "copy on write". +If a TQValueVector is being used in a multi-threaded program, you +must protect all access to the vector. See TQMutex. +

        There are several ways to insert elements into the vector. The +push_back() function insert elements into the end of the vector, +and is usually fastest. The insert() function can be used to add +elements at specific positions within the vector. +

        Items can be also be removed from the vector in several ways. +There are several variants of the erase() function which removes a +specific element, or range of elements, from the vector. +

        Vectors can be also sorted with various STL algorithms , or it can +be sorted using the TQt Template Library. +For example with qHeapSort(): +

        Example: +

        +    TQValueVector<int> v( 4 );
        +    v.push_back( 5 );
        +    v.push_back( 8 );
        +    v.push_back( 3 );
        +    v.push_back( 4 );
        +    qHeapSort( v );
        +    
        + +

        TQValueVector stores its elements in contiguous memory. This means +that you can use a TQValueVector in any situation that requires an +array. +

        See also TQt Template Library Classes, Implicitly and Explicitly Shared Classes, and Non-GUI Classes. + +


        Member Type Documentation

        +

        TQValueVector::ConstIterator

        +The vector's const iterator type. +

        TQValueVector::Iterator

        +The vector's iterator type. +

        TQValueVector::ValueType

        +The type of the object stored in the vector. +

        TQValueVector::const_iterator

        +The vector's const iterator type. +

        TQValueVector::const_pointer

        +The const pointer to T type. +

        TQValueVector::const_reference

        +The const reference to T type. +

        TQValueVector::difference_type

        +A signed integral type used to represent the distance between two iterators. +

        TQValueVector::iterator

        +The vector's iterator type. +

        TQValueVector::pointer

        +The pointer to T type. +

        TQValueVector::reference

        +The reference to T type. +

        TQValueVector::size_type

        +An unsigned integral type, used to represent various sizes. +

        TQValueVector::value_type

        +The type of the object stored in the vector. +

        Member Function Documentation

        +

        TQValueVector::TQValueVector () +

        + +

        Constructs an empty vector without any elements. To create a +vector which reserves an initial amount of space for elements, use +TQValueVector(size_type n). + +

        TQValueVector::TQValueVector ( const TQValueVector<T> & v ) +

        + +

        Constructs a copy of v. +

        This operation costs O(1) time because TQValueVector is implicitly shared. +

        The first modification to the vector does takes O(n) time, because +the elements must be copied. + +

        TQValueVector::TQValueVector ( size_type n, const T & val = T ( ) ) +

        + +

        Constructs a vector with an initial size of n elements. Each +element is initialized with the value of val. + +

        TQValueVector::TQValueVector ( std::vector<T> & v ) +

        + +

        Constructs a copy of v. + +

        TQValueVector::TQValueVector ( const std::vector<T> & v ) +

        + +

        This operation costs O(n) time because v is copied. + +

        TQValueVector::~TQValueVector () +

        + +

        Destroys the vector, destroying all elements and freeing the +allocated memory. References to the values in the vector and all +iterators of this vector become invalidated. Note that it is +impossible for an iterator to check whether or not it is valid: +TQValueVector is tuned for performance, not for error checking. + +

        void TQValueVector::append ( const T & x ) +

        + +

        Appends a copy of x to the end of the vector. +

        See also push_back() and insert(). + +

        reference TQValueVector::at ( size_type i, bool * ok = 0 ) +

        + +

        Returns a reference to the element with index i. If ok is +non-null, and the index i is out of range, *ok is set to +FALSE and the returned reference is undefined. If the index i +is within the range of the vector, and ok is non-null, *ok +is set to TRUE and the returned reference is well defined. + +

        const_reference TQValueVector::at ( size_type i, bool * ok = 0 ) const +

        + +

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

        Returns a const reference to the element with index i. If ok +is non-null, and the index i is out of range, *ok is set to +FALSE and the returned reference is undefined. If the index i +is within the range of the vector, and ok is non-null, *ok +is set to TRUE and the returned reference is well defined. + +

        reference TQValueVector::back () +

        + +

        Returns a reference to the last element in the vector. If there is +no last element, this function has undefined behavior. +

        See also empty() and front(). + +

        const_reference TQValueVector::back () const +

        + +

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

        Returns a const reference to the last element in the vector. If +there is no last element, this function has undefined behavior. +

        See also empty() and front(). + +

        iterator TQValueVector::begin () +

        + +

        Returns an iterator pointing to the beginning of the vector. If +the vector is empty(), the returned iterator will equal end(). + +

        const_iterator TQValueVector::begin () const +

        + +

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

        Returns a const iterator pointing to the beginning of the vector. +If the vector is empty(), the returned iterator will equal end(). + +

        size_type TQValueVector::capacity () const +

        + +

        Returns the maximum number of elements that can be stored in the +vector without forcing memory reallocation. If memory reallocation +takes place, some or all iterators may become invalidated. + +

        void TQValueVector::clear () +

        + +

        Removes all the elements from the vector. + +

        const_iterator TQValueVector::constBegin () const +

        + +

        Returns a const iterator pointing to the beginning of the vector. +If the vector is empty(), the returned iterator will equal end(). +

        See also constEnd(). + +

        const_iterator TQValueVector::constEnd () const +

        + +

        Returns a const iterator pointing behind the last element of the +vector. +

        See also constBegin(). + +

        size_type TQValueVector::count () const +

        + +

        Returns the number of items in the vector. +

        See also isEmpty(). + +

        bool TQValueVector::empty () const +

        + +

        Returns TRUE if the vector is empty; otherwise returns FALSE. +Equivalent to size()==0, only faster. +

        This function is provided for STL compatibility. It is equivalent +to isEmpty(). +

        See also size(). + +

        iterator TQValueVector::end () +

        + +

        Returns an iterator pointing behind the last element of the +vector. + +

        const_iterator TQValueVector::end () const +

        + +

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

        Returns a const iterator pointing behind the last element of the +vector. + +

        iterator TQValueVector::erase ( iterator pos ) +

        + +

        Removes the element at position pos and returns the position of +the next element. + +

        iterator TQValueVector::erase ( iterator first, iterator last ) +

        + +

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

        Removes all elements from first up to but not including last +and returns the position of the next element. + +

        reference TQValueVector::first () +

        + +

        Returns a reference to the first item in the vector. If there is +no first item, this function has undefined behavior. +

        See also empty() and last(). + +

        const_reference TQValueVector::first () const +

        + +

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

        +

        reference TQValueVector::front () +

        + +

        Returns a reference to the first element in the vector. If there +is no first element, this function has undefined behavior. +

        See also empty() and back(). + +

        const_reference TQValueVector::front () const +

        + +

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

        Returns a const reference to the first element in the vector. If +there is no first element, this function has undefined behavior. +

        See also empty() and back(). + +

        iterator TQValueVector::insert ( iterator pos, const T & x ) +

        + +

        Inserts a copy of x at the position immediately before pos. +

        See also push_back(). + +

        iterator TQValueVector::insert ( iterator pos, size_type n, const T & x ) +

        + +

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

        Inserts n copies of x immediately before position x. +

        See also push_back(). + +

        bool TQValueVector::isEmpty () const +

        + +

        Returns TRUE if the vector is empty; returns FALSE otherwise. +

        See also count(). + +

        reference TQValueVector::last () +

        + +

        Returns a reference to the last item in the vector. If there is no +last item, this function has undefined behavior. +

        See also empty() and first(). + +

        const_reference TQValueVector::last () const +

        + +

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

        +

        TQValueVector<T> & TQValueVector::operator= ( const TQValueVector<T> & v ) +

        + +

        Assigns v to this vector and returns a reference to this vector. +

        All iterators of the current vector become invalidated by this +operation. The cost of such an assignment is O(1) since +TQValueVector is implicitly shared. + +

        TQValueVector<T> & TQValueVector::operator= ( const std::vector<T> & v ) +

        + +

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

        Assigns v to this vector and returns a reference to this vector. +

        All iterators of the current vector become invalidated by this +operation. The cost of this assignment is O(n) since v is +copied. + +

        bool TQValueVector::operator== ( const TQValueVector<T> & x ) const +

        + +

        Returns TRUE if each element in this vector equals each +corresponding element in x; otherwise returns FALSE. + +

        bool TQValueVector::operator== ( const TQValueVector<T> & x ) +

        + +

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

        Returns TRUE if each element in this vector equals each +corresponding element in x; otherwise returns FALSE. + +

        reference TQValueVector::operator[] ( size_type i ) +

        + +

        Returns a reference to the element at index i. If i is out +of range, this function has undefined behavior. +

        See also at(). + +

        const_reference TQValueVector::operator[] ( size_type i ) const +

        + +

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

        Returns a const reference to the element at index i. If i is +out of range, this function has undefined behavior. +

        See also at(). + +

        void TQValueVector::pop_back () +

        + +

        Removes the last item from the vector. +

        This function is provided for STL compatibility. + +

        void TQValueVector::push_back ( const T & x ) +

        + +

        Appends a copy of x to the end of the vector. This is the +fastest way to add new elements. +

        This function is provided for STL compatibility. It is equivalent +to append(). +

        See also insert(). + +

        void TQValueVector::reserve ( size_type n ) +

        + +

        Increases the vector's capacity. If n is less than or equal to +capacity(), nothing happens. Otherwise, additional memory is +allocated so that capacity() will be increased to a value greater +than or equal to n. All iterators will then become invalidated. +Note that the vector's size() and the values of existing elements +remain unchanged. + +

        void TQValueVector::resize ( size_type n, const T & val = T ( ) ) +

        + +

        Changes the size of the vector to n. If n is greater than +the current size(), elements are added to the end and initialized +with the value of val. If n is less than size(), elements +are removed from the end. If n is equal to size() nothing +happens. + +

        size_type TQValueVector::size () const +

        + +

        Returns the number of elements in the vector. +

        This function is provided for STL compatibility. It is equivalent +to count(). +

        See also empty(). + + +


        +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/tqwidgetfactory-h.html b/doc/html/tqwidgetfactory-h.html index 575842457..78e8155db 100644 --- a/doc/html/tqwidgetfactory-h.html +++ b/doc/html/tqwidgetfactory-h.html @@ -74,8 +74,8 @@ body { background: #ffffff; color: black; } #include <ntqptrlist.h> #include <ntqimage.h> #include <ntqpixmap.h> -#include <ntqvaluelist.h> -#include <ntqmap.h> +#include <tqvaluelist.h> +#include <tqmap.h> #include <ntqaction.h> #endif // QT_H diff --git a/doc/html/tqxml-h.html b/doc/html/tqxml-h.html index 3941b1830..c28531326 100644 --- a/doc/html/tqxml-h.html +++ b/doc/html/tqxml-h.html @@ -82,7 +82,7 @@ body { background: #ffffff; color: black; } #include "ntqfile.h" #include "ntqstring.h" #include "ntqstringlist.h" -#include "ntqvaluevector.h" +#include "tqvaluevector.h" #endif // QT_H #if !defined(TQT_MODULE_XML) || defined( QT_LICENSE_PROFESSIONAL ) || defined( QT_INTERNAL_XML ) diff --git a/doc/html/tqxmlnamespacesupport.html b/doc/html/tqxmlnamespacesupport.html index 2fd6295b0..0d1aaa40a 100644 --- a/doc/html/tqxmlnamespacesupport.html +++ b/doc/html/tqxmlnamespacesupport.html @@ -106,8 +106,8 @@ argument of "". over a copy, e.g.
             TQStringList list = myXmlNamespaceSupport.prefixes();
        -    TQStringList::iterator it = list.begin();
        -    while ( it != list.end() ) {
        +    TQStringList::iterator it = list.begin();
        +    while ( it != list.end() ) {
                 myProcessing( *it );
                 ++it;
             }
        @@ -129,8 +129,8 @@ an argument of "".
         over a copy, e.g.
         
             TQStringList list = myXmlNamespaceSupport.prefixes( "" );
        -    TQStringList::Iterator it = list.begin();
        -    while( it != list.end() ) {
        +    TQStringList::Iterator it = list.begin();
        +    while( it != list.end() ) {
                 myProcessing( *it );
                 ++it;
             }
        diff --git a/doc/html/tutorial2-03.html b/doc/html/tutorial2-03.html
        index 1aa7f23c6..4a737dcb2 100644
        --- a/doc/html/tutorial2-03.html
        +++ b/doc/html/tutorial2-03.html
        @@ -55,7 +55,7 @@ of chart has a (relative) position stored in the m_propoints array.
         
            #include <ntqcolor.h>
             #include <ntqnamespace.h>
             #include <ntqstring.h>
        -    #include <ntqvaluevector.h>
        +    #include <tqvaluevector.h>
         

        Although the Element class is a purely internal data class, it #includes four TQt classes. TQt is often perceived as a purely GUI @@ -67,11 +67,11 @@ enumerations. The Element class does not derive from TQt subclass. We include ntqstring.h to make use of TQt's Unicode strings. As a convenience we will typedef a vector container for Elements, which is why we -pull in the ntqvaluevector.h header. +pull in the tqvaluevector.h header.

            typedef TQValueVector<Element> ElementVector;
         

        TQt provides a number of containers, some value based like -TQValueVector, and others pointer based. (See Collection Classes.) Here we've just typedefed one container +TQValueVector, and others pointer based. (See Collection Classes.) Here we've just typedefed one container type; we will keep each data set of elements in one ElementVector.

            const double EPSILON = 0.0000001; // Must be > INVALID.
         
        @@ -219,7 +219,7 @@ separator. The final field is the label followed by a newline. bool ok; TQStringList fields = TQStringList::split( FIELD_SEP, data ); - if ( fields.count() >= 4 ) { + if ( fields.count() >= 4 ) { double value = fields[0].toDouble( &ok ); if ( !ok ) errors++; @@ -238,8 +238,8 @@ separator. The final field is the label followed by a newline. if ( !errors ) { element.set( value, valueColor, valuePattern, label, labelColor ); int i = 0; - for ( TQStringList::iterator point = propoints.begin(); - i < Element::MAX_PROPOINTS && point != propoints.end(); + for ( TQStringList::iterator point = propoints.begin(); + i < Element::MAX_PROPOINTS && point != propoints.end(); ++i, ++point ) { errors = 0; TQStringList xy = TQStringList::split( XY_SEP, *point ); diff --git a/doc/html/tutorial2-06.html b/doc/html/tutorial2-06.html index 73ea348a3..96eabdd41 100644 --- a/doc/html/tutorial2-06.html +++ b/doc/html/tutorial2-06.html @@ -44,7 +44,7 @@ drawElements() function is called to redraw the canvas when necessary.
            void ChartForm::drawElements()
             {
                 TQCanvasItemList list = m_canvas->allItems();
        -        for ( TQCanvasItemList::iterator it = list.begin(); it != list.end(); ++it )
        +        for ( TQCanvasItemList::iterator it = list.begin(); it != list.end(); ++it )
                     delete *it;
         

        The first thing we do in drawElements() is delete all the existing @@ -300,7 +300,7 @@ drag and release at the new position.

            void CanvasView::contentsMousePressEvent( TQMouseEvent *e )
             {
                 TQCanvasItemList list = canvas()->collisions( e->pos() );
        -        for ( TQCanvasItemList::iterator it = list.begin(); it != list.end(); ++it )
        +        for ( TQCanvasItemList::iterator it = list.begin(); it != list.end(); ++it )
                     if ( (*it)->rtti() == CanvasText::CANVAS_TEXT ) {
                         m_movingItem = *it;
                         m_pos = e->pos();
        diff --git a/doc/html/whatsthis b/doc/html/whatsthis
        index e50312d88..6a529e32c 100644
        --- a/doc/html/whatsthis
        +++ b/doc/html/whatsthis
        @@ -71,7 +71,7 @@ Common API for network protocols. | QNetworkProtocol
         Common operations for network protocols. | QNetworkOperation
         Common operations on URLs. | QUrlOperator
         Communication capabilities between several clients. | QCopChannel
        -Const iterator for QValueList. | QValueListConstIterator
        +Const iterator for TQValueList. | TQValueListConstIterator
         Convenience class for input streams. | QTextIStream
         Convenience class for output streams. | QTextOStream
         Conversion between text encodings. | QTextCodec
        @@ -206,12 +206,12 @@ Iterator for QCache collections. | QCacheIterator
         Iterator for QDict collections. | QDictIterator
         Iterator for QIntCache collections. | QIntCacheIterator
         Iterator for QIntDict collections. | QIntDictIterator
        -Iterator for QMap. | QMapConstIterator
        -Iterator for QMap. | QMapIterator
        +Iterator for TQMap. | TQMapConstIterator
        +Iterator for TQMap. | TQMapIterator
         Iterator for TQObjectLists. | TQObjectListIterator
         Iterator for QPtrDict collections. | QPtrDictIterator
         Iterator for QPtrList collections. | QPtrListIterator
        -Iterator for QValueList. | QValueListIterator
        +Iterator for TQValueList. | TQValueListIterator
         Iterator for collections of QListViewItems. | QListViewItemIterator
         Iterator for the QStrList and QStrIList classes. | QStrListIterator
         Iterators over QLayoutItem. | QLayoutIterator
        @@ -398,11 +398,11 @@ Used to report errors with the TQXmlErrorHandler interface. | TQXmlParseExceptio
         Used to start external programs and to communicate with them. | QProcess
         Validation of input text. | QValidator
         Validator which ensures that a string contains a valid integer within a specified range. | QIntValidator
        -Value-based template class that provides a dictionary. | QMap
        -Value-based template class that provides a dynamic array. | QValueVector
        +Value-based template class that provides a dictionary. | TQMap
        +Value-based template class that provides a dynamic array. | TQValueVector
         Value-based template class that provides a pair of elements. | TQPair
        -Value-based template class that provides a stack. | QValueStack
        -Value-based template class that provides lists. | QValueList
        +Value-based template class that provides a stack. | TQValueStack
        +Value-based template class that provides lists. | TQValueList
         Vertical geometry management of its child widgets. | QVBox
         Vertical or horizontal scroll bar. | QScrollBar
         Vertical or horizontal slider. | QSlider
        diff --git a/doc/man/man3/tqaxbase.3qt b/doc/man/man3/tqaxbase.3qt
        index fc0f1969f..e8c6f0a2e 100644
        --- a/doc/man/man3/tqaxbase.3qt
        +++ b/doc/man/man3/tqaxbase.3qt
        @@ -33,7 +33,7 @@ Inherited by QAxObject and QAxWidget.
         .BI "QVariant \fBdynamicCall\fR ( const QCString & function, const QVariant & var1 = QVariant ( ), const QVariant & var2 = QVariant ( ), const QVariant & var3 = QVariant ( ), const QVariant & var4 = QVariant ( ), const QVariant & var5 = QVariant ( ), const QVariant & var6 = QVariant ( ), const QVariant & var7 = QVariant ( ), const QVariant & var8 = QVariant ( ) )"
         .br
         .ti -1c
        -.BI "QVariant \fBdynamicCall\fR ( const QCString & function, QValueList & vars )"
        +.BI "QVariant \fBdynamicCall\fR ( const QCString & function, TQValueList & vars )"
         .br
         .ti -1c
         .BI "QAxObject * \fBquerySubObject\fR ( const QCString & name, const QVariant & var1 = QVariant ( ), const QVariant & var2 = QVariant ( ), const QVariant & var3 = QVariant ( ), const QVariant & var4 = QVariant ( ), const QVariant & var5 = QVariant ( ), const QVariant & var6 = QVariant ( ), const QVariant & var7 = QVariant ( ), const QVariant & var8 = QVariant ( ) )"
        @@ -156,7 +156,7 @@ QAxBase transparently converts between COM data types and the equivalent TQt dat
         .PP
         Supported COM datatypes are listed in the first column of following table. The second column is the TQt type that can be used with the TQObject property functions. The third column is the TQt type that is used in the prototype of generated signals and slots for in-parameters, and the last column is the TQt type that is used in the prototype of signals and slots for out-parameters. 
        .nf .TS -l - l. COM type TQt property in-parameter out-parameter VARIANT_BOOL bool bool bool& BSTR TQString const TQString& TQString& char, short, int, long int int int& uchar, ushort, uint, ulong uint uint uint& float, double double double double& DATE QDateTime const QDateTime& QDateTime& CY TQ_LLONG TQ_LLONG TQ_LLONG& OLE_COLOR TQColor const TQColor& TQColor& SAFEARRAY(VARIANT) QValueList const QValueList& QValueList& SAFEARRAY(BYTE) QByteArray const QByteArray& QByteArray& SAFEARRAY(BSTR) QStringList const QStringList& QStringList& VARIANT type-dependent const QVariant& QVariant& IFontDisp* QFont const QFont& QFont& IPictureDisp* QPixmap const QPixmap& QPixmap& IDispatch* QAxObject* (read-only) QAxBase::asVariant() QAxObject* (return value) IUnknown* QAxObject* (read-only) QAxBase::asVariant() QAxObject* (return value) SCODE, DECIMAL \fIunsupported\fR \fIunsupported\fR +l - l. COM type TQt property in-parameter out-parameter VARIANT_BOOL bool bool bool& BSTR TQString const TQString& TQString& char, short, int, long int int int& uchar, ushort, uint, ulong uint uint uint& float, double double double double& DATE QDateTime const QDateTime& QDateTime& CY TQ_LLONG TQ_LLONG TQ_LLONG& OLE_COLOR TQColor const TQColor& TQColor& SAFEARRAY(VARIANT) TQValueList const TQValueList& TQValueList& SAFEARRAY(BYTE) QByteArray const QByteArray& QByteArray& SAFEARRAY(BSTR) QStringList const QStringList& QStringList& VARIANT type-dependent const QVariant& QVariant& IFontDisp* QFont const QFont& QFont& IPictureDisp* QPixmap const QPixmap& QPixmap& IDispatch* QAxObject* (read-only) QAxBase::asVariant() QAxObject* (return value) IUnknown* QAxObject* (read-only) QAxBase::asVariant() QAxObject* (return value) SCODE, DECIMAL \fIunsupported\fR \fIunsupported\fR .TE .fi
        @@ -208,20 +208,20 @@ use the QAxBase API like this: bool ok = object.dynamicCall( "addColumn(const TQString&)", "Column 1" ).toBool(); .br .br - QValueList varlist; + TQValueList varlist; .br - QValueList parameters; + TQValueList parameters; .br parameters << QVariant( varlist ); .br - int n = object.dynamicCall( "fillList(QValueList&)", parameters ).toInt(); + int n = object.dynamicCall( "fillList(TQValueList&)", parameters ).toInt(); .br .br QAxObject *item = object.querySubItem( "item(int)", 5 ); .br .fi .PP -Note that the QValueList the object should fill has to be provided as an element in the parameter list of QVariants. +Note that the TQValueList the object should fill has to be provided as an element in the parameter list of QVariants. .PP If you need to access properties or pass parameters of unsupported datatypes you must access the COM object directly through its IDispatch implementation or other interfaces. Those interfaces can be retrieved through queryInterface(). .PP @@ -246,7 +246,7 @@ To get the definition of the COM interfaces you will have to use the header file If you need to react to events that pass parameters of unsupported datatypes you can use the generic signal that delivers the event data as provided by the COM event. .SS "Member Type Documentation" .SH "QAxBase::PropertyBag" -A QMap that can store properties as name:value pairs. +A TQMap that can store properties as name:value pairs. .SH MEMBER FUNCTION DOCUMENTATION .SH "QAxBase::QAxBase ( IUnknown * iface = 0 )" Creates a QAxBase object that wraps the COM object \fIiface\fR. If \fIiface\fR is 0 (the default), use setControl() to instantiate a COM object. @@ -330,7 +330,7 @@ It is only possible to call functions through dynamicCall() that have parameters This is also more efficient. .PP Example: qutlook/centralwidget.cpp. -.SH "QVariant QAxBase::dynamicCall ( const QCString & function, QValueList & vars )" +.SH "QVariant QAxBase::dynamicCall ( const QCString & function, TQValueList & vars )" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP Calls the COM object's method \fIfunction\fR, passing the parameters in \fIvars\fR, and returns the value returned by the method. If the method does not return a value or when the function call failed this function returns an invalid QVariant object. diff --git a/doc/man/man3/tqaxobject.3qt b/doc/man/man3/tqaxobject.3qt index f035fcde3..3019e2e0a 100644 --- a/doc/man/man3/tqaxobject.3qt +++ b/doc/man/man3/tqaxobject.3qt @@ -38,7 +38,7 @@ Inherited by QAxScriptEngine. .BI "QVariant \fBdynamicCall\fR ( const QCString & function, const QVariant & var1 = QVariant ( ), const QVariant & var2 = QVariant ( ), const QVariant & var3 = QVariant ( ), const QVariant & var4 = QVariant ( ), const QVariant & var5 = QVariant ( ), const QVariant & var6 = QVariant ( ), const QVariant & var7 = QVariant ( ), const QVariant & var8 = QVariant ( ) )" .br .ti -1c -.BI "QVariant \fBdynamicCall\fR ( const QCString & function, QValueList & vars )" +.BI "QVariant \fBdynamicCall\fR ( const QCString & function, TQValueList & vars )" .br .ti -1c .BI "QAxObject * \fBquerySubObject\fR ( const QCString & name, const QVariant & var1 = QVariant ( ), const QVariant & var2 = QVariant ( ), const QVariant & var3 = QVariant ( ), const QVariant & var4 = QVariant ( ), const QVariant & var5 = QVariant ( ), const QVariant & var6 = QVariant ( ), const QVariant & var7 = QVariant ( ), const QVariant & var8 = QVariant ( ) )" @@ -118,7 +118,7 @@ It is only possible to call functions through dynamicCall() that have parameters This is also more efficient. .PP Example: qutlook/centralwidget.cpp. -.SH "QVariant QAxBase::dynamicCall ( const QCString & function, QValueList & vars )" +.SH "QVariant QAxBase::dynamicCall ( const QCString & function, TQValueList & vars )" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP Calls the COM object's method \fIfunction\fR, passing the parameters in \fIvars\fR, and returns the value returned by the method. If the method does not return a value or when the function call failed this function returns an invalid QVariant object. diff --git a/doc/man/man3/tqaxscript.3qt b/doc/man/man3/tqaxscript.3qt index 42bcfe4fd..0117f6bda 100644 --- a/doc/man/man3/tqaxscript.3qt +++ b/doc/man/man3/tqaxscript.3qt @@ -45,7 +45,7 @@ Inherits TQObject. .BI "QVariant \fBcall\fR ( const TQString & function, const QVariant & var1 = QVariant ( ), const QVariant & var2 = QVariant ( ), const QVariant & var3 = QVariant ( ), const QVariant & var4 = QVariant ( ), const QVariant & var5 = QVariant ( ), const QVariant & var6 = QVariant ( ), const QVariant & var7 = QVariant ( ), const QVariant & var8 = QVariant ( ) )" .br .ti -1c -.BI "QVariant \fBcall\fR ( const TQString & function, QValueList & arguments )" +.BI "QVariant \fBcall\fR ( const TQString & function, TQValueList & arguments )" .br .in -1c .SS "Signals" @@ -97,7 +97,7 @@ Destroys the object, releasing all allocated resources. Calls \fIfunction\fR, passing the parameters \fIvar1\fR, \fIvar1\fR, \fIvar2\fR, \fIvar3\fR, \fIvar4\fR, \fIvar5\fR, \fIvar6\fR, \fIvar7\fR and \fIvar8\fR as arguments and returns the value returned by the function, or an invalid QVariant if the function does not return a value or when the function call failed. .PP See QAxScriptManager::call() for more information about how to call script functions. -.SH "QVariant QAxScript::call ( const TQString & function, QValueList & arguments )" +.SH "QVariant QAxScript::call ( const TQString & function, TQValueList & arguments )" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP Calls \fIfunction\fR passing \fIarguments\fR as parameters, and returns the result. Returns when the script's execution has finished. diff --git a/doc/man/man3/tqaxscriptmanager.3qt b/doc/man/man3/tqaxscriptmanager.3qt index d789b0568..432b5a8e5 100644 --- a/doc/man/man3/tqaxscriptmanager.3qt +++ b/doc/man/man3/tqaxscriptmanager.3qt @@ -48,7 +48,7 @@ Inherits TQObject. .BI "QVariant \fBcall\fR ( const TQString & function, const QVariant & var1 = QVariant ( ), const QVariant & var2 = QVariant ( ), const QVariant & var3 = QVariant ( ), const QVariant & var4 = QVariant ( ), const QVariant & var5 = QVariant ( ), const QVariant & var6 = QVariant ( ), const QVariant & var7 = QVariant ( ), const QVariant & var8 = QVariant ( ) )" .br .ti -1c -.BI "QVariant \fBcall\fR ( const TQString & function, QValueList & arguments )" +.BI "QVariant \fBcall\fR ( const TQString & function, TQValueList & arguments )" .br .in -1c .SS "Signals" @@ -111,7 +111,7 @@ use .PP .nf .br - QValueList args; + TQValueList args; .br args << 5; .br @@ -130,7 +130,7 @@ However, this is slower. Functions provided by script engines that don't support introspection are not available and must be called directly using QAxScript::call() on the respective script object. .PP Note that calling this function can be significantely slower than using call() on the respective QAxScript directly. -.SH "QVariant QAxScriptManager::call ( const TQString & function, QValueList & arguments )" +.SH "QVariant QAxScriptManager::call ( const TQString & function, TQValueList & arguments )" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP Calls \fIfunction\fR passing \fIarguments\fR as parameters, and returns the result. Returns when the script's execution has finished. diff --git a/doc/man/man3/tqaxwidget.3qt b/doc/man/man3/tqaxwidget.3qt index 4bc933518..448584e3a 100644 --- a/doc/man/man3/tqaxwidget.3qt +++ b/doc/man/man3/tqaxwidget.3qt @@ -36,7 +36,7 @@ Inherits TQWidget and QAxBase. .BI "QVariant \fBdynamicCall\fR ( const QCString & function, const QVariant & var1 = QVariant ( ), const QVariant & var2 = QVariant ( ), const QVariant & var3 = QVariant ( ), const QVariant & var4 = QVariant ( ), const QVariant & var5 = QVariant ( ), const QVariant & var6 = QVariant ( ), const QVariant & var7 = QVariant ( ), const QVariant & var8 = QVariant ( ) )" .br .ti -1c -.BI "QVariant \fBdynamicCall\fR ( const QCString & function, QValueList & vars )" +.BI "QVariant \fBdynamicCall\fR ( const QCString & function, TQValueList & vars )" .br .ti -1c .BI "QAxObject * \fBquerySubObject\fR ( const QCString & name, const QVariant & var1 = QVariant ( ), const QVariant & var2 = QVariant ( ), const QVariant & var3 = QVariant ( ), const QVariant & var4 = QVariant ( ), const QVariant & var5 = QVariant ( ), const QVariant & var6 = QVariant ( ), const QVariant & var7 = QVariant ( ), const QVariant & var8 = QVariant ( ) )" @@ -131,7 +131,7 @@ It is only possible to call functions through dynamicCall() that have parameters This is also more efficient. .PP Example: qutlook/centralwidget.cpp. -.SH "QVariant QAxBase::dynamicCall ( const QCString & function, QValueList & vars )" +.SH "QVariant QAxBase::dynamicCall ( const QCString & function, TQValueList & vars )" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP Calls the COM object's method \fIfunction\fR, passing the parameters in \fIvars\fR, and returns the value returned by the method. If the method does not return a value or when the function call failed this function returns an invalid QVariant object. diff --git a/doc/man/man3/tqcanvasitemlist.3qt b/doc/man/man3/tqcanvasitemlist.3qt index 258d9fd29..f3be5b4dc 100644 --- a/doc/man/man3/tqcanvasitemlist.3qt +++ b/doc/man/man3/tqcanvasitemlist.3qt @@ -11,7 +11,7 @@ TQCanvasItemList \- List of TQCanvasItems .SH SYNOPSIS \fC#include \fR .PP -Inherits QValueList. +Inherits TQValueList. .PP .SS "Public Members" .in +1c @@ -22,9 +22,9 @@ Inherits QValueList. .SH DESCRIPTION The TQCanvasItemList class is a list of TQCanvasItems. .PP -TQCanvasItemList is a QValueList of pointers to TQCanvasItems. This class is used by some methods in TQCanvas that need to return a list of canvas items. +TQCanvasItemList is a TQValueList of pointers to TQCanvasItems. This class is used by some methods in TQCanvas that need to return a list of canvas items. .PP -The QValueList documentation describes how to use this list. +The TQValueList documentation describes how to use this list. .PP See also Graphics Classes and Image Processing Classes. .SH MEMBER FUNCTION DOCUMENTATION diff --git a/doc/man/man3/tqcanvaspixmaparray.3qt b/doc/man/man3/tqcanvaspixmaparray.3qt index 296c66c73..5c3369c40 100644 --- a/doc/man/man3/tqcanvaspixmaparray.3qt +++ b/doc/man/man3/tqcanvaspixmaparray.3qt @@ -23,7 +23,7 @@ TQCanvasPixmapArray \- Array of TQCanvasPixmaps .BI "TQCanvasPixmapArray ( QPtrList list, QPtrList hotspots ) \fI(obsolete)\fR" .br .ti -1c -.BI "\fBTQCanvasPixmapArray\fR ( QValueList list, QPointArray hotspots = QPointArray ( ) )" +.BI "\fBTQCanvasPixmapArray\fR ( TQValueList list, QPointArray hotspots = QPointArray ( ) )" .br .ti -1c .BI "\fB~TQCanvasPixmapArray\fR ()" @@ -78,10 +78,10 @@ If \fIdatafilenamepattern\fR does not exist, is not readable, isn't an image, or .SH "TQCanvasPixmapArray::TQCanvasPixmapArray ( QPtrList list, QPtrList hotspots )" \fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code. .PP -Use TQCanvasPixmapArray::TQCanvasPixmapArray( QValueList, QPointArray ) instead. +Use TQCanvasPixmapArray::TQCanvasPixmapArray( TQValueList, QPointArray ) instead. .PP Constructs a TQCanvasPixmapArray from the list of QPixmaps \fIlist\fR. The \fIhotspots\fR list has to be of the same size as \fIlist\fR. -.SH "TQCanvasPixmapArray::TQCanvasPixmapArray ( QValueList list, QPointArray hotspots = QPointArray ( ) )" +.SH "TQCanvasPixmapArray::TQCanvasPixmapArray ( TQValueList list, QPointArray hotspots = QPointArray ( ) )" Constructs a TQCanvasPixmapArray from the list of QPixmaps in the \fIlist\fR. Each pixmap will get a hotspot according to the \fIhotspots\fR array. If no hotspots are specified, each one is set to be at position (0, 0). .PP If an error occurs, isValid() will return FALSE. diff --git a/doc/man/man3/tqdeepcopy.3qt b/doc/man/man3/tqdeepcopy.3qt index 6275ab594..d586efdcb 100644 --- a/doc/man/man3/tqdeepcopy.3qt +++ b/doc/man/man3/tqdeepcopy.3qt @@ -145,13 +145,13 @@ Currently, QDeepCopy works with the following classes: .TP QMemArray (including subclasses like QByteArray and QCString) .TP -QMap +TQMap .TP TQString .TP -QValueList (including subclasses like QStringList and QValueStack) +TQValueList (including subclasses like QStringList and TQValueStack) .TP -QValueVector +TQValueVector .PP See also Thread Support in Qt, Implicitly and Explicitly Shared Classes, and Non-GUI Classes. .SH MEMBER FUNCTION DOCUMENTATION diff --git a/doc/man/man3/tqdict.3qt b/doc/man/man3/tqdict.3qt index 81aed0021..e5e051efc 100644 --- a/doc/man/man3/tqdict.3qt +++ b/doc/man/man3/tqdict.3qt @@ -85,13 +85,13 @@ Inherits QPtrCollection. .SH DESCRIPTION The QDict class is a template class that provides a dictionary based on TQString keys. .PP -QMap is an STL-compatible alternative to this class. +TQMap is an STL-compatible alternative to this class. .PP QDict is implemented as a template class. Define a template instance QDict to create a dictionary that operates on pointers to X (X *). .PP A dictionary is a collection of key-value pairs. The key is a TQString used for insertion, removal and lookup. The value is a pointer. Dictionaries provide very fast insertion and lookup. .PP -If you want to use non-Unicode, plain 8-bit \fCchar*\fR keys, use the QAsciiDict template. A QDict has the same performance as a QAsciiDict. If you want to have a dictionary that maps QStrings to QStrings use QMap. +If you want to use non-Unicode, plain 8-bit \fCchar*\fR keys, use the QAsciiDict template. A QDict has the same performance as a QAsciiDict. If you want to have a dictionary that maps QStrings to QStrings use TQMap. .PP The size() of the dictionary is very important. In order to get good performance, you should use a suitably large prime number. Suitable means equal to or larger than the maximum expected number of dictionary items. Size is set in the constructor but may be changed with resize(). .PP diff --git a/doc/man/man3/tqdns.3qt b/doc/man/man3/tqdns.3qt index 8aae9e479..38b3e062c 100644 --- a/doc/man/man3/tqdns.3qt +++ b/doc/man/man3/tqdns.3qt @@ -49,13 +49,13 @@ Inherits TQObject. .BI "bool \fBisWorking\fR () const" .br .ti -1c -.BI "QValueList \fBaddresses\fR () const" +.BI "TQValueList \fBaddresses\fR () const" .br .ti -1c -.BI "QValueList \fBmailServers\fR () const" +.BI "TQValueList \fBmailServers\fR () const" .br .ti -1c -.BI "QValueList \fBservers\fR () const" +.BI "TQValueList \fBservers\fR () const" .br .ti -1c .BI "QStringList \fBhostNames\fR () const" @@ -128,7 +128,7 @@ The DNS lookup is started the next time the application enters the event loop. W \fIrr\fR defaults to Ptr, that maps addresses to hostnames. .SH "QDns::~QDns ()\fC [virtual]\fR" Destroys the DNS query object and frees its allocated resources. -.SH "QValueList QDns::addresses () const" +.SH "TQValueList QDns::addresses () const" Returns a list of the addresses for this name if this QDns object has a recordType() of QDns::A or QDns::Aaaa and the answer is available; otherwise returns an empty list. .PP As a special case, if label() is a valid numeric IP address, this function returns that address. @@ -137,9 +137,9 @@ Note that if you want to iterate over the list, you should iterate over a copy, .PP .nf .br - QValueList list = myDns.addresses(); + TQValueList list = myDns.addresses(); .br - QValueList::Iterator it = list.begin(); + TQValueList::Iterator it = list.begin(); .br while( it != list.end() ) { .br @@ -186,7 +186,7 @@ Example: network/mail/smtp.cpp. Returns the domain name for which this object returns information. .PP See also setLabel(). -.SH "QValueList QDns::mailServers () const" +.SH "TQValueList QDns::mailServers () const" Returns a list of mail servers if the record type is Mx. The class \fCQDns::MailServer\fR contains the following public variables: .TP TQString QDns::MailServer::name @@ -197,9 +197,9 @@ Note that if you want to iterate over the list, you should iterate over a copy, .PP .nf .br - QValueList list = myDns.mailServers(); + TQValueList list = myDns.mailServers(); .br - QValueList::Iterator it = list.begin(); + TQValueList::Iterator it = list.begin(); .br while( it != list.end() ) { .br @@ -240,7 +240,7 @@ See also setRecordType() and RecordType. This signal is emitted when results are available for one of the qualifiedNames(). .PP Example: network/mail/smtp.cpp. -.SH "QValueList QDns::servers () const" +.SH "TQValueList QDns::servers () const" Returns a list of servers if the record type is Srv. The class \fCQDns::Server\fR contains the following public variables: .TP TQString QDns::Server::name @@ -255,9 +255,9 @@ Note that if you want to iterate over the list, you should iterate over a copy, .PP .nf .br - QValueList list = myDns.servers(); + TQValueList list = myDns.servers(); .br - QValueList::Iterator it = list.begin(); + TQValueList::Iterator it = list.begin(); .br while( it != list.end() ) { .br diff --git a/doc/man/man3/tqfiledialog.3qt b/doc/man/man3/tqfiledialog.3qt index a7d6c1107..2f6cb0dcd 100644 --- a/doc/man/man3/tqfiledialog.3qt +++ b/doc/man/man3/tqfiledialog.3qt @@ -973,7 +973,7 @@ Note that if you want to iterate over the list, you should iterate over a copy, .br .fi .PP -See also selectedFile, selectedFilter, and QValueList::empty(). +See also selectedFile, selectedFilter, and TQValueList::empty(). .PP Get this property's value with selectedFiles(). .SH "TQString selectedFilter" diff --git a/doc/man/man3/tqfont.3qt b/doc/man/man3/tqfont.3qt index da524875e..c0964e005 100644 --- a/doc/man/man3/tqfont.3qt +++ b/doc/man/man3/tqfont.3qt @@ -628,7 +628,7 @@ Example: chart/optionsform.cpp. .SH "TQString QFont::key () const" Returns the font's key, a textual representation of a font. It is typically used as the key for a cache or dictionary of fonts. .PP -See also QMap. +See also TQMap. .SH "TQString QFont::lastResortFamily () const" Returns the "last resort" font family name. .PP diff --git a/doc/man/man3/tqfontdatabase.3qt b/doc/man/man3/tqfontdatabase.3qt index f0996c801..10cb8b239 100644 --- a/doc/man/man3/tqfontdatabase.3qt +++ b/doc/man/man3/tqfontdatabase.3qt @@ -26,10 +26,10 @@ QFontDatabase \- Information about the fonts available in the underlying window .BI "QStringList \fBstyles\fR ( const TQString & family ) const" .br .ti -1c -.BI "QValueList \fBpointSizes\fR ( const TQString & family, const TQString & style = TQString::null )" +.BI "TQValueList \fBpointSizes\fR ( const TQString & family, const TQString & style = TQString::null )" .br .ti -1c -.BI "QValueList \fBsmoothSizes\fR ( const TQString & family, const TQString & style )" +.BI "TQValueList \fBsmoothSizes\fR ( const TQString & family, const TQString & style )" .br .ti -1c .BI "TQString \fBstyleString\fR ( const QFont & f )" @@ -65,10 +65,10 @@ QFontDatabase \- Information about the fonts available in the underlying window .BI "QStringList styles ( const TQString & family, const TQString & ) const \fI(obsolete)\fR" .br .ti -1c -.BI "QValueList pointSizes ( const TQString & family, const TQString & style, const TQString & ) \fI(obsolete)\fR" +.BI "TQValueList pointSizes ( const TQString & family, const TQString & style, const TQString & ) \fI(obsolete)\fR" .br .ti -1c -.BI "QValueList smoothSizes ( const TQString & family, const TQString & style, const TQString & ) \fI(obsolete)\fR" +.BI "TQValueList smoothSizes ( const TQString & family, const TQString & style, const TQString & ) \fI(obsolete)\fR" .br .ti -1c .BI "QFont font ( const TQString & familyName, const TQString & style, int pointSize, const TQString & ) \fI(obsolete)\fR" @@ -98,7 +98,7 @@ QFontDatabase \- Information about the fonts available in the underlying window .SS "Static Public Members" .in +1c .ti -1c -.BI "QValueList \fBstandardSizes\fR ()" +.BI "TQValueList \fBstandardSizes\fR ()" .br .ti -1c .BI "TQString \fBscriptName\fR ( QFont::Script script )" @@ -157,9 +157,9 @@ int main( int argc, char **argv ) .br TQString dstyle = "\\t" + style + " ("; .br - QValueList smoothies = fdb.smoothSizes( family, style ); + TQValueList smoothies = fdb.smoothSizes( family, style ); .br - for ( QValueList::Iterator points = smoothies.begin(); + for ( TQValueList::Iterator points = smoothies.begin(); .br points != smoothies.end(); ++points ) { .br @@ -239,11 +239,11 @@ Returns TRUE if the font that has family \fIfamily\fR and style \fIstyle\fR is i See also weight() and bold(). .SH "bool QFontDatabase::italic ( const TQString & family, const TQString & style, const TQString & ) const" \fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code. -.SH "QValueList QFontDatabase::pointSizes ( const TQString & family, const TQString & style = TQString::null )" +.SH "TQValueList QFontDatabase::pointSizes ( const TQString & family, const TQString & style = TQString::null )" Returns a list of the point sizes available for the font that has family \fIfamily\fR and style \fIstyle\fR. The list may be empty. .PP See also smoothSizes() and standardSizes(). -.SH "QValueList QFontDatabase::pointSizes ( const TQString & family, const TQString & style, const TQString & )" +.SH "TQValueList QFontDatabase::pointSizes ( const TQString & family, const TQString & style, const TQString & )" \fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code. .SH "TQString QFontDatabase::scriptName ( QFont::Script script )\fC [static]\fR" Returns a string that gives a default description of the \fIscript\fR (e.g. for displaying to the user in a dialog). The name matches the name of the script as defined by the Unicode 3.0 standard. @@ -253,13 +253,13 @@ See also QFont::Script. Returns a string with sample characters from \fIscript\fR. .PP See also QFont::Script. -.SH "QValueList QFontDatabase::smoothSizes ( const TQString & family, const TQString & style )" +.SH "TQValueList QFontDatabase::smoothSizes ( const TQString & family, const TQString & style )" Returns the point sizes of a font that has family \fIfamily\fR and style \fIstyle\fR that will look attractive. The list may be empty. For non-scalable fonts and bitmap scalable fonts, this function is equivalent to pointSizes(). .PP See also pointSizes() and standardSizes(). -.SH "QValueList QFontDatabase::smoothSizes ( const TQString & family, const TQString & style, const TQString & )" +.SH "TQValueList QFontDatabase::smoothSizes ( const TQString & family, const TQString & style, const TQString & )" \fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code. -.SH "QValueList QFontDatabase::standardSizes ()\fC [static]\fR" +.SH "TQValueList QFontDatabase::standardSizes ()\fC [static]\fR" Returns a list of standard font sizes. .PP See also smoothSizes() and pointSizes(). diff --git a/doc/man/man3/tqiconview.3qt b/doc/man/man3/tqiconview.3qt index acde42dc0..ccd7a4284 100644 --- a/doc/man/man3/tqiconview.3qt +++ b/doc/man/man3/tqiconview.3qt @@ -247,7 +247,7 @@ Inherits QScrollView. .BI "void \fBcontextMenuRequested\fR ( QIconViewItem * item, const QPoint & pos )" .br .ti -1c -.BI "void \fBdropped\fR ( QDropEvent * e, const QValueList & lst )" +.BI "void \fBdropped\fR ( QDropEvent * e, const TQValueList & lst )" .br .ti -1c .BI "void \fBmoved\fR ()" @@ -431,7 +431,7 @@ The simple approach to dragging items out of the icon view is to subclass QIconV .PP In this example we create a QTextDrag object, (derived from QDragObject), containing the item's label and return it as the drag object. We could just as easily have created a QImageDrag from the item's pixmap and returned that instead. .PP -QIconViews and their QIconViewItems can also be the targets of drag and drops. To make the QIconView itself able to accept drops connect to the dropped() signal. When a drop occurs this signal will be emitted with a QDragEvent and a QValueList of QIconDragItems. To make a QIconViewItem into a drop target subclass QIconViewItem and reimplement QIconViewItem::acceptDrop() and QIconViewItem::dropped(). +QIconViews and their QIconViewItems can also be the targets of drag and drops. To make the QIconView itself able to accept drops connect to the dropped() signal. When a drop occurs this signal will be emitted with a QDragEvent and a TQValueList of QIconDragItems. To make a QIconViewItem into a drop target subclass QIconViewItem and reimplement QIconViewItem::acceptDrop() and QIconViewItem::dropped(). .PP .nf .br @@ -448,7 +448,7 @@ QIconViews and their QIconViewItems can also be the targets of drag and drops. T } .br .br - void MyIconViewItem::dropped( QDropEvent *evt, const QValueList& ) + void MyIconViewItem::dropped( QDropEvent *evt, const TQValueList& ) .br { .br @@ -468,7 +468,7 @@ If you want to use extended drag-and-drop or have drag shapes drawn you must tak .PP The first part is starting drags -- you should use a QIconDrag (or a class derived from it) for the drag object. In dragObject() create the drag object, populate it with QIconDragItems and return it. Normally such a drag should offer each selected item's data. So in dragObject() you should iterate over all the items, and create a QIconDragItem for each selected item, and append these items with QIconDrag::append() to the QIconDrag object. You can use QIconDragItem::setData() to set the data of each item that should be dragged. If you want to offer the data in additional mime-types, it's best to use a class derived from QIconDrag, which implements additional encoding and decoding functions. .PP -When a drag enters the icon view, there is little to do. Simply connect to the dropped() signal and reimplement QIconViewItem::acceptDrop() and QIconViewItem::dropped(). If you've used a QIconDrag (or a subclass of it) the second argument to the dropped signal contains a QValueList of QIconDragItems -- you can access their data by calling QIconDragItem::data() on each one. +When a drag enters the icon view, there is little to do. Simply connect to the dropped() signal and reimplement QIconViewItem::acceptDrop() and QIconViewItem::dropped(). If you've used a QIconDrag (or a subclass of it) the second argument to the dropped signal contains a TQValueList of QIconDragItems -- you can access their data by calling QIconDragItem::data() on each one. .PP For an example implementation of complex drag-and-drop look at the fileiconview example (qt/examples/fileiconview). .PP @@ -588,7 +588,7 @@ The default implementation fills \fIr\fR with the viewport's backgroundBrush(). See also contentsX, contentsY, and drawContents(). .SH "void QIconView::drawRubber ( QPainter * p )\fC [virtual protected]\fR" Draws the rubber band using the painter \fIp\fR. -.SH "void QIconView::dropped ( QDropEvent * e, const QValueList & lst )\fC [signal]\fR" +.SH "void QIconView::dropped ( QDropEvent * e, const TQValueList & lst )\fC [signal]\fR" This signal is emitted when a drop event occurs in the viewport (but not on any icon) which the icon view itself can't handle. .PP \fIe\fR provides all the information about the drop. If the drag object of the drop was a QIconDrag, \fIlst\fR contains the list of the dropped items. You can get the data using QIconDragItem::data() on each item. If the \fIlst\fR is empty, i.e. the drag was not a QIconDrag, you have to decode the data in \fIe\fR and work with that. diff --git a/doc/man/man3/tqiconviewitem.3qt b/doc/man/man3/tqiconviewitem.3qt index 870f53bbd..d965c7947 100644 --- a/doc/man/man3/tqiconviewitem.3qt +++ b/doc/man/man3/tqiconviewitem.3qt @@ -193,7 +193,7 @@ Inherits Qt. .BI "virtual void \fBpaintFocus\fR ( QPainter * p, const QColorGroup & cg )" .br .ti -1c -.BI "virtual void \fBdropped\fR ( QDropEvent * e, const QValueList & lst )" +.BI "virtual void \fBdropped\fR ( QDropEvent * e, const TQValueList & lst )" .br .ti -1c .BI "virtual void \fBdragEntered\fR ()" @@ -333,7 +333,7 @@ Example: fileiconview/qfileiconview.cpp. Returns TRUE if the user is allowed to drop something onto the item; otherwise returns FALSE. .PP See also setDropEnabled(). -.SH "void QIconViewItem::dropped ( QDropEvent * e, const QValueList & lst )\fC [virtual protected]\fR" +.SH "void QIconViewItem::dropped ( QDropEvent * e, const TQValueList & lst )\fC [virtual protected]\fR" This function is called when something is dropped on the item. \fIe\fR provides all the information about the drop. If the drag object of the drop was a QIconDrag, \fIlst\fR contains the list of the dropped items. You can get the data by calling QIconDragItem::data() on each item. If the \fIlst\fR is empty, i.e. the drag was not a QIconDrag, you must decode the data in \fIe\fR and work with that. .PP The default implementation does nothing; subclasses may reimplement this function. diff --git a/doc/man/man3/tqimage.3qt b/doc/man/man3/tqimage.3qt index d7b37bc0e..7fafb7464 100644 --- a/doc/man/man3/tqimage.3qt +++ b/doc/man/man3/tqimage.3qt @@ -245,7 +245,7 @@ TQImage \- Hardware-independent pixmap representation with direct access to the .BI "void \fBsetOffset\fR ( const QPoint & p )" .br .ti -1c -.BI "QValueList \fBtextList\fR () const" +.BI "TQValueList \fBtextList\fR () const" .br .ti -1c .BI "QStringList \fBtextLanguages\fR () const" @@ -1007,16 +1007,16 @@ Note that if you want to iterate over the list, you should iterate over a copy, .fi .PP See also textList(), text(), setText(), and textKeys(). -.SH "QValueList TQImage::textList () const" +.SH "TQValueList TQImage::textList () const" Returns a list of QImageTextKeyLang objects that enumerate all the texts key/language pairs set by setText() for this image. .PP Note that if you want to iterate over the list, you should iterate over a copy, e.g. .PP .nf .br - QValueList list = myImage.textList(); + TQValueList list = myImage.textList(); .br - QValueList::Iterator it = list.begin(); + TQValueList::Iterator it = list.begin(); .br while( it != list.end() ) { .br diff --git a/doc/man/man3/tqintdict.3qt b/doc/man/man3/tqintdict.3qt index 1ee5298ba..2b91b9839 100644 --- a/doc/man/man3/tqintdict.3qt +++ b/doc/man/man3/tqintdict.3qt @@ -85,7 +85,7 @@ Inherits QPtrCollection. .SH DESCRIPTION The QIntDict class is a template class that provides a dictionary based on long keys. .PP -QMap is an STL-compatible alternative to this class. +TQMap is an STL-compatible alternative to this class. .PP QIntDict is implemented as a template class. Define a template instance QIntDict to create a dictionary that operates on pointers to X (X*). .PP diff --git a/doc/man/man3/tqmacmime.3qt b/doc/man/man3/tqmacmime.3qt index 6c1710b64..4166efc3c 100644 --- a/doc/man/man3/tqmacmime.3qt +++ b/doc/man/man3/tqmacmime.3qt @@ -38,10 +38,10 @@ QMacMime \- Maps open-standard MIME to Mac flavors .BI "virtual int \fBflavorFor\fR ( const char * mime ) = 0" .br .ti -1c -.BI "virtual QByteArray \fBconvertToMime\fR ( QValueList data, const char * mime, int flav ) = 0" +.BI "virtual QByteArray \fBconvertToMime\fR ( TQValueList data, const char * mime, int flav ) = 0" .br .ti -1c -.BI "virtual QValueList \fBconvertFromMime\fR ( QByteArray data, const char * mime, int flav ) = 0" +.BI "virtual TQValueList \fBconvertFromMime\fR ( QByteArray data, const char * mime, int flav ) = 0" .br .in -1c .SS "Static Public Members" @@ -87,13 +87,13 @@ Returns a list of all currently defined QMacMime objects of type \fIt\fR. Returns TRUE if the convertor can convert (both ways) between \fImime\fR and \fIflav\fR; otherwise returns FALSE. .PP All subclasses must reimplement this pure virtual function. -.SH "QValueList QMacMime::convertFromMime ( QByteArray data, const char * mime, int flav )\fC [pure virtual]\fR" +.SH "TQValueList QMacMime::convertFromMime ( QByteArray data, const char * mime, int flav )\fC [pure virtual]\fR" Returns \fIdata\fR converted from MIME type \fImime\fR to Mac flavor \fIflav\fR. .PP Note that Mac flavors must all be self-terminating. The return value may contain trailing data. .PP All subclasses must reimplement this pure virtual function. -.SH "QByteArray QMacMime::convertToMime ( QValueList data, const char * mime, int flav )\fC [pure virtual]\fR" +.SH "QByteArray QMacMime::convertToMime ( TQValueList data, const char * mime, int flav )\fC [pure virtual]\fR" Returns \fIdata\fR converted from Mac flavor \fIflav\fR to MIME type \fImime\fR. .PP Note that Mac flavors must all be self-terminating. The input \fIdata\fR may contain trailing data. diff --git a/doc/man/man3/tqmap.3qt b/doc/man/man3/tqmap.3qt index e7d208fd0..04b53cb7a 100644 --- a/doc/man/man3/tqmap.3qt +++ b/doc/man/man3/tqmap.3qt @@ -1,5 +1,5 @@ '\" t -.TH QMap 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- +.TH TQMap 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,9 +7,9 @@ .ad l .nh .SH NAME -QMap \- Value-based template class that provides a dictionary +TQMap \- Value-based template class that provides a dictionary .SH SYNOPSIS -\fC#include \fR +\fC#include \fR .PP .SS "Public Members" .in +1c @@ -38,40 +38,40 @@ QMap \- Value-based template class that provides a dictionary .BI "typedef size_t \fBsize_type\fR" .br .ti -1c -.BI "typedef QMapIterator \fBiterator\fR" +.BI "typedef TQMapIterator \fBiterator\fR" .br .ti -1c -.BI "typedef QMapConstIterator \fBconst_iterator\fR" +.BI "typedef TQMapConstIterator \fBconst_iterator\fR" .br .ti -1c .BI "typedef TQPair \fBinsert_pair\fR" .br .ti -1c -.BI "typedef QMapIterator \fBIterator\fR" +.BI "typedef TQMapIterator \fBIterator\fR" .br .ti -1c -.BI "typedef QMapConstIterator \fBConstIterator\fR" +.BI "typedef TQMapConstIterator \fBConstIterator\fR" .br .ti -1c .BI "typedef T \fBValueType\fR" .br .ti -1c -.BI "\fBQMap\fR ()" +.BI "\fBTQMap\fR ()" .br .ti -1c -.BI "\fBQMap\fR ( const QMap & m )" +.BI "\fBTQMap\fR ( const TQMap & m )" .br .ti -1c -.BI "\fBQMap\fR ( const std::map & m )" +.BI "\fBTQMap\fR ( const std::map & m )" .br .ti -1c -.BI "\fB~QMap\fR ()" +.BI "\fB~TQMap\fR ()" .br .ti -1c -.BI "QMap & \fBoperator=\fR ( const QMap & m )" +.BI "TQMap & \fBoperator=\fR ( const TQMap & m )" .br .ti -1c -.BI "QMap & \fBoperator=\fR ( const std::map & m )" +.BI "TQMap & \fBoperator=\fR ( const std::map & m )" .br .ti -1c .BI "iterator \fBbegin\fR ()" @@ -134,10 +134,10 @@ QMap \- Value-based template class that provides a dictionary .BI "size_type \fBcount\fR () const" .br .ti -1c -.BI "QValueList \fBkeys\fR () const" +.BI "TQValueList \fBkeys\fR () const" .br .ti -1c -.BI "QValueList \fBvalues\fR () const" +.BI "TQValueList \fBvalues\fR () const" .br .ti -1c .BI "bool \fBisEmpty\fR () const" @@ -161,22 +161,22 @@ QMap \- Value-based template class that provides a dictionary .SH RELATED FUNCTION DOCUMENTATION .in +1c .ti -1c -.BI "QDataStream & \fBoperator>>\fR ( QDataStream & s, QMap & m )" +.BI "QDataStream & \fBoperator>>\fR ( QDataStream & s, TQMap & m )" .br .ti -1c -.BI "QDataStream & \fBoperator<<\fR ( QDataStream & s, const QMap & m )" +.BI "QDataStream & \fBoperator<<\fR ( QDataStream & s, const TQMap & m )" .br .in -1c .SH DESCRIPTION -The QMap class is a value-based template class that provides a dictionary. +The TQMap class is a value-based template class that provides a dictionary. .PP -QMap is a TQt implementation of an STL-like map container. It can be used in your application if the standard \fCmap\fR is not available on all your target platforms. QMap is part of the TQt Template Library. +TQMap is a TQt implementation of an STL-like map container. It can be used in your application if the standard \fCmap\fR is not available on all your target platforms. TQMap is part of the TQt Template Library. .PP -QMap defines a template instance to create a dictionary with keys of type Key and values of type Data. QMap does not store pointers to the members of the map; instead, it holds a copy of every member. For this reason, QMap is value-based, whereas QPtrList and QDict are pointer-based. +TQMap defines a template instance to create a dictionary with keys of type Key and values of type Data. TQMap does not store pointers to the members of the map; instead, it holds a copy of every member. For this reason, TQMap is value-based, whereas QPtrList and QDict are pointer-based. .PP -QMap contains and manages a collection of objects of type Data with associated key values of type Key and provides iterators that allow the contained objects to be addressed. QMap owns the contained items. +TQMap contains and manages a collection of objects of type Data with associated key values of type Key and provides iterators that allow the contained objects to be addressed. TQMap owns the contained items. .PP -Some classes cannot be used within a QMap. For example everything derived from TQObject and thus all classes that implement widgets. Only values can be used in a QMap. To qualify as a value, the class must provide +Some classes cannot be used within a TQMap. For example everything derived from TQObject and thus all classes that implement widgets. Only values can be used in a TQMap. To qualify as a value, the class must provide .TP A copy constructor .TP @@ -188,7 +188,7 @@ Note that C++ defaults to field-by-field assignment operators and copy construct .PP The class used for the key requires that the \fCoperator<\fR is implemented to define ordering of the keys. .PP -QMap's function naming is consistent with the other TQt classes (e.g., count(), isEmpty()). QMap also provides extra functions for compatibility with STL algorithms, such as size() and empty(). Programmers already familiar with the STL \fCmap\fR can use these the STL-like functions if preferred. +TQMap's function naming is consistent with the other TQt classes (e.g., count(), isEmpty()). TQMap also provides extra functions for compatibility with STL algorithms, such as size() and empty(). Programmers already familiar with the STL \fCmap\fR can use these the STL-like functions if preferred. .PP Example: .PP @@ -196,7 +196,7 @@ Example: .br #include .br - #include + #include .br #include .br @@ -243,7 +243,7 @@ Example: QApplication app( argc, argv ); .br .br - typedef QMap EmployeeMap; + typedef TQMap EmployeeMap; .br EmployeeMap map; .br @@ -308,7 +308,7 @@ Another approach uses the operator[]. But be warned: if the map does not contain .PP .nf .br - QMap map; + TQMap map; .br map["Clinton"] = "Bill"; .br @@ -322,15 +322,15 @@ If you just want to know whether a certain key is contained in the map, use the .PP It is safe to have multiple iterators at the same time. If some member of the map is removed, only iterators pointing to the removed member become invalid; inserting in the map does not invalidate any iterators. .PP -Since QMap is value-based, there is no need to be concerned about deleting items in the map. The map holds its own copies and will free them if the corresponding member or the map itself is deleted. +Since TQMap is value-based, there is no need to be concerned about deleting items in the map. The map holds its own copies and will free them if the corresponding member or the map itself is deleted. .PP -QMap is implicitly shared. This means you can just make copies of the map in time O(1). If multiple QMap instances share the same data and one is modifying the map's data, this modifying instance makes a copy and modifies its private copy: so it does not affect other instances. If a QMap is being used in a multi-threaded program, you must protect all access to the map. See QMutex. +TQMap is implicitly shared. This means you can just make copies of the map in time O(1). If multiple TQMap instances share the same data and one is modifying the map's data, this modifying instance makes a copy and modifies its private copy: so it does not affect other instances. If a TQMap is being used in a multi-threaded program, you must protect all access to the map. See QMutex. .PP There are a couple of ways of inserting new items into the map. One uses the insert() method; the other uses operator[]: .PP .nf .br - QMap map; + TQMap map; .br map["Clinton"] = "Bill"; .br @@ -340,196 +340,196 @@ There are a couple of ways of inserting new items into the map. One uses the ins .PP Items can also be removed from the map in several ways. One way is to pass an iterator to remove(). Another way is to pass a key value to remove(), which will delete the entry with the requested key. In addition you can clear the entire map using the clear() method. .PP -See also QMapIterator, TQt Template Library Classes, Implicitly and Explicitly Shared Classes, and Non-GUI Classes. +See also TQMapIterator, TQt Template Library Classes, Implicitly and Explicitly Shared Classes, and Non-GUI Classes. .SS "Member Type Documentation" -.SH "QMap::ConstIterator" +.SH "TQMap::ConstIterator" The map's const iterator type, TQt style. -.SH "QMap::Iterator" +.SH "TQMap::Iterator" The map's iterator type, TQt style. -.SH "QMap::ValueType" +.SH "TQMap::ValueType" Corresponds to TQPair, TQt style. -.SH "QMap::const_iterator" +.SH "TQMap::const_iterator" The map's const iterator type. -.SH "QMap::const_pointer" +.SH "TQMap::const_pointer" Const pointer to value_type. -.SH "QMap::const_reference" +.SH "TQMap::const_reference" Const reference to value_type. -.SH "QMap::iterator" +.SH "TQMap::iterator" The map's iterator type. -.SH "QMap::key_type" +.SH "TQMap::key_type" The map's key type. -.SH "QMap::mapped_type" +.SH "TQMap::mapped_type" The map's data type. -.SH "QMap::pointer" +.SH "TQMap::pointer" Pointer to value_type. -.SH "QMap::reference" +.SH "TQMap::reference" Reference to value_type. -.SH "QMap::size_type" +.SH "TQMap::size_type" An unsigned integral type, used to represent various sizes. -.SH "QMap::value_type" +.SH "TQMap::value_type" Corresponds to TQPair. .SH MEMBER FUNCTION DOCUMENTATION -.SH "QMap::QMap ()" +.SH "TQMap::TQMap ()" Constructs an empty map. -.SH "QMap::QMap ( const QMap & m )" +.SH "TQMap::TQMap ( const TQMap & m )" Constructs a copy of \fIm\fR. .PP -This operation costs O(1) time because QMap is implicitly shared. This makes returning a QMap from a function very fast. If a shared instance is modified, it will be copied (copy-on-write), and this takes O(n) time. -.SH "QMap::QMap ( const std::map & m )" +This operation costs O(1) time because TQMap is implicitly shared. This makes returning a TQMap from a function very fast. If a shared instance is modified, it will be copied (copy-on-write), and this takes O(n) time. +.SH "TQMap::TQMap ( const std::map & m )" Constructs a copy of \fIm\fR. -.SH "QMap::~QMap ()" -Destroys the map. References to the values in the map and all iterators of this map become invalidated. Since QMap is highly tuned for performance you won't see warnings if you use invalid iterators, because it is not possible for an iterator to check whether it is valid or not. -.SH "iterator QMap::begin ()" +.SH "TQMap::~TQMap ()" +Destroys the map. References to the values in the map and all iterators of this map become invalidated. Since TQMap is highly tuned for performance you won't see warnings if you use invalid iterators, because it is not possible for an iterator to check whether it is valid or not. +.SH "iterator TQMap::begin ()" Returns an iterator pointing to the first element in the map. This iterator equals end() if the map is empty. .PP The items in the map are traversed in the order defined by operator<(Key, Key). .PP -See also end() and QMapIterator. -.SH "const_iterator QMap::begin () const" +See also end() and TQMapIterator. +.SH "const_iterator TQMap::begin () const" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP -See also end() and QMapConstIterator. -.SH "void QMap::clear ()" +See also end() and TQMapConstIterator. +.SH "void TQMap::clear ()" Removes all items from the map. .PP See also remove(). -.SH "const_iterator QMap::constBegin () const" +.SH "const_iterator TQMap::constBegin () const" Returns an iterator pointing to the first element in the map. This iterator equals end() if the map is empty. .PP The items in the map are traversed in the order defined by operator<(Key, Key). .PP -See also constEnd() and QMapConstIterator. -.SH "const_iterator QMap::constEnd () const" +See also constEnd() and TQMapConstIterator. +.SH "const_iterator TQMap::constEnd () const" The iterator returned by end() points to the element which is one past the last element in the container. The past-the-end iterator is still associated with the map it belongs to, but it is \fInot\fR dereferenceable; operator*() will not return a well-defined value. .PP This iterator equals constBegin() if the map is empty. .PP -See also constBegin() and QMapConstIterator. -.SH "bool QMap::contains ( const Key & k ) const" +See also constBegin() and TQMapConstIterator. +.SH "bool TQMap::contains ( const Key & k ) const" Returns TRUE if the map contains an item with key \fIk\fR; otherwise returns FALSE. -.SH "size_type QMap::count ( const key_type & k ) const" -Returns the number of items whose key is \fIk\fR. Since QMap does not allow duplicate keys, the return value is always 0 or 1. +.SH "size_type TQMap::count ( const key_type & k ) const" +Returns the number of items whose key is \fIk\fR. Since TQMap does not allow duplicate keys, the return value is always 0 or 1. .PP This function is provided for STL compatibility. -.SH "size_type QMap::count () const" +.SH "size_type TQMap::count () const" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP Returns the number of items in the map. .PP See also isEmpty(). -.SH "void QMap::detach ()\fC [protected]\fR" -If the map does not share its data with another QMap instance, nothing happens; otherwise the function creates a new copy of this map and detaches from the shared one. This function is called whenever the map is modified. The implicit sharing mechanism is implemented this way. -.SH "bool QMap::empty () const" +.SH "void TQMap::detach ()\fC [protected]\fR" +If the map does not share its data with another TQMap instance, nothing happens; otherwise the function creates a new copy of this map and detaches from the shared one. This function is called whenever the map is modified. The implicit sharing mechanism is implemented this way. +.SH "bool TQMap::empty () const" Returns TRUE if the map contains no items; otherwise returns FALSE. .PP This function is provided for STL compatibility. It is equivalent to isEmpty(). .PP See also size(). -.SH "iterator QMap::end ()" +.SH "iterator TQMap::end ()" The iterator returned by end() points to the element which is one past the last element in the container. The past-the-end iterator is still associated with the map it belongs to, but it is \fInot\fR dereferenceable; operator*() will not return a well-defined value. .PP This iterator equals begin() if the map is empty. .PP -See also begin() and QMapIterator. -.SH "const_iterator QMap::end () const" +See also begin() and TQMapIterator. +.SH "const_iterator TQMap::end () const" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -.SH "void QMap::erase ( iterator it )" +.SH "void TQMap::erase ( iterator it )" Removes the item associated with the iterator \fIit\fR from the map. .PP This function is provided for STL compatibility. It is equivalent to remove(). .PP See also clear(). -.SH "void QMap::erase ( const key_type & k )" +.SH "void TQMap::erase ( const key_type & k )" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP Removes the item with the key \fIk\fR from the map. -.SH "iterator QMap::find ( const Key & k )" +.SH "iterator TQMap::find ( const Key & k )" Returns an iterator pointing to the element with key \fIk\fR in the map. .PP Returns end() if no key matched. .PP -See also QMapIterator. -.SH "const_iterator QMap::find ( const Key & k ) const" +See also TQMapIterator. +.SH "const_iterator TQMap::find ( const Key & k ) const" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP Returns an iterator pointing to the element with key \fIk\fR in the map. .PP Returns end() if no key matched. .PP -See also QMapConstIterator. -.SH "iterator QMap::insert ( const Key & key, const T & value, bool overwrite = TRUE )" +See also TQMapConstIterator. +.SH "iterator TQMap::insert ( const Key & key, const T & value, bool overwrite = TRUE )" Inserts a new item with the key, \fIkey\fR, and a value of \fIvalue\fR. If there is already an item whose key is \fIkey\fR, that item's value is replaced with \fIvalue\fR, unless \fIoverwrite\fR is FALSE (it is TRUE by default). In this case an iterator to this item is returned, else an iterator to the new item is returned. -.SH "TQPair QMap::insert ( const value_type & x )" +.SH "TQPair TQMap::insert ( const value_type & x )" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP Inserts the (key, value) pair \fIx\fR into the map. \fIx\fR is a TQPair whose \fCfirst\fR element is a key to be inserted and whose \fCsecond\fR element is the associated value to be inserted. Returns a pair whose \fCfirst\fR element is an iterator pointing to the inserted item and whose \fCsecond\fR element is a bool indicating TRUE if \fIx\fR was inserted and FALSE if it was not inserted, e.g. because it was already present. .PP See also replace(). -.SH "bool QMap::isEmpty () const" +.SH "bool TQMap::isEmpty () const" Returns TRUE if the map contains no items; otherwise returns FALSE. .PP See also count(). -.SH "QValueList QMap::keys () const" +.SH "TQValueList TQMap::keys () const" Returns a list of all the keys in the map, in order. -.SH "QMap & QMap::operator= ( const QMap & m )" +.SH "TQMap & TQMap::operator= ( const TQMap & m )" Assigns \fIm\fR to this map and returns a reference to this map. .PP -All iterators of the current map become invalidated by this operation. The cost of such an assignment is O(1), because QMap is implicitly shared. -.SH "QMap & QMap::operator= ( const std::map & m )" +All iterators of the current map become invalidated by this operation. The cost of such an assignment is O(1), because TQMap is implicitly shared. +.SH "TQMap & TQMap::operator= ( const std::map & m )" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP Assigns \fIm\fR to this map and returns a reference to this map. .PP All iterators of the current map become invalidated by this operation. -.SH "T & QMap::operator[] ( const Key & k )" +.SH "T & TQMap::operator[] ( const Key & k )" Returns the value associated with the key \fIk\fR. If no such key is present, an empty item is inserted with this key and a reference to the empty item is returned. .PP You can use this operator both for reading and writing: .PP .nf .br - QMap map; + TQMap map; .br map["Clinton"] = "Bill"; .br stream << map["Clinton"]; .br .fi -.SH "const T & QMap::operator[] ( const Key & k ) const" +.SH "const T & TQMap::operator[] ( const Key & k ) const" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP \fBWarning:\fR This function differs from the non-const version of the same function. It will \fInot\fR insert an empty value if the key \fIk\fR does not exist. This may lead to logic errors in your program. You should check if the element exists before calling this function. .PP Returns the value associated with the key \fIk\fR. If no such key is present, a reference to an empty item is returned. -.SH "void QMap::remove ( iterator it )" +.SH "void TQMap::remove ( iterator it )" Removes the item associated with the iterator \fIit\fR from the map. .PP See also clear(). -.SH "void QMap::remove ( const Key & k )" +.SH "void TQMap::remove ( const Key & k )" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP Removes the item with the key \fIk\fR from the map. -.SH "iterator QMap::replace ( const Key & k, const T & v )" +.SH "iterator TQMap::replace ( const Key & k, const T & v )" Replaces the value of the element with key \fIk\fR, with the value \fIv\fR. .PP See also insert() and remove(). -.SH "size_type QMap::size () const" +.SH "size_type TQMap::size () const" Returns the number of items in the map. .PP This function is provided for STL compatibility. It is equivalent to count(). .PP See also empty(). -.SH "QValueList QMap::values () const" +.SH "TQValueList TQMap::values () const" Returns a list of all the values in the map, in key order. .SH RELATED FUNCTION DOCUMENTATION -.SH "QDataStream & operator<< ( QDataStream & s, const QMap & m )" +.SH "QDataStream & operator<< ( QDataStream & s, const TQMap & m )" Writes the map \fIm\fR to the stream \fIs\fR. The types \fIKey\fR and \fIT\fR must implement the streaming operator as well. -.SH "QDataStream & operator>> ( QDataStream & s, QMap & m )" +.SH "QDataStream & operator>> ( QDataStream & s, TQMap & m )" Reads the map \fIm\fR from the stream \fIs\fR. The types \fIKey\fR and \fIT\fR must implement the streaming operator as well. .SH "SEE ALSO" -.BR http://doc.trolltech.com/ntqmap.html +.BR http://doc.trolltech.com/tqmap.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/tqmapconstiterator.3qt b/doc/man/man3/tqmapconstiterator.3qt index 5d204c7cf..49596eba2 100644 --- a/doc/man/man3/tqmapconstiterator.3qt +++ b/doc/man/man3/tqmapconstiterator.3qt @@ -1,5 +1,5 @@ '\" t -.TH QMapConstIterator 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- +.TH TQMapConstIterator 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,9 +7,9 @@ .ad l .nh .SH NAME -QMapConstIterator \- Iterator for QMap +TQMapConstIterator \- Iterator for TQMap .SH SYNOPSIS -\fC#include \fR +\fC#include \fR .PP .SS "Public Members" .in +1c @@ -26,22 +26,22 @@ QMapConstIterator \- Iterator for QMap .BI "typedef const T & \fBreference\fR" .br .ti -1c -.BI "\fBQMapConstIterator\fR ()" +.BI "\fBTQMapConstIterator\fR ()" .br .ti -1c -.BI "\fBQMapConstIterator\fR ( QMapNode * p )" +.BI "\fBTQMapConstIterator\fR ( TQMapNode * p )" .br .ti -1c -.BI "\fBQMapConstIterator\fR ( const QMapConstIterator & it )" +.BI "\fBTQMapConstIterator\fR ( const TQMapConstIterator & it )" .br .ti -1c -.BI "\fBQMapConstIterator\fR ( const QMapIterator & it )" +.BI "\fBTQMapConstIterator\fR ( const TQMapIterator & it )" .br .ti -1c -.BI "bool \fBoperator==\fR ( const QMapConstIterator & it ) const" +.BI "bool \fBoperator==\fR ( const TQMapConstIterator & it ) const" .br .ti -1c -.BI "bool \fBoperator!=\fR ( const QMapConstIterator & it ) const" +.BI "bool \fBoperator!=\fR ( const TQMapConstIterator & it ) const" .br .ti -1c .BI "const T & \fBoperator*\fR () const" @@ -53,70 +53,70 @@ QMapConstIterator \- Iterator for QMap .BI "const T & \fBdata\fR () const" .br .ti -1c -.BI "QMapConstIterator & \fBoperator++\fR ()" +.BI "TQMapConstIterator & \fBoperator++\fR ()" .br .ti -1c -.BI "QMapConstIterator \fBoperator++\fR ( int )" +.BI "TQMapConstIterator \fBoperator++\fR ( int )" .br .ti -1c -.BI "QMapConstIterator & \fBoperator--\fR ()" +.BI "TQMapConstIterator & \fBoperator--\fR ()" .br .ti -1c -.BI "QMapConstIterator \fBoperator--\fR ( int )" +.BI "TQMapConstIterator \fBoperator--\fR ( int )" .br .in -1c .SH DESCRIPTION -The QMapConstIterator class provides an iterator for QMap. +The TQMapConstIterator class provides an iterator for TQMap. .PP -In contrast to QMapIterator, this class is used to iterate over a const map. It does not allow you to modify the values of the map because this would break the const semantics. +In contrast to TQMapIterator, this class is used to iterate over a const map. It does not allow you to modify the values of the map because this would break the const semantics. .PP -For more information on QMap iterators, see QMapIterator and the QMap example. +For more information on TQMap iterators, see TQMapIterator and the TQMap example. .PP -See also QMap, QMapIterator, TQt Template Library Classes, and Non-GUI Classes. +See also TQMap, TQMapIterator, TQt Template Library Classes, and Non-GUI Classes. .SS "Member Type Documentation" -.SH "QMapConstIterator::iterator_category" +.SH "TQMapConstIterator::iterator_category" The type of iterator category, \fCstd::bidirectional_iterator_tag\fR. -.SH "QMapConstIterator::pointer" +.SH "TQMapConstIterator::pointer" Const pointer to value_type. -.SH "QMapConstIterator::reference" +.SH "TQMapConstIterator::reference" Const reference to value_type. -.SH "QMapConstIterator::value_type" +.SH "TQMapConstIterator::value_type" The type of const value. .SH MEMBER FUNCTION DOCUMENTATION -.SH "QMapConstIterator::QMapConstIterator ()" +.SH "TQMapConstIterator::TQMapConstIterator ()" Constructs an uninitialized iterator. -.SH "QMapConstIterator::QMapConstIterator ( QMapNode * p )" +.SH "TQMapConstIterator::TQMapConstIterator ( TQMapNode * p )" Constructs an iterator starting at node \fIp\fR. -.SH "QMapConstIterator::QMapConstIterator ( const QMapConstIterator & it )" +.SH "TQMapConstIterator::TQMapConstIterator ( const TQMapConstIterator & it )" Constructs a copy of the iterator, \fIit\fR. -.SH "QMapConstIterator::QMapConstIterator ( const QMapIterator & it )" +.SH "TQMapConstIterator::TQMapConstIterator ( const TQMapIterator & it )" Constructs a copy of the iterator, \fIit\fR. -.SH "const T & QMapConstIterator::data () const" +.SH "const T & TQMapConstIterator::data () const" Returns a const reference to the current item's data. -.SH "const K & QMapConstIterator::key () const" +.SH "const K & TQMapConstIterator::key () const" Returns a const reference to the current item's key. -.SH "bool QMapConstIterator::operator!= ( const QMapConstIterator & it ) const" +.SH "bool TQMapConstIterator::operator!= ( const TQMapConstIterator & it ) const" Compares the iterator to the \fIit\fR iterator and returns FALSE if they point to the same item; otherwise returns TRUE. -.SH "const T & QMapConstIterator::operator* () const" +.SH "const T & TQMapConstIterator::operator* () const" Dereference operator. Returns a const reference to the current item's data. The same as data(). -.SH "QMapConstIterator & QMapConstIterator::operator++ ()" +.SH "TQMapConstIterator & TQMapConstIterator::operator++ ()" Prefix ++ makes the succeeding item current and returns an iterator pointing to the new current item. The iterator cannot check whether it reached the end of the map. Incrementing the iterator returned by end() causes undefined results. -.SH "QMapConstIterator QMapConstIterator::operator++ ( int )" +.SH "TQMapConstIterator TQMapConstIterator::operator++ ( int )" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP Postfix ++ makes the succeeding item current and returns an iterator pointing to the new current item. The iterator cannot check whether it reached the end of the map. Incrementing the iterator returned by end() causes undefined results. -.SH "QMapConstIterator & QMapConstIterator::operator-- ()" +.SH "TQMapConstIterator & TQMapConstIterator::operator-- ()" Prefix -- makes the previous item current and returns an iterator pointing to the new current item. The iterator cannot check whether it reached the beginning of the map. Decrementing the iterator returned by begin() causes undefined results. -.SH "QMapConstIterator QMapConstIterator::operator-- ( int )" +.SH "TQMapConstIterator TQMapConstIterator::operator-- ( int )" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP Postfix -- makes the previous item current and returns an iterator pointing to the new current item. The iterator cannot check whether it reached the beginning of the map. Decrementing the iterator returned by begin() causes undefined results. -.SH "bool QMapConstIterator::operator== ( const QMapConstIterator & it ) const" +.SH "bool TQMapConstIterator::operator== ( const TQMapConstIterator & it ) const" Compares the iterator to the \fIit\fR iterator and returns TRUE if they point to the same item; otherwise returns FALSE. .SH "SEE ALSO" -.BR http://doc.trolltech.com/qmapconstiterator.html +.BR http://doc.trolltech.com/tqmapconstiterator.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/tqmapiterator.3qt b/doc/man/man3/tqmapiterator.3qt index 0b3d6dfe6..fe3f39cd3 100644 --- a/doc/man/man3/tqmapiterator.3qt +++ b/doc/man/man3/tqmapiterator.3qt @@ -1,5 +1,5 @@ '\" t -.TH QMapIterator 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- +.TH TQMapIterator 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,9 +7,9 @@ .ad l .nh .SH NAME -QMapIterator \- Iterator for QMap +TQMapIterator \- Iterator for TQMap .SH SYNOPSIS -\fC#include \fR +\fC#include \fR .PP .SS "Public Members" .in +1c @@ -26,19 +26,19 @@ QMapIterator \- Iterator for QMap .BI "typedef T & \fBreference\fR" .br .ti -1c -.BI "\fBQMapIterator\fR ()" +.BI "\fBTQMapIterator\fR ()" .br .ti -1c -.BI "\fBQMapIterator\fR ( QMapNode * p )" +.BI "\fBTQMapIterator\fR ( TQMapNode * p )" .br .ti -1c -.BI "\fBQMapIterator\fR ( const QMapIterator & it )" +.BI "\fBTQMapIterator\fR ( const TQMapIterator & it )" .br .ti -1c -.BI "bool \fBoperator==\fR ( const QMapIterator & it ) const" +.BI "bool \fBoperator==\fR ( const TQMapIterator & it ) const" .br .ti -1c -.BI "bool \fBoperator!=\fR ( const QMapIterator & it ) const" +.BI "bool \fBoperator!=\fR ( const TQMapIterator & it ) const" .br .ti -1c .BI "T & \fBoperator*\fR ()" @@ -56,78 +56,78 @@ QMapIterator \- Iterator for QMap .BI "const T & \fBdata\fR () const" .br .ti -1c -.BI "QMapIterator & \fBoperator++\fR ()" +.BI "TQMapIterator & \fBoperator++\fR ()" .br .ti -1c -.BI "QMapIterator \fBoperator++\fR ( int )" +.BI "TQMapIterator \fBoperator++\fR ( int )" .br .ti -1c -.BI "QMapIterator & \fBoperator--\fR ()" +.BI "TQMapIterator & \fBoperator--\fR ()" .br .ti -1c -.BI "QMapIterator \fBoperator--\fR ( int )" +.BI "TQMapIterator \fBoperator--\fR ( int )" .br .in -1c .SH DESCRIPTION -The QMapIterator class provides an iterator for QMap. +The TQMapIterator class provides an iterator for TQMap. .PP -You cannot create an iterator by yourself. Instead, you must ask a map to give you one. An iterator is as big as a pointer; on 32-bit machines that means 4 bytes, on 64-bit machines, 8 bytes. That makes copying iterators very fast. Iterators behave in a similar way to pointers, and they are almost as fast as pointers. See the QMap example. +You cannot create an iterator by yourself. Instead, you must ask a map to give you one. An iterator is as big as a pointer; on 32-bit machines that means 4 bytes, on 64-bit machines, 8 bytes. That makes copying iterators very fast. Iterators behave in a similar way to pointers, and they are almost as fast as pointers. See the TQMap example. .PP -QMap is highly optimized for performance and memory usage, but the trade-off is that you must be more careful. The only way to traverse a map is to use iterators. QMap does not know about its iterators, and the iterators don't even know to which map they belong. That makes things fast but a bit dangerous because it is up to you to make sure that the iterators you are using are still valid. QDictIterator will be able to give warnings, whereas QMapIterator may end up in an undefined state. +TQMap is highly optimized for performance and memory usage, but the trade-off is that you must be more careful. The only way to traverse a map is to use iterators. TQMap does not know about its iterators, and the iterators don't even know to which map they belong. That makes things fast but a bit dangerous because it is up to you to make sure that the iterators you are using are still valid. QDictIterator will be able to give warnings, whereas TQMapIterator may end up in an undefined state. .PP -For every Iterator there is also a ConstIterator. You must use the ConstIterator to access a QMap in a const environment or if the reference or pointer to the map is itself const. Its semantics are the same, but it only returns const references to the item it points to. +For every Iterator there is also a ConstIterator. You must use the ConstIterator to access a TQMap in a const environment or if the reference or pointer to the map is itself const. Its semantics are the same, but it only returns const references to the item it points to. .PP -See also QMap, QMapConstIterator, TQt Template Library Classes, and Non-GUI Classes. +See also TQMap, TQMapConstIterator, TQt Template Library Classes, and Non-GUI Classes. .SS "Member Type Documentation" -.SH "QMapIterator::iterator_category" +.SH "TQMapIterator::iterator_category" The type of iterator category, \fCstd::bidirectional_iterator_tag\fR. -.SH "QMapIterator::pointer" +.SH "TQMapIterator::pointer" Pointer to value_type. -.SH "QMapIterator::reference" +.SH "TQMapIterator::reference" Reference to value_type. -.SH "QMapIterator::value_type" +.SH "TQMapIterator::value_type" The type of value. .SH MEMBER FUNCTION DOCUMENTATION -.SH "QMapIterator::QMapIterator ()" +.SH "TQMapIterator::TQMapIterator ()" Creates an uninitialized iterator. -.SH "QMapIterator::QMapIterator ( QMapNode * p )" +.SH "TQMapIterator::TQMapIterator ( TQMapNode * p )" Constructs an iterator starting at node \fIp\fR. -.SH "QMapIterator::QMapIterator ( const QMapIterator & it )" +.SH "TQMapIterator::TQMapIterator ( const TQMapIterator & it )" Constructs a copy of the iterator, \fIit\fR. -.SH "T & QMapIterator::data ()" +.SH "T & TQMapIterator::data ()" Returns a reference to the current item's data. -.SH "const T & QMapIterator::data () const" +.SH "const T & TQMapIterator::data () const" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP Returns a const reference to the current item's data. -.SH "const K & QMapIterator::key () const" +.SH "const K & TQMapIterator::key () const" Returns a const reference to the current item's key. -.SH "bool QMapIterator::operator!= ( const QMapIterator & it ) const" +.SH "bool TQMapIterator::operator!= ( const TQMapIterator & it ) const" Compares the iterator to the \fIit\fR iterator and returns FALSE if they point to the same item; otherwise returns TRUE. -.SH "T & QMapIterator::operator* ()" +.SH "T & TQMapIterator::operator* ()" Dereference operator. Returns a reference to the current item's data. The same as data(). -.SH "const T & QMapIterator::operator* () const" +.SH "const T & TQMapIterator::operator* () const" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP Dereference operator. Returns a const reference to the current item's data. The same as data(). -.SH "QMapIterator & QMapIterator::operator++ ()" +.SH "TQMapIterator & TQMapIterator::operator++ ()" Prefix ++ makes the succeeding item current and returns an iterator pointing to the new current item. The iterator cannot check whether it reached the end of the map. Incrementing the iterator returned by end() causes undefined results. -.SH "QMapIterator QMapIterator::operator++ ( int )" +.SH "TQMapIterator TQMapIterator::operator++ ( int )" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP Postfix ++ makes the succeeding item current and returns an iterator pointing to the new current item. The iterator cannot check whether it reached the end of the map. Incrementing the iterator returned by end() causes undefined results. -.SH "QMapIterator & QMapIterator::operator-- ()" +.SH "TQMapIterator & TQMapIterator::operator-- ()" Prefix -- makes the previous item current and returns an iterator pointing to the new current item. The iterator cannot check whether it reached the beginning of the map. Decrementing the iterator returned by begin() causes undefined results. -.SH "QMapIterator QMapIterator::operator-- ( int )" +.SH "TQMapIterator TQMapIterator::operator-- ( int )" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP Postfix -- makes the previous item current and returns an iterator pointing to the new current item. The iterator cannot check whether it reached the beginning of the map. Decrementing the iterator returned by begin() causes undefined results. -.SH "bool QMapIterator::operator== ( const QMapIterator & it ) const" +.SH "bool TQMapIterator::operator== ( const TQMapIterator & it ) const" Compares the iterator to the \fIit\fR iterator and returns TRUE if they point to the same item; otherwise returns FALSE. .SH "SEE ALSO" -.BR http://doc.trolltech.com/qmapiterator.html +.BR http://doc.trolltech.com/tqmapiterator.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/tqmemarray.3qt b/doc/man/man3/tqmemarray.3qt index 7a5a42eb5..207ef97f9 100644 --- a/doc/man/man3/tqmemarray.3qt +++ b/doc/man/man3/tqmemarray.3qt @@ -163,7 +163,7 @@ QMemArray uses explicit sharing with a reference count. If more than one array s .PP The benefit of sharing is that a program does not need to duplicate data when it is not required, which results in lower memory use and less copying of data. .PP -An alternative to QMemArray is QValueVector. The QValueVector class also provides an array of objects, but can deal with objects that have constructors (specifically a copy constructor and a default constructor). QValueVector provides an STL-compatible syntax and is implicitly shared. +An alternative to QMemArray is TQValueVector. The TQValueVector class also provides an array of objects, but can deal with objects that have constructors (specifically a copy constructor and a default constructor). TQValueVector provides an STL-compatible syntax and is implicitly shared. .PP Example: .PP @@ -329,11 +329,11 @@ This can be used to both read and set an element. .PP See also operator[](). .SH "Iterator QMemArray::begin ()" -Returns an iterator pointing at the beginning of this array. This iterator can be used in the same way as the iterators of QValueList and QMap, for example. +Returns an iterator pointing at the beginning of this array. This iterator can be used in the same way as the iterators of TQValueList and TQMap, for example. .SH "ConstIterator QMemArray::begin () const" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP -Returns a const iterator pointing at the beginning of this array. This iterator can be used in the same way as the iterators of QValueList and QMap, for example. +Returns a const iterator pointing at the beginning of this array. This iterator can be used in the same way as the iterators of TQValueList and TQMap, for example. .SH "int QMemArray::bsearch ( const type & v ) const" In a sorted array (as sorted by sort()), finds the first occurrence of \fIv\fR by using a binary search. For a sorted array this is generally much faster than find(), which does a linear search. .PP @@ -382,11 +382,11 @@ Deep copy. Dereferences the current array and obtains a copy of the array data \ .PP See also copy(). .SH "Iterator QMemArray::end ()" -Returns an iterator pointing behind the last element of this array. This iterator can be used in the same way as the iterators of QValueList and QMap, for example. +Returns an iterator pointing behind the last element of this array. This iterator can be used in the same way as the iterators of TQValueList and TQMap, for example. .SH "ConstIterator QMemArray::end () const" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP -Returns a const iterator pointing behind the last element of this array. This iterator can be used in the same way as the iterators of QValueList and QMap, for example. +Returns a const iterator pointing behind the last element of this array. This iterator can be used in the same way as the iterators of TQValueList and TQMap, for example. .SH "bool QMemArray::fill ( const type & v, int size = -1 )" Fills the array with the value \fIv\fR. If \fIsize\fR is specified as different from -1, then the array will be resized before being filled. .PP diff --git a/doc/man/man3/tqnetworkprotocol.3qt b/doc/man/man3/tqnetworkprotocol.3qt index 5960ccbe4..d3e58000c 100644 --- a/doc/man/man3/tqnetworkprotocol.3qt +++ b/doc/man/man3/tqnetworkprotocol.3qt @@ -78,7 +78,7 @@ Inherited by QFtp, QHttp, and QLocalFs. .BI "void \fBstart\fR ( QNetworkOperation * op )" .br .ti -1c -.BI "void \fBnewChildren\fR ( const QValueList & i, QNetworkOperation * op )" +.BI "void \fBnewChildren\fR ( const TQValueList & i, QNetworkOperation * op )" .br .ti -1c .BI "void \fBnewChild\fR ( const QUrlInfo & i, QNetworkOperation * op )" @@ -276,7 +276,7 @@ When a protocol emits this signal, QNetworkProtocol is smart enough to let the Q This signal is emitted if a new child (file) has been read. QNetworkProtocol automatically connects it to a slot which creates a list of QUrlInfo objects (with just one QUrlInfo \fIi\fR) and emits the newChildren() signal with this list. \fIop\fR is the pointer to the operation object which contains all the information about the operation that has finished, including the state, etc. .PP This is just a convenience signal useful for implementing your own network protocol. In all other cases connect to the newChildren() signal with its list of QUrlInfo objects. -.SH "void QNetworkProtocol::newChildren ( const QValueList & i, QNetworkOperation * op )\fC [signal]\fR" +.SH "void QNetworkProtocol::newChildren ( const TQValueList & i, QNetworkOperation * op )\fC [signal]\fR" This signal is emitted after listChildren() was called and new children (files) have been read from the list of files. \fIi\fR holds the information about the new children. \fIop\fR is the pointer to the operation object which contains all the information about the operation, including the state, etc. .PP When a protocol emits this signal, QNetworkProtocol is smart enough to let the QUrlOperator, which is used by the network protocol, emit its corresponding signal. diff --git a/doc/man/man3/tqpair.3qt b/doc/man/man3/tqpair.3qt index 88e7ba520..00f83cdbf 100644 --- a/doc/man/man3/tqpair.3qt +++ b/doc/man/man3/tqpair.3qt @@ -9,7 +9,7 @@ .SH NAME TQPair \- Value-based template class that provides a pair of elements .SH SYNOPSIS -\fC#include \fR +\fC#include \fR .PP .SS "Public Members" .in +1c @@ -20,10 +20,10 @@ TQPair \- Value-based template class that provides a pair of elements .BI "typedef T2 \fBsecond_type\fR" .br .ti -1c -.BI "\fBQPair\fR ()" +.BI "\fBTQPair\fR ()" .br .ti -1c -.BI "\fBQPair\fR ( const T1 & t1, const T2 & t2 )" +.BI "\fBTQPair\fR ( const T1 & t1, const T2 & t2 )" .br .ti -1c .BI "TQPair & \fBoperator=\fR ( const TQPair & other )" @@ -75,7 +75,7 @@ This is a template convenience function. It is used to create a TQPair<> object that contains \fIt1\fR and \fIt2\fR. .SH "SEE ALSO" -.BR http://doc.trolltech.com/ntqpair.html +.BR http://doc.trolltech.com/tqpair.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/tqptrcollection.3qt b/doc/man/man3/tqptrcollection.3qt index 265af59c1..101c81cb3 100644 --- a/doc/man/man3/tqptrcollection.3qt +++ b/doc/man/man3/tqptrcollection.3qt @@ -54,7 +54,7 @@ Inherited by QAsciiCache, QAsciiDict, QCache, QDict, QIntCache, QIntDict, QPtrLi .SH DESCRIPTION The QPtrCollection class is the base class of most pointer-based TQt collections. .PP -The QPtrCollection class is an abstract base class for the TQt collection classes QDict, QPtrList, etc. TQt also includes value based collections, e.g. QValueList, QMap, etc. +The QPtrCollection class is an abstract base class for the TQt collection classes QDict, QPtrList, etc. TQt also includes value based collections, e.g. TQValueList, TQMap, etc. .PP A QPtrCollection only knows about the number of objects in the collection and the deletion strategy (see setAutoDelete()). .PP diff --git a/doc/man/man3/tqptrlist.3qt b/doc/man/man3/tqptrlist.3qt index eb3dbdc7b..2b40eccc6 100644 --- a/doc/man/man3/tqptrlist.3qt +++ b/doc/man/man3/tqptrlist.3qt @@ -168,7 +168,7 @@ Inherited by TQObjectList and QStrList. .SH DESCRIPTION The QPtrList class is a template class that provides a list. .PP -QValueList is an STL-compatible alternative to this class. +TQValueList is an STL-compatible alternative to this class. .PP Define a template instance QPtrList to create a list that operates on pointers to X (X*). .PP diff --git a/doc/man/man3/tqptrqueue.3qt b/doc/man/man3/tqptrqueue.3qt index 7dc08ccf3..98c8e0e93 100644 --- a/doc/man/man3/tqptrqueue.3qt +++ b/doc/man/man3/tqptrqueue.3qt @@ -71,7 +71,7 @@ QPtrQueue \- Template class that provides a queue .SH DESCRIPTION The QPtrQueue class is a template class that provides a queue. .PP -QValueVector can be used as an STL-compatible alternative to this class. +TQValueVector can be used as an STL-compatible alternative to this class. .PP A template instance QPtrQueue is a queue that operates on pointers to X (X*). .PP diff --git a/doc/man/man3/tqptrstack.3qt b/doc/man/man3/tqptrstack.3qt index 8964b2c82..e6607756a 100644 --- a/doc/man/man3/tqptrstack.3qt +++ b/doc/man/man3/tqptrstack.3qt @@ -71,7 +71,7 @@ QPtrStack \- Template class that provides a stack .SH DESCRIPTION The QPtrStack class is a template class that provides a stack. .PP -QValueStack is an STL-compatible alternative to this class. +TQValueStack is an STL-compatible alternative to this class. .PP Define a template instance QPtrStack to create a stack that operates on pointers to X, (X*). .PP diff --git a/doc/man/man3/tqptrvector.3qt b/doc/man/man3/tqptrvector.3qt index a2f364211..e2aaeede6 100644 --- a/doc/man/man3/tqptrvector.3qt +++ b/doc/man/man3/tqptrvector.3qt @@ -115,7 +115,7 @@ Inherits QPtrCollection. .SH DESCRIPTION The QPtrVector class is a template collection class that provides a vector (array). .PP -QValueVector is an STL-compatible alternative to this class. +TQValueVector is an STL-compatible alternative to this class. .PP QPtrVector is implemented as a template class. Defines a template instance QPtrVector to create a vector that contains pointers to X (X*). .PP diff --git a/doc/man/man3/tqsplitter.3qt b/doc/man/man3/tqsplitter.3qt index 7f73a1dcf..59ab39e3a 100644 --- a/doc/man/man3/tqsplitter.3qt +++ b/doc/man/man3/tqsplitter.3qt @@ -61,10 +61,10 @@ Inherits QFrame. .BI "void \fBrefresh\fR ()" .br .ti -1c -.BI "QValueList \fBsizes\fR () const" +.BI "TQValueList \fBsizes\fR () const" .br .ti -1c -.BI "void \fBsetSizes\fR ( QValueList list )" +.BI "void \fBsetSizes\fR ( TQValueList list )" .br .ti -1c .BI "int \fBhandleWidth\fR () const" @@ -239,7 +239,7 @@ Examples: .)l fileiconview/mainwindow.cpp, listviews/listviews.cpp, and splitter/splitter.cpp. .SH "void QSplitter::setRubberband ( int p )\fC [virtual protected]\fR" Displays a rubber band at position \fIp\fR. If \fIp\fR is negative, the rubber band is removed. -.SH "void QSplitter::setSizes ( QValueList list )" +.SH "void QSplitter::setSizes ( TQValueList list )" Sets the size parameters to the values given in the \fIlist\fR. If the splitter is horizontal, the values set the widths of each widget going from left to right. If the splitter is vertical, the values set the heights of each widget going from top to bottom. Extra values in the \fIlist\fR are ignored. .PP If \fIlist\fR contains too few values, the result is undefined but the program will still be well-behaved. @@ -247,7 +247,7 @@ If \fIlist\fR contains too few values, the result is undefined but the program w Note that the values in \fIlist\fR should be the height/width that the widgets should be resized to. .PP See also sizes(). -.SH "QValueList QSplitter::sizes () const" +.SH "TQValueList QSplitter::sizes () const" Returns a list of the size parameters of all the widgets in this splitter. .PP If the splitter's orientation is horizontal, the list is a list of widget widths; if the orientation is vertical, the list is a list of widget heights. @@ -258,9 +258,9 @@ Note that if you want to iterate over the list, you should iterate over a copy, .PP .nf .br - QValueList list = mySplitter.sizes(); + TQValueList list = mySplitter.sizes(); .br - QValueList::Iterator it = list.begin(); + TQValueList::Iterator it = list.begin(); .br while( it != list.end() ) { .br diff --git a/doc/man/man3/tqsqlquery.3qt b/doc/man/man3/tqsqlquery.3qt index d77a24120..731c8243a 100644 --- a/doc/man/man3/tqsqlquery.3qt +++ b/doc/man/man3/tqsqlquery.3qt @@ -124,7 +124,7 @@ Inherited by TQSqlCursor. .BI "QVariant \fBboundValue\fR ( int pos ) const" .br .ti -1c -.BI "QMap \fBboundValues\fR () const" +.BI "TQMap \fBboundValues\fR () const" .br .ti -1c .BI "TQString \fBexecutedQuery\fR () const" @@ -339,7 +339,7 @@ Returns the value for the \fIplaceholder\fR. This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP Returns the value for the placeholder at position \fIpos\fR. -.SH "QMap TQSqlQuery::boundValues () const" +.SH "TQMap TQSqlQuery::boundValues () const" Returns a map of the bound values. .PP The bound values can be examined in the following way: @@ -352,9 +352,9 @@ The bound values can be examined in the following way: .br // Examine the bound values - bound using named binding .br - QMap::ConstIterator it; + TQMap::ConstIterator it; .br - QMap vals = query.boundValues(); + TQMap vals = query.boundValues(); .br for ( it = vals.begin(); it != vals.end(); ++it ) .br @@ -365,9 +365,9 @@ The bound values can be examined in the following way: .br // Examine the bound values - bound using positional binding .br - QValueList::ConstIterator it; + TQValueList::ConstIterator it; .br - QValueList list = query.boundValues().values(); + TQValueList list = query.boundValues().values(); .br int i = 0; .br diff --git a/doc/man/man3/tqsqlrecordinfo.3qt b/doc/man/man3/tqsqlrecordinfo.3qt index 78b21788d..78caa3fd6 100644 --- a/doc/man/man3/tqsqlrecordinfo.3qt +++ b/doc/man/man3/tqsqlrecordinfo.3qt @@ -35,9 +35,9 @@ TQSqlRecordInfo \- Encapsulates a set of database field meta data .SH DESCRIPTION The TQSqlRecordInfo class encapsulates a set of database field meta data. .PP -This class is a QValueList that holds a set of database field meta data. Use contains() to see if a given field name exists in the record, and use find() to get a TQSqlFieldInfo record for a named field. +This class is a TQValueList that holds a set of database field meta data. Use contains() to see if a given field name exists in the record, and use find() to get a TQSqlFieldInfo record for a named field. .PP -See also QValueList, TQSqlFieldInfo, and Database Classes. +See also TQValueList, TQSqlFieldInfo, and Database Classes. .SH MEMBER FUNCTION DOCUMENTATION .SH "TQSqlRecordInfo::TQSqlRecordInfo ()" Constructs an empty record info object diff --git a/doc/man/man3/tqstringlist.3qt b/doc/man/man3/tqstringlist.3qt index c1da5978d..891227c7a 100644 --- a/doc/man/man3/tqstringlist.3qt +++ b/doc/man/man3/tqstringlist.3qt @@ -13,7 +13,7 @@ All the functions in this class are reentrant when TQt is built with thread supp .PP \fC#include \fR .PP -Inherits QValueList. +Inherits TQValueList. .PP .SS "Public Members" .in +1c @@ -24,7 +24,7 @@ Inherits QValueList. .BI "\fBQStringList\fR ( const QStringList & l )" .br .ti -1c -.BI "\fBQStringList\fR ( const QValueList & l )" +.BI "\fBQStringList\fR ( const TQValueList & l )" .br .ti -1c .BI "\fBQStringList\fR ( const TQString & i )" @@ -69,7 +69,7 @@ Inherits QValueList. .SH DESCRIPTION The QStringList class provides a list of strings. .PP -It is used to store and manipulate strings that logically belong together. Essentially QStringList is a QValueList of TQString objects. Unlike QStrList, which stores pointers to characters, QStringList holds real TQString objects. It is the class of choice whenever you work with Unicode strings. QStringList is part of the TQt Template Library. +It is used to store and manipulate strings that logically belong together. Essentially QStringList is a TQValueList of TQString objects. Unlike QStrList, which stores pointers to characters, QStringList holds real TQString objects. It is the class of choice whenever you work with Unicode strings. QStringList is part of the TQt Template Library. .PP Like TQString itself, QStringList objects are implicitly shared, so passing them around as value-parameters is both fast and safe. .PP @@ -169,7 +169,7 @@ Creates an empty string list. .SH "QStringList::QStringList ( const QStringList & l )" Creates a copy of the list \fIl\fR. This function is very fast because QStringList is implicitly shared. In most situations this acts like a deep copy, for example, if this list or the original one or some other list referencing the same shared data is modified, the modifying list first makes a copy, i.e. copy-on-write. In a threaded environment you may require a real deep copy . -.SH "QStringList::QStringList ( const QValueList & l )" +.SH "QStringList::QStringList ( const TQValueList & l )" Constructs a new string list that is a copy of \fIl\fR. .SH "QStringList::QStringList ( const TQString & i )" Constructs a string list consisting of the single string \fIi\fR. Longer lists are easily created as follows: @@ -277,7 +277,7 @@ Sorts the list of strings in ascending case-sensitive order. .PP Sorting is very fast. It uses the TQt Template Library's efficient HeapSort implementation that has a time complexity of O(n*log n). .PP -If you want to sort your strings in an arbitrary order consider using a QMap. For example you could use a QMap to create a case-insensitive ordering (e.g. mapping the lowercase text to the text), or a QMap to sort the strings by some integer index, etc. +If you want to sort your strings in an arbitrary order consider using a TQMap. For example you could use a TQMap to create a case-insensitive ordering (e.g. mapping the lowercase text to the text), or a TQMap to sort the strings by some integer index, etc. .PP Example: themes/themes.cpp. .SH "QStringList QStringList::split ( const QRegExp & sep, const TQString & str, bool allowEmptyEntries = FALSE )\fC [static]\fR" diff --git a/doc/man/man3/tqstylesheet.3qt b/doc/man/man3/tqstylesheet.3qt index 2ec054934..19e069432 100644 --- a/doc/man/man3/tqstylesheet.3qt +++ b/doc/man/man3/tqstylesheet.3qt @@ -28,7 +28,7 @@ Inherits TQObject. .BI "const QStyleSheetItem * \fBitem\fR ( const TQString & name ) const" .br .ti -1c -.BI "virtual QTextCustomItem * \fBtag\fR ( const TQString & name, const QMap & attr, const TQString & context, const QMimeSourceFactory & factory, bool emptyTag, QTextDocument * doc ) const" +.BI "virtual QTextCustomItem * \fBtag\fR ( const TQString & name, const TQMap & attr, const TQString & context, const QMimeSourceFactory & factory, bool emptyTag, QTextDocument * doc ) const" .br .ti -1c .BI "virtual void \fBscaleFont\fR ( QFont & font, int logicalSize ) const" @@ -187,7 +187,7 @@ See also QStyleSheetItem::logicalFontSize(), QStyleSheetItem::logicalFontSizeSte Sets the application-wide default style sheet to \fIsheet\fR, deleting any style sheet previously set. The ownership is transferred to QStyleSheet. .PP See also defaultSheet(). -.SH "QTextCustomItem * QStyleSheet::tag ( const TQString & name, const QMap & attr, const TQString & context, const QMimeSourceFactory & factory, bool emptyTag, QTextDocument * doc ) const\fC [virtual]\fR" +.SH "QTextCustomItem * QStyleSheet::tag ( const TQString & name, const TQMap & attr, const TQString & context, const QMimeSourceFactory & factory, bool emptyTag, QTextDocument * doc ) const\fC [virtual]\fR" \fBThis function is under development and is subject to change.\fR .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. diff --git a/doc/man/man3/tqtextcodecplugin.3qt b/doc/man/man3/tqtextcodecplugin.3qt index 3cd95f8da..8226705cb 100644 --- a/doc/man/man3/tqtextcodecplugin.3qt +++ b/doc/man/man3/tqtextcodecplugin.3qt @@ -28,7 +28,7 @@ All the functions in this class are reentrant when TQt is built with thread supp .BI "virtual QTextCodec * \fBcreateForName\fR ( const TQString & name ) = 0" .br .ti -1c -.BI "virtual QValueList \fBmibEnums\fR () const = 0" +.BI "virtual TQValueList \fBmibEnums\fR () const = 0" .br .ti -1c .BI "virtual QTextCodec * \fBcreateForMib\fR ( int mib ) = 0" @@ -61,7 +61,7 @@ See also mibEnums(). Creates a QTextCodec object for the codec called \fIname\fR. .PP See also names(). -.SH "QValueList QTextCodecPlugin::mibEnums () const\fC [pure virtual]\fR" +.SH "TQValueList QTextCodecPlugin::mibEnums () const\fC [pure virtual]\fR" Returns the list of mib enums supported by this plugin. .PP See also createForMib(). diff --git a/doc/man/man3/tqtranslator.3qt b/doc/man/man3/tqtranslator.3qt index cc41b06f3..5a84db4ef 100644 --- a/doc/man/man3/tqtranslator.3qt +++ b/doc/man/man3/tqtranslator.3qt @@ -64,7 +64,7 @@ Inherits TQObject. .BI "void \fBunsqueeze\fR ()" .br .ti -1c -.BI "QValueList \fBmessages\fR () const" +.BI "TQValueList \fBmessages\fR () const" .br .ti -1c .BI "bool \fBisEmpty\fR () const" @@ -222,16 +222,16 @@ This is an overloaded member function, provided for convenience. It behaves esse Loads the .qm file data \fIdata\fR of length \fIlen\fR into the translator. Returns TRUE if the data is loaded successfully; otherwise returns FALSE. .PP The data is not copied. The caller must be able to guarantee that \fIdata\fR will not be deleted or modified. -.SH "QValueList QTranslator::messages () const" +.SH "TQValueList QTranslator::messages () const" Returns a list of the messages in the translator. This function is rather slow. Because it is seldom called, it's optimized for simplicity and small size, rather than speed. .PP If you want to iterate over the list, you should iterate over a copy, e.g. .PP .nf .br - QValueList list = myTranslator.messages(); + TQValueList list = myTranslator.messages(); .br - QValueList::Iterator it = list.begin(); + TQValueList::Iterator it = list.begin(); .br while ( it != list.end() ) { .br diff --git a/doc/man/man3/tqurloperator.3qt b/doc/man/man3/tqurloperator.3qt index 36c60f027..6e2f17b8a 100644 --- a/doc/man/man3/tqurloperator.3qt +++ b/doc/man/man3/tqurloperator.3qt @@ -73,7 +73,7 @@ Inherits TQObject and QUrl. .SS "Signals" .in +1c .ti -1c -.BI "void \fBnewChildren\fR ( const QValueList & i, QNetworkOperation * op )" +.BI "void \fBnewChildren\fR ( const TQValueList & i, QNetworkOperation * op )" .br .ti -1c .BI "void \fBfinished\fR ( QNetworkOperation * op )" @@ -281,7 +281,7 @@ The path of this QUrlOperator must to point to a directory (not a file) because Returns the name filter of the URL. .PP See also QUrlOperator::setNameFilter() and QDir::nameFilter(). -.SH "void QUrlOperator::newChildren ( const QValueList & i, QNetworkOperation * op )\fC [signal]\fR" +.SH "void QUrlOperator::newChildren ( const TQValueList & i, QNetworkOperation * op )\fC [signal]\fR" This signal is emitted after listChildren() was called and new children (i.e. files) have been read from a list of files. \fIi\fR holds the information about the new files. \fIop\fR is a pointer to the operation object which contains all the information about the operation, including the state. .PP See also QNetworkOperation and QNetworkProtocol. diff --git a/doc/man/man3/tqvaluelist.3qt b/doc/man/man3/tqvaluelist.3qt index a24de76fe..a01a41ce6 100644 --- a/doc/man/man3/tqvaluelist.3qt +++ b/doc/man/man3/tqvaluelist.3qt @@ -1,5 +1,5 @@ '\" t -.TH QValueList 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- +.TH TQValueList 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,21 +7,21 @@ .ad l .nh .SH NAME -QValueList \- Value-based template class that provides lists +TQValueList \- Value-based template class that provides lists .SH SYNOPSIS All the functions in this class are reentrant when TQt is built with thread support.

        .PP -\fC#include \fR +\fC#include \fR .PP -Inherited by TQCanvasItemList, QStringList, and QValueStack. +Inherited by TQCanvasItemList, QStringList, and TQValueStack. .PP .SS "Public Members" .in +1c .ti -1c -.BI "typedef QValueListIterator \fBiterator\fR" +.BI "typedef TQValueListIterator \fBiterator\fR" .br .ti -1c -.BI "typedef QValueListConstIterator \fBconst_iterator\fR" +.BI "typedef TQValueListConstIterator \fBconst_iterator\fR" .br .ti -1c .BI "typedef T \fBvalue_type\fR" @@ -42,31 +42,31 @@ Inherited by TQCanvasItemList, QStringList, and QValueStack. .BI "typedef size_t \fBsize_type\fR" .br .ti -1c -.BI "\fBQValueList\fR ()" +.BI "\fBTQValueList\fR ()" .br .ti -1c -.BI "\fBQValueList\fR ( const QValueList & l )" +.BI "\fBTQValueList\fR ( const TQValueList & l )" .br .ti -1c -.BI "\fBQValueList\fR ( const std::list & l )" +.BI "\fBTQValueList\fR ( const std::list & l )" .br .ti -1c -.BI "\fB~QValueList\fR ()" +.BI "\fB~TQValueList\fR ()" .br .ti -1c -.BI "QValueList & \fBoperator=\fR ( const QValueList & l )" +.BI "TQValueList & \fBoperator=\fR ( const TQValueList & l )" .br .ti -1c -.BI "QValueList & \fBoperator=\fR ( const std::list & l )" +.BI "TQValueList & \fBoperator=\fR ( const std::list & l )" .br .ti -1c .BI "bool \fBoperator==\fR ( const std::list & l ) const" .br .ti -1c -.BI "bool \fBoperator==\fR ( const QValueList & l ) const" +.BI "bool \fBoperator==\fR ( const TQValueList & l ) const" .br .ti -1c -.BI "bool \fBoperator!=\fR ( const QValueList & l ) const" +.BI "bool \fBoperator!=\fR ( const TQValueList & l ) const" .br .ti -1c .BI "iterator \fBbegin\fR ()" @@ -96,7 +96,7 @@ Inherited by TQCanvasItemList, QStringList, and QValueStack. .BI "void \fBclear\fR ()" .br .ti -1c -.BI "QValueList & \fBoperator<<\fR ( const T & x )" +.BI "TQValueList & \fBoperator<<\fR ( const T & x )" .br .ti -1c .BI "size_type \fBsize\fR () const" @@ -138,10 +138,10 @@ Inherited by TQCanvasItemList, QStringList, and QValueStack. .BI "void \fBinsert\fR ( iterator pos, size_type n, const T & x )" .br .ti -1c -.BI "QValueList \fBoperator+\fR ( const QValueList & l ) const" +.BI "TQValueList \fBoperator+\fR ( const TQValueList & l ) const" .br .ti -1c -.BI "QValueList & \fBoperator+=\fR ( const QValueList & l )" +.BI "TQValueList & \fBoperator+=\fR ( const TQValueList & l )" .br .ti -1c .BI "iterator \fBfromLast\fR ()" @@ -207,34 +207,34 @@ Inherited by TQCanvasItemList, QStringList, and QValueStack. .BI "size_type \fBcount\fR () const" .br .ti -1c -.BI "QValueList & \fBoperator+=\fR ( const T & x )" +.BI "TQValueList & \fBoperator+=\fR ( const T & x )" .br .ti -1c -.BI "typedef QValueListIterator \fBIterator\fR" +.BI "typedef TQValueListIterator \fBIterator\fR" .br .ti -1c -.BI "typedef QValueListConstIterator \fBConstIterator\fR" +.BI "typedef TQValueListConstIterator \fBConstIterator\fR" .br .in -1c .SH RELATED FUNCTION DOCUMENTATION .in +1c .ti -1c -.BI "QDataStream & \fBoperator>>\fR ( QDataStream & s, QValueList & l )" +.BI "QDataStream & \fBoperator>>\fR ( QDataStream & s, TQValueList & l )" .br .ti -1c -.BI "QDataStream & \fBoperator<<\fR ( QDataStream & s, const QValueList & l )" +.BI "QDataStream & \fBoperator<<\fR ( QDataStream & s, const TQValueList & l )" .br .in -1c .SH DESCRIPTION -The QValueList class is a value-based template class that provides lists. +The TQValueList class is a value-based template class that provides lists. .PP -QValueList is a TQt implementation of an STL-like list container. It can be used in your application if the standard \fClist\fR is not available for your target platform(s). QValueList is part of the TQt Template Library. +TQValueList is a TQt implementation of an STL-like list container. It can be used in your application if the standard \fClist\fR is not available for your target platform(s). TQValueList is part of the TQt Template Library. .PP -QValueList defines a template instance to create a list of values that all have the class T. Note that QValueList does not store pointers to the members of the list; it holds a copy of every member. This is why these kinds of classes are called "value based"; QPtrList and QDict are "pointer based". +TQValueList defines a template instance to create a list of values that all have the class T. Note that TQValueList does not store pointers to the members of the list; it holds a copy of every member. This is why these kinds of classes are called "value based"; QPtrList and QDict are "pointer based". .PP -QValueList contains and manages a collection of objects of type T and provides iterators that allow the contained objects to be addressed. QValueList owns the contained items. For more relaxed ownership semantics, see QPtrCollection and friends which are pointer-based containers. +TQValueList contains and manages a collection of objects of type T and provides iterators that allow the contained objects to be addressed. TQValueList owns the contained items. For more relaxed ownership semantics, see QPtrCollection and friends which are pointer-based containers. .PP -Some classes cannot be used within a QValueList, for example, all classes derived from TQObject and thus all classes that implement widgets. Only values can be used in a QValueList. To qualify as a value the class must provide: +Some classes cannot be used within a TQValueList, for example, all classes derived from TQObject and thus all classes that implement widgets. Only values can be used in a TQValueList. To qualify as a value the class must provide: .TP a copy constructor; .TP @@ -246,7 +246,7 @@ Note that C++ defaults to field-by-field assignment operators and copy construct .PP In addition, some compilers (e.g. Sun CC) might require that the class provides an equality operator (operator==()). .PP -QValueList's function naming is consistent with the other TQt classes (e.g. count(), isEmpty()). QValueList also provides extra functions for compatibility with STL algorithms, such as size() and empty(). Programmers already familiar with the STL \fClist\fR may prefer to use the STL-compatible functions. +TQValueList's function naming is consistent with the other TQt classes (e.g. count(), isEmpty()). TQValueList also provides extra functions for compatibility with STL algorithms, such as size() and empty(). Programmers already familiar with the STL \fClist\fR may prefer to use the STL-compatible functions. .PP Example: .PP @@ -287,7 +287,7 @@ Example: }; .br .br - typedef QValueList EmployeeList; + typedef TQValueList EmployeeList; .br EmployeeList list; .br @@ -337,11 +337,11 @@ Another way to find an item in the list is by using the tqFind() algorithm. For .PP .nf .br - QValueList list; + TQValueList list; .br ... .br - QValueList::iterator it = tqFind( list.begin(), list.end(), 3 ); + TQValueList::iterator it = tqFind( list.begin(), list.end(), 3 ); .br if ( it != list.end() ) .br @@ -353,7 +353,7 @@ It is safe to have multiple iterators a the list at the same time. If some membe .PP .nf .br - QValueList list; + TQValueList list; .br list.append( 1 ); .br @@ -375,15 +375,15 @@ It is safe to have multiple iterators a the list at the same time. If some membe .br ... .br - QValueList dlist; + TQValueList dlist; .br double d = dlist.last(); // undefined .br .fi .PP -Because QValueList is value-based there is no need to be careful about deleting items in the list. The list holds its own copies and will free them if the corresponding member or the list itself is deleted. You can force the list to free all of its items with clear(). +Because TQValueList is value-based there is no need to be careful about deleting items in the list. The list holds its own copies and will free them if the corresponding member or the list itself is deleted. You can force the list to free all of its items with clear(). .PP -QValueList is shared implicitly, which means it can be copied in constant time, i.e. O(1). If multiple QValueList instances share the same data and one needs to modify its contents, this modifying instance makes a copy and modifies its private copy; therefore it does not affect the other instances; this takes O(n) time. This is often called "copy on write". If a QValueList is being used in a multi-threaded program, you must protect all access to the list. See QMutex. +TQValueList is shared implicitly, which means it can be copied in constant time, i.e. O(1). If multiple TQValueList instances share the same data and one needs to modify its contents, this modifying instance makes a copy and modifies its private copy; therefore it does not affect the other instances; this takes O(n) time. This is often called "copy on write". If a TQValueList is being used in a multi-threaded program, you must protect all access to the list. See QMutex. .PP There are several ways to insert items into the list. The prepend() and append() functions insert items at the beginning and the end of the list respectively. The insert() function comes in several flavors and can be used to add one or more items at specific positions within the list. .PP @@ -395,7 +395,7 @@ Example: .PP .nf .br - QValueList list; + TQValueList list; .br list.append( 5 ); .br @@ -409,177 +409,177 @@ Example: .br .fi .PP -See also QValueListIterator, TQt Template Library Classes, Implicitly and Explicitly Shared Classes, and Non-GUI Classes. +See also TQValueListIterator, TQt Template Library Classes, Implicitly and Explicitly Shared Classes, and Non-GUI Classes. .SS "Member Type Documentation" -.SH "QValueList::ConstIterator" -This iterator is an instantiation of QValueListConstIterator for the same type as this QValueList. In other words, if you instantiate QValueList, ConstIterator is a QValueListConstIterator. Several member function use it, such as QValueList::begin(), which returns an iterator pointing to the first item in the list. +.SH "TQValueList::ConstIterator" +This iterator is an instantiation of TQValueListConstIterator for the same type as this TQValueList. In other words, if you instantiate TQValueList, ConstIterator is a TQValueListConstIterator. Several member function use it, such as TQValueList::begin(), which returns an iterator pointing to the first item in the list. .PP Functionally, this is almost the same as Iterator. The only difference is you cannot use ConstIterator for non-const operations, and that the compiler can often generate better code if you use ConstIterator. .PP -See also QValueListIterator and Iterator. -.SH "QValueList::Iterator" -This iterator is an instantiation of QValueListIterator for the same type as this QValueList. In other words, if you instantiate QValueList, Iterator is a QValueListIterator. Several member function use it, such as QValueList::begin(), which returns an iterator pointing to the first item in the list. +See also TQValueListIterator and Iterator. +.SH "TQValueList::Iterator" +This iterator is an instantiation of TQValueListIterator for the same type as this TQValueList. In other words, if you instantiate TQValueList, Iterator is a TQValueListIterator. Several member function use it, such as TQValueList::begin(), which returns an iterator pointing to the first item in the list. .PP Functionally, this is almost the same as ConstIterator. The only difference is that you cannot use ConstIterator for non-const operations, and that the compiler can often generate better code if you use ConstIterator. .PP -See also QValueListIterator and ConstIterator. -.SH "QValueList::const_iterator" -The list's const iterator type, QValueListConstIterator. -.SH "QValueList::const_pointer" +See also TQValueListIterator and ConstIterator. +.SH "TQValueList::const_iterator" +The list's const iterator type, TQValueListConstIterator. +.SH "TQValueList::const_pointer" The const pointer to T type. -.SH "QValueList::const_reference" +.SH "TQValueList::const_reference" The const reference to T type. -.SH "QValueList::iterator" -The list's iterator type, QValueListIterator. -.SH "QValueList::pointer" +.SH "TQValueList::iterator" +The list's iterator type, TQValueListIterator. +.SH "TQValueList::pointer" The pointer to T type. -.SH "QValueList::reference" +.SH "TQValueList::reference" The reference to T type. -.SH "QValueList::size_type" +.SH "TQValueList::size_type" An unsigned integral type, used to represent various sizes. -.SH "QValueList::value_type" +.SH "TQValueList::value_type" The type of the object stored in the list, T. .SH MEMBER FUNCTION DOCUMENTATION -.SH "QValueList::QValueList ()" +.SH "TQValueList::TQValueList ()" Constructs an empty list. -.SH "QValueList::QValueList ( const QValueList & l )" +.SH "TQValueList::TQValueList ( const TQValueList & l )" Constructs a copy of \fIl\fR. .PP -This operation takes O(1) time because QValueList is implicitly shared. +This operation takes O(1) time because TQValueList is implicitly shared. .PP The first modification to a list will take O(n) time. -.SH "QValueList::QValueList ( const std::list & l )" +.SH "TQValueList::TQValueList ( const std::list & l )" Contructs a copy of \fIl\fR. .PP This constructor is provided for compatibility with STL containers. -.SH "QValueList::~QValueList ()" -Destroys the list. References to the values in the list and all iterators of this list become invalidated. Note that it is impossible for an iterator to check whether or not it is valid: QValueList is highly tuned for performance, not for error checking. -.SH "iterator QValueList::append ( const T & x )" +.SH "TQValueList::~TQValueList ()" +Destroys the list. References to the values in the list and all iterators of this list become invalidated. Note that it is impossible for an iterator to check whether or not it is valid: TQValueList is highly tuned for performance, not for error checking. +.SH "iterator TQValueList::append ( const T & x )" Inserts \fIx\fR at the end of the list. .PP See also insert() and prepend(). .PP Examples: .)l checklists/checklists.cpp and fonts/simple-qfont-demo/viewer.cpp. -.SH "const_iterator QValueList::at ( size_type i ) const" +.SH "const_iterator TQValueList::at ( size_type i ) const" Returns an iterator pointing to the item at position \fIi\fR in the list, or an undefined value if the index is out of range. .PP -\fBWarning:\fR This function uses a linear search and can be extremely slow for large lists. QValueList is not optimized for random item access. If you need random access use a different container, such as QValueVector. -.SH "iterator QValueList::at ( size_type i )" +\fBWarning:\fR This function uses a linear search and can be extremely slow for large lists. TQValueList is not optimized for random item access. If you need random access use a different container, such as TQValueVector. +.SH "iterator TQValueList::at ( size_type i )" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP Returns an iterator pointing to the item at position \fIi\fR in the list, or an undefined value if the index is out of range. -.SH "reference QValueList::back ()" +.SH "reference TQValueList::back ()" Returns a reference to the last item. If the list contains no last item (i.e. empty() returns TRUE), the return value is undefined. .PP This function is provided for STL compatibility. It is equivalent to last(). .PP See also front(). -.SH "const_reference QValueList::back () const" +.SH "const_reference TQValueList::back () const" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -.SH "const_iterator QValueList::begin () const" +.SH "const_iterator TQValueList::begin () const" Returns an iterator pointing to the first item in the list. This iterator equals end() if the list is empty. .PP See also first(), end(), and constBegin(). .PP Examples: .)l canvas/canvas.cpp, chart/canvasview.cpp, chart/element.cpp, checklists/checklists.cpp, sql/overview/insert/main.cpp, table/statistics/statistics.cpp, and themes/themes.cpp. -.SH "iterator QValueList::begin ()" +.SH "iterator TQValueList::begin ()" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP Returns an iterator pointing to the first item in the list. This iterator equals end() if the list is empty. .PP See also first() and end(). -.SH "void QValueList::clear ()" +.SH "void TQValueList::clear ()" Removes all items from the list. .PP See also remove(). -.SH "const_iterator QValueList::constBegin () const" +.SH "const_iterator TQValueList::constBegin () const" Returns an iterator pointing to the first item in the list. This iterator equals constEnd() if the list is empty. .PP See also begin(). -.SH "const_iterator QValueList::constEnd () const" +.SH "const_iterator TQValueList::constEnd () const" Returns an iterator pointing \fIpast\fR the last item in the list. This iterator equals constBegin() if the list is empty. .PP See also end(). -.SH "size_type QValueList::contains ( const T & x ) const" +.SH "size_type TQValueList::contains ( const T & x ) const" Returns the number of occurrences of the value \fIx\fR in the list. -.SH "size_type QValueList::count () const" +.SH "size_type TQValueList::count () const" Returns the number of items in the list. .PP See also isEmpty(). .PP Examples: .)l chart/element.cpp, fileiconview/qfileiconview.cpp, and table/statistics/statistics.cpp. -.SH "bool QValueList::empty () const" +.SH "bool TQValueList::empty () const" Returns TRUE if the list contains no items; otherwise returns FALSE. .PP See also size(). -.SH "iterator QValueList::end ()" +.SH "iterator TQValueList::end ()" Returns an iterator pointing \fIpast\fR the last item in the list. This iterator equals begin() if the list is empty. .PP See also last(), begin(), and constEnd(). .PP Examples: .)l canvas/canvas.cpp, chart/canvasview.cpp, chart/element.cpp, checklists/checklists.cpp, sql/overview/insert/main.cpp, table/statistics/statistics.cpp, and themes/themes.cpp. -.SH "const_iterator QValueList::end () const" +.SH "const_iterator TQValueList::end () const" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP Returns an iterator pointing \fIpast\fR the last item in the list. This iterator equals begin() if the list is empty. .PP See also last() and begin(). -.SH "iterator QValueList::erase ( iterator it )" +.SH "iterator TQValueList::erase ( iterator it )" Removes the item pointed to by \fIit\fR from the list. No iterators other than \fIit\fR or other iterators pointing at the same item as \fIit\fR are invalidated. Returns an iterator to the next item after \fIit\fR, or end() if there is no such item. .PP This function is provided for STL compatibility. It is equivalent to remove(). -.SH "iterator QValueList::erase ( iterator first, iterator last )" +.SH "iterator TQValueList::erase ( iterator first, iterator last )" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP Deletes all items from \fIfirst\fR to \fIlast\fR (not including \fIlast\fR). No iterators are invalidated, except those pointing to the removed items themselves. Returns \fIlast\fR. -.SH "iterator QValueList::find ( const T & x )" +.SH "iterator TQValueList::find ( const T & x )" Returns an iterator pointing to the first occurrence of \fIx\fR in the list. .PP Returns end() is no item matched. -.SH "const_iterator QValueList::find ( const T & x ) const" +.SH "const_iterator TQValueList::find ( const T & x ) const" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP Returns an iterator pointing to the first occurrence of \fIx\fR in the list. .PP Returns end() if no item matched. -.SH "iterator QValueList::find ( iterator it, const T & x )" +.SH "iterator TQValueList::find ( iterator it, const T & x )" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP Finds the first occurrence of \fIx\fR in the list starting at the position given by \fIit\fR. .PP Returns end() if no item matched. -.SH "const_iterator QValueList::find ( const_iterator it, const T & x ) const" +.SH "const_iterator TQValueList::find ( const_iterator it, const T & x ) const" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP Finds the first occurrence of \fIx\fR in the list starting at the position given by \fIit\fR. .PP Returns end() if no item matched. -.SH "int QValueList::findIndex ( const T & x ) const" +.SH "int TQValueList::findIndex ( const T & x ) const" Returns the index of the first occurrence of the value \fIx\fR. Returns -1 if no item matched. -.SH "T & QValueList::first ()" +.SH "T & TQValueList::first ()" Returns a reference to the first item. If the list contains no first item (i.e. isEmpty() returns TRUE), the return value is undefined. .PP See also last(). .PP Example: network/mail/smtp.cpp. -.SH "const T & QValueList::first () const" +.SH "const T & TQValueList::first () const" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -.SH "const_iterator QValueList::fromLast () const" +.SH "const_iterator TQValueList::fromLast () const" Returns an iterator to the last item in the list, or end() if there is no last item. .PP Use the end() function instead. For example: .PP .nf .br - QValueList l; + TQValueList l; .br ... .br - QValueList::iterator it = l.end(); + TQValueList::iterator it = l.end(); .br --it; .br @@ -588,7 +588,7 @@ Use the end() function instead. For example: // ... .br .fi -.SH "iterator QValueList::fromLast ()" +.SH "iterator TQValueList::fromLast ()" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP Returns an iterator to the last item in the list, or end() if there is no last item. @@ -597,11 +597,11 @@ Use the end() function instead. For example: .PP .nf .br - QValueList l; + TQValueList l; .br ... .br - QValueList::iterator it = l.end(); + TQValueList::iterator it = l.end(); .br --it; .br @@ -610,15 +610,15 @@ Use the end() function instead. For example: // ... .br .fi -.SH "reference QValueList::front ()" +.SH "reference TQValueList::front ()" Returns a reference to the first item. If the list contains no first item (i.e. empty() returns TRUE), the return value is undefined. .PP This function is provided for STL compatibility. It is equivalent to first(). .PP See also back(). -.SH "const_reference QValueList::front () const" +.SH "const_reference TQValueList::front () const" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -.SH "iterator QValueList::insert ( iterator it, const T & x )" +.SH "iterator TQValueList::insert ( iterator it, const T & x )" Inserts the value \fIx\fR in front of the item pointed to by the iterator, \fIit\fR. .PP Returns an iterator pointing at the inserted item. @@ -626,112 +626,112 @@ Returns an iterator pointing at the inserted item. See also append() and prepend(). .PP Example: themes/themes.cpp. -.SH "void QValueList::insert ( iterator pos, size_type n, const T & x )" +.SH "void TQValueList::insert ( iterator pos, size_type n, const T & x )" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP Inserts \fIn\fR copies of \fIx\fR before position \fIpos\fR. -.SH "bool QValueList::isEmpty () const" +.SH "bool TQValueList::isEmpty () const" Returns TRUE if the list contains no items; otherwise returns FALSE. .PP See also count(). .PP Examples: .)l fonts/simple-qfont-demo/viewer.cpp and network/mail/smtp.cpp. -.SH "T & QValueList::last ()" +.SH "T & TQValueList::last ()" Returns a reference to the last item. If the list contains no last item (i.e. empty() returns TRUE), the return value is undefined. -.SH "const T & QValueList::last () const" +.SH "const T & TQValueList::last () const" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -.SH "bool QValueList::operator!= ( const QValueList & l ) const" +.SH "bool TQValueList::operator!= ( const TQValueList & l ) const" Compares both lists. .PP Returns TRUE if this list and \fIl\fR are unequal; otherwise returns FALSE. -.SH "QValueList QValueList::operator+ ( const QValueList & l ) const" +.SH "TQValueList TQValueList::operator+ ( const TQValueList & l ) const" Creates a new list and fills it with the items of this list. Then the items of \fIl\fR are appended. Returns the new list. -.SH "QValueList & QValueList::operator+= ( const QValueList & l )" +.SH "TQValueList & TQValueList::operator+= ( const TQValueList & l )" Appends the items of \fIl\fR to this list. Returns a reference to this list. -.SH "QValueList & QValueList::operator+= ( const T & x )" +.SH "TQValueList & TQValueList::operator+= ( const T & x )" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP Appends the value \fIx\fR to the list. Returns a reference to the list. -.SH "QValueList & QValueList::operator<< ( const T & x )" +.SH "TQValueList & TQValueList::operator<< ( const T & x )" Adds the value \fIx\fR to the end of the list. .PP Returns a reference to the list. -.SH "QValueList & QValueList::operator= ( const QValueList & l )" +.SH "TQValueList & TQValueList::operator= ( const TQValueList & l )" Assigns \fIl\fR to this list and returns a reference to this list. .PP -All iterators of the current list become invalidated by this operation. The cost of such an assignment is O(1) since QValueList is implicitly shared. -.SH "QValueList & QValueList::operator= ( const std::list & l )" +All iterators of the current list become invalidated by this operation. The cost of such an assignment is O(1) since TQValueList is implicitly shared. +.SH "TQValueList & TQValueList::operator= ( const std::list & l )" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP Assigns the contents of \fIl\fR to the list. .PP All iterators of the current list become invalidated by this operation. -.SH "bool QValueList::operator== ( const QValueList & l ) const" +.SH "bool TQValueList::operator== ( const TQValueList & l ) const" Compares both lists. .PP Returns TRUE if this list and \fIl\fR are equal; otherwise returns FALSE. -.SH "bool QValueList::operator== ( const std::list & l ) const" +.SH "bool TQValueList::operator== ( const std::list & l ) const" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP Returns TRUE if this list and \fIl\fR are equal; otherwise returns FALSE. .PP This operator is provided for compatibility with STL containers. -.SH "const T & QValueList::operator[] ( size_type i ) const" +.SH "const T & TQValueList::operator[] ( size_type i ) const" Returns a const reference to the item with index \fIi\fR in the list. It is up to you to check whether this item really exists. You can do that easily with the count() function. However this operator does not check whether \fIi\fR is in range and will deliver undefined results if it does not exist. .PP -\fBWarning:\fR This function uses a linear search and can be extremely slow for large lists. QValueList is not optimized for random item access. If you need random access use a different container, such as QValueVector. -.SH "T & QValueList::operator[] ( size_type i )" +\fBWarning:\fR This function uses a linear search and can be extremely slow for large lists. TQValueList is not optimized for random item access. If you need random access use a different container, such as TQValueVector. +.SH "T & TQValueList::operator[] ( size_type i )" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP Returns a non-const reference to the item with index \fIi\fR. -.SH "void QValueList::pop_back ()" +.SH "void TQValueList::pop_back ()" Removes the last item. If there is no last item, this operation is undefined. .PP This function is provided for STL compatibility. -.SH "void QValueList::pop_front ()" +.SH "void TQValueList::pop_front ()" Removes the first item. If there is no first item, this operation is undefined. .PP This function is provided for STL compatibility. -.SH "iterator QValueList::prepend ( const T & x )" +.SH "iterator TQValueList::prepend ( const T & x )" Inserts \fIx\fR at the beginning of the list. .PP See also insert() and append(). -.SH "void QValueList::push_back ( const T & x )" +.SH "void TQValueList::push_back ( const T & x )" Inserts \fIx\fR at the end of the list. .PP This function is provided for STL compatibility. It is equivalent to append(). -.SH "void QValueList::push_front ( const T & x )" +.SH "void TQValueList::push_front ( const T & x )" Inserts \fIx\fR at the beginning of the list. .PP This function is provided for STL compatibility. It is equivalent to prepend(). .PP Example: toplevel/options.ui.h. -.SH "iterator QValueList::remove ( iterator it )" +.SH "iterator TQValueList::remove ( iterator it )" Removes the item pointed to by \fIit\fR from the list. No iterators other than \fIit\fR or other iterators pointing at the same item as \fIit\fR are invalidated. Returns an iterator to the next item after \fIit\fR, or end() if there is no such item. .PP See also clear(). -.SH "uint QValueList::remove ( const T & x )" +.SH "uint TQValueList::remove ( const T & x )" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP Removes all items that have value \fIx\fR and returns the number of removed items. -.SH "size_type QValueList::size () const" +.SH "size_type TQValueList::size () const" Returns the number of items in the list. .PP This function is provided for STL compatibility. It is equivalent to count(). .PP See also empty(). .SH RELATED FUNCTION DOCUMENTATION -.SH "QDataStream & operator<< ( QDataStream & s, const QValueList & l )" +.SH "QDataStream & operator<< ( QDataStream & s, const TQValueList & l )" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP Writes a list, \fIl\fR, to the stream \fIs\fR. The type T stored in the list must implement the streaming operator. -.SH "QDataStream & operator>> ( QDataStream & s, QValueList & l )" +.SH "QDataStream & operator>> ( QDataStream & s, TQValueList & l )" Reads a list, \fIl\fR, from the stream \fIs\fR. The type T stored in the list must implement the streaming operator. .SH "SEE ALSO" -.BR http://doc.trolltech.com/ntqvaluelist.html +.BR http://doc.trolltech.com/tqvaluelist.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/tqvaluelistconstiterator.3qt b/doc/man/man3/tqvaluelistconstiterator.3qt index 6032bddff..35c19fcf7 100644 --- a/doc/man/man3/tqvaluelistconstiterator.3qt +++ b/doc/man/man3/tqvaluelistconstiterator.3qt @@ -1,5 +1,5 @@ '\" t -.TH QValueListConstIterator 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- +.TH TQValueListConstIterator 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 -QValueListConstIterator \- Const iterator for QValueList +TQValueListConstIterator \- Const iterator for TQValueList .SH SYNOPSIS All the functions in this class are reentrant when TQt is built with thread support.

        .PP -\fC#include \fR +\fC#include \fR .PP .SS "Public Members" .in +1c @@ -25,84 +25,84 @@ All the functions in this class are reentrant when TQt is built with thread supp .BI "typedef const T & \fBreference\fR" .br .ti -1c -.BI "\fBQValueListConstIterator\fR ()" +.BI "\fBTQValueListConstIterator\fR ()" .br .ti -1c -.BI "\fBQValueListConstIterator\fR ( const QValueListConstIterator & it )" +.BI "\fBTQValueListConstIterator\fR ( const TQValueListConstIterator & it )" .br .ti -1c -.BI "\fBQValueListConstIterator\fR ( const QValueListIterator & it )" +.BI "\fBTQValueListConstIterator\fR ( const TQValueListIterator & it )" .br .ti -1c -.BI "bool \fBoperator==\fR ( const QValueListConstIterator & it ) const" +.BI "bool \fBoperator==\fR ( const TQValueListConstIterator & it ) const" .br .ti -1c -.BI "bool \fBoperator!=\fR ( const QValueListConstIterator & it ) const" +.BI "bool \fBoperator!=\fR ( const TQValueListConstIterator & it ) const" .br .ti -1c .BI "const T & \fBoperator*\fR () const" .br .ti -1c -.BI "QValueListConstIterator & \fBoperator++\fR ()" +.BI "TQValueListConstIterator & \fBoperator++\fR ()" .br .ti -1c -.BI "QValueListConstIterator \fBoperator++\fR ( int )" +.BI "TQValueListConstIterator \fBoperator++\fR ( int )" .br .ti -1c -.BI "QValueListConstIterator & \fBoperator--\fR ()" +.BI "TQValueListConstIterator & \fBoperator--\fR ()" .br .ti -1c -.BI "QValueListConstIterator \fBoperator--\fR ( int )" +.BI "TQValueListConstIterator \fBoperator--\fR ( int )" .br .in -1c .SH DESCRIPTION -The QValueListConstIterator class provides a const iterator for QValueList. +The TQValueListConstIterator class provides a const iterator for TQValueList. .PP -In contrast to QValueListIterator, this class is used to iterate over a const list. It does not allow modification of the values of the list since that would break const semantics. +In contrast to TQValueListIterator, this class is used to iterate over a const list. It does not allow modification of the values of the list since that would break const semantics. .PP -You can create the appropriate const iterator type by using the \fCconst_iterator\fR typedef provided by QValueList. +You can create the appropriate const iterator type by using the \fCconst_iterator\fR typedef provided by TQValueList. .PP -For more information on QValueList iterators, see QValueListIterator. +For more information on TQValueList iterators, see TQValueListIterator. .PP -See also QValueListIterator, QValueList, TQt Template Library Classes, and Non-GUI Classes. +See also TQValueListIterator, TQValueList, TQt Template Library Classes, and Non-GUI Classes. .SS "Member Type Documentation" -.SH "QValueListConstIterator::pointer" +.SH "TQValueListConstIterator::pointer" Pointer to value_type. -.SH "QValueListConstIterator::reference" +.SH "TQValueListConstIterator::reference" Reference to value_type. -.SH "QValueListConstIterator::value_type" +.SH "TQValueListConstIterator::value_type" The type of value. .SH MEMBER FUNCTION DOCUMENTATION -.SH "QValueListConstIterator::QValueListConstIterator ()" +.SH "TQValueListConstIterator::TQValueListConstIterator ()" Creates un uninitialized iterator. -.SH "QValueListConstIterator::QValueListConstIterator ( const QValueListConstIterator & it )" +.SH "TQValueListConstIterator::TQValueListConstIterator ( const TQValueListConstIterator & it )" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP Constructs a copy of the iterator \fIit\fR. -.SH "QValueListConstIterator::QValueListConstIterator ( const QValueListIterator & it )" +.SH "TQValueListConstIterator::TQValueListConstIterator ( const TQValueListIterator & it )" Constructs a copy of the iterator \fIit\fR. -.SH "bool QValueListConstIterator::operator!= ( const QValueListConstIterator & it ) const" +.SH "bool TQValueListConstIterator::operator!= ( const TQValueListConstIterator & it ) const" Compares this iterator with \fIit\fR and returns TRUE if they point to different items; otherwise returns FALSE. -.SH "const T & QValueListConstIterator::operator* () const" +.SH "const T & TQValueListConstIterator::operator* () const" Asterisk operator. Returns a reference to the current iterator item. -.SH "QValueListConstIterator & QValueListConstIterator::operator++ ()" +.SH "TQValueListConstIterator & TQValueListConstIterator::operator++ ()" Prefix ++ makes the succeeding item current and returns an iterator pointing to the new current item. The iterator cannot check whether it reached the end of the list. Incrementing the iterator returned by end() causes undefined results. -.SH "QValueListConstIterator QValueListConstIterator::operator++ ( int )" +.SH "TQValueListConstIterator TQValueListConstIterator::operator++ ( int )" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP Postfix ++ makes the succeeding item current and returns an iterator pointing to the new current item. The iterator cannot check whether it reached the end of the list. Incrementing the iterator returned by end() causes undefined results. -.SH "QValueListConstIterator & QValueListConstIterator::operator-- ()" +.SH "TQValueListConstIterator & TQValueListConstIterator::operator-- ()" Prefix -- makes the previous item current and returns an iterator pointing to the new current item. The iterator cannot check whether it reached the beginning of the list. Decrementing the iterator returned by begin() causes undefined results. -.SH "QValueListConstIterator QValueListConstIterator::operator-- ( int )" +.SH "TQValueListConstIterator TQValueListConstIterator::operator-- ( int )" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP Postfix -- makes the previous item current and returns an iterator pointing to the new current item. The iterator cannot check whether it reached the beginning of the list. Decrementing the iterator returned by begin() causes undefined results. -.SH "bool QValueListConstIterator::operator== ( const QValueListConstIterator & it ) const" +.SH "bool TQValueListConstIterator::operator== ( const TQValueListConstIterator & it ) const" Compares this iterator with \fIit\fR and returns TRUE if they point to the same item; otherwise returns FALSE. .SH "SEE ALSO" -.BR http://doc.trolltech.com/qvaluelistconstiterator.html +.BR http://doc.trolltech.com/tqvaluelistconstiterator.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/tqvaluelistiterator.3qt b/doc/man/man3/tqvaluelistiterator.3qt index f652ca180..a7345817f 100644 --- a/doc/man/man3/tqvaluelistiterator.3qt +++ b/doc/man/man3/tqvaluelistiterator.3qt @@ -1,5 +1,5 @@ '\" t -.TH QValueListIterator 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- +.TH TQValueListIterator 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 -QValueListIterator \- Iterator for QValueList +TQValueListIterator \- Iterator for TQValueList .SH SYNOPSIS All the functions in this class are reentrant when TQt is built with thread support.

        .PP -\fC#include \fR +\fC#include \fR .PP .SS "Public Members" .in +1c @@ -25,16 +25,16 @@ All the functions in this class are reentrant when TQt is built with thread supp .BI "typedef T & \fBreference\fR" .br .ti -1c -.BI "\fBQValueListIterator\fR ()" +.BI "\fBTQValueListIterator\fR ()" .br .ti -1c -.BI "\fBQValueListIterator\fR ( const QValueListIterator & it )" +.BI "\fBTQValueListIterator\fR ( const TQValueListIterator & it )" .br .ti -1c -.BI "bool \fBoperator==\fR ( const QValueListIterator & it ) const" +.BI "bool \fBoperator==\fR ( const TQValueListIterator & it ) const" .br .ti -1c -.BI "bool \fBoperator!=\fR ( const QValueListIterator & it ) const" +.BI "bool \fBoperator!=\fR ( const TQValueListIterator & it ) const" .br .ti -1c .BI "const T & \fBoperator*\fR () const" @@ -43,34 +43,34 @@ All the functions in this class are reentrant when TQt is built with thread supp .BI "T & \fBoperator*\fR ()" .br .ti -1c -.BI "QValueListIterator & \fBoperator++\fR ()" +.BI "TQValueListIterator & \fBoperator++\fR ()" .br .ti -1c -.BI "QValueListIterator \fBoperator++\fR ( int )" +.BI "TQValueListIterator \fBoperator++\fR ( int )" .br .ti -1c -.BI "QValueListIterator & \fBoperator--\fR ()" +.BI "TQValueListIterator & \fBoperator--\fR ()" .br .ti -1c -.BI "QValueListIterator \fBoperator--\fR ( int )" +.BI "TQValueListIterator \fBoperator--\fR ( int )" .br .ti -1c -.BI "QValueListIterator & \fBoperator+=\fR ( int j )" +.BI "TQValueListIterator & \fBoperator+=\fR ( int j )" .br .ti -1c -.BI "QValueListIterator & \fBoperator-=\fR ( int j )" +.BI "TQValueListIterator & \fBoperator-=\fR ( int j )" .br .in -1c .SH DESCRIPTION -The QValueListIterator class provides an iterator for QValueList. +The TQValueListIterator class provides an iterator for TQValueList. .PP An iterator is a class for accessing the items of a container class: a generalization of the index in an array. A pointer into a "const char *" and an index into an "int[]" are both iterators, and the general idea is to provide that functionality for any data structure. .PP -The QValueListIterator class is an iterator for QValueList instantiations. You can create the appropriate iterator type by using the \fCiterator\fR typedef provided by QValueList. +The TQValueListIterator class is an iterator for TQValueList instantiations. You can create the appropriate iterator type by using the \fCiterator\fR typedef provided by TQValueList. .PP -The only way to access the items in a QValueList is to use an iterator. +The only way to access the items in a TQValueList is to use an iterator. .PP -Example (see QValueList for the complete code): +Example (see TQValueList for the complete code): .PP .nf .br @@ -97,57 +97,57 @@ Example (see QValueList for the complete code): .br .fi .PP -QValueList is highly optimized for performance and memory usage. This means that you must be careful: QValueList does not know about all its iterators and the iterators don't know to which list they belong. This makes things very fast, but if you're not careful, you can get spectacular bugs. Always make sure iterators are valid before dereferencing them or using them as parameters to generic algorithms in the STL or the QTL. +TQValueList is highly optimized for performance and memory usage. This means that you must be careful: TQValueList does not know about all its iterators and the iterators don't know to which list they belong. This makes things very fast, but if you're not careful, you can get spectacular bugs. Always make sure iterators are valid before dereferencing them or using them as parameters to generic algorithms in the STL or the QTL. .PP Using an invalid iterator is undefined (your application will probably crash). Many TQt functions return const value lists; to iterate over these you should make a copy and iterate over the copy. .PP -For every Iterator there is a ConstIterator. When accessing a QValueList in a const environment or if the reference or pointer to the list is itself const, then you must use the ConstIterator. Its semantics are the same as the Iterator, but it only returns const references. +For every Iterator there is a ConstIterator. When accessing a TQValueList in a const environment or if the reference or pointer to the list is itself const, then you must use the ConstIterator. Its semantics are the same as the Iterator, but it only returns const references. .PP -See also QValueList, QValueListConstIterator, TQt Template Library Classes, and Non-GUI Classes. +See also TQValueList, TQValueListConstIterator, TQt Template Library Classes, and Non-GUI Classes. .SS "Member Type Documentation" -.SH "QValueListIterator::pointer" +.SH "TQValueListIterator::pointer" Pointer to value_type. -.SH "QValueListIterator::reference" +.SH "TQValueListIterator::reference" Reference to value_type. -.SH "QValueListIterator::value_type" +.SH "TQValueListIterator::value_type" The type of value, T. .SH MEMBER FUNCTION DOCUMENTATION -.SH "QValueListIterator::QValueListIterator ()" +.SH "TQValueListIterator::TQValueListIterator ()" Creates un uninitialized iterator. -.SH "QValueListIterator::QValueListIterator ( const QValueListIterator & it )" +.SH "TQValueListIterator::TQValueListIterator ( const TQValueListIterator & it )" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP Constructs a copy of the iterator \fIit\fR. -.SH "bool QValueListIterator::operator!= ( const QValueListIterator & it ) const" +.SH "bool TQValueListIterator::operator!= ( const TQValueListIterator & it ) const" Compares this iterator and \fIit\fR and returns TRUE if they point to different items; otherwise returns FALSE. -.SH "T & QValueListIterator::operator* ()" +.SH "T & TQValueListIterator::operator* ()" Asterisk operator. Returns a reference to the current iterator item. -.SH "const T & QValueListIterator::operator* () const" +.SH "const T & TQValueListIterator::operator* () const" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP Asterisk operator. Returns a reference to the current iterator item. -.SH "QValueListIterator & QValueListIterator::operator++ ()" +.SH "TQValueListIterator & TQValueListIterator::operator++ ()" Prefix ++ makes the succeeding item current and returns an iterator pointing to the new current item. The iterator cannot check whether it reached the end of the list. Incrementing the iterator returned by end() causes undefined results. -.SH "QValueListIterator QValueListIterator::operator++ ( int )" +.SH "TQValueListIterator TQValueListIterator::operator++ ( int )" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP Postfix ++ makes the succeeding item current and returns an iterator pointing to the new current item. The iterator cannot check whether it reached the end of the list. Incrementing the iterator returned by end() causes undefined results. -.SH "QValueListIterator & QValueListIterator::operator+= ( int j )" +.SH "TQValueListIterator & TQValueListIterator::operator+= ( int j )" Postfix -- jumps \fIj\fR steps forward in the list. The iterator cannot check whether it reached the end of the list. Jumping past the end() causes undefined results. -.SH "QValueListIterator & QValueListIterator::operator-- ()" +.SH "TQValueListIterator & TQValueListIterator::operator-- ()" Prefix -- makes the previous item current and returns an iterator pointing to the new current item. The iterator cannot check whether it reached the beginning of the list. Decrementing the iterator returned by begin() causes undefined results. -.SH "QValueListIterator QValueListIterator::operator-- ( int )" +.SH "TQValueListIterator TQValueListIterator::operator-- ( int )" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP Postfix -- makes the previous item current and returns an iterator pointing to the new current item. The iterator cannot check whether it reached the beginning of the list. Decrementing the iterator returned by begin() causes undefined results. -.SH "QValueListIterator & QValueListIterator::operator-= ( int j )" +.SH "TQValueListIterator & TQValueListIterator::operator-= ( int j )" Postfix -- jumps \fIj\fR steps backward in the list. The iterator cannot check whether it reached the beginning of the list. Jumping past begin() causes undefined results. -.SH "bool QValueListIterator::operator== ( const QValueListIterator & it ) const" +.SH "bool TQValueListIterator::operator== ( const TQValueListIterator & it ) const" Compares this iterator and \fIit\fR and returns TRUE if they point to the same item; otherwise returns FALSE. .SH "SEE ALSO" -.BR http://doc.trolltech.com/qvaluelistiterator.html +.BR http://doc.trolltech.com/tqvaluelistiterator.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/tqvaluestack.3qt b/doc/man/man3/tqvaluestack.3qt index b36a89092..ba24f2b80 100644 --- a/doc/man/man3/tqvaluestack.3qt +++ b/doc/man/man3/tqvaluestack.3qt @@ -1,5 +1,5 @@ '\" t -.TH QValueStack 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- +.TH TQValueStack 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,21 +7,21 @@ .ad l .nh .SH NAME -QValueStack \- Value-based template class that provides a stack +TQValueStack \- Value-based template class that provides a stack .SH SYNOPSIS All the functions in this class are reentrant when TQt is built with thread support.

        .PP -\fC#include \fR +\fC#include \fR .PP -Inherits QValueList. +Inherits TQValueList. .PP .SS "Public Members" .in +1c .ti -1c -.BI "\fBQValueStack\fR ()" +.BI "\fBTQValueStack\fR ()" .br .ti -1c -.BI "\fB~QValueStack\fR ()" +.BI "\fB~TQValueStack\fR ()" .br .ti -1c .BI "void \fBpush\fR ( const T & d )" @@ -37,11 +37,11 @@ Inherits QValueList. .br .in -1c .SH DESCRIPTION -The QValueStack class is a value-based template class that provides a stack. +The TQValueStack class is a value-based template class that provides a stack. .PP -Define a template instance QValueStack to create a stack of values that all have the class X. QValueStack is part of the TQt Template Library. +Define a template instance TQValueStack to create a stack of values that all have the class X. TQValueStack is part of the TQt Template Library. .PP -Note that QValueStack does not store pointers to the members of the stack; it holds a copy of every member. That is why these kinds of classes are called "value based"; QPtrStack, QPtrList, QDict, etc., are "pointer based". +Note that TQValueStack does not store pointers to the members of the stack; it holds a copy of every member. That is why these kinds of classes are called "value based"; QPtrStack, QPtrList, QDict, etc., are "pointer based". .PP A stack is a last in, first out (LIFO) structure. Items are added to the top of the stack with push() and retrieved from the top with pop(). The top() function provides access to the topmost item without removing it. .PP @@ -49,7 +49,7 @@ Example: .PP .nf .br - QValueStack stack; + TQValueStack stack; .br stack.push( 1 ); .br @@ -72,9 +72,9 @@ Example: .br .fi .PP -QValueStack is a specialized QValueList provided for convenience. All of QValueList's functionality also applies to QPtrStack, for example the facility to iterate over all elements using QValueStack::Iterator. See QValueListIterator for further details. +TQValueStack is a specialized TQValueList provided for convenience. All of TQValueList's functionality also applies to QPtrStack, for example the facility to iterate over all elements using TQValueStack::Iterator. See TQValueListIterator for further details. .PP -Some classes cannot be used within a QValueStack, for example everything derived from TQObject and thus all classes that implement widgets. Only values can be used in a QValueStack. To qualify as a value, the class must provide +Some classes cannot be used within a TQValueStack, for example everything derived from TQObject and thus all classes that implement widgets. Only values can be used in a TQValueStack. To qualify as a value, the class must provide .TP a copy constructor; .TP @@ -86,37 +86,37 @@ Note that C++ defaults to field-by-field assignment operators and copy construct .PP See also TQt Template Library Classes, Implicitly and Explicitly Shared Classes, and Non-GUI Classes. .SH MEMBER FUNCTION DOCUMENTATION -.SH "QValueStack::QValueStack ()" +.SH "TQValueStack::TQValueStack ()" Constructs an empty stack. -.SH "QValueStack::~QValueStack ()" -Destroys the stack. References to the values in the stack and all iterators of this stack become invalidated. Because QValueStack is highly tuned for performance, you won't see warnings if you use invalid iterators because it is impossible for an iterator to check whether or not it is valid. -.SH "T QValueStack::pop ()" +.SH "TQValueStack::~TQValueStack ()" +Destroys the stack. References to the values in the stack and all iterators of this stack become invalidated. Because TQValueStack is highly tuned for performance, you won't see warnings if you use invalid iterators because it is impossible for an iterator to check whether or not it is valid. +.SH "T TQValueStack::pop ()" Removes the top item from the stack and returns it. .PP See also top() and push(). -.SH "void QValueStack::push ( const T & d )" +.SH "void TQValueStack::push ( const T & d )" Adds element, \fId\fR, to the top of the stack. Last in, first out. .PP This function is equivalent to append(). .PP See also pop() and top(). -.SH "T & QValueStack::top ()" +.SH "T & TQValueStack::top ()" Returns a reference to the top item of the stack or the item referenced by end() if no such item exists. Note that you must not change the value the end() iterator points to. .PP This function is equivalent to last(). .PP -See also pop(), push(), and QValueList::fromLast(). -.SH "const T & QValueStack::top () const" +See also pop(), push(), and TQValueList::fromLast(). +.SH "const T & TQValueStack::top () const" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP Returns a reference to the top item of the stack or the item referenced by end() if no such item exists. .PP This function is equivalent to last(). .PP -See also pop(), push(), and QValueList::fromLast(). +See also pop(), push(), and TQValueList::fromLast(). .SH "SEE ALSO" -.BR http://doc.trolltech.com/ntqvaluestack.html +.BR http://doc.trolltech.com/tqvaluestack.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/tqvaluevector.3qt b/doc/man/man3/tqvaluevector.3qt index a291ab580..2e8dba809 100644 --- a/doc/man/man3/tqvaluevector.3qt +++ b/doc/man/man3/tqvaluevector.3qt @@ -1,5 +1,5 @@ '\" t -.TH QValueVector 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- +.TH TQValueVector 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 -QValueVector \- Value-based template class that provides a dynamic array +TQValueVector \- Value-based template class that provides a dynamic array .SH SYNOPSIS All the functions in this class are reentrant when TQt is built with thread support.

        .PP -\fC#include \fR +\fC#include \fR .PP .SS "Public Members" .in +1c @@ -43,28 +43,28 @@ All the functions in this class are reentrant when TQt is built with thread supp .BI "typedef ptrdiff_t \fBdifference_type\fR" .br .ti -1c -.BI "\fBQValueVector\fR ()" +.BI "\fBTQValueVector\fR ()" .br .ti -1c -.BI "\fBQValueVector\fR ( const QValueVector & v )" +.BI "\fBTQValueVector\fR ( const TQValueVector & v )" .br .ti -1c -.BI "\fBQValueVector\fR ( size_type n, const T & val = T ( ) )" +.BI "\fBTQValueVector\fR ( size_type n, const T & val = T ( ) )" .br .ti -1c -.BI "\fBQValueVector\fR ( std::vector & v )" +.BI "\fBTQValueVector\fR ( std::vector & v )" .br .ti -1c -.BI "\fBQValueVector\fR ( const std::vector & v )" +.BI "\fBTQValueVector\fR ( const std::vector & v )" .br .ti -1c -.BI "\fB~QValueVector\fR ()" +.BI "\fB~TQValueVector\fR ()" .br .ti -1c -.BI "QValueVector & \fBoperator=\fR ( const QValueVector & v )" +.BI "TQValueVector & \fBoperator=\fR ( const TQValueVector & v )" .br .ti -1c -.BI "QValueVector & \fBoperator=\fR ( const std::vector & v )" +.BI "TQValueVector & \fBoperator=\fR ( const std::vector & v )" .br .ti -1c .BI "size_type \fBsize\fR () const" @@ -145,10 +145,10 @@ All the functions in this class are reentrant when TQt is built with thread supp .BI "iterator \fBerase\fR ( iterator first, iterator last )" .br .ti -1c -.BI "bool \fBoperator==\fR ( const QValueVector & x )" +.BI "bool \fBoperator==\fR ( const TQValueVector & x )" .br .ti -1c -.BI "bool \fBoperator==\fR ( const QValueVector & x ) const" +.BI "bool \fBoperator==\fR ( const TQValueVector & x ) const" .br .ti -1c .BI "typedef T \fBValueType\fR" @@ -182,17 +182,17 @@ All the functions in this class are reentrant when TQt is built with thread supp .br .in -1c .SH DESCRIPTION -The QValueVector class is a value-based template class that provides a dynamic array. +The TQValueVector class is a value-based template class that provides a dynamic array. .PP -QValueVector is a TQt implementation of an STL-like vector container. It can be used in your application if the standard \fCvector\fR is not available for your target platforms. QValueVector is part of the TQt Template Library. +TQValueVector is a TQt implementation of an STL-like vector container. It can be used in your application if the standard \fCvector\fR is not available for your target platforms. TQValueVector is part of the TQt Template Library. .PP -QValueVector defines a template instance to create a vector of values that all have the class T. QValueVector does not store pointers to the members of the vector; it holds a copy of every member. QValueVector is said to be value based; in contrast, QPtrList and QDict are pointer based. +TQValueVector defines a template instance to create a vector of values that all have the class T. TQValueVector does not store pointers to the members of the vector; it holds a copy of every member. TQValueVector is said to be value based; in contrast, QPtrList and QDict are pointer based. .PP -QValueVector contains and manages a collection of objects of type T and provides random access iterators that allow the contained objects to be addressed. QValueVector owns the contained elements. For more relaxed ownership semantics, see QPtrCollection and friends, which are pointer-based containers. +TQValueVector contains and manages a collection of objects of type T and provides random access iterators that allow the contained objects to be addressed. TQValueVector owns the contained elements. For more relaxed ownership semantics, see QPtrCollection and friends, which are pointer-based containers. .PP -QValueVector provides good performance if you append or remove elements from the end of the vector. If you insert or remove elements from anywhere but the end, performance is very bad. The reason for this is that elements must to be copied into new positions. +TQValueVector provides good performance if you append or remove elements from the end of the vector. If you insert or remove elements from anywhere but the end, performance is very bad. The reason for this is that elements must to be copied into new positions. .PP -Some classes cannot be used within a QValueVector: for example, all classes derived from TQObject and thus all classes that implement widgets. Only values can be used in a QValueVector. To qualify as a value the class must provide: +Some classes cannot be used within a TQValueVector: for example, all classes derived from TQObject and thus all classes that implement widgets. Only values can be used in a TQValueVector. To qualify as a value the class must provide: .TP a copy constructor; .TP @@ -202,13 +202,13 @@ a default constructor, i.e., a constructor that does not take any arguments. .PP Note that C++ defaults to field-by-field assignment operators and copy constructors if no explicit version is supplied. In many cases this is sufficient. .PP -QValueVector uses an STL-like syntax to manipulate and address the objects it contains. See this document for more information. +TQValueVector uses an STL-like syntax to manipulate and address the objects it contains. See this document for more information. .PP Example: .PP .nf .br - #include + #include .br #include .br @@ -249,7 +249,7 @@ Example: .br { .br - typedef QValueVector EmployeeVector; + typedef TQValueVector EmployeeVector; .br EmployeeVector vec( 3 ); // vector of 3 Employees .br @@ -306,12 +306,12 @@ The fastest way to access an element of a vector is by using operator[]. This fu .PP .nf .br - QValueVector vec1; // an empty vector + TQValueVector vec1; // an empty vector .br vec1[10] = 4; // WARNING: undefined, probably a crash .br .br - QValueVector vec2(25); // initialize with 25 elements + TQValueVector vec2(25); // initialize with 25 elements .br vec2[10] = "Dave"; // OK .br @@ -321,7 +321,7 @@ Whenever inserting, removing or referencing elements in a vector, always make su .PP .nf .br - void func( QValueVector& vec ) + void func( TQValueVector& vec ) .br { .br @@ -341,11 +341,11 @@ Another way to find an element in the vector is by using the std::find() or tqFi .PP .nf .br - QValueVector vec; + TQValueVector vec; .br ... .br - QValueVector::const_iterator it = tqFind( vec.begin(), vec.end(), 3 ); + TQValueVector::const_iterator it = tqFind( vec.begin(), vec.end(), 3 ); .br if ( it != vector.end() ) .br @@ -353,11 +353,11 @@ Another way to find an element in the vector is by using the std::find() or tqFi .br .fi .PP -It is safe to have multiple iterators on the vector at the same time. Since QValueVector manages memory dynamically, all iterators can become invalid if a memory reallocation occurs. For example, if some member of the vector is removed, iterators that point to the removed element and to all following elements become invalidated. Inserting into the middle of the vector will invalidate all iterators. For convenience, the function back() returns a reference to the last element in the vector, and front() returns a reference to the first element. If the vector is empty(), both back() and front() have undefined behavior (your application will crash or do unpredictable things). Use back() and front() with caution, for example: +It is safe to have multiple iterators on the vector at the same time. Since TQValueVector manages memory dynamically, all iterators can become invalid if a memory reallocation occurs. For example, if some member of the vector is removed, iterators that point to the removed element and to all following elements become invalidated. Inserting into the middle of the vector will invalidate all iterators. For convenience, the function back() returns a reference to the last element in the vector, and front() returns a reference to the first element. If the vector is empty(), both back() and front() have undefined behavior (your application will crash or do unpredictable things). Use back() and front() with caution, for example: .PP .nf .br - QValueVector vec( 3 ); + TQValueVector vec( 3 ); .br vec.push_back( 1 ); .br @@ -379,23 +379,23 @@ It is safe to have multiple iterators on the vector at the same time. Since QVal .br ... .br - QValueVector dvec; + TQValueVector dvec; .br double d = dvec.back(); // undefined behavior .br .fi .PP -Because QValueVector manages memory dynamically, it is recommended that you contruct a vector with an initial size. Inserting and removing elements happens fastest when: +Because TQValueVector manages memory dynamically, it is recommended that you contruct a vector with an initial size. Inserting and removing elements happens fastest when: .TP Inserting or removing elements happens at the end() of the vector; .TP The vector does not need to allocate additional memory. .PP -By creating a QValueVector with a sufficiently large initial size, there will be less memory allocations. Do not use an initial size that is too big, since it will still take time to construct all the empty entries, and the extra space will be wasted if it is never used. +By creating a TQValueVector with a sufficiently large initial size, there will be less memory allocations. Do not use an initial size that is too big, since it will still take time to construct all the empty entries, and the extra space will be wasted if it is never used. .PP -Because QValueVector is value-based there is no need to be careful about deleting elements in the vector. The vector holds its own copies and will free them if the corresponding member or the vector itself is deleted. You can force the vector to free all of its items with clear(). +Because TQValueVector is value-based there is no need to be careful about deleting elements in the vector. The vector holds its own copies and will free them if the corresponding member or the vector itself is deleted. You can force the vector to free all of its items with clear(). .PP -QValueVector is shared implicitly, which means it can be copied in constant time. If multiple QValueVector instances share the same data and one needs to modify its contents, this modifying instance makes a copy and modifies its private copy; it thus does not affect the other instances. This is often called "copy on write". If a QValueVector is being used in a multi-threaded program, you must protect all access to the vector. See QMutex. +TQValueVector is shared implicitly, which means it can be copied in constant time. If multiple TQValueVector instances share the same data and one needs to modify its contents, this modifying instance makes a copy and modifies its private copy; it thus does not affect the other instances. This is often called "copy on write". If a TQValueVector is being used in a multi-threaded program, you must protect all access to the vector. See QMutex. .PP There are several ways to insert elements into the vector. The push_back() function insert elements into the end of the vector, and is usually fastest. The insert() function can be used to add elements at specific positions within the vector. .PP @@ -407,7 +407,7 @@ Example: .PP .nf .br - QValueVector v( 4 ); + TQValueVector v( 4 ); .br v.push_back( 5 ); .br @@ -421,188 +421,188 @@ Example: .br .fi .PP -QValueVector stores its elements in contiguous memory. This means that you can use a QValueVector in any situation that requires an array. +TQValueVector stores its elements in contiguous memory. This means that you can use a TQValueVector in any situation that requires an array. .PP See also TQt Template Library Classes, Implicitly and Explicitly Shared Classes, and Non-GUI Classes. .SS "Member Type Documentation" -.SH "QValueVector::ConstIterator" +.SH "TQValueVector::ConstIterator" The vector's const iterator type. -.SH "QValueVector::Iterator" +.SH "TQValueVector::Iterator" The vector's iterator type. -.SH "QValueVector::ValueType" +.SH "TQValueVector::ValueType" The type of the object stored in the vector. -.SH "QValueVector::const_iterator" +.SH "TQValueVector::const_iterator" The vector's const iterator type. -.SH "QValueVector::const_pointer" +.SH "TQValueVector::const_pointer" The const pointer to T type. -.SH "QValueVector::const_reference" +.SH "TQValueVector::const_reference" The const reference to T type. -.SH "QValueVector::difference_type" +.SH "TQValueVector::difference_type" A signed integral type used to represent the distance between two iterators. -.SH "QValueVector::iterator" +.SH "TQValueVector::iterator" The vector's iterator type. -.SH "QValueVector::pointer" +.SH "TQValueVector::pointer" The pointer to T type. -.SH "QValueVector::reference" +.SH "TQValueVector::reference" The reference to T type. -.SH "QValueVector::size_type" +.SH "TQValueVector::size_type" An unsigned integral type, used to represent various sizes. -.SH "QValueVector::value_type" +.SH "TQValueVector::value_type" The type of the object stored in the vector. .SH MEMBER FUNCTION DOCUMENTATION -.SH "QValueVector::QValueVector ()" -Constructs an empty vector without any elements. To create a vector which reserves an initial amount of space for elements, use \fCQValueVector(size_type n)\fR. -.SH "QValueVector::QValueVector ( const QValueVector & v )" +.SH "TQValueVector::TQValueVector ()" +Constructs an empty vector without any elements. To create a vector which reserves an initial amount of space for elements, use \fCTQValueVector(size_type n)\fR. +.SH "TQValueVector::TQValueVector ( const TQValueVector & v )" Constructs a copy of \fIv\fR. .PP -This operation costs O(1) time because QValueVector is implicitly shared. +This operation costs O(1) time because TQValueVector is implicitly shared. .PP The first modification to the vector does takes O(n) time, because the elements must be copied. -.SH "QValueVector::QValueVector ( size_type n, const T & val = T ( ) )" +.SH "TQValueVector::TQValueVector ( size_type n, const T & val = T ( ) )" Constructs a vector with an initial size of \fIn\fR elements. Each element is initialized with the value of \fIval\fR. -.SH "QValueVector::QValueVector ( std::vector & v )" +.SH "TQValueVector::TQValueVector ( std::vector & v )" Constructs a copy of \fIv\fR. -.SH "QValueVector::QValueVector ( const std::vector & v )" +.SH "TQValueVector::TQValueVector ( const std::vector & v )" This operation costs O(n) time because \fIv\fR is copied. -.SH "QValueVector::~QValueVector ()" -Destroys the vector, destroying all elements and freeing the allocated memory. References to the values in the vector and all iterators of this vector become invalidated. Note that it is impossible for an iterator to check whether or not it is valid: QValueVector is tuned for performance, not for error checking. -.SH "void QValueVector::append ( const T & x )" +.SH "TQValueVector::~TQValueVector ()" +Destroys the vector, destroying all elements and freeing the allocated memory. References to the values in the vector and all iterators of this vector become invalidated. Note that it is impossible for an iterator to check whether or not it is valid: TQValueVector is tuned for performance, not for error checking. +.SH "void TQValueVector::append ( const T & x )" Appends a copy of \fIx\fR to the end of the vector. .PP See also push_back() and insert(). -.SH "reference QValueVector::at ( size_type i, bool * ok = 0 )" +.SH "reference TQValueVector::at ( size_type i, bool * ok = 0 )" Returns a reference to the element with index \fIi\fR. If \fIok\fR is non-null, and the index \fIi\fR is out of range, *\fIok\fR is set to FALSE and the returned reference is undefined. If the index \fIi\fR is within the range of the vector, and \fIok\fR is non-null, *\fIok\fR is set to TRUE and the returned reference is well defined. -.SH "const_reference QValueVector::at ( size_type i, bool * ok = 0 ) const" +.SH "const_reference TQValueVector::at ( size_type i, bool * ok = 0 ) const" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP Returns a const reference to the element with index \fIi\fR. If \fIok\fR is non-null, and the index \fIi\fR is out of range, *\fIok\fR is set to FALSE and the returned reference is undefined. If the index \fIi\fR is within the range of the vector, and \fIok\fR is non-null, *\fIok\fR is set to TRUE and the returned reference is well defined. -.SH "reference QValueVector::back ()" +.SH "reference TQValueVector::back ()" Returns a reference to the last element in the vector. If there is no last element, this function has undefined behavior. .PP See also empty() and front(). -.SH "const_reference QValueVector::back () const" +.SH "const_reference TQValueVector::back () const" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP Returns a const reference to the last element in the vector. If there is no last element, this function has undefined behavior. .PP See also empty() and front(). -.SH "iterator QValueVector::begin ()" +.SH "iterator TQValueVector::begin ()" Returns an iterator pointing to the beginning of the vector. If the vector is empty(), the returned iterator will equal end(). -.SH "const_iterator QValueVector::begin () const" +.SH "const_iterator TQValueVector::begin () const" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP Returns a const iterator pointing to the beginning of the vector. If the vector is empty(), the returned iterator will equal end(). -.SH "size_type QValueVector::capacity () const" +.SH "size_type TQValueVector::capacity () const" Returns the maximum number of elements that can be stored in the vector without forcing memory reallocation. If memory reallocation takes place, some or all iterators may become invalidated. -.SH "void QValueVector::clear ()" +.SH "void TQValueVector::clear ()" Removes all the elements from the vector. -.SH "const_iterator QValueVector::constBegin () const" +.SH "const_iterator TQValueVector::constBegin () const" Returns a const iterator pointing to the beginning of the vector. If the vector is empty(), the returned iterator will equal end(). .PP See also constEnd(). -.SH "const_iterator QValueVector::constEnd () const" +.SH "const_iterator TQValueVector::constEnd () const" Returns a const iterator pointing behind the last element of the vector. .PP See also constBegin(). -.SH "size_type QValueVector::count () const" +.SH "size_type TQValueVector::count () const" Returns the number of items in the vector. .PP See also isEmpty(). -.SH "bool QValueVector::empty () const" +.SH "bool TQValueVector::empty () const" Returns TRUE if the vector is empty; otherwise returns FALSE. Equivalent to size()==0, only faster. .PP This function is provided for STL compatibility. It is equivalent to isEmpty(). .PP See also size(). -.SH "iterator QValueVector::end ()" +.SH "iterator TQValueVector::end ()" Returns an iterator pointing behind the last element of the vector. -.SH "const_iterator QValueVector::end () const" +.SH "const_iterator TQValueVector::end () const" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP Returns a const iterator pointing behind the last element of the vector. -.SH "iterator QValueVector::erase ( iterator pos )" +.SH "iterator TQValueVector::erase ( iterator pos )" Removes the element at position \fIpos\fR and returns the position of the next element. -.SH "iterator QValueVector::erase ( iterator first, iterator last )" +.SH "iterator TQValueVector::erase ( iterator first, iterator last )" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP Removes all elements from \fIfirst\fR up to but not including \fIlast\fR and returns the position of the next element. -.SH "reference QValueVector::first ()" +.SH "reference TQValueVector::first ()" Returns a reference to the first item in the vector. If there is no first item, this function has undefined behavior. .PP See also empty() and last(). -.SH "const_reference QValueVector::first () const" +.SH "const_reference TQValueVector::first () const" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -.SH "reference QValueVector::front ()" +.SH "reference TQValueVector::front ()" Returns a reference to the first element in the vector. If there is no first element, this function has undefined behavior. .PP See also empty() and back(). -.SH "const_reference QValueVector::front () const" +.SH "const_reference TQValueVector::front () const" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP Returns a const reference to the first element in the vector. If there is no first element, this function has undefined behavior. .PP See also empty() and back(). -.SH "iterator QValueVector::insert ( iterator pos, const T & x )" +.SH "iterator TQValueVector::insert ( iterator pos, const T & x )" Inserts a copy of \fIx\fR at the position immediately before \fIpos\fR. .PP See also push_back(). -.SH "iterator QValueVector::insert ( iterator pos, size_type n, const T & x )" +.SH "iterator TQValueVector::insert ( iterator pos, size_type n, const T & x )" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP Inserts \fIn\fR copies of \fIx\fR immediately before position x. .PP See also push_back(). -.SH "bool QValueVector::isEmpty () const" +.SH "bool TQValueVector::isEmpty () const" Returns TRUE if the vector is empty; returns FALSE otherwise. .PP See also count(). -.SH "reference QValueVector::last ()" +.SH "reference TQValueVector::last ()" Returns a reference to the last item in the vector. If there is no last item, this function has undefined behavior. .PP See also empty() and first(). -.SH "const_reference QValueVector::last () const" +.SH "const_reference TQValueVector::last () const" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -.SH "QValueVector & QValueVector::operator= ( const QValueVector & v )" +.SH "TQValueVector & TQValueVector::operator= ( const TQValueVector & v )" Assigns \fIv\fR to this vector and returns a reference to this vector. .PP -All iterators of the current vector become invalidated by this operation. The cost of such an assignment is O(1) since QValueVector is implicitly shared. -.SH "QValueVector & QValueVector::operator= ( const std::vector & v )" +All iterators of the current vector become invalidated by this operation. The cost of such an assignment is O(1) since TQValueVector is implicitly shared. +.SH "TQValueVector & TQValueVector::operator= ( const std::vector & v )" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP Assigns \fIv\fR to this vector and returns a reference to this vector. .PP All iterators of the current vector become invalidated by this operation. The cost of this assignment is O(n) since \fIv\fR is copied. -.SH "bool QValueVector::operator== ( const QValueVector & x ) const" +.SH "bool TQValueVector::operator== ( const TQValueVector & x ) const" Returns TRUE if each element in this vector equals each corresponding element in \fIx\fR; otherwise returns FALSE. -.SH "bool QValueVector::operator== ( const QValueVector & x )" +.SH "bool TQValueVector::operator== ( const TQValueVector & x )" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP Returns TRUE if each element in this vector equals each corresponding element in \fIx\fR; otherwise returns FALSE. -.SH "reference QValueVector::operator[] ( size_type i )" +.SH "reference TQValueVector::operator[] ( size_type i )" Returns a reference to the element at index \fIi\fR. If \fIi\fR is out of range, this function has undefined behavior. .PP See also at(). -.SH "const_reference QValueVector::operator[] ( size_type i ) const" +.SH "const_reference TQValueVector::operator[] ( size_type i ) const" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP Returns a const reference to the element at index \fIi\fR. If \fIi\fR is out of range, this function has undefined behavior. .PP See also at(). -.SH "void QValueVector::pop_back ()" +.SH "void TQValueVector::pop_back ()" Removes the last item from the vector. .PP This function is provided for STL compatibility. -.SH "void QValueVector::push_back ( const T & x )" +.SH "void TQValueVector::push_back ( const T & x )" Appends a copy of \fIx\fR to the end of the vector. This is the fastest way to add new elements. .PP This function is provided for STL compatibility. It is equivalent to append(). .PP See also insert(). -.SH "void QValueVector::reserve ( size_type n )" +.SH "void TQValueVector::reserve ( size_type n )" Increases the vector's capacity. If \fIn\fR is less than or equal to capacity(), nothing happens. Otherwise, additional memory is allocated so that capacity() will be increased to a value greater than or equal to \fIn\fR. All iterators will then become invalidated. Note that the vector's size() and the values of existing elements remain unchanged. -.SH "void QValueVector::resize ( size_type n, const T & val = T ( ) )" +.SH "void TQValueVector::resize ( size_type n, const T & val = T ( ) )" Changes the size of the vector to \fIn\fR. If \fIn\fR is greater than the current size(), elements are added to the end and initialized with the value of \fIval\fR. If \fIn\fR is less than size(), elements are removed from the end. If \fIn\fR is equal to size() nothing happens. -.SH "size_type QValueVector::size () const" +.SH "size_type TQValueVector::size () const" Returns the number of elements in the vector. .PP This function is provided for STL compatibility. It is equivalent to count(). @@ -610,7 +610,7 @@ This function is provided for STL compatibility. It is equivalent to count(). See also empty(). .SH "SEE ALSO" -.BR http://doc.trolltech.com/ntqvaluevector.html +.BR http://doc.trolltech.com/tqvaluevector.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/tqvariant.3qt b/doc/man/man3/tqvariant.3qt index 5a8876570..02cdd692f 100644 --- a/doc/man/man3/tqvariant.3qt +++ b/doc/man/man3/tqvariant.3qt @@ -107,10 +107,10 @@ QVariant \- Acts like a union for the most common TQt data types .BI "\fBQVariant\fR ( const QPen & val )" .br .ti -1c -.BI "\fBQVariant\fR ( const QValueList & val )" +.BI "\fBQVariant\fR ( const TQValueList & val )" .br .ti -1c -.BI "\fBQVariant\fR ( const QMap & val )" +.BI "\fBQVariant\fR ( const TQMap & val )" .br .ti -1c .BI "\fBQVariant\fR ( int val )" @@ -257,34 +257,34 @@ QVariant \- Acts like a union for the most common TQt data types .BI "double \fBtoDouble\fR ( bool * ok = 0 ) const" .br .ti -1c -.BI "const QValueList \fBtoList\fR () const" +.BI "const TQValueList \fBtoList\fR () const" .br .ti -1c -.BI "const QMap \fBtoMap\fR () const" +.BI "const TQMap \fBtoMap\fR () const" .br .ti -1c .BI "QSizePolicy \fBtoSizePolicy\fR () const" .br .ti -1c -.BI "QValueListConstIterator stringListBegin () const \fI(obsolete)\fR" +.BI "TQValueListConstIterator stringListBegin () const \fI(obsolete)\fR" .br .ti -1c -.BI "QValueListConstIterator stringListEnd () const \fI(obsolete)\fR" +.BI "TQValueListConstIterator stringListEnd () const \fI(obsolete)\fR" .br .ti -1c -.BI "QValueListConstIterator listBegin () const \fI(obsolete)\fR" +.BI "TQValueListConstIterator listBegin () const \fI(obsolete)\fR" .br .ti -1c -.BI "QValueListConstIterator listEnd () const \fI(obsolete)\fR" +.BI "TQValueListConstIterator listEnd () const \fI(obsolete)\fR" .br .ti -1c -.BI "QMapConstIterator mapBegin () const \fI(obsolete)\fR" +.BI "TQMapConstIterator mapBegin () const \fI(obsolete)\fR" .br .ti -1c -.BI "QMapConstIterator mapEnd () const \fI(obsolete)\fR" +.BI "TQMapConstIterator mapEnd () const \fI(obsolete)\fR" .br .ti -1c -.BI "QMapConstIterator mapFind ( const TQString & key ) const \fI(obsolete)\fR" +.BI "TQMapConstIterator mapFind ( const TQString & key ) const \fI(obsolete)\fR" .br .ti -1c .BI "TQString & \fBasString\fR ()" @@ -380,10 +380,10 @@ QVariant \- Acts like a union for the most common TQt data types .BI "double & \fBasDouble\fR ()" .br .ti -1c -.BI "QValueList & \fBasList\fR ()" +.BI "TQValueList & \fBasList\fR ()" .br .ti -1c -.BI "QMap & \fBasMap\fR ()" +.BI "TQMap & \fBasMap\fR ()" .br .ti -1c .BI "QSizePolicy & \fBasSizePolicy\fR ()" @@ -453,7 +453,7 @@ Here is some example code to demonstrate the use of QVariant: .br .fi .PP -You can even store QValueLists and QMaps in a variant, so you can easily construct arbitrarily complex data structures of arbitrary types. This is very powerful and versatile, but may prove less memory and speed efficient than storing specific types in standard data structures. +You can even store TQValueLists and TQMaps in a variant, so you can easily construct arbitrarily complex data structures of arbitrary types. This is very powerful and versatile, but may prove less memory and speed efficient than storing specific types in standard data structures. .PP QVariant also supports the notion of NULL values, where you have a defined type with no value set. .PP @@ -508,13 +508,13 @@ This enum type defines the types of variable that a QVariant can contain. .TP \fCQVariant::KeySequence\fR - a QKeySequence .TP -\fCQVariant::List\fR - a QValueList +\fCQVariant::List\fR - a TQValueList .TP \fCQVariant::LongLong\fR - a long long .TP \fCQVariant::ULongLong\fR - an unsigned long long .TP -\fCQVariant::Map\fR - a QMap +\fCQVariant::Map\fR - a TQMap .TP \fCQVariant::Palette\fR - a QPalette .TP @@ -618,9 +618,9 @@ Constructs a new variant with a bitarray value, \fIval\fR. Constructs a new variant with a key sequence value, \fIval\fR. .SH "QVariant::QVariant ( const QPen & val )" Constructs a new variant with a pen value, \fIval\fR. -.SH "QVariant::QVariant ( const QValueList & val )" +.SH "QVariant::QVariant ( const TQValueList & val )" Constructs a new variant with a list value, \fIval\fR. -.SH "QVariant::QVariant ( const QMap & val )" +.SH "QVariant::QVariant ( const TQMap & val )" Constructs a new variant with a map of QVariants, \fIval\fR. .SH "QVariant::QVariant ( int val )" Constructs a new variant with an integer value, \fIval\fR. @@ -724,16 +724,16 @@ Tries to convert the variant to hold a QKeySequence value. If that is not possib Returns a reference to the stored key sequence. .PP See also toKeySequence(). -.SH "QValueList & QVariant::asList ()" +.SH "TQValueList & QVariant::asList ()" Returns the variant's value as variant list reference. .PP Note that if you want to iterate over the list, you should iterate over a copy, e.g. .PP .nf .br - QValueList list = myVariant.asList(); + TQValueList list = myVariant.asList(); .br - QValueList::Iterator it = list.begin(); + TQValueList::Iterator it = list.begin(); .br while( it != list.end() ) { .br @@ -746,16 +746,16 @@ Note that if you want to iterate over the list, you should iterate over a copy, .fi .SH "TQ_LLONG & QVariant::asLongLong ()" Returns the variant's value as long long reference. -.SH "QMap & QVariant::asMap ()" +.SH "TQMap & QVariant::asMap ()" Returns the variant's value as variant map reference. .PP Note that if you want to iterate over the map, you should iterate over a copy, e.g. .PP .nf .br - QMap map = myVariant.asMap(); + TQMap map = myVariant.asMap(); .br - QMap::Iterator it = map.begin(); + TQMap::Iterator it = map.begin(); .br while( it != map.end() ) { .br @@ -875,23 +875,23 @@ Convert this variant to type Invalid and free up any resources used. Returns TRUE if this is a NULL variant, FALSE otherwise. .SH "bool QVariant::isValid () const" Returns TRUE if the storage type of this variant is not QVariant::Invalid; otherwise returns FALSE. -.SH "QValueListConstIterator QVariant::listBegin () const" +.SH "TQValueListConstIterator QVariant::listBegin () 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 an iterator to the first item in the list if the variant's type is appropriate; otherwise returns a null iterator. -.SH "QValueListConstIterator QVariant::listEnd () const" +.SH "TQValueListConstIterator QVariant::listEnd () 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 the end iterator for the list if the variant's type is appropriate; otherwise returns a null iterator. -.SH "QMapConstIterator QVariant::mapBegin () const" +.SH "TQMapConstIterator QVariant::mapBegin () 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 an iterator to the first item in the map, if the variant's type is appropriate; otherwise returns a null iterator. -.SH "QMapConstIterator QVariant::mapEnd () const" +.SH "TQMapConstIterator QVariant::mapEnd () 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 the end iterator for the map, if the variant's type is appropriate; otherwise returns a null iterator. -.SH "QMapConstIterator QVariant::mapFind ( const TQString & key ) const" +.SH "TQMapConstIterator QVariant::mapFind ( const TQString & key ) 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 an iterator to the item in the map with \fIkey\fR as key, if the variant's type is appropriate and \fIkey\fR is a valid key; otherwise returns a null iterator. @@ -907,11 +907,11 @@ Assigns the value of the variant \fIvariant\fR to this variant. This is a deep copy of the variant, but note that if the variant holds an explicitly shared type such as TQImage, a shallow copy is performed. .SH "bool QVariant::operator== ( const QVariant & v ) const" Compares this QVariant with \fIv\fR and returns TRUE if they are equal; otherwise returns FALSE. -.SH "QValueListConstIterator QVariant::stringListBegin () const" +.SH "TQValueListConstIterator QVariant::stringListBegin () 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 an iterator to the first string in the list if the variant's type is StringList; otherwise returns a null iterator. -.SH "QValueListConstIterator QVariant::stringListEnd () const" +.SH "TQValueListConstIterator QVariant::stringListEnd () 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 the end iterator for the list if the variant's type is StringList; otherwise returns a null iterator. @@ -993,16 +993,16 @@ See also asInt() and canCast(). Returns the variant as a QKeySequence if the variant can be cast to a KeySequence; otherwise returns an empty key sequence. .PP See also asKeySequence() and canCast(). -.SH "const QValueList QVariant::toList () const" -Returns the variant as a QValueList if the variant has type() List or StringList; otherwise returns an empty list. +.SH "const TQValueList QVariant::toList () const" +Returns the variant as a TQValueList if the variant has type() List or StringList; otherwise returns an empty list. .PP Note that if you want to iterate over the list, you should iterate over a copy, e.g. .PP .nf .br - QValueList list = myVariant.toList(); + TQValueList list = myVariant.toList(); .br - QValueList::Iterator it = list.begin(); + TQValueList::Iterator it = list.begin(); .br while( it != list.end() ) { .br @@ -1021,16 +1021,16 @@ Returns the variant as a long long int if the variant can be cast to LongLong; o If \fIok\fR is non-null: \fI*ok\fR is set to TRUE if the value could be converted to an int; otherwise \fI*ok\fR is set to FALSE. .PP See also asLongLong() and canCast(). -.SH "const QMap QVariant::toMap () const" -Returns the variant as a QMap if the variant has type() Map; otherwise returns an empty map. +.SH "const TQMap QVariant::toMap () const" +Returns the variant as a TQMap if the variant has type() Map; otherwise returns an empty map. .PP Note that if you want to iterate over the map, you should iterate over a copy, e.g. .PP .nf .br - QMap map = myVariant.toMap(); + TQMap map = myVariant.toMap(); .br - QMap::Iterator it = map.begin(); + TQMap::Iterator it = map.begin(); .br while( it != map.end() ) { .br @@ -1124,7 +1124,7 @@ See also asULongLong() and canCast(). .SH "Type QVariant::type () const" Returns the storage type of the value stored in the variant. Usually it's best to test with canCast() whether the variant can deliver the data type you are interested in. .SH "const char * QVariant::typeName () const" -Returns the name of the type stored in the variant. The returned strings describe the C++ datatype used to store the data: for example, "QFont", "TQString", or "QValueList". An Invalid variant returns 0. +Returns the name of the type stored in the variant. The returned strings describe the C++ datatype used to store the data: for example, "QFont", "TQString", or "TQValueList". An Invalid variant returns 0. .SH "const char * QVariant::typeToName ( Type typ )\fC [static]\fR" Converts the enum representation of the storage type, \fItyp\fR, to its string representation. diff --git a/doc/network.doc b/doc/network.doc index f37a911d8..6c55a1ddb 100644 --- a/doc/network.doc +++ b/doc/network.doc @@ -166,17 +166,17 @@ QUrlOperator op; MyClass::MyClass() : TQObject(), op( "ftp://ftp.trolltech.com" ) { - connect( &op, TQ_SIGNAL( newChildren( const QValueList &, QNetworkOperation * ) ), - this, TQ_SLOT( slotInsertEntries( const QValueList &, QNetworkOperation * ) ) ); + connect( &op, TQ_SIGNAL( newChildren( const TQValueList &, QNetworkOperation * ) ), + this, TQ_SLOT( slotInsertEntries( const TQValueList &, QNetworkOperation * ) ) ); connect( &op, TQ_SIGNAL( start( QNetworkOperation * ) ), this, TQ_SLOT( slotStart( QNetworkOperation *) ) ); connect( &op, TQ_SIGNAL( finished( QNetworkOperation * ) ), this, TQ_SLOT( slotFinished( QNetworkOperation *) ) ); } -void MyClass::slotInsertEntries( const QValueList &info, QNetworkOperation * ) +void MyClass::slotInsertEntries( const TQValueList &info, QNetworkOperation * ) { - QValueList::ConstIterator it = info.begin(); + TQValueList::ConstIterator it = info.begin(); for ( ; it != info.end(); ++it ) { const QUrlInfo &inf = *it; tqDebug( "Name: %s, Size: %d, Last Modified: %s", diff --git a/doc/object.doc b/doc/object.doc index 175e9bc92..381f96030 100644 --- a/doc/object.doc +++ b/doc/object.doc @@ -323,16 +323,16 @@ the enumeration type \c Priority for the property, this type must be registered with the property system as well. There are two exceptions to the above: The type of a property can also -be either \link QValueList QValueList\\endlink or \link -QMap QMap\\endlink. In -these cases the type must be specified as \c QValueList or as \c QMap +be either \link TQValueList TQValueList\\endlink or \link +TQMap TQMap\\endlink. In +these cases the type must be specified as \c TQValueList or as \c TQMap (i.e. without their template parameters). It is possible to set a value by name, like this: \code obj->setProperty( "priority", "VeryHigh" ); \endcode -In the case of \c QValueList and \c QMap properties the value passes +In the case of \c TQValueList and \c TQMap properties the value passes is a QVariant whose value is the entire list or map. Enumeration types are registered with the \c TQ_ENUMS macro. Here's the diff --git a/doc/porting3.doc b/doc/porting3.doc index 02d26fef3..3be95f6df 100644 --- a/doc/porting3.doc +++ b/doc/porting3.doc @@ -117,7 +117,7 @@ Header files that you might need to add #include directives for include: \i \c \i \c \i \c -\i \c +\i \c \endlist \section1 Namespace @@ -641,7 +641,7 @@ modal dialog instead. \section1 QSortedList -The QSortedList class is now obsolete. Consider using a QDict, a QMap +The QSortedList class is now obsolete. Consider using a QDict, a TQMap or a plain QPtrList instead. \section1 QTableView diff --git a/doc/qdict.doc b/doc/qdict.doc index 5c7ebc7ba..c28967d8f 100644 --- a/doc/qdict.doc +++ b/doc/qdict.doc @@ -52,7 +52,7 @@ \important autoDelete setAutoDelete - QMap is an STL-compatible alternative to this class. + TQMap is an STL-compatible alternative to this class. QDict is implemented as a template class. Define a template instance QDict\ to create a dictionary that operates on @@ -65,7 +65,7 @@ If you want to use non-Unicode, plain 8-bit \c char* keys, use the QAsciiDict template. A QDict has the same performance as a QAsciiDict. If you want to have a dictionary that maps QStrings to - QStrings use QMap. + QStrings use TQMap. The size() of the dictionary is very important. In order to get good performance, you should use a suitably large prime number. diff --git a/doc/qintdict.doc b/doc/qintdict.doc index fcf5a24b9..be269316f 100644 --- a/doc/qintdict.doc +++ b/doc/qintdict.doc @@ -50,7 +50,7 @@ \important autoDelete setAutoDelete - QMap is an STL-compatible alternative to this class. + TQMap is an STL-compatible alternative to this class. QIntDict is implemented as a template class. Define a template instance QIntDict\ to create a dictionary that operates on diff --git a/doc/qmap.doc b/doc/qmap.doc deleted file mode 100644 index 6f5987ed5..000000000 --- a/doc/qmap.doc +++ /dev/null @@ -1,902 +0,0 @@ -/**************************************************************************** -** -** QMap and QMapIterator class documentation -** -** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. -** -** This file is part 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.QPL -** included in the packaging of this file. Licensees holding valid Qt -** Commercial licenses may use this file in accordance with the Qt -** 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. -** -**********************************************************************/ - - -/***************************************************************************** - QMap documentation - *****************************************************************************/ - -/*! - \class QMap ntqmap.h - \brief The QMap class is a value-based template class that - provides a dictionary. - - \ingroup qtl - \ingroup tools - \ingroup shared - \mainclass - - QMap is a TQt implementation of an STL-like map container. It can - be used in your application if the standard \c map is not - available on all your target platforms. QMap is part of the \link - ntqtl.html TQt Template Library\endlink. - - QMap\ defines a template instance to create a - dictionary with keys of type Key and values of type Data. QMap - does not store pointers to the members of the map; instead, it - holds a copy of every member. For this reason, QMap is - value-based, whereas QPtrList and QDict are pointer-based. - - QMap contains and manages a collection of objects of type Data - with associated key values of type Key and provides iterators that - allow the contained objects to be addressed. QMap owns the - contained items. - - Some classes cannot be used within a QMap. For example everything - derived from TQObject and thus all classes that implement widgets. - Only values can be used in a QMap. To qualify as a value, the - class must provide - - \list - \i A copy constructor - \i An assignment operator - \i A default constructor, i.e. a constructor that does not take - any arguments. - \endlist - - Note that C++ defaults to field-by-field assignment operators and - copy constructors if no explicit version is supplied. In many - cases, this is sufficient. - - The class used for the key requires that the \c operator< is - implemented to define ordering of the keys. - - QMap's function naming is consistent with the other TQt classes - (e.g., count(), isEmpty()). QMap also provides extra functions for - compatibility with STL algorithms, such as size() and empty(). - Programmers already familiar with the STL \c map can use these - the STL-like functions if preferred. - - Example: - \target qmap-eg - \code - #include - #include - #include - - class Employee - { - public: - Employee(): sn(0) {} - Employee( const TQString& forename, const TQString& surname, int salary ) - : fn(forename), sn(surname), sal(salary) - { } - - TQString forename() const { return fn; } - TQString surname() const { return sn; } - int salary() const { return sal; } - void setSalary( int salary ) { sal = salary; } - - private: - TQString fn; - TQString sn; - int sal; - }; - - int main(int argc, char **argv) - { - QApplication app( argc, argv ); - - typedef QMap EmployeeMap; - EmployeeMap map; - - map["JD001"] = Employee("John", "Doe", 50000); - map["JW002"] = Employee("Jane", "Williams", 80000); - map["TJ001"] = Employee("Tom", "Jones", 60000); - - Employee sasha( "Sasha", "Hind", 50000 ); - map["SH001"] = sasha; - sasha.setSalary( 40000 ); - - EmployeeMap::Iterator it; - for ( it = map.begin(); it != map.end(); ++it ) { - printf( "%s: %s, %s earns %d\n", - it.key().latin1(), - it.data().surname().latin1(), - it.data().forename().latin1(), - it.data().salary() ); - } - return 0; - } - \endcode - - Program output: - \code - JD001: Doe, John earns 50000 - JW002: Williams, Jane earns 80000 - SH001: Hind, Sasha earns 50000 - TJ001: Jones, Tom earns 60000 - \endcode - - The latest changes to Sasha's salary did not affect the value in - the list because the map created a copy of Sasha's entry. In - addition, notice that the items are sorted alphabetically (by key) - when iterating over the map. - - There are several ways to find items in a map. The begin() and - end() functions return iterators to the beginning and end of the - map. The advantage of using an iterator is that you can move - forward or backward by incrementing/decrementing the iterator. - The iterator returned by end() points to the element which is one - past the last element in the container. The past-the-end iterator - is still associated with the map it belongs to, however it is \e - not dereferenceable; operator*() will not return a well-defined - value. If the map is empty, the iterator returned by begin() will - equal the iterator returned by end(). - - Another way to find an element in the map is by using the find() - function. This returns an iterator pointing to the desired item or - to the end() iterator if no such element exists. - - Another approach uses the operator[]. But be warned: if the map - does not contain an entry for the element you are looking for, - operator[] inserts a default value. If you do not know that the - element you are searching for is really in the list, you should - not use operator[]. The following example illustrates this: - - \code - QMap map; - map["Clinton"] = "Bill"; - str << map["Clinton"] << map["Bush"] << endl; - \endcode - - The code fragment will print out "Clinton", "". Since the value - associated with the "Bush" key did not exist, the map inserted a - default value (in this case, an empty string). If you are not - sure whether a certain element is in the map, you should use - find() and iterators instead. - - If you just want to know whether a certain key is contained in the - map, use the contains() function. In addition, count() tells you - how many keys are in the map. - - It is safe to have multiple iterators at the same time. If some - member of the map is removed, only iterators pointing to the - removed member become invalid; inserting in the map does not - invalidate any iterators. - - Since QMap is value-based, there is no need to be concerned about - deleting items in the map. The map holds its own copies and will - free them if the corresponding member or the map itself is - deleted. - - QMap is implicitly shared. This means you can just make copies of - the map in time O(1). If multiple QMap instances share the same - data and one is modifying the map's data, this modifying instance - makes a copy and modifies its private copy: so it does not affect - other instances. If a QMap is being used in a multi-threaded - program, you must protect all access to the map. See \l QMutex. - - There are a couple of ways of inserting new items into the map. - One uses the insert() method; the other uses operator[]: - \code - QMap map; - map["Clinton"] = "Bill"; - map.insert( "Bush", "George" ); - \endcode - - Items can also be removed from the map in several ways. One way is - to pass an iterator to remove(). Another way is to pass a key - value to remove(), which will delete the entry with the requested - key. In addition you can clear the entire map using the clear() - method. - - \sa QMapIterator -*/ - - -/*! \enum QMap::key_type - The map's key type. */ -/*! \enum QMap::mapped_type - The map's data type. */ -/*! \enum QMap::value_type - Corresponds to TQPair\. */ -/*! \enum QMap::ValueType - Corresponds to TQPair\, TQt style.*/ -/*! \enum QMap::pointer - Pointer to value_type.*/ -/*! \enum QMap::const_pointer - Const pointer to value_type.*/ -/*! \enum QMap::reference - Reference to value_type.*/ -/*! \enum QMap::const_reference - Const reference to value_type.*/ -/*! \enum QMap::size_type - An unsigned integral type, used to represent various sizes. */ -/*! \enum QMap::iterator - The map's iterator type.*/ -/*! \enum QMap::Iterator - The map's iterator type, TQt style. */ -/*! \enum QMap::const_iterator - The map's const iterator type.*/ -/*! \enum QMap::ConstIterator - The map's const iterator type, TQt style.*/ -/*! \enum QMap::difference_type - \internal */ -/*! \enum QMap::Priv - \internal */ - -/*! - \fn QMap::QMap() - - Constructs an empty map. -*/ - -/*! - \fn QMap::QMap( const QMap& m ) - - Constructs a copy of \a m. - - This operation costs O(1) time because QMap is implicitly shared. - This makes returning a QMap from a function very fast. If a shared - instance is modified, it will be copied (copy-on-write), and this - takes O(n) time. -*/ - -/*! - \fn QMap::QMap( const std::map& m ) - - Constructs a copy of \a m. -*/ - -/*! - \fn QMap& QMap::operator= ( const std::map& m ) - - \overload - - Assigns \a m to this map and returns a reference to this map. - - All iterators of the current map become invalidated by this - operation. -*/ - -/*! - \fn QMap::~QMap() - - Destroys the map. References to the values in the map and all - iterators of this map become invalidated. Since QMap is highly - tuned for performance you won't see warnings if you use invalid - iterators, because it is not possible for an iterator to check - whether it is valid or not. -*/ - -/*! - \fn QMap& QMap::operator= (const QMap& m) - - Assigns \a m to this map and returns a reference to this map. - - All iterators of the current map become invalidated by this - operation. The cost of such an assignment is O(1), because QMap is - implicitly shared. -*/ - -/*! - \fn T& QMap::operator[] ( const Key& k ) - - Returns the value associated with the key \a k. If no such key is - present, an empty item is inserted with this key and a reference - to the empty item is returned. - - You can use this operator both for reading and writing: - \code - QMap map; - map["Clinton"] = "Bill"; - stream << map["Clinton"]; - \endcode -*/ - -/*! - \fn void QMap::clear() - - Removes all items from the map. - - \sa remove() -*/ - -/*! - \fn Iterator QMap::find( const Key& k ) - - Returns an iterator pointing to the element with key \a k in the - map. - - Returns end() if no key matched. - - \sa QMapIterator -*/ - -/*! - \fn ConstIterator QMap::find( const Key& k ) const - - \overload - - Returns an iterator pointing to the element with key \a k in the - map. - - Returns end() if no key matched. - - \sa QMapConstIterator -*/ - -/*! - \fn Iterator QMap::begin() - - Returns an iterator pointing to the first element in the map. This - iterator equals end() if the map is empty. - - The items in the map are traversed in the order defined by - operator\<(Key, Key). - - \sa end() QMapIterator -*/ - -/*! - \fn ConstIterator QMap::begin() const - - \overload - - \sa end() QMapConstIterator -*/ - -/*! - \fn ConstIterator QMap::constBegin() const - - Returns an iterator pointing to the first element in the map. This - iterator equals end() if the map is empty. - - The items in the map are traversed in the order defined by - operator\<(Key, Key). - - \sa constEnd() QMapConstIterator -*/ - -/*! - \fn Iterator QMap::end() - - The iterator returned by end() points to the element which is one - past the last element in the container. The past-the-end iterator - is still associated with the map it belongs to, but it is \e not - dereferenceable; operator*() will not return a well-defined value. - - This iterator equals begin() if the map is empty. - - \sa begin() QMapIterator -*/ - -/*! - \fn ConstIterator QMap::end() const - - \overload -*/ - -/*! - \fn ConstIterator QMap::constEnd() const - - The iterator returned by end() points to the element which is one - past the last element in the container. The past-the-end iterator - is still associated with the map it belongs to, but it is \e not - dereferenceable; operator*() will not return a well-defined value. - - This iterator equals constBegin() if the map is empty. - - \sa constBegin() QMapConstIterator -*/ - -/*! - \fn void QMap::detach() - - If the map does not share its data with another QMap instance, - nothing happens; otherwise the function creates a new copy of this - map and detaches from the shared one. This function is called - whenever the map is modified. The implicit sharing mechanism is - implemented this way. -*/ - - -/*! - \fn QDataStream& operator>>( QDataStream& s, QMap& m ) - - \relates QMap - - Reads the map \a m from the stream \a s. The types \e Key and \e T - must implement the streaming operator as well. -*/ - -/*! - \fn QDataStream& operator<<( QDataStream& s, const QMap& m ) - - \relates QMap - - Writes the map \a m to the stream \a s. The types \e Key and \e T - must implement the streaming operator as well. -*/ - -/*! - \fn size_type QMap::size() const - - Returns the number of items in the map. - - This function is provided for STL compatibility. It is equivalent - to count(). - - \sa empty() -*/ - -/*! - \fn bool QMap::empty() const - - Returns TRUE if the map contains no items; otherwise returns - FALSE. - - This function is provided for STL compatibility. It is equivalent - to isEmpty(). - - \sa size() -*/ - -/*! - \fn TQPair QMap::insert( const value_type& x ) - - \overload - - Inserts the (key, value) pair \a x into the map. \a x is a TQPair - whose \c first element is a key to be inserted and whose \c second - element is the associated value to be inserted. Returns a pair - whose \c first element is an iterator pointing to the inserted - item and whose \c second element is a bool indicating TRUE if \a x - was inserted and FALSE if it was not inserted, e.g. because it was - already present. - - \sa replace() -*/ - -/*! - \fn void QMap::erase( iterator it ) - - Removes the item associated with the iterator \a it from the map. - - This function is provided for STL compatibility. It is equivalent - to remove(). - - \sa clear() -*/ - -/*! - \fn void QMap::erase( const key_type& k ) - - \overload - - Removes the item with the key \a k from the map. -*/ - -/*! - \fn size_type QMap::count( const key_type& k ) const - - Returns the number of items whose key is \a k. Since QMap does not - allow duplicate keys, the return value is always 0 or 1. - - This function is provided for STL compatibility. -*/ - -/*! - \fn Iterator QMap::replace( const Key& k, const T& v ) - - Replaces the value of the element with key \a k, with the value \a - v. - - \sa insert() remove() -*/ - -/*! - \fn const T& QMap::operator[] ( const Key& k ) const - - \overload - - \warning This function differs from the non-const version of the - same function. It will \e not insert an empty value if the key \a - k does not exist. This may lead to logic errors in your program. - You should check if the element exists before calling this - function. - - Returns the value associated with the key \a k. If no such key is - present, a reference to an empty item is returned. -*/ - -/*! - \fn uint QMap::count() const - - \overload - - Returns the number of items in the map. - - \sa isEmpty() -*/ - -/*! - \fn bool QMap::isEmpty() const - - Returns TRUE if the map contains no items; otherwise returns - FALSE. - - \sa count() -*/ - -/*! - \fn Iterator QMap::insert( const Key& key, const T& value, bool overwrite ) - - Inserts a new item with the key, \a key, and a value of \a value. - If there is already an item whose key is \a key, that item's value - is replaced with \a value, unless \a overwrite is FALSE (it is - TRUE by default). In this case an iterator to this item is - returned, else an iterator to the new item is returned. - -*/ - -/*! - \fn void QMap::remove( iterator it ) - - Removes the item associated with the iterator \a it from the map. - - \sa clear() -*/ - -/*! - \fn void QMap::remove( const Key& k ) - - \overload - - Removes the item with the key \a k from the map. -*/ - -/*! - \fn bool QMap::contains( const Key& k ) const - - Returns TRUE if the map contains an item with key \a k; otherwise - returns FALSE. -*/ - - -/***************************************************************************** - QMapIterator documentation - *****************************************************************************/ - -/*! - \class QMapIterator ntqmap.h - \brief The QMapIterator class provides an iterator for QMap. - - \ingroup qtl - \ingroup tools - - You cannot create an iterator by yourself. Instead, you must ask a - map to give you one. An iterator is as big as a pointer; on 32-bit - machines that means 4 bytes, on 64-bit machines, 8 bytes. That - makes copying iterators very fast. Iterators behave in a similar - way to pointers, and they are almost as fast as pointers. See the - \link ntqmap.html#qmap-eg QMap example\endlink. - - QMap is highly optimized for performance and memory usage, but the - trade-off is that you must be more careful. The only way to - traverse a map is to use iterators. QMap does not know about its - iterators, and the iterators don't even know to which map they - belong. That makes things fast but a bit dangerous because it is - up to you to make sure that the iterators you are using are still - valid. QDictIterator will be able to give warnings, whereas - QMapIterator may end up in an undefined state. - - For every Iterator there is also a ConstIterator. You must use the - ConstIterator to access a QMap in a const environment or if the - reference or pointer to the map is itself const. Its semantics are - the same, but it only returns const references to the item it - points to. - - \sa QMap QMapConstIterator -*/ - -/*! \enum QMapIterator::iterator_category - The type of iterator category, \c std::bidirectional_iterator_tag. */ -/*! \enum QMapIterator::value_type - The type of value. */ -/*! \enum QMapIterator::pointer - Pointer to value_type. */ -/*! \enum QMapIterator::reference - Reference to value_type. */ -/*! \enum QMapIterator::difference_type - \internal */ -/*! \enum QMapIterator::NodePtr - \internal */ - -/*! - \fn QMapIterator::QMapIterator() - - Creates an uninitialized iterator. -*/ - -/*! - \fn QMapIterator::QMapIterator (QMapNode * p) - - Constructs an iterator starting at node \a p. -*/ - -/*! - \fn QMapIterator::QMapIterator( const QMapIterator& it ) - - Constructs a copy of the iterator, \a it. -*/ - -/*! - \fn QMapIterator& QMapIterator::operator++() - - Prefix ++ makes the succeeding item current and returns an - iterator pointing to the new current item. The iterator cannot - check whether it reached the end of the map. Incrementing the - iterator returned by end() causes undefined results. -*/ - -/*! - \fn QMapIterator QMapIterator::operator++(int) - - \overload - - Postfix ++ makes the succeeding item current and returns an - iterator pointing to the new current item. The iterator cannot - check whether it reached the end of the map. Incrementing the - iterator returned by end() causes undefined results. -*/ - -/*! - \fn QMapIterator& QMapIterator::operator--() - - Prefix -- makes the previous item current and returns an iterator - pointing to the new current item. The iterator cannot check - whether it reached the beginning of the map. Decrementing the - iterator returned by begin() causes undefined results. -*/ - -/*! - \fn QMapIterator QMapIterator::operator--(int) - - \overload - - Postfix -- makes the previous item current and returns an iterator - pointing to the new current item. The iterator cannot check - whether it reached the beginning of the map. Decrementing the - iterator returned by begin() causes undefined results. -*/ - -/*! - \fn T& QMapIterator::operator*() - - Dereference operator. Returns a reference to the current item's - data. The same as data(). -*/ - -/*! - \fn const T& QMapIterator::operator*() const - - \overload - - Dereference operator. Returns a const reference to the current - item's data. The same as data(). -*/ - -/*! - \fn bool QMapIterator::operator==( const QMapIterator& it ) const - - Compares the iterator to the \a it iterator and returns TRUE if - they point to the same item; otherwise returns FALSE. -*/ - -/*! - \fn bool QMapIterator::operator!=( const QMapIterator& it ) const - - Compares the iterator to the \a it iterator and returns FALSE if - they point to the same item; otherwise returns TRUE. -*/ - -/*! - \fn T& QMapIterator::data() - - Returns a reference to the current item's data. -*/ - -/*! - \fn const T& QMapIterator::data() const - - \overload - - Returns a const reference to the current item's data. -*/ - -/*! - \fn const K& QMapIterator::key() const - - Returns a const reference to the current item's key. -*/ - -/*! - \fn QValueList QMap::keys() const - - Returns a list of all the keys in the map, in order. -*/ - -/*! - \fn QValueList QMap::values() const - - Returns a list of all the values in the map, in key order. -*/ - -/***************************************************************************** - QMapConstIterator documentation - *****************************************************************************/ - -/*! - \class QMapConstIterator ntqmap.h - \brief The QMapConstIterator class provides an iterator for QMap. - - \ingroup qtl - \ingroup tools - - In contrast to QMapIterator, this class is used to iterate over a - const map. It does not allow you to modify the values of the map - because this would break the const semantics. - - For more information on QMap iterators, see \l{QMapIterator} and - the \link ntqmap.html#qmap-eg QMap example\endlink. - - \sa QMap QMapIterator -*/ - -/*! \enum QMapConstIterator::iterator_category - The type of iterator category, \c std::bidirectional_iterator_tag. */ -/*! \enum QMapConstIterator::value_type - The type of const value. */ -/*! \enum QMapConstIterator::pointer - Const pointer to value_type. */ -/*! \enum QMapConstIterator::reference - Const reference to value_type. */ -/*! \enum QMapConstIterator::difference_type - \internal */ -/*! \enum QMapConstIterator::NodePtr - \internal */ - - -/*! - \fn QMapConstIterator::QMapConstIterator() - - Constructs an uninitialized iterator. -*/ - -/*! - \fn QMapConstIterator::QMapConstIterator (QMapNode * p) - - Constructs an iterator starting at node \a p. -*/ - -/*! - \fn QMapConstIterator::QMapConstIterator( const QMapConstIterator& it ) - - Constructs a copy of the iterator, \a it. -*/ - -/*! - \fn QMapConstIterator::QMapConstIterator( const QMapIterator& it ) - - Constructs a copy of the iterator, \a it. -*/ - -/*! - \fn QMapConstIterator& QMapConstIterator::operator++() - - Prefix ++ makes the succeeding item current and returns an - iterator pointing to the new current item. The iterator cannot - check whether it reached the end of the map. Incrementing the - iterator returned by end() causes undefined results. -*/ - -/*! - \fn QMapConstIterator QMapConstIterator::operator++(int) - - \overload - - Postfix ++ makes the succeeding item current and returns an - iterator pointing to the new current item. The iterator cannot - check whether it reached the end of the map. Incrementing the - iterator returned by end() causes undefined results. -*/ - -/*! - \fn QMapConstIterator& QMapConstIterator::operator--() - - Prefix -- makes the previous item current and returns an iterator - pointing to the new current item. The iterator cannot check - whether it reached the beginning of the map. Decrementing the - iterator returned by begin() causes undefined results. -*/ - -/*! - \fn QMapConstIterator QMapConstIterator::operator--(int) - - \overload - - Postfix -- makes the previous item current and returns an iterator - pointing to the new current item. The iterator cannot check - whether it reached the beginning of the map. Decrementing the - iterator returned by begin() causes undefined results. -*/ - -/*! - \fn const T& QMapConstIterator::operator*() const - - Dereference operator. Returns a const reference to the current - item's data. The same as data(). -*/ - -/*! - \fn bool QMapConstIterator::operator==( const QMapConstIterator& it ) const - - Compares the iterator to the \a it iterator and returns TRUE if - they point to the same item; otherwise returns FALSE. -*/ - -/*! - \fn bool QMapConstIterator::operator!=( const QMapConstIterator& it ) const - - Compares the iterator to the \a it iterator and returns FALSE if - they point to the same item; otherwise returns TRUE. -*/ - -/*! - \fn const T& QMapConstIterator::data() const - - Returns a const reference to the current item's data. -*/ - -/*! - \fn const K& QMapConstIterator::key() const - - Returns a const reference to the current item's key. -*/ diff --git a/doc/qmemarray.doc b/doc/qmemarray.doc index 09fd67c5f..566731eeb 100644 --- a/doc/qmemarray.doc +++ b/doc/qmemarray.doc @@ -69,10 +69,10 @@ data when it is not required, which results in lower memory use and less copying of data. - An alternative to QMemArray is QValueVector. The QValueVector class + An alternative to QMemArray is TQValueVector. The TQValueVector class also provides an array of objects, but can deal with objects that have constructors (specifically a copy constructor and a default - constructor). QValueVector provides an STL-compatible syntax and is + constructor). TQValueVector provides an STL-compatible syntax and is \link shclass.html implicitly shared\endlink. Example: @@ -558,7 +558,7 @@ Returns an iterator pointing at the beginning of this array. This iterator can be used in the same way as the iterators of - QValueList and QMap, for example. + TQValueList and TQMap, for example. */ /*! @@ -566,7 +566,7 @@ Returns an iterator pointing behind the last element of this array. This iterator can be used in the same way as the iterators - of QValueList and QMap, for example. + of TQValueList and TQMap, for example. */ /*! @@ -576,7 +576,7 @@ Returns a const iterator pointing at the beginning of this array. This iterator can be used in the same way as the iterators of - QValueList and QMap, for example. + TQValueList and TQMap, for example. */ /*! @@ -586,5 +586,5 @@ Returns a const iterator pointing behind the last element of this array. This iterator can be used in the same way as the iterators - of QValueList and QMap, for example. + of TQValueList and TQMap, for example. */ diff --git a/doc/qpair.doc b/doc/qpair.doc deleted file mode 100644 index 2b1b5a6e5..000000000 --- a/doc/qpair.doc +++ /dev/null @@ -1,146 +0,0 @@ -/**************************************************************************** -** -** TQPair class documentation -** -** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. -** -** This file is part 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.QPL -** included in the packaging of this file. Licensees holding valid Qt -** Commercial licenses may use this file in accordance with the Qt -** 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. -** -**********************************************************************/ - -/***************************************************************************** - TQPair documentation - *****************************************************************************/ - - -/*! - \class TQPair ntqpair.h - \brief The TQPair class is a value-based template class that provides a pair of elements. - - \ingroup qtl - \ingroup tools - \ingroup shared - - TQPair is a TQt implementation of an STL-like pair. It can be used - in your application if the standard pair\<\> is not available on - your target platforms. - - TQPair\ defines a template instance to create a pair of - values that contains two values of type T1 and T2. Please note - that TQPair does not store pointers to the two elements; it holds a - copy of every member. This is why these kinds of classes are - called \e{value based}. If you're interested in \e{pointer based} - classes see, for example, QPtrList and QDict. - - TQPair holds one copy of type T1 and one copy of type T2, but does - not provide iterators to access these elements. Instead, the two - elements (\c first and \c second) are public member variables of - the pair. TQPair owns the contained elements. For more relaxed - ownership semantics, see QPtrCollection and friends which are - pointer-based containers. - - Some classes cannot be used within a TQPair: for example, all - classes derived from TQObject and thus all classes that implement - widgets. Only "values" can be used in a TQPair. To qualify as a - value the class must provide: - - \list - \i A copy constructor - \i An assignment operator - \i A constructor that takes no arguments - \endlist - - Note that C++ defaults to field-by-field assignment operators and - copy constructors if no explicit version is supplied. In many - cases this is sufficient. - - TQPair uses an STL-like syntax to manipulate and address the - objects it contains. See the \link ntqtl.html QTL - documentation\endlink for more information. - - Functions that need to return two values can use a TQPair. -*/ - -/*! \enum TQPair::first_type - The type of the first element in the pair. */ - -/*! \enum TQPair::second_type - The type of the second element in the pair. */ - - -/*! - \fn TQPair::TQPair() - - Constructs an empty pair. The \c first and \c second elements are - default constructed. -*/ - -/*! - \fn TQPair::TQPair( const T1& t1, const T2& t2 ) - - Constructs a pair and initializes the \c first element with \a t1 - and the \c second element with \a t2. -*/ - -/*! - \fn bool operator==( const TQPair& x, const TQPair& y ) - - Returns TRUE if \a x is equal to \a y; otherwise returns FALSE. - Two QPairs are equal if both their \c first and \c second elements - are equal. -*/ - -/*! - \fn bool operator<( const TQPair& x, const TQPair& y ) - - Returns TRUE if \a x is less than \a y; otherwise returns FALSE. - \a x is less than \a y if x.first is less than y.first, or if - x.second is less than y.second and x.first is the same as y.first. - - For example, (0, 1) < (0, 4) and (0, 4) < (1, 0). -*/ - -/*! \fn TQPair qMakePair( const T1& x, const T2& y ) - - Convenience wrapper for the TQPair constructor. -*/ - -/*! \fn QDataStream& operator>>( QDataStream& s, TQPair& p ) - - Reads a pair \a p from the stream \a s. The types T1 and T2 must - implement the streaming operator as well. -*/ - -/*! \fn QDataStream& operator<<( QDataStream& s, const TQPair& p ) - - Writes the pair \a p to the stream \a s. The types T1 and T2 must - implement the streaming operator as well. -*/ diff --git a/doc/qptrlist.doc b/doc/qptrlist.doc index df8cfbb9b..14b51645d 100644 --- a/doc/qptrlist.doc +++ b/doc/qptrlist.doc @@ -50,7 +50,7 @@ \important autoDelete setAutoDelete - QValueList is an STL-compatible alternative to this class. + TQValueList is an STL-compatible alternative to this class. Define a template instance QPtrList\ to create a list that operates on pointers to X (X*). diff --git a/doc/qptrqueue.doc b/doc/qptrqueue.doc index 6dc8ddf9e..b0dd1a5b2 100644 --- a/doc/qptrqueue.doc +++ b/doc/qptrqueue.doc @@ -44,7 +44,7 @@ \ingroup collection \ingroup tools - QValueVector can be used as an STL-compatible alternative to this + TQValueVector can be used as an STL-compatible alternative to this class. A template instance QPtrQueue\ is a queue that operates on diff --git a/doc/qptrstack.doc b/doc/qptrstack.doc index 783f28823..585d93c44 100644 --- a/doc/qptrstack.doc +++ b/doc/qptrstack.doc @@ -47,7 +47,7 @@ \ingroup tools - QValueStack is an STL-compatible alternative to this class. + TQValueStack is an STL-compatible alternative to this class. Define a template instance QPtrStack\ to create a stack that operates on pointers to X, (X*). diff --git a/doc/qptrvector.doc b/doc/qptrvector.doc index dba8af826..05ea6f45c 100644 --- a/doc/qptrvector.doc +++ b/doc/qptrvector.doc @@ -50,7 +50,7 @@ \important autoDelete setAutoDelete - QValueVector is an STL-compatible alternative to this class. + TQValueVector is an STL-compatible alternative to this class. QPtrVector is implemented as a template class. Defines a template instance QPtrVector\ to create a vector that contains pointers diff --git a/doc/qtl.doc b/doc/qtl.doc index f2cdf744a..2c3ab4e34 100644 --- a/doc/qtl.doc +++ b/doc/qtl.doc @@ -68,7 +68,7 @@ use QPtrCollection and friends, all of which operate on pointers rather than values. This applies, for example, to all classes derived from \l TQObject. A TQObject does not have a copy constructor, so using it as value is impossible. You may choose to store pointers to -TQObjects in a QValueList, but using QPtrList directly seems to be the +TQObjects in a TQValueList, but using QPtrList directly seems to be the better choice for this kind of application domain. QPtrList, like all other QPtrCollection based containers, provides far more sanity checking than a speed-optimized value based container. @@ -109,7 +109,7 @@ iterator matches the size of a normal pointer. To iterate over a container, use a loop like this: \code - typedef QValueList List; + typedef TQValueList List; List list; for( List::Iterator it = list.begin(); it != list.end(); ++it ) printf( "Number is %i\n", *it ); @@ -125,12 +125,12 @@ operator (it++, it--), since the former is slightly faster. The same concept applies to the other container classes: \code - typedef QMap Map; + typedef TQMap Map; Map map; for( Map::iterator it = map.begin(); it != map.end(); ++it ) printf( "Key=%s Data=%s\n", it.key().ascii(), it.data().ascii() ); - typedef QValueVector Vector; + typedef TQValueVector Vector; Vector vec; for( Vector::iterator it = vec.begin(); it != vec.end(); ++it ) printf( "Data=%d\n", *it ); @@ -156,7 +156,7 @@ that provides iterators (including your own containers). qHeapSort() provides a well known sorting algorithm. You can use it like this: \code - typedef QValueList List; + typedef TQValueList List; List list; list << 42 << 100 << 1234 << 12 << 8; qHeapSort( list ); @@ -197,7 +197,7 @@ tqSwap() exchanges the values of two variables: The tqCount() template function counts the number of occurrences of a value within a container. For example: \code - QValueList list; + TQValueList list; list.push_back( 1 ); list.push_back( 1 ); list.push_back( 1 ); @@ -212,12 +212,12 @@ value within a container. For example: The tqFind() template function finds the first occurrence of a value within a container. For example: \code - QValueList list; + TQValueList list; list.push_back( 1 ); list.push_back( 1 ); list.push_back( 1 ); list.push_back( 2 ); - QValueListIterator it = tqFind( list.begin(), list.end(), 2 ); + TQValueListIterator it = tqFind( list.begin(), list.end(), 2 ); \endcode \target tqFill @@ -226,7 +226,7 @@ within a container. For example: The tqFill() template function fills a range with copies of a value. For example: \code - QValueVector vec(3); + TQValueVector vec(3); tqFill( vec.begin(), vec.end(), 99 ); // vec contains 99, 99, 99 \endcode @@ -239,12 +239,12 @@ considered, only if the elements in the first range are equal to the corresponding elements in the second range (consequently, both ranges must be valid). For example: \code - QValueVector v1(3); + TQValueVector v1(3); v1[0] = 1; v1[2] = 2; v1[3] = 3; - QValueVector v2(5); + TQValueVector v2(5); v2[0] = 1; v2[2] = 2; v2[3] = 3; @@ -261,7 +261,7 @@ must be valid). For example: The tqCopy() template function copies a range of elements to an OutputIterator, in this case a QTextOStreamIterator: \code - QValueList list; + TQValueList list; list.push_back( 100 ); list.push_back( 200 ); list.push_back( 300 ); @@ -276,11 +276,11 @@ which creates a QBackInsertIterator<> whose job is to insert elements into the end of a container. For example: \code - QValueList l; + TQValueList l; l.push_back( 100 ); l.push_back( 200 ); l.push_back( 300 ); - QValueVector v; + TQValueVector v; tqCopy( l.begin(), l.end(), qBackInserter(v) ); \endcode \endomit @@ -291,11 +291,11 @@ into the end of a container. For example: The tqCopyBackward() template function copies a container or a slice of a container to an OutputIterator, but in reverse order, for example: \code - QValueVector vec(3); + TQValueVector vec(3); vec.push_back( 100 ); vec.push_back( 200 ); vec.push_back( 300 ); - QValueVector another; + TQValueVector another; tqCopyBackward( vec.begin(), vec.end(), another.begin() ); // 'another' now contains 100, 200, 300 // however the elements are copied one at a time @@ -315,7 +315,7 @@ illustrates this: list2 << "Torben" << "Matthias"; tqCopy( list2.begin(), list2.end(), list1.begin() ); - QValueVector vec( list1.size(), "Dave" ); + TQValueVector vec( list1.size(), "Dave" ); tqCopy( list2.begin(), list2.end(), vec.begin() ); \endcode @@ -342,7 +342,7 @@ appropriate streaming operators. Here is an example. \code QDataStream str(...); - QValueList list; + TQValueList list; // ... fill the list here str << list; \endcode @@ -350,11 +350,11 @@ appropriate streaming operators. Here is an example. The container can be read in again with: \code - QValueList list; + TQValueList list; str >> list; \endcode -The same applies to QStringList, QValueStack and QMap. +The same applies to QStringList, TQValueStack and TQMap. */ /*! diff --git a/doc/qvaluelist.doc b/doc/qvaluelist.doc deleted file mode 100644 index 2727356f4..000000000 --- a/doc/qvaluelist.doc +++ /dev/null @@ -1,1200 +0,0 @@ -/**************************************************************************** -** -** QValueList and QValueListIterator class documentation -** -** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. -** -** This file is part 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.QPL -** included in the packaging of this file. Licensees holding valid Qt -** Commercial licenses may use this file in accordance with the Qt -** 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. -** -**********************************************************************/ - - -/***************************************************************************** - QValueList documentation - *****************************************************************************/ - -/*! - \class QValueList ntqvaluelist.h - \brief The QValueList class is a value-based template class that - provides lists. - - \ingroup qtl - \ingroup tools - \ingroup shared - \mainclass - \reentrant - - QValueList is a TQt implementation of an STL-like list container. - It can be used in your application if the standard \c list is not - available for your target platform(s). QValueList is part of the - \link ntqtl.html TQt Template Library\endlink. - - QValueList\ defines a template instance to create a list of - values that all have the class T. Note that QValueList does not - store pointers to the members of the list; it holds a copy of - every member. This is why these kinds of classes are called "value - based"; QPtrList and QDict are "pointer based". - - QValueList contains and manages a collection of objects of type T - and provides iterators that allow the contained objects to be - addressed. QValueList owns the contained items. For more relaxed - ownership semantics, see QPtrCollection and friends which are - pointer-based containers. - - Some classes cannot be used within a QValueList, for example, all - classes derived from TQObject and thus all classes that implement - widgets. Only values can be used in a QValueList. To qualify as a - value the class must provide: - \list - \i a copy constructor; - \i an assignment operator; - \i a default constructor, i.e. a constructor that does not take any arguments. - \endlist - - Note that C++ defaults to field-by-field assignment operators and - copy constructors if no explicit version is supplied. In many - cases this is sufficient. - - In addition, some compilers (e.g. Sun CC) might require that the - class provides an equality operator (operator==()). - - QValueList's function naming is consistent with the other Qt - classes (e.g. count(), isEmpty()). QValueList also provides extra - functions for compatibility with STL algorithms, such as size() - and empty(). Programmers already familiar with the STL \c list may - prefer to use the STL-compatible functions. - - Example: - \code - class Employee - { - public: - Employee(): sn(0) {} - Employee( const TQString& forename, const TQString& surname, int salary ) - : fn(forename), sn(surname), sal(salary) - {} - - TQString forename() const { return fn; } - TQString surname() const { return sn; } - int salary() const { return sal; } - void setSalary( int salary ) { sal = salary; } - - private: - TQString fn; - TQString sn; - int sal; - }; - - typedef QValueList EmployeeList; - EmployeeList list; - - list.append( Employee("John", "Doe", 50000) ); - list.append( Employee("Jane", "Williams", 80000) ); - list.append( Employee("Tom", "Jones", 60000) ); - - Employee mary( "Mary", "Hawthorne", 90000 ); - list.append( mary ); - mary.setSalary( 100000 ); - - EmployeeList::iterator it; - for ( it = list.begin(); it != list.end(); ++it ) - cout << (*it).surname().latin1() << ", " << - (*it).forename().latin1() << " earns " << - (*it).salary() << endl; - - // Output: - // Doe, John earns 50000 - // Williams, Jane earns 80000 - // Hawthorne, Mary earns 90000 - // Jones, Tom earns 60000 - \endcode - - - Notice that the latest changes to Mary's salary did not affect the - value in the list because the list created a copy of Mary's entry. - - There are several ways to find items in the list. The begin() and - end() functions return iterators to the beginning and end of the - list. The advantage of getting an iterator is that you can move - forward or backward from this position by - incrementing/decrementing the iterator. The iterator returned by - end() points to the item which is one \e past the last item in the - container. The past-the-end iterator is still associated with the - list it belongs to, however it is \e not dereferenceable; - operator*() will not return a well-defined value. If the list is - empty(), the iterator returned by begin() will equal the iterator - returned by end(). - - Another way to find an item in the list is by using the \link - ntqtl.html#qFind tqFind()\endlink algorithm. For example: - - \code - QValueList list; - ... - QValueList::iterator it = tqFind( list.begin(), list.end(), 3 ); - if ( it != list.end() ) - // it points to the found item - \endcode - - It is safe to have multiple iterators a the list at the same - time. If some member of the list is removed, only iterators - pointing to the removed member become invalid. Inserting into the - list does not invalidate any iterator. For convenience, the - function last() returns a reference to the last item in the list, - and first() returns a reference to the the first item. If the - list is empty(), both last() and first() have undefined behavior - (your application will crash or do unpredictable things). Use - last() and first() with caution, for example: - - \code - QValueList list; - list.append( 1 ); - list.append( 2 ); - list.append( 3 ); - ... - if ( !list.empty() ) { - // OK, modify the first item - int& i = list.first(); - i = 18; - } - ... - QValueList dlist; - double d = dlist.last(); // undefined - \endcode - - Because QValueList is value-based there is no need to be careful - about deleting items in the list. The list holds its own copies - and will free them if the corresponding member or the list itself - is deleted. You can force the list to free all of its items with - clear(). - - QValueList is shared implicitly, which means it can be copied in - constant time, i.e. O(1). If multiple QValueList instances share - the same data and one needs to modify its contents, this modifying - instance makes a copy and modifies its private copy; therefore it - does not affect the other instances; this takes O(n) time. This is - often called "copy on write". If a QValueList is being used in a - multi-threaded program, you must protect all access to the list. - See \l QMutex. - - There are several ways to insert items into the list. The - prepend() and append() functions insert items at the beginning and - the end of the list respectively. The insert() function comes in - several flavors and can be used to add one or more items at - specific positions within the list. - - Items can also be removed from the list in several ways. There - are several variants of the remove() function, which removes a - specific item from the list. The remove() function will find and - remove items according to a specific item value. - - Lists can also be sorted using the \link ntqtl.html TQt Template - Library\endlink. For example with qHeapSort(): - - Example: - \code - QValueList list; - list.append( 5 ); - list.append( 8 ); - list.append( 3 ); - list.append( 4 ); - qHeapSort( list ); - \endcode - - \sa QValueListIterator -*/ - -/*! \enum QValueList::iterator - The list's iterator type, QValueListIterator. */ -/*! \enum QValueList::const_iterator - The list's const iterator type, QValueListConstIterator. */ -/*! \enum QValueList::value_type - The type of the object stored in the list, T. */ -/*! \enum QValueList::pointer - The pointer to T type. */ -/*! \enum QValueList::const_pointer - The const pointer to T type. */ -/*! \enum QValueList::reference - The reference to T type. */ -/*! \enum QValueList::const_reference - The const reference to T type. */ -/*! \enum QValueList::size_type - An unsigned integral type, used to represent various sizes. */ -/*! \enum QValueList::difference_type - \internal -*/ -/*! \enum QValueList::ValueType - \internal -*/ -/*! - \fn QValueList::QValueList() - - Constructs an empty list. -*/ - -/*! - \fn QValueList::QValueList( const QValueList& l ) - - Constructs a copy of \a l. - - This operation takes O(1) time because QValueList is implicitly - shared. - - The first modification to a list will take O(n) time. -*/ - -/*! - \fn QValueList::QValueList( const std::list& l ) - - Contructs a copy of \a l. - - This constructor is provided for compatibility with STL - containers. -*/ - -/*! - \fn QValueList::~QValueList() - - Destroys the list. References to the values in the list and all - iterators of this list become invalidated. Note that it is - impossible for an iterator to check whether or not it is valid: - QValueList is highly tuned for performance, not for error - checking. -*/ - -/*! \enum QValueListIterator::NodePtr - \internal */ -/*! \enum QValueListIterator::iterator_category - \internal */ -/*! \enum QValueListIterator::size_type - \internal */ -/*! \enum QValueListIterator::difference_type - \internal */ -/*! - \fn QValueListIterator::QValueListIterator( NodePtr p ) - \internal -*/ - -/*! - \fn bool QValueList::operator== ( const QValueList& l ) const - - Compares both lists. - - Returns TRUE if this list and \a l are equal; otherwise returns - FALSE. -*/ - -/*! - \fn bool QValueList::operator== ( const std::list& l ) const - - \overload - - Returns TRUE if this list and \a l are equal; otherwise returns - FALSE. - - This operator is provided for compatibility with STL containers. -*/ - -/*! - \fn QValueList& QValueList::operator= ( const QValueList& l ) - - Assigns \a l to this list and returns a reference to this list. - - All iterators of the current list become invalidated by this - operation. The cost of such an assignment is O(1) since QValueList - is implicitly shared. -*/ - -/*! - \fn QValueList& QValueList::operator= ( const std::list& l ) - - \overload - - Assigns the contents of \a l to the list. - - All iterators of the current list become invalidated by this - operation. -*/ - -/*! - \fn bool QValueList::operator!= ( const QValueList& l ) const - - Compares both lists. - - Returns TRUE if this list and \a l are unequal; otherwise returns - FALSE. -*/ - -/*! - \fn iterator QValueList::insert( iterator it, const T& x ) - - Inserts the value \a x in front of the item pointed to by the - iterator, \a it. - - Returns an iterator pointing at the inserted item. - - \sa append(), prepend() -*/ - -/*! - \fn uint QValueList::remove( const T& x ) - - \overload - - Removes all items that have value \a x and returns the number of - removed items. -*/ - -/*! - \fn void QValueList::clear() - - Removes all items from the list. - - \sa remove() -*/ - -/*! - \fn iterator QValueList::begin() - - \overload - - Returns an iterator pointing to the first item in the list. This - iterator equals end() if the list is empty. - - \sa first(), end() -*/ - -/*! - \fn const_iterator QValueList::begin() const - - Returns an iterator pointing to the first item in the list. This - iterator equals end() if the list is empty. - - \sa first(), end(), constBegin() -*/ - -/*! - \fn const_iterator QValueList::constBegin() const - - Returns an iterator pointing to the first item in the list. This - iterator equals constEnd() if the list is empty. - - \sa begin() -*/ - -/*! - \fn iterator QValueList::end() - - Returns an iterator pointing \e past the last item in the list. - This iterator equals begin() if the list is empty. - - \sa last(), begin(), constEnd() -*/ - -/*! - \fn const_iterator QValueList::end() const - - \overload - - Returns an iterator pointing \e past the last item in the list. - This iterator equals begin() if the list is empty. - - \sa last(), begin() -*/ - -/*! - \fn const_iterator QValueList::constEnd() const - - Returns an iterator pointing \e past the last item in the list. - This iterator equals constBegin() if the list is empty. - - \sa end() -*/ - -/*! - \fn QDataStream& operator>>( QDataStream& s, QValueList& l ) - - \relates QValueList - - Reads a list, \a l, from the stream \a s. The type T stored in the - list must implement the streaming operator. -*/ - -/*! - \fn QDataStream& operator<<( QDataStream& s, const QValueList& l ) - - \overload - \relates QValueList - - Writes a list, \a l, to the stream \a s. The type T stored in the - list must implement the streaming operator. -*/ - -/*! - \fn size_type QValueList::size() const - - Returns the number of items in the list. - - This function is provided for STL compatibility. It is equivalent - to count(). - - \sa empty() -*/ - -/*! - \fn bool QValueList::empty() const - - Returns TRUE if the list contains no items; otherwise returns - FALSE. - - \sa size() -*/ - -/*! - \fn void QValueList::push_front( const T& x ) - - Inserts \a x at the beginning of the list. - - This function is provided for STL compatibility. It is equivalent - to prepend(). -*/ - -/*! - \fn void QValueList::push_back( const T& x ) - - Inserts \a x at the end of the list. - - This function is provided for STL compatibility. It is equivalent - to append(). -*/ - -/*! - \fn iterator QValueList::erase( iterator it ) - - Removes the item pointed to by \a it from the list. No iterators - other than \a it or other iterators pointing at the same item as - \a it are invalidated. Returns an iterator to the next item after - \a it, or end() if there is no such item. - - This function is provided for STL compatibility. It is equivalent - to remove(). -*/ - -/*! - \fn iterator QValueList::erase( iterator first, iterator last ) - - \overload - - Deletes all items from \a first to \a last (not including \a - last). No iterators are invalidated, except those pointing to the - removed items themselves. Returns \a last. -*/ - -/*! - \fn reference QValueList::front() - - Returns a reference to the first item. If the list contains no - first item (i.e. empty() returns TRUE), the return value is - undefined. - - This function is provided for STL compatibility. It is equivalent - to first(). - - \sa back() -*/ - -/*! - \fn const_reference QValueList::front() const - - \overload -*/ - -/*! - \fn reference QValueList::back() - - Returns a reference to the last item. If the list contains no last - item (i.e. empty() returns TRUE), the return value is undefined. - - This function is provided for STL compatibility. It is equivalent - to last(). - - \sa front() -*/ - -/*! - \fn const_reference QValueList::back() const - - \overload -*/ - -/*! - \fn void QValueList::pop_front() - - Removes the first item. If there is no first item, this operation - is undefined. - - This function is provided for STL compatibility. -*/ - -/*! - \fn void QValueList::pop_back() - - Removes the last item. If there is no last item, this operation is - undefined. - - This function is provided for STL compatibility. -*/ - -/*! - \fn void QValueList::insert( iterator pos, size_type n, const T& x ) - - \overload - - Inserts \a n copies of \a x before position \a pos. -*/ - -/*! - \fn void QValueList::detach() - \internal -*/ - -/*! - \fn QValueList& QValueList::operator<< ( const T& x ) - - Adds the value \a x to the end of the list. - - Returns a reference to the list. -*/ - -/*! - \fn const T& QValueList::operator[] ( size_type i ) const - - Returns a const reference to the item with index \a i in the list. - It is up to you to check whether this item really exists. You can - do that easily with the count() function. However this operator - does not check whether \a i is in range and will deliver undefined - results if it does not exist. - - \warning This function uses a linear search and can be extremely - slow for large lists. QValueList is not optimized for random item - access. If you need random access use a different container, such - as QValueVector. -*/ - -/*! - \fn T& QValueList::operator[] ( size_type i ) - - \overload - - Returns a non-const reference to the item with index \a i. -*/ - -/*! - \fn const_iterator QValueList::at( size_type i ) const - - Returns an iterator pointing to the item at position \a i in the - list, or an undefined value if the index is out of range. - - \warning This function uses a linear search and can be extremely - slow for large lists. QValueList is not optimized for random item - access. If you need random access use a different container, such - as QValueVector. -*/ - -/*! - \fn iterator QValueList::at( size_type i ) - - \overload - - Returns an iterator pointing to the item at position \a i in the - list, or an undefined value if the index is out of range. - -*/ - -/*! - \fn iterator QValueList::fromLast() - - \overload - - Returns an iterator to the last item in the list, or end() if - there is no last item. - - Use the end() function instead. For example: - - \code - QValueList l; - ... - QValueList::iterator it = l.end(); - --it; - if ( it != end() ) - // ... - \endcode - -*/ - -/*! - \fn const_iterator QValueList::fromLast() const - - Returns an iterator to the last item in the list, or end() if - there is no last item. - - Use the end() function instead. For example: - - \code - QValueList l; - ... - QValueList::iterator it = l.end(); - --it; - if ( it != end() ) - // ... - \endcode - -*/ - -/*! - \fn QValueList QValueList::operator+( const QValueList& l ) const - - Creates a new list and fills it with the items of this list. Then - the items of \a l are appended. Returns the new list. -*/ - -/*! - \fn QValueList& QValueList::operator+= ( const QValueList& l ) - - Appends the items of \a l to this list. Returns a reference to - this list. -*/ - -/*! - \fn QValueList& QValueList::operator+= ( const T& x ) - - \overload - - Appends the value \a x to the list. Returns a reference to the - list. -*/ - -/*! - \fn uint QValueList::count() const - - Returns the number of items in the list. - - \sa isEmpty() -*/ - -/*! - \fn bool QValueList::isEmpty() const - - Returns TRUE if the list contains no items; otherwise returns - FALSE. - - \sa count() -*/ - -/*! - \fn iterator QValueList::append( const T& x ) - - Inserts \a x at the end of the list. - - \sa insert(), prepend() -*/ - -/*! - \fn iterator QValueList::prepend( const T& x ) - - Inserts \a x at the beginning of the list. - - \sa insert(), append() -*/ - -/*! - \fn iterator QValueList::remove( iterator it ) - - Removes the item pointed to by \a it from the list. No iterators - other than \a it or other iterators pointing at the same item as - \a it are invalidated. Returns an iterator to the next item after - \a it, or end() if there is no such item. - - \sa clear() -*/ - -/*! - \fn iterator QValueList::find( const T& x ) - - Returns an iterator pointing to the first occurrence of \a x in - the list. - - Returns end() is no item matched. -*/ - -/*! - \fn const_iterator QValueList::find( const T& x ) const - - \overload - - Returns an iterator pointing to the first occurrence of \a x in - the list. - - Returns end() if no item matched. -*/ - -/*! - \fn iterator QValueList::find( iterator it, const T& x ) - - \overload - - Finds the first occurrence of \a x in the list starting at the - position given by \a it. - - Returns end() if no item matched. -*/ - -/*! - \fn const_iterator QValueList::find( const_iterator it, const T& x ) const - - \overload - - Finds the first occurrence of \a x in the list starting at the - position given by \a it. - - Returns end() if no item matched. -*/ - -/*! - \fn uint QValueList::contains( const T& x ) const - - Returns the number of occurrences of the value \a x in the list. -*/ - -/*! - \fn int QValueList::findIndex( const T& x ) const - - Returns the index of the first occurrence of the value \a x. - Returns -1 if no item matched. -*/ - -/*! - \fn T& QValueList::first() - - Returns a reference to the first item. If the list contains no - first item (i.e. isEmpty() returns TRUE), the return value is - undefined. - - \sa last() -*/ - -/*! - \fn const T& QValueList::first() const - - \overload -*/ - -/*! - \fn T& QValueList::last() - - Returns a reference to the last item. If the list contains no last - item (i.e. empty() returns TRUE), the return value is undefined. -*/ - -/*! - \fn const T& QValueList::last() const - - \overload -*/ - -/***************************************************************************** - QValueListIterator documentation - *****************************************************************************/ - -/*! - \class QValueListIterator ntqvaluelist.h - \brief The QValueListIterator class provides an iterator for QValueList. - - \ingroup qtl - \ingroup tools - \reentrant - - An iterator is a class for accessing the items of a container - class: a generalization of the index in an array. A pointer - into a "const char *" and an index into an "int[]" are both - iterators, and the general idea is to provide that functionality - for any data structure. - - The QValueListIterator class is an iterator for QValueList - instantiations. You can create the appropriate iterator type by - using the \c iterator typedef provided by QValueList. - - The only way to access the items in a QValueList is to use an - iterator. - - Example (see QValueList for the complete code): - \code - EmployeeList::iterator it; - for ( it = list.begin(); it != list.end(); ++it ) - cout << (*it).surname().latin1() << ", " << - (*it).forename().latin1() << " earns " << - (*it).salary() << endl; - - // Output: - // Doe, John earns 50000 - // Williams, Jane earns 80000 - // Hawthorne, Mary earns 90000 - // Jones, Tom earns 60000 - \endcode - - QValueList is highly optimized for performance and memory usage. - This means that you must be careful: QValueList does not know - about all its iterators and the iterators don't know to which list - they belong. This makes things very fast, but if you're not - careful, you can get spectacular bugs. Always make sure iterators - are valid before dereferencing them or using them as parameters to - generic algorithms in the STL or the \link ntqtl.html QTL\endlink. - - Using an invalid iterator is undefined (your application will - probably crash). Many TQt functions return const value lists; to - iterate over these you should make a copy and iterate over the - copy. - - For every Iterator there is a ConstIterator. When accessing a - QValueList in a const environment or if the reference or pointer - to the list is itself const, then you must use the ConstIterator. - Its semantics are the same as the Iterator, but it only returns - const references. - - \sa QValueList, QValueListConstIterator -*/ - -/*! \enum QValueListIterator::value_type - The type of value, T. */ -/*! \enum QValueListIterator::pointer - Pointer to value_type. */ -/*! \enum QValueListIterator::reference - Reference to value_type. */ - -/*! - \fn QValueListIterator::QValueListIterator() - - Creates un uninitialized iterator. -*/ - -/* - \fn QValueListIterator::QValueListIterator( NodePtr p ) - - \overload - - \internal -*/ - -/*! - \fn QValueListIterator::QValueListIterator( const QValueListIterator& it ) - - \overload - - Constructs a copy of the iterator \a it. -*/ - -/* Unfortunately not with MSVC - \fn T *QValueListIterator::operator->() - Pointer operator. Returns a pointer to the current iterator item. - The great advantage of this operator is that you can treat the - iterator like a pointer. - - Example: - \code - QValueList::Iterator it = list.begin(); - for( ; it != end(); ++it ) - it->show(); - \endcode -*/ - -/*! - \fn T& QValueListIterator::operator*() - - Asterisk operator. Returns a reference to the current iterator item. -*/ - -/*! - \fn const T& QValueListIterator::operator*() const - - \overload - - Asterisk operator. Returns a reference to the current iterator item. -*/ - -/*! - \fn QValueListIterator& QValueListIterator::operator++() - - Prefix ++ makes the succeeding item current and returns an - iterator pointing to the new current item. The iterator cannot - check whether it reached the end of the list. Incrementing the - iterator returned by end() causes undefined results. -*/ - -/*! - \fn QValueListIterator QValueListIterator::operator++(int) - - \overload - - Postfix ++ makes the succeeding item current and returns an - iterator pointing to the new current item. The iterator cannot - check whether it reached the end of the list. Incrementing the - iterator returned by end() causes undefined results. -*/ - -/*! - \fn QValueListIterator& QValueListIterator::operator--() - - Prefix -- makes the previous item current and returns an iterator - pointing to the new current item. The iterator cannot check - whether it reached the beginning of the list. Decrementing the - iterator returned by begin() causes undefined results. -*/ - -/*! - \fn QValueListIterator QValueListIterator::operator--(int) - - \overload - - Postfix -- makes the previous item current and returns an iterator - pointing to the new current item. The iterator cannot check - whether it reached the beginning of the list. Decrementing the - iterator returned by begin() causes undefined results. -*/ - - -/*! - \fn QValueListIterator& QValueListIterator::operator+=(int j) - - Postfix -- jumps \a j steps forward in the list. The iterator - cannot check whether it reached the end of the list. Jumping past - the end() causes undefined results. -*/ - -/*! - \fn QValueListIterator& QValueListIterator::operator-=(int j) - - Postfix -- jumps \a j steps backward in the list. The iterator - cannot check whether it reached the beginning of the list. Jumping - past begin() causes undefined results. -*/ - -/*! - \fn bool QValueListIterator::operator==( const QValueListIterator& it ) const - - Compares this iterator and \a it and returns TRUE if they point to - the same item; otherwise returns FALSE. -*/ - -/*! - \fn bool QValueListIterator::operator!=( const QValueListIterator& it ) const - - Compares this iterator and \a it and returns TRUE if they point to - different items; otherwise returns FALSE. -*/ - -/***************************************************************************** - QValueListConstIterator documentation - *****************************************************************************/ - -/*! - \class QValueListConstIterator ntqvaluelist.h - \brief The QValueListConstIterator class provides a const iterator - for QValueList. - - \ingroup qtl - \ingroup tools - \reentrant - - In contrast to QValueListIterator, this class is used to iterate - over a const list. It does not allow modification of the values of - the list since that would break const semantics. - - You can create the appropriate const iterator type by using the \c - const_iterator typedef provided by QValueList. - - For more information on QValueList iterators, see - QValueListIterator. - - \sa QValueListIterator, QValueList -*/ - -/*! \enum QValueListConstIterator::value_type - The type of value. */ -/*! \enum QValueListConstIterator::pointer - Pointer to value_type. */ -/*! \enum QValueListConstIterator::reference - Reference to value_type. */ -/*! \enum QValueListConstIterator::NodePtr - \internal */ -/*! \enum QValueListConstIterator::iterator_category - \internal */ -/*! \enum QValueListConstIterator::size_type - \internal */ -/*! \enum QValueListConstIterator::difference_type - \internal */ - -/*! - \fn QValueListConstIterator::QValueListConstIterator() - - Creates un uninitialized iterator. -*/ - -/*! - \fn QValueListConstIterator::QValueListConstIterator( NodePtr p ) - - \overload - - \internal -*/ - -/*! - \fn QValueListConstIterator::QValueListConstIterator( const QValueListConstIterator& it ) - - \overload - - Constructs a copy of the iterator \a it. -*/ - -/*! - \fn QValueListConstIterator::QValueListConstIterator( const QValueListIterator& it ) - - Constructs a copy of the iterator \a it. -*/ - -/* Unfortunately not with MSVC - \fn const T *QValueListConstIterator::operator->() - Pointer operator. Returns a pointer to the current iterator item. - The great advantage of this operator is that you can treat the - iterator like a pointer. - - Example: - \code - QValueList::Iterator it = list.begin(); - for( ; it != end(); ++it ) - it->show(); - \endcode -*/ - -/*! - \fn const T& QValueListConstIterator::operator*() const - - Asterisk operator. Returns a reference to the current iterator item. -*/ - -/*! - \fn QValueListConstIterator& QValueListConstIterator::operator++() - - Prefix ++ makes the succeeding item current and returns an - iterator pointing to the new current item. The iterator cannot - check whether it reached the end of the list. Incrementing the - iterator returned by end() causes undefined results. -*/ - -/*! - \fn QValueListConstIterator QValueListConstIterator::operator++(int) - - \overload - - Postfix ++ makes the succeeding item current and returns an - iterator pointing to the new current item. The iterator cannot - check whether it reached the end of the list. Incrementing the - iterator returned by end() causes undefined results. -*/ - -/*! - \fn QValueListConstIterator& QValueListConstIterator::operator--() - - Prefix -- makes the previous item current and returns an iterator - pointing to the new current item. The iterator cannot check - whether it reached the beginning of the list. Decrementing the - iterator returned by begin() causes undefined results. -*/ - -/*! - \fn QValueListConstIterator QValueListConstIterator::operator--(int) - - \overload - - Postfix -- makes the previous item current and returns an iterator - pointing to the new current item. The iterator cannot check - whether it reached the beginning of the list. Decrementing the - iterator returned by begin() causes undefined results. -*/ - -/*! - \fn bool QValueListConstIterator::operator==( const QValueListConstIterator& it ) const - - Compares this iterator with \a it and returns TRUE if they point - to the same item; otherwise returns FALSE. -*/ - -/*! - \fn bool QValueListConstIterator::operator!=( const QValueListConstIterator& it ) const - - Compares this iterator with \a it and returns TRUE if they point - to different items; otherwise returns FALSE. -*/ - - -/*! - \enum QValueList::Iterator - - This iterator is an instantiation of QValueListIterator for the - same type as this QValueList. In other words, if you instantiate - QValueList, Iterator is a QValueListIterator. Several - member function use it, such as QValueList::begin(), which returns - an iterator pointing to the first item in the list. - - Functionally, this is almost the same as ConstIterator. The only - difference is that you cannot use ConstIterator for non-const - operations, and that the compiler can often generate better code - if you use ConstIterator. - - \sa QValueListIterator ConstIterator -*/ - -/*! - \enum QValueList::ConstIterator - - This iterator is an instantiation of QValueListConstIterator for - the same type as this QValueList. In other words, if you - instantiate QValueList, ConstIterator is a - QValueListConstIterator. Several member function use it, such - as QValueList::begin(), which returns an iterator pointing to the - first item in the list. - - Functionally, this is almost the same as Iterator. The only - difference is you cannot use ConstIterator for non-const - operations, and that the compiler can often generate better code - if you use ConstIterator. - - \sa QValueListIterator Iterator -*/ diff --git a/doc/qvaluestack.doc b/doc/qvaluestack.doc deleted file mode 100644 index f94c5e7be..000000000 --- a/doc/qvaluestack.doc +++ /dev/null @@ -1,169 +0,0 @@ -/**************************************************************************** -** -** QValueStack class documentation -** -** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. -** -** This file is part 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.QPL -** included in the packaging of this file. Licensees holding valid Qt -** Commercial licenses may use this file in accordance with the Qt -** 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. -** -**********************************************************************/ - - -/***************************************************************************** - QValueStack documentation - *****************************************************************************/ - -/*! - \class QValueStack ntqvaluestack.h - \brief The QValueStack class is a value-based template class that provides a stack. - - \ingroup qtl - \ingroup tools - \ingroup shared - \mainclass - \reentrant - - Define a template instance QValueStack\ to create a stack of - values that all have the class X. QValueStack is part of the \link - ntqtl.html TQt Template Library\endlink. - - Note that QValueStack does not store pointers to the members of - the stack; it holds a copy of every member. That is why these - kinds of classes are called "value based"; QPtrStack, QPtrList, - QDict, etc., are "pointer based". - - A stack is a last in, first out (LIFO) structure. Items are added - to the top of the stack with push() and retrieved from the top - with pop(). The top() function provides access to the topmost item - without removing it. - - Example: - \code - QValueStack stack; - stack.push( 1 ); - stack.push( 2 ); - stack.push( 3 ); - while ( ! stack.isEmpty() ) - cout << "Item: " << stack.pop() << endl; - - // Output: - // Item: 3 - // Item: 2 - // Item: 1 - \endcode - - QValueStack is a specialized QValueList provided for convenience. - All of QValueList's functionality also applies to QPtrStack, for - example the facility to iterate over all elements using - QValueStack::Iterator. See QValueListIterator for further - details. - - Some classes cannot be used within a QValueStack, for example - everything derived from TQObject and thus all classes that - implement widgets. Only values can be used in a QValueStack. To - qualify as a value, the class must provide - \list - \i a copy constructor; - \i an assignment operator; - \i a default constructor, i.e. a constructor that does not take any arguments. - \endlist - - Note that C++ defaults to field-by-field assignment operators and - copy constructors if no explicit version is supplied. In many - cases this is sufficient. -*/ - - -/*! - \fn QValueStack::QValueStack() - - Constructs an empty stack. -*/ - -/*! - \fn QValueStack::~QValueStack() - - Destroys the stack. References to the values in the stack and all - iterators of this stack become invalidated. Because QValueStack is - highly tuned for performance, you won't see warnings if you use - invalid iterators because it is impossible for an iterator to - check whether or not it is valid. -*/ - - -/*! - \fn void QValueStack::push( const T& d ) - - Adds element, \a d, to the top of the stack. Last in, first out. - - This function is equivalent to append(). - - \sa pop(), top() -*/ - -/*! - \fn T& QValueStack::top() - - Returns a reference to the top item of the stack or the item - referenced by end() if no such item exists. Note that you must not - change the value the end() iterator points to. - - This function is equivalent to last(). - - \sa pop(), push(), QValueList::fromLast() -*/ - - -/*! - \fn const T& QValueStack::top() const - - \overload - - Returns a reference to the top item of the stack or the item - referenced by end() if no such item exists. - - This function is equivalent to last(). - - \sa pop(), push(), QValueList::fromLast() -*/ - -/*! - \fn T QValueStack::pop() - - Removes the top item from the stack and returns it. - - \sa top() push() -*/ - - - - - diff --git a/doc/qvaluevector.doc b/doc/qvaluevector.doc deleted file mode 100644 index c4df61f85..000000000 --- a/doc/qvaluevector.doc +++ /dev/null @@ -1,724 +0,0 @@ -/**************************************************************************** -** -** QValueVector class documentation -** -** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. -** -** This file is part 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.QPL -** included in the packaging of this file. Licensees holding valid Qt -** Commercial licenses may use this file in accordance with the Qt -** 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. -** -**********************************************************************/ - - -/***************************************************************************** - QValueVector documentation - *****************************************************************************/ - -/*! - \class QValueVector ntqvaluevector.h - \brief The QValueVector class is a value-based template class that provides a dynamic array. - - \ingroup qtl - \ingroup tools - \ingroup shared - \mainclass - \reentrant - - QValueVector is a TQt implementation of an STL-like vector - container. It can be used in your application if the standard \c - vector is not available for your target platforms. QValueVector is - part of the \link ntqtl.html TQt Template Library\endlink. - - QValueVector\ defines a template instance to create a vector - of values that all have the class T. QValueVector does not store - pointers to the members of the vector; it holds a copy of every - member. QValueVector is said to be value based; in contrast, - QPtrList and QDict are pointer based. - - QValueVector contains and manages a collection of objects of type - T and provides random access iterators that allow the contained - objects to be addressed. QValueVector owns the contained - elements. For more relaxed ownership semantics, see QPtrCollection - and friends, which are pointer-based containers. - - QValueVector provides good performance if you append or remove - elements from the end of the vector. If you insert or remove - elements from anywhere but the end, performance is very bad. The - reason for this is that elements must to be copied into new - positions. - - Some classes cannot be used within a QValueVector: for example, - all classes derived from TQObject and thus all classes that - implement widgets. Only values can be used in a QValueVector. To - qualify as a value the class must provide: - \list - \i a copy constructor; - \i an assignment operator; - \i a default constructor, i.e., a constructor that does not take any arguments. - \endlist - - Note that C++ defaults to field-by-field assignment operators and - copy constructors if no explicit version is supplied. In many - cases this is sufficient. - - QValueVector uses an STL-like syntax to manipulate and address the - objects it contains. See \link ntqtl.html this document\endlink for - more information. - - Example: - \code - #include - #include - #include - - class Employee - { - public: - Employee(): s(0) {} - Employee( const TQString& name, int salary ) - : n( name ), s( salary ) - { } - - TQString name() const { return n; } - int salary() const { return s; } - void setSalary( int salary ) { s = salary; } - private: - TQString n; - int s; - }; - - int main() - { - typedef QValueVector EmployeeVector; - EmployeeVector vec( 3 ); // vector of 3 Employees - - vec[0] = Employee( "Bill", 50000 ); - vec[1] = Employee( "Steve", 80000 ); - vec[2] = Employee( "Ron", 60000 ); - - Employee joe( "Joe", 50000 ); - vec.push_back( joe ); // vector expands to accommodate 4 Employees - joe.setSalary( 70000 ); - - EmployeeVector::iterator it; - for( it = vec.begin(); it != vec.end(); ++it ) - printf( "%s earns %d\n", (*it).name().latin1(), (*it).salary() ); - - return 0; - } - \endcode - - Program output: - \code - Bill earns 50000 - Steve earns 80000 - Ron earns 60000 - Joe earns 50000 - \endcode - - As you can see, the most recent change to Joe's salary did not - affect the value in the vector because the vector created a copy - of Joe's entry. - - Many TQt functions return const value vectors; to iterate over - these you should make a copy and iterate over the copy. - - There are several ways to find items in the vector. The begin() - and end() functions return iterators to the beginning and end of - the vector. The advantage of getting an iterator is that you can - move forward or backward from this position by - incrementing/decrementing the iterator. The iterator returned by - end() points to the element which is one past the last element in - the container. The past-the-end iterator is still associated with - the vector it belongs to, however it is \e not dereferenceable; - operator*() will not return a well-defined value. If the vector is - empty(), the iterator returned by begin() will equal the iterator - returned by end(). - - The fastest way to access an element of a vector is by using - operator[]. This function provides random access and will return - a reference to the element located at the specified index. Thus, - you can access every element directly, in constant time, providing - you know the location of the element. It is undefined to access - an element that does not exist (your application will probably - crash). For example: - - \code - QValueVector vec1; // an empty vector - vec1[10] = 4; // WARNING: undefined, probably a crash - - QValueVector vec2(25); // initialize with 25 elements - vec2[10] = "Dave"; // OK - \endcode - - Whenever inserting, removing or referencing elements in a vector, - always make sure you are referring to valid positions. For - example: - - \code - void func( QValueVector& vec ) - { - if ( vec.size() > 10 ) { - vec[9] = 99; // OK - } - }; - \endcode - - The iterators provided by vector are random access iterators, - therefore you can use them with many generic algorithms, for - example, algorithms provided by the STL or the \link ntqtl.html - QTL\endlink. - - Another way to find an element in the vector is by using the - std::find() or \link ntqtl.html#qFind tqFind()\endlink algorithms. - For example: - - \code - QValueVector vec; - ... - QValueVector::const_iterator it = tqFind( vec.begin(), vec.end(), 3 ); - if ( it != vector.end() ) - // 'it' points to the found element - \endcode - - It is safe to have multiple iterators on the vector at the same - time. Since QValueVector manages memory dynamically, all iterators - can become invalid if a memory reallocation occurs. For example, - if some member of the vector is removed, iterators that point to - the removed element and to all following elements become - invalidated. Inserting into the middle of the vector will - invalidate all iterators. For convenience, the function back() - returns a reference to the last element in the vector, and front() - returns a reference to the first element. If the vector is - empty(), both back() and front() have undefined behavior (your - application will crash or do unpredictable things). Use back() and - front() with caution, for example: - - \code - QValueVector vec( 3 ); - vec.push_back( 1 ); - vec.push_back( 2 ); - vec.push_back( 3 ); - ... - if ( !vec.empty() ) { - // OK: modify the first element - int& i = vec.front(); - i = 18; - } - ... - QValueVector dvec; - double d = dvec.back(); // undefined behavior - \endcode - - Because QValueVector manages memory dynamically, it is recommended - that you contruct a vector with an initial size. Inserting and - removing elements happens fastest when: - \list - \i Inserting or removing elements happens at the end() of the - vector; - \i The vector does not need to allocate additional memory. - \endlist - - By creating a QValueVector with a sufficiently large initial size, - there will be less memory allocations. Do not use an initial size - that is too big, since it will still take time to construct all - the empty entries, and the extra space will be wasted if it is - never used. - - Because QValueVector is value-based there is no need to be careful - about deleting elements in the vector. The vector holds its own - copies and will free them if the corresponding member or the - vector itself is deleted. You can force the vector to free all of - its items with clear(). - - QValueVector is shared implicitly, which means it can be copied in - constant time. If multiple QValueVector instances share the same - data and one needs to modify its contents, this modifying instance - makes a copy and modifies its private copy; it thus does not - affect the other instances. This is often called "copy on write". - If a QValueVector is being used in a multi-threaded program, you - must protect all access to the vector. See QMutex. - - There are several ways to insert elements into the vector. The - push_back() function insert elements into the end of the vector, - and is usually fastest. The insert() function can be used to add - elements at specific positions within the vector. - - Items can be also be removed from the vector in several ways. - There are several variants of the erase() function which removes a - specific element, or range of elements, from the vector. - - Vectors can be also sorted with various STL algorithms , or it can - be sorted using the \link ntqtl.html TQt Template Library\endlink. - For example with qHeapSort(): - - Example: - \code - QValueVector v( 4 ); - v.push_back( 5 ); - v.push_back( 8 ); - v.push_back( 3 ); - v.push_back( 4 ); - qHeapSort( v ); - \endcode - - QValueVector stores its elements in contiguous memory. This means - that you can use a QValueVector in any situation that requires an - array. -*/ - -/*! \enum QValueVector::value_type - The type of the object stored in the vector. */ -/*! \enum QValueVector::ValueType - The type of the object stored in the vector. */ -/*! \enum QValueVector::pointer - The pointer to T type. */ -/*! \enum QValueVector::const_pointer - The const pointer to T type. */ -/*! \enum QValueVector::iterator - The vector's iterator type. */ -/*! \enum QValueVector::const_iterator - The vector's const iterator type. */ -/*! \enum QValueVector::Iterator - The vector's iterator type. */ -/*! \enum QValueVector::ConstIterator - The vector's const iterator type. */ -/*! \enum QValueVector::reference - The reference to T type. */ -/*! \enum QValueVector::const_reference - The const reference to T type. */ -/*! \enum QValueVector::size_type - An unsigned integral type, used to represent various sizes. */ -/*! \enum QValueVector::difference_type - A signed integral type used to represent the distance between two iterators. */ - - -/*! - \fn QValueVector::QValueVector() - - Constructs an empty vector without any elements. To create a - vector which reserves an initial amount of space for elements, use - \c QValueVector(size_type n). -*/ - -/*! - \fn QValueVector::QValueVector( const QValueVector& v ) - - Constructs a copy of \a v. - - This operation costs O(1) time because QValueVector is implicitly - shared. - - The first modification to the vector does takes O(n) time, because - the elements must be copied. -*/ - -/*! - \fn QValueVector::QValueVector( std::vector& v ) - - Constructs a copy of \a v. -*/ - -/*! - \fn QValueVector::QValueVector( const std::vector& v ) - - This operation costs O(n) time because \a v is copied. -*/ - -/*! - \fn QValueVector::QValueVector( size_type n, const T& val ) - - Constructs a vector with an initial size of \a n elements. Each - element is initialized with the value of \a val. -*/ - -/*! - \fn QValueVector::~QValueVector() - - Destroys the vector, destroying all elements and freeing the - allocated memory. References to the values in the vector and all - iterators of this vector become invalidated. Note that it is - impossible for an iterator to check whether or not it is valid: - QValueVector is tuned for performance, not for error checking. -*/ - -/*! - \fn QValueVector& QValueVector::operator=( const QValueVector& v ) - - Assigns \a v to this vector and returns a reference to this vector. - - All iterators of the current vector become invalidated by this - operation. The cost of such an assignment is O(1) since - QValueVector is implicitly shared. -*/ - -/*! - \fn QValueVector& QValueVector::operator=( const std::vector& v ) - - \overload - - Assigns \a v to this vector and returns a reference to this vector. - - All iterators of the current vector become invalidated by this - operation. The cost of this assignment is O(n) since \a v is - copied. -*/ - -/*! - \fn size_type QValueVector::size() const - - Returns the number of elements in the vector. - - This function is provided for STL compatibility. It is equivalent - to count(). - - \sa empty() -*/ - -/*! - \fn size_type QValueVector::count() const - - Returns the number of items in the vector. - - \sa isEmpty() -*/ - -/*! - \fn bool QValueVector::empty() const - - Returns TRUE if the vector is empty; otherwise returns FALSE. - Equivalent to size()==0, only faster. - - This function is provided for STL compatibility. It is equivalent - to isEmpty(). - - \sa size() -*/ - -/*! - \fn bool QValueVector::isEmpty() const - - Returns TRUE if the vector is empty; returns FALSE otherwise. - - \sa count() -*/ - -/*! - \fn size_type QValueVector::capacity() const - - Returns the maximum number of elements that can be stored in the - vector without forcing memory reallocation. If memory reallocation - takes place, some or all iterators may become invalidated. -*/ - -/*! - \fn iterator QValueVector::begin() - - Returns an iterator pointing to the beginning of the vector. If - the vector is empty(), the returned iterator will equal end(). -*/ - -/*! - \fn const_iterator QValueVector::begin() const - - \overload - - Returns a const iterator pointing to the beginning of the vector. - If the vector is empty(), the returned iterator will equal end(). -*/ - -/*! - \fn const_iterator QValueVector::constBegin() const - - Returns a const iterator pointing to the beginning of the vector. - If the vector is empty(), the returned iterator will equal end(). - - \sa constEnd(); -*/ - -/*! - \fn iterator QValueVector::end() - - Returns an iterator pointing behind the last element of the - vector. -*/ - -/*! - \fn const_iterator QValueVector::end() const - - \overload - - Returns a const iterator pointing behind the last element of the - vector. -*/ - -/*! - \fn const_iterator QValueVector::constEnd() const - - Returns a const iterator pointing behind the last element of the - vector. - - \sa constBegin() -*/ - -/*! - \fn reference QValueVector::at( size_type i , bool* ok ) - - Returns a reference to the element with index \a i. If \a ok is - non-null, and the index \a i is out of range, *\a ok is set to - FALSE and the returned reference is undefined. If the index \a i - is within the range of the vector, and \a ok is non-null, *\a ok - is set to TRUE and the returned reference is well defined. -*/ - -/*! - \fn const_reference QValueVector::at( size_type i , bool* ok ) const - - \overload - - Returns a const reference to the element with index \a i. If \a ok - is non-null, and the index \a i is out of range, *\a ok is set to - FALSE and the returned reference is undefined. If the index \a i - is within the range of the vector, and \a ok is non-null, *\a ok - is set to TRUE and the returned reference is well defined. -*/ - -/*! - \fn reference QValueVector::operator[]( size_type i ) - - Returns a reference to the element at index \a i. If \a i is out - of range, this function has undefined behavior. - - \sa at() -*/ - -/*! - \fn const_reference QValueVector::operator[]( size_type i ) const - - \overload - - Returns a const reference to the element at index \a i. If \a i is - out of range, this function has undefined behavior. - - \sa at() -*/ - -/*! - \fn reference QValueVector::front() - - Returns a reference to the first element in the vector. If there - is no first element, this function has undefined behavior. - - \sa empty() back() -*/ - -/*! - \fn const_reference QValueVector::front() const - - \overload - - Returns a const reference to the first element in the vector. If - there is no first element, this function has undefined behavior. - - \sa empty() back() -*/ - -/*! - \fn reference QValueVector::first() - - Returns a reference to the first item in the vector. If there is - no first item, this function has undefined behavior. - - \sa empty() last() -*/ - -/*! - \fn const_reference QValueVector::first() const - - \overload -*/ - -/*! - \fn reference QValueVector::back() - - Returns a reference to the last element in the vector. If there is - no last element, this function has undefined behavior. - - \sa empty() front() -*/ - -/*! - \fn const_reference QValueVector::back() const - - \overload - - Returns a const reference to the last element in the vector. If - there is no last element, this function has undefined behavior. - - \sa empty() front() -*/ - -/*! - \fn reference QValueVector::last() - - Returns a reference to the last item in the vector. If there is no - last item, this function has undefined behavior. - - \sa empty() first() -*/ - -/*! - \fn const_reference QValueVector::last() const - - \overload -*/ - -/*! - \fn void QValueVector::push_back( const T& x ) - - Appends a copy of \a x to the end of the vector. This is the - fastest way to add new elements. - - This function is provided for STL compatibility. It is equivalent - to append(). - - \sa insert() -*/ - -/*! - \fn void QValueVector::append( const T& x ) - - Appends a copy of \a x to the end of the vector. - - \sa push_back() insert() -*/ - -/*! - \fn void QValueVector::pop_back() - - Removes the last item from the vector. - - This function is provided for STL compatibility. -*/ - -/*! - \fn iterator QValueVector::insert( iterator pos, const T& x ) - - Inserts a copy of \a x at the position immediately before \a pos. - - \sa push_back() -*/ - -/*! \fn void QValueVector::detachInternal() - - \internal -*/ - -/*! - \fn iterator QValueVector::insert( iterator pos, size_type n, const T& x ) - - \overload - - Inserts \a n copies of \a x immediately before position x. - - \sa push_back() -*/ - -/*! - \fn void QValueVector::reserve( size_type n ) - - Increases the vector's capacity. If \a n is less than or equal to - capacity(), nothing happens. Otherwise, additional memory is - allocated so that capacity() will be increased to a value greater - than or equal to \a n. All iterators will then become invalidated. - Note that the vector's size() and the values of existing elements - remain unchanged. -*/ - -/*! - \fn void QValueVector::resize( size_type n, const T& val = T() ) - - Changes the size of the vector to \a n. If \a n is greater than - the current size(), elements are added to the end and initialized - with the value of \a val. If \a n is less than size(), elements - are removed from the end. If \a n is equal to size() nothing - happens. -*/ - -/*! - \fn void QValueVector::clear() - - Removes all the elements from the vector. -*/ - -/*! - \fn iterator QValueVector::erase( iterator pos ) - - Removes the element at position \a pos and returns the position of - the next element. -*/ - -/*! - \fn iterator QValueVector::erase( iterator first, iterator last ) - - \overload - - Removes all elements from \a first up to but not including \a last - and returns the position of the next element. -*/ - -/*! - \fn bool QValueVector::operator==( const QValueVector& x ) const - - Returns TRUE if each element in this vector equals each - corresponding element in \a x; otherwise returns FALSE. -*/ - -/*! - \fn bool QValueVector::operator==( const QValueVector& x ) - - \overload - - Returns TRUE if each element in this vector equals each - corresponding element in \a x; otherwise returns FALSE. -*/ - - -/*! - \fn void QValueVector::detach() - - \internal - - If the vector does not share its data with another QValueVector - instance, nothing happens. Otherwise the function creates a new - copy of this data and detaches from the shared one. This function - is called whenever the vector is modified. The implicit sharing - mechanism is implemented this way. -*/ diff --git a/doc/shclass.doc b/doc/shclass.doc index 02bb129ab..ea92f475b 100644 --- a/doc/shclass.doc +++ b/doc/shclass.doc @@ -209,7 +209,7 @@ The TQt classes that are implicitly shared are: \i \l QFontInfo \i \l QFontMetrics \i \l QIconSet -\i \l QMap +\i \l TQMap \i \l QPalette \i \l QPen \i \l QPicture @@ -218,8 +218,8 @@ The TQt classes that are implicitly shared are: \i \l QRegExp \i \l TQString \i \l QStringList -\i \l QValueList -\i \l QValueStack +\i \l TQValueList +\i \l TQValueStack \endlist These classes automatically detach from common data if an object is @@ -246,8 +246,8 @@ called for \c p2, because painting a pixmap will modify it. The same also happens if anything is \link ::bitBlt() bitBlt()\endlink'ed into \c p2. -\warning Do not copy an implicitly shared container (QMap, -QValueVector, etc.) while you are iterating over it. +\warning Do not copy an implicitly shared container (TQMap, +TQValueVector, etc.) while you are iterating over it. \section1 QCString: implicit or explicit? diff --git a/doc/sql.doc b/doc/sql.doc index 9542f4aff..f57ba7746 100644 --- a/doc/sql.doc +++ b/doc/sql.doc @@ -1096,7 +1096,7 @@ can use a custom editor. We create a property, statusid, and define our READ and WRITE methods for it. The statusid's in the status table will probably be different -from the combobox's indexes so we create a QMap to map combobox indexes +from the combobox's indexes so we create a TQMap to map combobox indexes to/from the statusids that we will list in the combobox. \skipto CustomSqlEditor @@ -1117,7 +1117,7 @@ function since that is the only function we need to reimplement. In the StatusPicker's constructor we create a cursor over the status table indexed by the name field. We then iterate over each record in the status table inserting each name into the combobox. We store the -statusid for each name in the index2id QMap using the same QMap index as +statusid for each name in the index2id TQMap using the same TQMap index as the combobox index. \skipto StatusPicker @@ -1125,7 +1125,7 @@ the combobox index. \printuntil } The statusid property READ function simply involves looking up the -combobox's index for the currently selected item in the index2id QMap +combobox's index for the currently selected item in the index2id TQMap which maps combobox indexes to statusids. \skipto StatusPicker @@ -1135,8 +1135,8 @@ which maps combobox indexes to statusids. \printline The statusId() function implements the statusid property's WRITE -function. We create an iterator over a QMap and iterate over the -index2id QMap. We compare each index2id element's data (statusid) to +function. We create an iterator over a TQMap and iterate over the +index2id TQMap. We compare each index2id element's data (statusid) to the id parameter's value. If we have a match we set the combobox's current item to the index2id element's key (the combobox index), and leave the loop. diff --git a/doc/tqmap.doc b/doc/tqmap.doc new file mode 100644 index 000000000..6c1266052 --- /dev/null +++ b/doc/tqmap.doc @@ -0,0 +1,902 @@ +/**************************************************************************** +** +** TQMap and TQMapIterator class documentation +** +** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. +** +** This file is part 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.QPL +** included in the packaging of this file. Licensees holding valid Qt +** Commercial licenses may use this file in accordance with the Qt +** 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. +** +**********************************************************************/ + + +/***************************************************************************** + TQMap documentation + *****************************************************************************/ + +/*! + \class TQMap tqmap.h + \brief The TQMap class is a value-based template class that + provides a dictionary. + + \ingroup qtl + \ingroup tools + \ingroup shared + \mainclass + + TQMap is a TQt implementation of an STL-like map container. It can + be used in your application if the standard \c map is not + available on all your target platforms. TQMap is part of the \link + ntqtl.html TQt Template Library\endlink. + + TQMap\ defines a template instance to create a + dictionary with keys of type Key and values of type Data. TQMap + does not store pointers to the members of the map; instead, it + holds a copy of every member. For this reason, TQMap is + value-based, whereas QPtrList and QDict are pointer-based. + + TQMap contains and manages a collection of objects of type Data + with associated key values of type Key and provides iterators that + allow the contained objects to be addressed. TQMap owns the + contained items. + + Some classes cannot be used within a TQMap. For example everything + derived from TQObject and thus all classes that implement widgets. + Only values can be used in a TQMap. To qualify as a value, the + class must provide + + \list + \i A copy constructor + \i An assignment operator + \i A default constructor, i.e. a constructor that does not take + any arguments. + \endlist + + Note that C++ defaults to field-by-field assignment operators and + copy constructors if no explicit version is supplied. In many + cases, this is sufficient. + + The class used for the key requires that the \c operator< is + implemented to define ordering of the keys. + + TQMap's function naming is consistent with the other TQt classes + (e.g., count(), isEmpty()). TQMap also provides extra functions for + compatibility with STL algorithms, such as size() and empty(). + Programmers already familiar with the STL \c map can use these + the STL-like functions if preferred. + + Example: + \target tqmap-eg + \code + #include + #include + #include + + class Employee + { + public: + Employee(): sn(0) {} + Employee( const TQString& forename, const TQString& surname, int salary ) + : fn(forename), sn(surname), sal(salary) + { } + + TQString forename() const { return fn; } + TQString surname() const { return sn; } + int salary() const { return sal; } + void setSalary( int salary ) { sal = salary; } + + private: + TQString fn; + TQString sn; + int sal; + }; + + int main(int argc, char **argv) + { + QApplication app( argc, argv ); + + typedef TQMap EmployeeMap; + EmployeeMap map; + + map["JD001"] = Employee("John", "Doe", 50000); + map["JW002"] = Employee("Jane", "Williams", 80000); + map["TJ001"] = Employee("Tom", "Jones", 60000); + + Employee sasha( "Sasha", "Hind", 50000 ); + map["SH001"] = sasha; + sasha.setSalary( 40000 ); + + EmployeeMap::Iterator it; + for ( it = map.begin(); it != map.end(); ++it ) { + printf( "%s: %s, %s earns %d\n", + it.key().latin1(), + it.data().surname().latin1(), + it.data().forename().latin1(), + it.data().salary() ); + } + return 0; + } + \endcode + + Program output: + \code + JD001: Doe, John earns 50000 + JW002: Williams, Jane earns 80000 + SH001: Hind, Sasha earns 50000 + TJ001: Jones, Tom earns 60000 + \endcode + + The latest changes to Sasha's salary did not affect the value in + the list because the map created a copy of Sasha's entry. In + addition, notice that the items are sorted alphabetically (by key) + when iterating over the map. + + There are several ways to find items in a map. The begin() and + end() functions return iterators to the beginning and end of the + map. The advantage of using an iterator is that you can move + forward or backward by incrementing/decrementing the iterator. + The iterator returned by end() points to the element which is one + past the last element in the container. The past-the-end iterator + is still associated with the map it belongs to, however it is \e + not dereferenceable; operator*() will not return a well-defined + value. If the map is empty, the iterator returned by begin() will + equal the iterator returned by end(). + + Another way to find an element in the map is by using the find() + function. This returns an iterator pointing to the desired item or + to the end() iterator if no such element exists. + + Another approach uses the operator[]. But be warned: if the map + does not contain an entry for the element you are looking for, + operator[] inserts a default value. If you do not know that the + element you are searching for is really in the list, you should + not use operator[]. The following example illustrates this: + + \code + TQMap map; + map["Clinton"] = "Bill"; + str << map["Clinton"] << map["Bush"] << endl; + \endcode + + The code fragment will print out "Clinton", "". Since the value + associated with the "Bush" key did not exist, the map inserted a + default value (in this case, an empty string). If you are not + sure whether a certain element is in the map, you should use + find() and iterators instead. + + If you just want to know whether a certain key is contained in the + map, use the contains() function. In addition, count() tells you + how many keys are in the map. + + It is safe to have multiple iterators at the same time. If some + member of the map is removed, only iterators pointing to the + removed member become invalid; inserting in the map does not + invalidate any iterators. + + Since TQMap is value-based, there is no need to be concerned about + deleting items in the map. The map holds its own copies and will + free them if the corresponding member or the map itself is + deleted. + + TQMap is implicitly shared. This means you can just make copies of + the map in time O(1). If multiple TQMap instances share the same + data and one is modifying the map's data, this modifying instance + makes a copy and modifies its private copy: so it does not affect + other instances. If a TQMap is being used in a multi-threaded + program, you must protect all access to the map. See \l QMutex. + + There are a couple of ways of inserting new items into the map. + One uses the insert() method; the other uses operator[]: + \code + TQMap map; + map["Clinton"] = "Bill"; + map.insert( "Bush", "George" ); + \endcode + + Items can also be removed from the map in several ways. One way is + to pass an iterator to remove(). Another way is to pass a key + value to remove(), which will delete the entry with the requested + key. In addition you can clear the entire map using the clear() + method. + + \sa TQMapIterator +*/ + + +/*! \enum TQMap::key_type + The map's key type. */ +/*! \enum TQMap::mapped_type + The map's data type. */ +/*! \enum TQMap::value_type + Corresponds to TQPair\. */ +/*! \enum TQMap::ValueType + Corresponds to TQPair\, TQt style.*/ +/*! \enum TQMap::pointer + Pointer to value_type.*/ +/*! \enum TQMap::const_pointer + Const pointer to value_type.*/ +/*! \enum TQMap::reference + Reference to value_type.*/ +/*! \enum TQMap::const_reference + Const reference to value_type.*/ +/*! \enum TQMap::size_type + An unsigned integral type, used to represent various sizes. */ +/*! \enum TQMap::iterator + The map's iterator type.*/ +/*! \enum TQMap::Iterator + The map's iterator type, TQt style. */ +/*! \enum TQMap::const_iterator + The map's const iterator type.*/ +/*! \enum TQMap::ConstIterator + The map's const iterator type, TQt style.*/ +/*! \enum TQMap::difference_type + \internal */ +/*! \enum TQMap::Priv + \internal */ + +/*! + \fn TQMap::TQMap() + + Constructs an empty map. +*/ + +/*! + \fn TQMap::TQMap( const TQMap& m ) + + Constructs a copy of \a m. + + This operation costs O(1) time because TQMap is implicitly shared. + This makes returning a TQMap from a function very fast. If a shared + instance is modified, it will be copied (copy-on-write), and this + takes O(n) time. +*/ + +/*! + \fn TQMap::TQMap( const std::map& m ) + + Constructs a copy of \a m. +*/ + +/*! + \fn TQMap& TQMap::operator= ( const std::map& m ) + + \overload + + Assigns \a m to this map and returns a reference to this map. + + All iterators of the current map become invalidated by this + operation. +*/ + +/*! + \fn TQMap::~TQMap() + + Destroys the map. References to the values in the map and all + iterators of this map become invalidated. Since TQMap is highly + tuned for performance you won't see warnings if you use invalid + iterators, because it is not possible for an iterator to check + whether it is valid or not. +*/ + +/*! + \fn TQMap& TQMap::operator= (const TQMap& m) + + Assigns \a m to this map and returns a reference to this map. + + All iterators of the current map become invalidated by this + operation. The cost of such an assignment is O(1), because TQMap is + implicitly shared. +*/ + +/*! + \fn T& TQMap::operator[] ( const Key& k ) + + Returns the value associated with the key \a k. If no such key is + present, an empty item is inserted with this key and a reference + to the empty item is returned. + + You can use this operator both for reading and writing: + \code + TQMap map; + map["Clinton"] = "Bill"; + stream << map["Clinton"]; + \endcode +*/ + +/*! + \fn void TQMap::clear() + + Removes all items from the map. + + \sa remove() +*/ + +/*! + \fn Iterator TQMap::find( const Key& k ) + + Returns an iterator pointing to the element with key \a k in the + map. + + Returns end() if no key matched. + + \sa TQMapIterator +*/ + +/*! + \fn ConstIterator TQMap::find( const Key& k ) const + + \overload + + Returns an iterator pointing to the element with key \a k in the + map. + + Returns end() if no key matched. + + \sa TQMapConstIterator +*/ + +/*! + \fn Iterator TQMap::begin() + + Returns an iterator pointing to the first element in the map. This + iterator equals end() if the map is empty. + + The items in the map are traversed in the order defined by + operator\<(Key, Key). + + \sa end() TQMapIterator +*/ + +/*! + \fn ConstIterator TQMap::begin() const + + \overload + + \sa end() TQMapConstIterator +*/ + +/*! + \fn ConstIterator TQMap::constBegin() const + + Returns an iterator pointing to the first element in the map. This + iterator equals end() if the map is empty. + + The items in the map are traversed in the order defined by + operator\<(Key, Key). + + \sa constEnd() TQMapConstIterator +*/ + +/*! + \fn Iterator TQMap::end() + + The iterator returned by end() points to the element which is one + past the last element in the container. The past-the-end iterator + is still associated with the map it belongs to, but it is \e not + dereferenceable; operator*() will not return a well-defined value. + + This iterator equals begin() if the map is empty. + + \sa begin() TQMapIterator +*/ + +/*! + \fn ConstIterator TQMap::end() const + + \overload +*/ + +/*! + \fn ConstIterator TQMap::constEnd() const + + The iterator returned by end() points to the element which is one + past the last element in the container. The past-the-end iterator + is still associated with the map it belongs to, but it is \e not + dereferenceable; operator*() will not return a well-defined value. + + This iterator equals constBegin() if the map is empty. + + \sa constBegin() TQMapConstIterator +*/ + +/*! + \fn void TQMap::detach() + + If the map does not share its data with another TQMap instance, + nothing happens; otherwise the function creates a new copy of this + map and detaches from the shared one. This function is called + whenever the map is modified. The implicit sharing mechanism is + implemented this way. +*/ + + +/*! + \fn QDataStream& operator>>( QDataStream& s, TQMap& m ) + + \relates TQMap + + Reads the map \a m from the stream \a s. The types \e Key and \e T + must implement the streaming operator as well. +*/ + +/*! + \fn QDataStream& operator<<( QDataStream& s, const TQMap& m ) + + \relates TQMap + + Writes the map \a m to the stream \a s. The types \e Key and \e T + must implement the streaming operator as well. +*/ + +/*! + \fn size_type TQMap::size() const + + Returns the number of items in the map. + + This function is provided for STL compatibility. It is equivalent + to count(). + + \sa empty() +*/ + +/*! + \fn bool TQMap::empty() const + + Returns TRUE if the map contains no items; otherwise returns + FALSE. + + This function is provided for STL compatibility. It is equivalent + to isEmpty(). + + \sa size() +*/ + +/*! + \fn TQPair TQMap::insert( const value_type& x ) + + \overload + + Inserts the (key, value) pair \a x into the map. \a x is a TQPair + whose \c first element is a key to be inserted and whose \c second + element is the associated value to be inserted. Returns a pair + whose \c first element is an iterator pointing to the inserted + item and whose \c second element is a bool indicating TRUE if \a x + was inserted and FALSE if it was not inserted, e.g. because it was + already present. + + \sa replace() +*/ + +/*! + \fn void TQMap::erase( iterator it ) + + Removes the item associated with the iterator \a it from the map. + + This function is provided for STL compatibility. It is equivalent + to remove(). + + \sa clear() +*/ + +/*! + \fn void TQMap::erase( const key_type& k ) + + \overload + + Removes the item with the key \a k from the map. +*/ + +/*! + \fn size_type TQMap::count( const key_type& k ) const + + Returns the number of items whose key is \a k. Since TQMap does not + allow duplicate keys, the return value is always 0 or 1. + + This function is provided for STL compatibility. +*/ + +/*! + \fn Iterator TQMap::replace( const Key& k, const T& v ) + + Replaces the value of the element with key \a k, with the value \a + v. + + \sa insert() remove() +*/ + +/*! + \fn const T& TQMap::operator[] ( const Key& k ) const + + \overload + + \warning This function differs from the non-const version of the + same function. It will \e not insert an empty value if the key \a + k does not exist. This may lead to logic errors in your program. + You should check if the element exists before calling this + function. + + Returns the value associated with the key \a k. If no such key is + present, a reference to an empty item is returned. +*/ + +/*! + \fn uint TQMap::count() const + + \overload + + Returns the number of items in the map. + + \sa isEmpty() +*/ + +/*! + \fn bool TQMap::isEmpty() const + + Returns TRUE if the map contains no items; otherwise returns + FALSE. + + \sa count() +*/ + +/*! + \fn Iterator TQMap::insert( const Key& key, const T& value, bool overwrite ) + + Inserts a new item with the key, \a key, and a value of \a value. + If there is already an item whose key is \a key, that item's value + is replaced with \a value, unless \a overwrite is FALSE (it is + TRUE by default). In this case an iterator to this item is + returned, else an iterator to the new item is returned. + +*/ + +/*! + \fn void TQMap::remove( iterator it ) + + Removes the item associated with the iterator \a it from the map. + + \sa clear() +*/ + +/*! + \fn void TQMap::remove( const Key& k ) + + \overload + + Removes the item with the key \a k from the map. +*/ + +/*! + \fn bool TQMap::contains( const Key& k ) const + + Returns TRUE if the map contains an item with key \a k; otherwise + returns FALSE. +*/ + + +/***************************************************************************** + TQMapIterator documentation + *****************************************************************************/ + +/*! + \class TQMapIterator tqmap.h + \brief The TQMapIterator class provides an iterator for TQMap. + + \ingroup qtl + \ingroup tools + + You cannot create an iterator by yourself. Instead, you must ask a + map to give you one. An iterator is as big as a pointer; on 32-bit + machines that means 4 bytes, on 64-bit machines, 8 bytes. That + makes copying iterators very fast. Iterators behave in a similar + way to pointers, and they are almost as fast as pointers. See the + \link tqmap.html#tqmap-eg TQMap example\endlink. + + TQMap is highly optimized for performance and memory usage, but the + trade-off is that you must be more careful. The only way to + traverse a map is to use iterators. TQMap does not know about its + iterators, and the iterators don't even know to which map they + belong. That makes things fast but a bit dangerous because it is + up to you to make sure that the iterators you are using are still + valid. QDictIterator will be able to give warnings, whereas + TQMapIterator may end up in an undefined state. + + For every Iterator there is also a ConstIterator. You must use the + ConstIterator to access a TQMap in a const environment or if the + reference or pointer to the map is itself const. Its semantics are + the same, but it only returns const references to the item it + points to. + + \sa TQMap TQMapConstIterator +*/ + +/*! \enum TQMapIterator::iterator_category + The type of iterator category, \c std::bidirectional_iterator_tag. */ +/*! \enum TQMapIterator::value_type + The type of value. */ +/*! \enum TQMapIterator::pointer + Pointer to value_type. */ +/*! \enum TQMapIterator::reference + Reference to value_type. */ +/*! \enum TQMapIterator::difference_type + \internal */ +/*! \enum TQMapIterator::NodePtr + \internal */ + +/*! + \fn TQMapIterator::TQMapIterator() + + Creates an uninitialized iterator. +*/ + +/*! + \fn TQMapIterator::TQMapIterator (TQMapNode * p) + + Constructs an iterator starting at node \a p. +*/ + +/*! + \fn TQMapIterator::TQMapIterator( const TQMapIterator& it ) + + Constructs a copy of the iterator, \a it. +*/ + +/*! + \fn TQMapIterator& TQMapIterator::operator++() + + Prefix ++ makes the succeeding item current and returns an + iterator pointing to the new current item. The iterator cannot + check whether it reached the end of the map. Incrementing the + iterator returned by end() causes undefined results. +*/ + +/*! + \fn TQMapIterator TQMapIterator::operator++(int) + + \overload + + Postfix ++ makes the succeeding item current and returns an + iterator pointing to the new current item. The iterator cannot + check whether it reached the end of the map. Incrementing the + iterator returned by end() causes undefined results. +*/ + +/*! + \fn TQMapIterator& TQMapIterator::operator--() + + Prefix -- makes the previous item current and returns an iterator + pointing to the new current item. The iterator cannot check + whether it reached the beginning of the map. Decrementing the + iterator returned by begin() causes undefined results. +*/ + +/*! + \fn TQMapIterator TQMapIterator::operator--(int) + + \overload + + Postfix -- makes the previous item current and returns an iterator + pointing to the new current item. The iterator cannot check + whether it reached the beginning of the map. Decrementing the + iterator returned by begin() causes undefined results. +*/ + +/*! + \fn T& TQMapIterator::operator*() + + Dereference operator. Returns a reference to the current item's + data. The same as data(). +*/ + +/*! + \fn const T& TQMapIterator::operator*() const + + \overload + + Dereference operator. Returns a const reference to the current + item's data. The same as data(). +*/ + +/*! + \fn bool TQMapIterator::operator==( const TQMapIterator& it ) const + + Compares the iterator to the \a it iterator and returns TRUE if + they point to the same item; otherwise returns FALSE. +*/ + +/*! + \fn bool TQMapIterator::operator!=( const TQMapIterator& it ) const + + Compares the iterator to the \a it iterator and returns FALSE if + they point to the same item; otherwise returns TRUE. +*/ + +/*! + \fn T& TQMapIterator::data() + + Returns a reference to the current item's data. +*/ + +/*! + \fn const T& TQMapIterator::data() const + + \overload + + Returns a const reference to the current item's data. +*/ + +/*! + \fn const K& TQMapIterator::key() const + + Returns a const reference to the current item's key. +*/ + +/*! + \fn TQValueList TQMap::keys() const + + Returns a list of all the keys in the map, in order. +*/ + +/*! + \fn TQValueList TQMap::values() const + + Returns a list of all the values in the map, in key order. +*/ + +/***************************************************************************** + TQMapConstIterator documentation + *****************************************************************************/ + +/*! + \class TQMapConstIterator tqmap.h + \brief The TQMapConstIterator class provides an iterator for TQMap. + + \ingroup qtl + \ingroup tools + + In contrast to TQMapIterator, this class is used to iterate over a + const map. It does not allow you to modify the values of the map + because this would break the const semantics. + + For more information on TQMap iterators, see \l{TQMapIterator} and + the \link tqmap.html#tqmap-eg TQMap example\endlink. + + \sa TQMap TQMapIterator +*/ + +/*! \enum TQMapConstIterator::iterator_category + The type of iterator category, \c std::bidirectional_iterator_tag. */ +/*! \enum TQMapConstIterator::value_type + The type of const value. */ +/*! \enum TQMapConstIterator::pointer + Const pointer to value_type. */ +/*! \enum TQMapConstIterator::reference + Const reference to value_type. */ +/*! \enum TQMapConstIterator::difference_type + \internal */ +/*! \enum TQMapConstIterator::NodePtr + \internal */ + + +/*! + \fn TQMapConstIterator::TQMapConstIterator() + + Constructs an uninitialized iterator. +*/ + +/*! + \fn TQMapConstIterator::TQMapConstIterator (TQMapNode * p) + + Constructs an iterator starting at node \a p. +*/ + +/*! + \fn TQMapConstIterator::TQMapConstIterator( const TQMapConstIterator& it ) + + Constructs a copy of the iterator, \a it. +*/ + +/*! + \fn TQMapConstIterator::TQMapConstIterator( const TQMapIterator& it ) + + Constructs a copy of the iterator, \a it. +*/ + +/*! + \fn TQMapConstIterator& TQMapConstIterator::operator++() + + Prefix ++ makes the succeeding item current and returns an + iterator pointing to the new current item. The iterator cannot + check whether it reached the end of the map. Incrementing the + iterator returned by end() causes undefined results. +*/ + +/*! + \fn TQMapConstIterator TQMapConstIterator::operator++(int) + + \overload + + Postfix ++ makes the succeeding item current and returns an + iterator pointing to the new current item. The iterator cannot + check whether it reached the end of the map. Incrementing the + iterator returned by end() causes undefined results. +*/ + +/*! + \fn TQMapConstIterator& TQMapConstIterator::operator--() + + Prefix -- makes the previous item current and returns an iterator + pointing to the new current item. The iterator cannot check + whether it reached the beginning of the map. Decrementing the + iterator returned by begin() causes undefined results. +*/ + +/*! + \fn TQMapConstIterator TQMapConstIterator::operator--(int) + + \overload + + Postfix -- makes the previous item current and returns an iterator + pointing to the new current item. The iterator cannot check + whether it reached the beginning of the map. Decrementing the + iterator returned by begin() causes undefined results. +*/ + +/*! + \fn const T& TQMapConstIterator::operator*() const + + Dereference operator. Returns a const reference to the current + item's data. The same as data(). +*/ + +/*! + \fn bool TQMapConstIterator::operator==( const TQMapConstIterator& it ) const + + Compares the iterator to the \a it iterator and returns TRUE if + they point to the same item; otherwise returns FALSE. +*/ + +/*! + \fn bool TQMapConstIterator::operator!=( const TQMapConstIterator& it ) const + + Compares the iterator to the \a it iterator and returns FALSE if + they point to the same item; otherwise returns TRUE. +*/ + +/*! + \fn const T& TQMapConstIterator::data() const + + Returns a const reference to the current item's data. +*/ + +/*! + \fn const K& TQMapConstIterator::key() const + + Returns a const reference to the current item's key. +*/ diff --git a/doc/tqpair.doc b/doc/tqpair.doc new file mode 100644 index 000000000..fed6658cc --- /dev/null +++ b/doc/tqpair.doc @@ -0,0 +1,146 @@ +/**************************************************************************** +** +** TQPair class documentation +** +** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. +** +** This file is part 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.QPL +** included in the packaging of this file. Licensees holding valid Qt +** Commercial licenses may use this file in accordance with the Qt +** 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. +** +**********************************************************************/ + +/***************************************************************************** + TQPair documentation + *****************************************************************************/ + + +/*! + \class TQPair tqpair.h + \brief The TQPair class is a value-based template class that provides a pair of elements. + + \ingroup qtl + \ingroup tools + \ingroup shared + + TQPair is a TQt implementation of an STL-like pair. It can be used + in your application if the standard pair\<\> is not available on + your target platforms. + + TQPair\ defines a template instance to create a pair of + values that contains two values of type T1 and T2. Please note + that TQPair does not store pointers to the two elements; it holds a + copy of every member. This is why these kinds of classes are + called \e{value based}. If you're interested in \e{pointer based} + classes see, for example, QPtrList and QDict. + + TQPair holds one copy of type T1 and one copy of type T2, but does + not provide iterators to access these elements. Instead, the two + elements (\c first and \c second) are public member variables of + the pair. TQPair owns the contained elements. For more relaxed + ownership semantics, see QPtrCollection and friends which are + pointer-based containers. + + Some classes cannot be used within a TQPair: for example, all + classes derived from TQObject and thus all classes that implement + widgets. Only "values" can be used in a TQPair. To qualify as a + value the class must provide: + + \list + \i A copy constructor + \i An assignment operator + \i A constructor that takes no arguments + \endlist + + Note that C++ defaults to field-by-field assignment operators and + copy constructors if no explicit version is supplied. In many + cases this is sufficient. + + TQPair uses an STL-like syntax to manipulate and address the + objects it contains. See the \link ntqtl.html QTL + documentation\endlink for more information. + + Functions that need to return two values can use a TQPair. +*/ + +/*! \enum TQPair::first_type + The type of the first element in the pair. */ + +/*! \enum TQPair::second_type + The type of the second element in the pair. */ + + +/*! + \fn TQPair::TQPair() + + Constructs an empty pair. The \c first and \c second elements are + default constructed. +*/ + +/*! + \fn TQPair::TQPair( const T1& t1, const T2& t2 ) + + Constructs a pair and initializes the \c first element with \a t1 + and the \c second element with \a t2. +*/ + +/*! + \fn bool operator==( const TQPair& x, const TQPair& y ) + + Returns TRUE if \a x is equal to \a y; otherwise returns FALSE. + Two TQPairs are equal if both their \c first and \c second elements + are equal. +*/ + +/*! + \fn bool operator<( const TQPair& x, const TQPair& y ) + + Returns TRUE if \a x is less than \a y; otherwise returns FALSE. + \a x is less than \a y if x.first is less than y.first, or if + x.second is less than y.second and x.first is the same as y.first. + + For example, (0, 1) < (0, 4) and (0, 4) < (1, 0). +*/ + +/*! \fn TQPair qMakePair( const T1& x, const T2& y ) + + Convenience wrapper for the TQPair constructor. +*/ + +/*! \fn QDataStream& operator>>( QDataStream& s, TQPair& p ) + + Reads a pair \a p from the stream \a s. The types T1 and T2 must + implement the streaming operator as well. +*/ + +/*! \fn QDataStream& operator<<( QDataStream& s, const TQPair& p ) + + Writes the pair \a p to the stream \a s. The types T1 and T2 must + implement the streaming operator as well. +*/ diff --git a/doc/tqvaluelist.doc b/doc/tqvaluelist.doc new file mode 100644 index 000000000..846282e09 --- /dev/null +++ b/doc/tqvaluelist.doc @@ -0,0 +1,1200 @@ +/**************************************************************************** +** +** TQValueList and TQValueListIterator class documentation +** +** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. +** +** This file is part 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.QPL +** included in the packaging of this file. Licensees holding valid Qt +** Commercial licenses may use this file in accordance with the Qt +** 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. +** +**********************************************************************/ + + +/***************************************************************************** + TQValueList documentation + *****************************************************************************/ + +/*! + \class TQValueList tqvaluelist.h + \brief The TQValueList class is a value-based template class that + provides lists. + + \ingroup qtl + \ingroup tools + \ingroup shared + \mainclass + \reentrant + + TQValueList is a TQt implementation of an STL-like list container. + It can be used in your application if the standard \c list is not + available for your target platform(s). TQValueList is part of the + \link ntqtl.html TQt Template Library\endlink. + + TQValueList\ defines a template instance to create a list of + values that all have the class T. Note that TQValueList does not + store pointers to the members of the list; it holds a copy of + every member. This is why these kinds of classes are called "value + based"; QPtrList and QDict are "pointer based". + + TQValueList contains and manages a collection of objects of type T + and provides iterators that allow the contained objects to be + addressed. TQValueList owns the contained items. For more relaxed + ownership semantics, see QPtrCollection and friends which are + pointer-based containers. + + Some classes cannot be used within a TQValueList, for example, all + classes derived from TQObject and thus all classes that implement + widgets. Only values can be used in a TQValueList. To qualify as a + value the class must provide: + \list + \i a copy constructor; + \i an assignment operator; + \i a default constructor, i.e. a constructor that does not take any arguments. + \endlist + + Note that C++ defaults to field-by-field assignment operators and + copy constructors if no explicit version is supplied. In many + cases this is sufficient. + + In addition, some compilers (e.g. Sun CC) might require that the + class provides an equality operator (operator==()). + + TQValueList's function naming is consistent with the other Qt + classes (e.g. count(), isEmpty()). TQValueList also provides extra + functions for compatibility with STL algorithms, such as size() + and empty(). Programmers already familiar with the STL \c list may + prefer to use the STL-compatible functions. + + Example: + \code + class Employee + { + public: + Employee(): sn(0) {} + Employee( const TQString& forename, const TQString& surname, int salary ) + : fn(forename), sn(surname), sal(salary) + {} + + TQString forename() const { return fn; } + TQString surname() const { return sn; } + int salary() const { return sal; } + void setSalary( int salary ) { sal = salary; } + + private: + TQString fn; + TQString sn; + int sal; + }; + + typedef TQValueList EmployeeList; + EmployeeList list; + + list.append( Employee("John", "Doe", 50000) ); + list.append( Employee("Jane", "Williams", 80000) ); + list.append( Employee("Tom", "Jones", 60000) ); + + Employee mary( "Mary", "Hawthorne", 90000 ); + list.append( mary ); + mary.setSalary( 100000 ); + + EmployeeList::iterator it; + for ( it = list.begin(); it != list.end(); ++it ) + cout << (*it).surname().latin1() << ", " << + (*it).forename().latin1() << " earns " << + (*it).salary() << endl; + + // Output: + // Doe, John earns 50000 + // Williams, Jane earns 80000 + // Hawthorne, Mary earns 90000 + // Jones, Tom earns 60000 + \endcode + + + Notice that the latest changes to Mary's salary did not affect the + value in the list because the list created a copy of Mary's entry. + + There are several ways to find items in the list. The begin() and + end() functions return iterators to the beginning and end of the + list. The advantage of getting an iterator is that you can move + forward or backward from this position by + incrementing/decrementing the iterator. The iterator returned by + end() points to the item which is one \e past the last item in the + container. The past-the-end iterator is still associated with the + list it belongs to, however it is \e not dereferenceable; + operator*() will not return a well-defined value. If the list is + empty(), the iterator returned by begin() will equal the iterator + returned by end(). + + Another way to find an item in the list is by using the \link + ntqtl.html#qFind tqFind()\endlink algorithm. For example: + + \code + TQValueList list; + ... + TQValueList::iterator it = tqFind( list.begin(), list.end(), 3 ); + if ( it != list.end() ) + // it points to the found item + \endcode + + It is safe to have multiple iterators a the list at the same + time. If some member of the list is removed, only iterators + pointing to the removed member become invalid. Inserting into the + list does not invalidate any iterator. For convenience, the + function last() returns a reference to the last item in the list, + and first() returns a reference to the the first item. If the + list is empty(), both last() and first() have undefined behavior + (your application will crash or do unpredictable things). Use + last() and first() with caution, for example: + + \code + TQValueList list; + list.append( 1 ); + list.append( 2 ); + list.append( 3 ); + ... + if ( !list.empty() ) { + // OK, modify the first item + int& i = list.first(); + i = 18; + } + ... + TQValueList dlist; + double d = dlist.last(); // undefined + \endcode + + Because TQValueList is value-based there is no need to be careful + about deleting items in the list. The list holds its own copies + and will free them if the corresponding member or the list itself + is deleted. You can force the list to free all of its items with + clear(). + + TQValueList is shared implicitly, which means it can be copied in + constant time, i.e. O(1). If multiple TQValueList instances share + the same data and one needs to modify its contents, this modifying + instance makes a copy and modifies its private copy; therefore it + does not affect the other instances; this takes O(n) time. This is + often called "copy on write". If a TQValueList is being used in a + multi-threaded program, you must protect all access to the list. + See \l QMutex. + + There are several ways to insert items into the list. The + prepend() and append() functions insert items at the beginning and + the end of the list respectively. The insert() function comes in + several flavors and can be used to add one or more items at + specific positions within the list. + + Items can also be removed from the list in several ways. There + are several variants of the remove() function, which removes a + specific item from the list. The remove() function will find and + remove items according to a specific item value. + + Lists can also be sorted using the \link ntqtl.html TQt Template + Library\endlink. For example with qHeapSort(): + + Example: + \code + TQValueList list; + list.append( 5 ); + list.append( 8 ); + list.append( 3 ); + list.append( 4 ); + qHeapSort( list ); + \endcode + + \sa TQValueListIterator +*/ + +/*! \enum TQValueList::iterator + The list's iterator type, TQValueListIterator. */ +/*! \enum TQValueList::const_iterator + The list's const iterator type, TQValueListConstIterator. */ +/*! \enum TQValueList::value_type + The type of the object stored in the list, T. */ +/*! \enum TQValueList::pointer + The pointer to T type. */ +/*! \enum TQValueList::const_pointer + The const pointer to T type. */ +/*! \enum TQValueList::reference + The reference to T type. */ +/*! \enum TQValueList::const_reference + The const reference to T type. */ +/*! \enum TQValueList::size_type + An unsigned integral type, used to represent various sizes. */ +/*! \enum TQValueList::difference_type + \internal +*/ +/*! \enum TQValueList::ValueType + \internal +*/ +/*! + \fn TQValueList::TQValueList() + + Constructs an empty list. +*/ + +/*! + \fn TQValueList::TQValueList( const TQValueList& l ) + + Constructs a copy of \a l. + + This operation takes O(1) time because TQValueList is implicitly + shared. + + The first modification to a list will take O(n) time. +*/ + +/*! + \fn TQValueList::TQValueList( const std::list& l ) + + Contructs a copy of \a l. + + This constructor is provided for compatibility with STL + containers. +*/ + +/*! + \fn TQValueList::~TQValueList() + + Destroys the list. References to the values in the list and all + iterators of this list become invalidated. Note that it is + impossible for an iterator to check whether or not it is valid: + TQValueList is highly tuned for performance, not for error + checking. +*/ + +/*! \enum TQValueListIterator::NodePtr + \internal */ +/*! \enum TQValueListIterator::iterator_category + \internal */ +/*! \enum TQValueListIterator::size_type + \internal */ +/*! \enum TQValueListIterator::difference_type + \internal */ +/*! + \fn TQValueListIterator::TQValueListIterator( NodePtr p ) + \internal +*/ + +/*! + \fn bool TQValueList::operator== ( const TQValueList& l ) const + + Compares both lists. + + Returns TRUE if this list and \a l are equal; otherwise returns + FALSE. +*/ + +/*! + \fn bool TQValueList::operator== ( const std::list& l ) const + + \overload + + Returns TRUE if this list and \a l are equal; otherwise returns + FALSE. + + This operator is provided for compatibility with STL containers. +*/ + +/*! + \fn TQValueList& TQValueList::operator= ( const TQValueList& l ) + + Assigns \a l to this list and returns a reference to this list. + + All iterators of the current list become invalidated by this + operation. The cost of such an assignment is O(1) since TQValueList + is implicitly shared. +*/ + +/*! + \fn TQValueList& TQValueList::operator= ( const std::list& l ) + + \overload + + Assigns the contents of \a l to the list. + + All iterators of the current list become invalidated by this + operation. +*/ + +/*! + \fn bool TQValueList::operator!= ( const TQValueList& l ) const + + Compares both lists. + + Returns TRUE if this list and \a l are unequal; otherwise returns + FALSE. +*/ + +/*! + \fn iterator TQValueList::insert( iterator it, const T& x ) + + Inserts the value \a x in front of the item pointed to by the + iterator, \a it. + + Returns an iterator pointing at the inserted item. + + \sa append(), prepend() +*/ + +/*! + \fn uint TQValueList::remove( const T& x ) + + \overload + + Removes all items that have value \a x and returns the number of + removed items. +*/ + +/*! + \fn void TQValueList::clear() + + Removes all items from the list. + + \sa remove() +*/ + +/*! + \fn iterator TQValueList::begin() + + \overload + + Returns an iterator pointing to the first item in the list. This + iterator equals end() if the list is empty. + + \sa first(), end() +*/ + +/*! + \fn const_iterator TQValueList::begin() const + + Returns an iterator pointing to the first item in the list. This + iterator equals end() if the list is empty. + + \sa first(), end(), constBegin() +*/ + +/*! + \fn const_iterator TQValueList::constBegin() const + + Returns an iterator pointing to the first item in the list. This + iterator equals constEnd() if the list is empty. + + \sa begin() +*/ + +/*! + \fn iterator TQValueList::end() + + Returns an iterator pointing \e past the last item in the list. + This iterator equals begin() if the list is empty. + + \sa last(), begin(), constEnd() +*/ + +/*! + \fn const_iterator TQValueList::end() const + + \overload + + Returns an iterator pointing \e past the last item in the list. + This iterator equals begin() if the list is empty. + + \sa last(), begin() +*/ + +/*! + \fn const_iterator TQValueList::constEnd() const + + Returns an iterator pointing \e past the last item in the list. + This iterator equals constBegin() if the list is empty. + + \sa end() +*/ + +/*! + \fn QDataStream& operator>>( QDataStream& s, TQValueList& l ) + + \relates TQValueList + + Reads a list, \a l, from the stream \a s. The type T stored in the + list must implement the streaming operator. +*/ + +/*! + \fn QDataStream& operator<<( QDataStream& s, const TQValueList& l ) + + \overload + \relates TQValueList + + Writes a list, \a l, to the stream \a s. The type T stored in the + list must implement the streaming operator. +*/ + +/*! + \fn size_type TQValueList::size() const + + Returns the number of items in the list. + + This function is provided for STL compatibility. It is equivalent + to count(). + + \sa empty() +*/ + +/*! + \fn bool TQValueList::empty() const + + Returns TRUE if the list contains no items; otherwise returns + FALSE. + + \sa size() +*/ + +/*! + \fn void TQValueList::push_front( const T& x ) + + Inserts \a x at the beginning of the list. + + This function is provided for STL compatibility. It is equivalent + to prepend(). +*/ + +/*! + \fn void TQValueList::push_back( const T& x ) + + Inserts \a x at the end of the list. + + This function is provided for STL compatibility. It is equivalent + to append(). +*/ + +/*! + \fn iterator TQValueList::erase( iterator it ) + + Removes the item pointed to by \a it from the list. No iterators + other than \a it or other iterators pointing at the same item as + \a it are invalidated. Returns an iterator to the next item after + \a it, or end() if there is no such item. + + This function is provided for STL compatibility. It is equivalent + to remove(). +*/ + +/*! + \fn iterator TQValueList::erase( iterator first, iterator last ) + + \overload + + Deletes all items from \a first to \a last (not including \a + last). No iterators are invalidated, except those pointing to the + removed items themselves. Returns \a last. +*/ + +/*! + \fn reference TQValueList::front() + + Returns a reference to the first item. If the list contains no + first item (i.e. empty() returns TRUE), the return value is + undefined. + + This function is provided for STL compatibility. It is equivalent + to first(). + + \sa back() +*/ + +/*! + \fn const_reference TQValueList::front() const + + \overload +*/ + +/*! + \fn reference TQValueList::back() + + Returns a reference to the last item. If the list contains no last + item (i.e. empty() returns TRUE), the return value is undefined. + + This function is provided for STL compatibility. It is equivalent + to last(). + + \sa front() +*/ + +/*! + \fn const_reference TQValueList::back() const + + \overload +*/ + +/*! + \fn void TQValueList::pop_front() + + Removes the first item. If there is no first item, this operation + is undefined. + + This function is provided for STL compatibility. +*/ + +/*! + \fn void TQValueList::pop_back() + + Removes the last item. If there is no last item, this operation is + undefined. + + This function is provided for STL compatibility. +*/ + +/*! + \fn void TQValueList::insert( iterator pos, size_type n, const T& x ) + + \overload + + Inserts \a n copies of \a x before position \a pos. +*/ + +/*! + \fn void TQValueList::detach() + \internal +*/ + +/*! + \fn TQValueList& TQValueList::operator<< ( const T& x ) + + Adds the value \a x to the end of the list. + + Returns a reference to the list. +*/ + +/*! + \fn const T& TQValueList::operator[] ( size_type i ) const + + Returns a const reference to the item with index \a i in the list. + It is up to you to check whether this item really exists. You can + do that easily with the count() function. However this operator + does not check whether \a i is in range and will deliver undefined + results if it does not exist. + + \warning This function uses a linear search and can be extremely + slow for large lists. TQValueList is not optimized for random item + access. If you need random access use a different container, such + as TQValueVector. +*/ + +/*! + \fn T& TQValueList::operator[] ( size_type i ) + + \overload + + Returns a non-const reference to the item with index \a i. +*/ + +/*! + \fn const_iterator TQValueList::at( size_type i ) const + + Returns an iterator pointing to the item at position \a i in the + list, or an undefined value if the index is out of range. + + \warning This function uses a linear search and can be extremely + slow for large lists. TQValueList is not optimized for random item + access. If you need random access use a different container, such + as TQValueVector. +*/ + +/*! + \fn iterator TQValueList::at( size_type i ) + + \overload + + Returns an iterator pointing to the item at position \a i in the + list, or an undefined value if the index is out of range. + +*/ + +/*! + \fn iterator TQValueList::fromLast() + + \overload + + Returns an iterator to the last item in the list, or end() if + there is no last item. + + Use the end() function instead. For example: + + \code + TQValueList l; + ... + TQValueList::iterator it = l.end(); + --it; + if ( it != end() ) + // ... + \endcode + +*/ + +/*! + \fn const_iterator TQValueList::fromLast() const + + Returns an iterator to the last item in the list, or end() if + there is no last item. + + Use the end() function instead. For example: + + \code + TQValueList l; + ... + TQValueList::iterator it = l.end(); + --it; + if ( it != end() ) + // ... + \endcode + +*/ + +/*! + \fn TQValueList TQValueList::operator+( const TQValueList& l ) const + + Creates a new list and fills it with the items of this list. Then + the items of \a l are appended. Returns the new list. +*/ + +/*! + \fn TQValueList& TQValueList::operator+= ( const TQValueList& l ) + + Appends the items of \a l to this list. Returns a reference to + this list. +*/ + +/*! + \fn TQValueList& TQValueList::operator+= ( const T& x ) + + \overload + + Appends the value \a x to the list. Returns a reference to the + list. +*/ + +/*! + \fn uint TQValueList::count() const + + Returns the number of items in the list. + + \sa isEmpty() +*/ + +/*! + \fn bool TQValueList::isEmpty() const + + Returns TRUE if the list contains no items; otherwise returns + FALSE. + + \sa count() +*/ + +/*! + \fn iterator TQValueList::append( const T& x ) + + Inserts \a x at the end of the list. + + \sa insert(), prepend() +*/ + +/*! + \fn iterator TQValueList::prepend( const T& x ) + + Inserts \a x at the beginning of the list. + + \sa insert(), append() +*/ + +/*! + \fn iterator TQValueList::remove( iterator it ) + + Removes the item pointed to by \a it from the list. No iterators + other than \a it or other iterators pointing at the same item as + \a it are invalidated. Returns an iterator to the next item after + \a it, or end() if there is no such item. + + \sa clear() +*/ + +/*! + \fn iterator TQValueList::find( const T& x ) + + Returns an iterator pointing to the first occurrence of \a x in + the list. + + Returns end() is no item matched. +*/ + +/*! + \fn const_iterator TQValueList::find( const T& x ) const + + \overload + + Returns an iterator pointing to the first occurrence of \a x in + the list. + + Returns end() if no item matched. +*/ + +/*! + \fn iterator TQValueList::find( iterator it, const T& x ) + + \overload + + Finds the first occurrence of \a x in the list starting at the + position given by \a it. + + Returns end() if no item matched. +*/ + +/*! + \fn const_iterator TQValueList::find( const_iterator it, const T& x ) const + + \overload + + Finds the first occurrence of \a x in the list starting at the + position given by \a it. + + Returns end() if no item matched. +*/ + +/*! + \fn uint TQValueList::contains( const T& x ) const + + Returns the number of occurrences of the value \a x in the list. +*/ + +/*! + \fn int TQValueList::findIndex( const T& x ) const + + Returns the index of the first occurrence of the value \a x. + Returns -1 if no item matched. +*/ + +/*! + \fn T& TQValueList::first() + + Returns a reference to the first item. If the list contains no + first item (i.e. isEmpty() returns TRUE), the return value is + undefined. + + \sa last() +*/ + +/*! + \fn const T& TQValueList::first() const + + \overload +*/ + +/*! + \fn T& TQValueList::last() + + Returns a reference to the last item. If the list contains no last + item (i.e. empty() returns TRUE), the return value is undefined. +*/ + +/*! + \fn const T& TQValueList::last() const + + \overload +*/ + +/***************************************************************************** + TQValueListIterator documentation + *****************************************************************************/ + +/*! + \class TQValueListIterator tqvaluelist.h + \brief The TQValueListIterator class provides an iterator for TQValueList. + + \ingroup qtl + \ingroup tools + \reentrant + + An iterator is a class for accessing the items of a container + class: a generalization of the index in an array. A pointer + into a "const char *" and an index into an "int[]" are both + iterators, and the general idea is to provide that functionality + for any data structure. + + The TQValueListIterator class is an iterator for TQValueList + instantiations. You can create the appropriate iterator type by + using the \c iterator typedef provided by TQValueList. + + The only way to access the items in a TQValueList is to use an + iterator. + + Example (see TQValueList for the complete code): + \code + EmployeeList::iterator it; + for ( it = list.begin(); it != list.end(); ++it ) + cout << (*it).surname().latin1() << ", " << + (*it).forename().latin1() << " earns " << + (*it).salary() << endl; + + // Output: + // Doe, John earns 50000 + // Williams, Jane earns 80000 + // Hawthorne, Mary earns 90000 + // Jones, Tom earns 60000 + \endcode + + TQValueList is highly optimized for performance and memory usage. + This means that you must be careful: TQValueList does not know + about all its iterators and the iterators don't know to which list + they belong. This makes things very fast, but if you're not + careful, you can get spectacular bugs. Always make sure iterators + are valid before dereferencing them or using them as parameters to + generic algorithms in the STL or the \link ntqtl.html QTL\endlink. + + Using an invalid iterator is undefined (your application will + probably crash). Many TQt functions return const value lists; to + iterate over these you should make a copy and iterate over the + copy. + + For every Iterator there is a ConstIterator. When accessing a + TQValueList in a const environment or if the reference or pointer + to the list is itself const, then you must use the ConstIterator. + Its semantics are the same as the Iterator, but it only returns + const references. + + \sa TQValueList, TQValueListConstIterator +*/ + +/*! \enum TQValueListIterator::value_type + The type of value, T. */ +/*! \enum TQValueListIterator::pointer + Pointer to value_type. */ +/*! \enum TQValueListIterator::reference + Reference to value_type. */ + +/*! + \fn TQValueListIterator::TQValueListIterator() + + Creates un uninitialized iterator. +*/ + +/* + \fn TQValueListIterator::TQValueListIterator( NodePtr p ) + + \overload + + \internal +*/ + +/*! + \fn TQValueListIterator::TQValueListIterator( const TQValueListIterator& it ) + + \overload + + Constructs a copy of the iterator \a it. +*/ + +/* Unfortunately not with MSVC + \fn T *TQValueListIterator::operator->() + Pointer operator. Returns a pointer to the current iterator item. + The great advantage of this operator is that you can treat the + iterator like a pointer. + + Example: + \code + TQValueList::Iterator it = list.begin(); + for( ; it != end(); ++it ) + it->show(); + \endcode +*/ + +/*! + \fn T& TQValueListIterator::operator*() + + Asterisk operator. Returns a reference to the current iterator item. +*/ + +/*! + \fn const T& TQValueListIterator::operator*() const + + \overload + + Asterisk operator. Returns a reference to the current iterator item. +*/ + +/*! + \fn TQValueListIterator& TQValueListIterator::operator++() + + Prefix ++ makes the succeeding item current and returns an + iterator pointing to the new current item. The iterator cannot + check whether it reached the end of the list. Incrementing the + iterator returned by end() causes undefined results. +*/ + +/*! + \fn TQValueListIterator TQValueListIterator::operator++(int) + + \overload + + Postfix ++ makes the succeeding item current and returns an + iterator pointing to the new current item. The iterator cannot + check whether it reached the end of the list. Incrementing the + iterator returned by end() causes undefined results. +*/ + +/*! + \fn TQValueListIterator& TQValueListIterator::operator--() + + Prefix -- makes the previous item current and returns an iterator + pointing to the new current item. The iterator cannot check + whether it reached the beginning of the list. Decrementing the + iterator returned by begin() causes undefined results. +*/ + +/*! + \fn TQValueListIterator TQValueListIterator::operator--(int) + + \overload + + Postfix -- makes the previous item current and returns an iterator + pointing to the new current item. The iterator cannot check + whether it reached the beginning of the list. Decrementing the + iterator returned by begin() causes undefined results. +*/ + + +/*! + \fn TQValueListIterator& TQValueListIterator::operator+=(int j) + + Postfix -- jumps \a j steps forward in the list. The iterator + cannot check whether it reached the end of the list. Jumping past + the end() causes undefined results. +*/ + +/*! + \fn TQValueListIterator& TQValueListIterator::operator-=(int j) + + Postfix -- jumps \a j steps backward in the list. The iterator + cannot check whether it reached the beginning of the list. Jumping + past begin() causes undefined results. +*/ + +/*! + \fn bool TQValueListIterator::operator==( const TQValueListIterator& it ) const + + Compares this iterator and \a it and returns TRUE if they point to + the same item; otherwise returns FALSE. +*/ + +/*! + \fn bool TQValueListIterator::operator!=( const TQValueListIterator& it ) const + + Compares this iterator and \a it and returns TRUE if they point to + different items; otherwise returns FALSE. +*/ + +/***************************************************************************** + TQValueListConstIterator documentation + *****************************************************************************/ + +/*! + \class TQValueListConstIterator tqvaluelist.h + \brief The TQValueListConstIterator class provides a const iterator + for TQValueList. + + \ingroup qtl + \ingroup tools + \reentrant + + In contrast to TQValueListIterator, this class is used to iterate + over a const list. It does not allow modification of the values of + the list since that would break const semantics. + + You can create the appropriate const iterator type by using the \c + const_iterator typedef provided by TQValueList. + + For more information on TQValueList iterators, see + TQValueListIterator. + + \sa TQValueListIterator, TQValueList +*/ + +/*! \enum TQValueListConstIterator::value_type + The type of value. */ +/*! \enum TQValueListConstIterator::pointer + Pointer to value_type. */ +/*! \enum TQValueListConstIterator::reference + Reference to value_type. */ +/*! \enum TQValueListConstIterator::NodePtr + \internal */ +/*! \enum TQValueListConstIterator::iterator_category + \internal */ +/*! \enum TQValueListConstIterator::size_type + \internal */ +/*! \enum TQValueListConstIterator::difference_type + \internal */ + +/*! + \fn TQValueListConstIterator::TQValueListConstIterator() + + Creates un uninitialized iterator. +*/ + +/*! + \fn TQValueListConstIterator::TQValueListConstIterator( NodePtr p ) + + \overload + + \internal +*/ + +/*! + \fn TQValueListConstIterator::TQValueListConstIterator( const TQValueListConstIterator& it ) + + \overload + + Constructs a copy of the iterator \a it. +*/ + +/*! + \fn TQValueListConstIterator::TQValueListConstIterator( const TQValueListIterator& it ) + + Constructs a copy of the iterator \a it. +*/ + +/* Unfortunately not with MSVC + \fn const T *TQValueListConstIterator::operator->() + Pointer operator. Returns a pointer to the current iterator item. + The great advantage of this operator is that you can treat the + iterator like a pointer. + + Example: + \code + TQValueList::Iterator it = list.begin(); + for( ; it != end(); ++it ) + it->show(); + \endcode +*/ + +/*! + \fn const T& TQValueListConstIterator::operator*() const + + Asterisk operator. Returns a reference to the current iterator item. +*/ + +/*! + \fn TQValueListConstIterator& TQValueListConstIterator::operator++() + + Prefix ++ makes the succeeding item current and returns an + iterator pointing to the new current item. The iterator cannot + check whether it reached the end of the list. Incrementing the + iterator returned by end() causes undefined results. +*/ + +/*! + \fn TQValueListConstIterator TQValueListConstIterator::operator++(int) + + \overload + + Postfix ++ makes the succeeding item current and returns an + iterator pointing to the new current item. The iterator cannot + check whether it reached the end of the list. Incrementing the + iterator returned by end() causes undefined results. +*/ + +/*! + \fn TQValueListConstIterator& TQValueListConstIterator::operator--() + + Prefix -- makes the previous item current and returns an iterator + pointing to the new current item. The iterator cannot check + whether it reached the beginning of the list. Decrementing the + iterator returned by begin() causes undefined results. +*/ + +/*! + \fn TQValueListConstIterator TQValueListConstIterator::operator--(int) + + \overload + + Postfix -- makes the previous item current and returns an iterator + pointing to the new current item. The iterator cannot check + whether it reached the beginning of the list. Decrementing the + iterator returned by begin() causes undefined results. +*/ + +/*! + \fn bool TQValueListConstIterator::operator==( const TQValueListConstIterator& it ) const + + Compares this iterator with \a it and returns TRUE if they point + to the same item; otherwise returns FALSE. +*/ + +/*! + \fn bool TQValueListConstIterator::operator!=( const TQValueListConstIterator& it ) const + + Compares this iterator with \a it and returns TRUE if they point + to different items; otherwise returns FALSE. +*/ + + +/*! + \enum TQValueList::Iterator + + This iterator is an instantiation of TQValueListIterator for the + same type as this TQValueList. In other words, if you instantiate + TQValueList, Iterator is a TQValueListIterator. Several + member function use it, such as TQValueList::begin(), which returns + an iterator pointing to the first item in the list. + + Functionally, this is almost the same as ConstIterator. The only + difference is that you cannot use ConstIterator for non-const + operations, and that the compiler can often generate better code + if you use ConstIterator. + + \sa TQValueListIterator ConstIterator +*/ + +/*! + \enum TQValueList::ConstIterator + + This iterator is an instantiation of TQValueListConstIterator for + the same type as this TQValueList. In other words, if you + instantiate TQValueList, ConstIterator is a + TQValueListConstIterator. Several member function use it, such + as TQValueList::begin(), which returns an iterator pointing to the + first item in the list. + + Functionally, this is almost the same as Iterator. The only + difference is you cannot use ConstIterator for non-const + operations, and that the compiler can often generate better code + if you use ConstIterator. + + \sa TQValueListIterator Iterator +*/ diff --git a/doc/tqvaluestack.doc b/doc/tqvaluestack.doc new file mode 100644 index 000000000..39f9f07ac --- /dev/null +++ b/doc/tqvaluestack.doc @@ -0,0 +1,169 @@ +/**************************************************************************** +** +** TQValueStack class documentation +** +** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. +** +** This file is part 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.QPL +** included in the packaging of this file. Licensees holding valid Qt +** Commercial licenses may use this file in accordance with the Qt +** 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. +** +**********************************************************************/ + + +/***************************************************************************** + TQValueStack documentation + *****************************************************************************/ + +/*! + \class TQValueStack tqvaluestack.h + \brief The TQValueStack class is a value-based template class that provides a stack. + + \ingroup qtl + \ingroup tools + \ingroup shared + \mainclass + \reentrant + + Define a template instance TQValueStack\ to create a stack of + values that all have the class X. TQValueStack is part of the \link + ntqtl.html TQt Template Library\endlink. + + Note that TQValueStack does not store pointers to the members of + the stack; it holds a copy of every member. That is why these + kinds of classes are called "value based"; QPtrStack, QPtrList, + QDict, etc., are "pointer based". + + A stack is a last in, first out (LIFO) structure. Items are added + to the top of the stack with push() and retrieved from the top + with pop(). The top() function provides access to the topmost item + without removing it. + + Example: + \code + TQValueStack stack; + stack.push( 1 ); + stack.push( 2 ); + stack.push( 3 ); + while ( ! stack.isEmpty() ) + cout << "Item: " << stack.pop() << endl; + + // Output: + // Item: 3 + // Item: 2 + // Item: 1 + \endcode + + TQValueStack is a specialized TQValueList provided for convenience. + All of TQValueList's functionality also applies to QPtrStack, for + example the facility to iterate over all elements using + TQValueStack::Iterator. See TQValueListIterator for further + details. + + Some classes cannot be used within a TQValueStack, for example + everything derived from TQObject and thus all classes that + implement widgets. Only values can be used in a TQValueStack. To + qualify as a value, the class must provide + \list + \i a copy constructor; + \i an assignment operator; + \i a default constructor, i.e. a constructor that does not take any arguments. + \endlist + + Note that C++ defaults to field-by-field assignment operators and + copy constructors if no explicit version is supplied. In many + cases this is sufficient. +*/ + + +/*! + \fn TQValueStack::TQValueStack() + + Constructs an empty stack. +*/ + +/*! + \fn TQValueStack::~TQValueStack() + + Destroys the stack. References to the values in the stack and all + iterators of this stack become invalidated. Because TQValueStack is + highly tuned for performance, you won't see warnings if you use + invalid iterators because it is impossible for an iterator to + check whether or not it is valid. +*/ + + +/*! + \fn void TQValueStack::push( const T& d ) + + Adds element, \a d, to the top of the stack. Last in, first out. + + This function is equivalent to append(). + + \sa pop(), top() +*/ + +/*! + \fn T& TQValueStack::top() + + Returns a reference to the top item of the stack or the item + referenced by end() if no such item exists. Note that you must not + change the value the end() iterator points to. + + This function is equivalent to last(). + + \sa pop(), push(), TQValueList::fromLast() +*/ + + +/*! + \fn const T& TQValueStack::top() const + + \overload + + Returns a reference to the top item of the stack or the item + referenced by end() if no such item exists. + + This function is equivalent to last(). + + \sa pop(), push(), TQValueList::fromLast() +*/ + +/*! + \fn T TQValueStack::pop() + + Removes the top item from the stack and returns it. + + \sa top() push() +*/ + + + + + diff --git a/doc/tqvaluevector.doc b/doc/tqvaluevector.doc new file mode 100644 index 000000000..bb2c12a5b --- /dev/null +++ b/doc/tqvaluevector.doc @@ -0,0 +1,724 @@ +/**************************************************************************** +** +** TQValueVector class documentation +** +** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. +** +** This file is part 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.QPL +** included in the packaging of this file. Licensees holding valid Qt +** Commercial licenses may use this file in accordance with the Qt +** 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. +** +**********************************************************************/ + + +/***************************************************************************** + TQValueVector documentation + *****************************************************************************/ + +/*! + \class TQValueVector tqvaluevector.h + \brief The TQValueVector class is a value-based template class that provides a dynamic array. + + \ingroup qtl + \ingroup tools + \ingroup shared + \mainclass + \reentrant + + TQValueVector is a TQt implementation of an STL-like vector + container. It can be used in your application if the standard \c + vector is not available for your target platforms. TQValueVector is + part of the \link ntqtl.html TQt Template Library\endlink. + + TQValueVector\ defines a template instance to create a vector + of values that all have the class T. TQValueVector does not store + pointers to the members of the vector; it holds a copy of every + member. TQValueVector is said to be value based; in contrast, + QPtrList and QDict are pointer based. + + TQValueVector contains and manages a collection of objects of type + T and provides random access iterators that allow the contained + objects to be addressed. TQValueVector owns the contained + elements. For more relaxed ownership semantics, see QPtrCollection + and friends, which are pointer-based containers. + + TQValueVector provides good performance if you append or remove + elements from the end of the vector. If you insert or remove + elements from anywhere but the end, performance is very bad. The + reason for this is that elements must to be copied into new + positions. + + Some classes cannot be used within a TQValueVector: for example, + all classes derived from TQObject and thus all classes that + implement widgets. Only values can be used in a TQValueVector. To + qualify as a value the class must provide: + \list + \i a copy constructor; + \i an assignment operator; + \i a default constructor, i.e., a constructor that does not take any arguments. + \endlist + + Note that C++ defaults to field-by-field assignment operators and + copy constructors if no explicit version is supplied. In many + cases this is sufficient. + + TQValueVector uses an STL-like syntax to manipulate and address the + objects it contains. See \link ntqtl.html this document\endlink for + more information. + + Example: + \code + #include + #include + #include + + class Employee + { + public: + Employee(): s(0) {} + Employee( const TQString& name, int salary ) + : n( name ), s( salary ) + { } + + TQString name() const { return n; } + int salary() const { return s; } + void setSalary( int salary ) { s = salary; } + private: + TQString n; + int s; + }; + + int main() + { + typedef TQValueVector EmployeeVector; + EmployeeVector vec( 3 ); // vector of 3 Employees + + vec[0] = Employee( "Bill", 50000 ); + vec[1] = Employee( "Steve", 80000 ); + vec[2] = Employee( "Ron", 60000 ); + + Employee joe( "Joe", 50000 ); + vec.push_back( joe ); // vector expands to accommodate 4 Employees + joe.setSalary( 70000 ); + + EmployeeVector::iterator it; + for( it = vec.begin(); it != vec.end(); ++it ) + printf( "%s earns %d\n", (*it).name().latin1(), (*it).salary() ); + + return 0; + } + \endcode + + Program output: + \code + Bill earns 50000 + Steve earns 80000 + Ron earns 60000 + Joe earns 50000 + \endcode + + As you can see, the most recent change to Joe's salary did not + affect the value in the vector because the vector created a copy + of Joe's entry. + + Many TQt functions return const value vectors; to iterate over + these you should make a copy and iterate over the copy. + + There are several ways to find items in the vector. The begin() + and end() functions return iterators to the beginning and end of + the vector. The advantage of getting an iterator is that you can + move forward or backward from this position by + incrementing/decrementing the iterator. The iterator returned by + end() points to the element which is one past the last element in + the container. The past-the-end iterator is still associated with + the vector it belongs to, however it is \e not dereferenceable; + operator*() will not return a well-defined value. If the vector is + empty(), the iterator returned by begin() will equal the iterator + returned by end(). + + The fastest way to access an element of a vector is by using + operator[]. This function provides random access and will return + a reference to the element located at the specified index. Thus, + you can access every element directly, in constant time, providing + you know the location of the element. It is undefined to access + an element that does not exist (your application will probably + crash). For example: + + \code + TQValueVector vec1; // an empty vector + vec1[10] = 4; // WARNING: undefined, probably a crash + + TQValueVector vec2(25); // initialize with 25 elements + vec2[10] = "Dave"; // OK + \endcode + + Whenever inserting, removing or referencing elements in a vector, + always make sure you are referring to valid positions. For + example: + + \code + void func( TQValueVector& vec ) + { + if ( vec.size() > 10 ) { + vec[9] = 99; // OK + } + }; + \endcode + + The iterators provided by vector are random access iterators, + therefore you can use them with many generic algorithms, for + example, algorithms provided by the STL or the \link ntqtl.html + QTL\endlink. + + Another way to find an element in the vector is by using the + std::find() or \link ntqtl.html#qFind tqFind()\endlink algorithms. + For example: + + \code + TQValueVector vec; + ... + TQValueVector::const_iterator it = tqFind( vec.begin(), vec.end(), 3 ); + if ( it != vector.end() ) + // 'it' points to the found element + \endcode + + It is safe to have multiple iterators on the vector at the same + time. Since TQValueVector manages memory dynamically, all iterators + can become invalid if a memory reallocation occurs. For example, + if some member of the vector is removed, iterators that point to + the removed element and to all following elements become + invalidated. Inserting into the middle of the vector will + invalidate all iterators. For convenience, the function back() + returns a reference to the last element in the vector, and front() + returns a reference to the first element. If the vector is + empty(), both back() and front() have undefined behavior (your + application will crash or do unpredictable things). Use back() and + front() with caution, for example: + + \code + TQValueVector vec( 3 ); + vec.push_back( 1 ); + vec.push_back( 2 ); + vec.push_back( 3 ); + ... + if ( !vec.empty() ) { + // OK: modify the first element + int& i = vec.front(); + i = 18; + } + ... + TQValueVector dvec; + double d = dvec.back(); // undefined behavior + \endcode + + Because TQValueVector manages memory dynamically, it is recommended + that you contruct a vector with an initial size. Inserting and + removing elements happens fastest when: + \list + \i Inserting or removing elements happens at the end() of the + vector; + \i The vector does not need to allocate additional memory. + \endlist + + By creating a TQValueVector with a sufficiently large initial size, + there will be less memory allocations. Do not use an initial size + that is too big, since it will still take time to construct all + the empty entries, and the extra space will be wasted if it is + never used. + + Because TQValueVector is value-based there is no need to be careful + about deleting elements in the vector. The vector holds its own + copies and will free them if the corresponding member or the + vector itself is deleted. You can force the vector to free all of + its items with clear(). + + TQValueVector is shared implicitly, which means it can be copied in + constant time. If multiple TQValueVector instances share the same + data and one needs to modify its contents, this modifying instance + makes a copy and modifies its private copy; it thus does not + affect the other instances. This is often called "copy on write". + If a TQValueVector is being used in a multi-threaded program, you + must protect all access to the vector. See QMutex. + + There are several ways to insert elements into the vector. The + push_back() function insert elements into the end of the vector, + and is usually fastest. The insert() function can be used to add + elements at specific positions within the vector. + + Items can be also be removed from the vector in several ways. + There are several variants of the erase() function which removes a + specific element, or range of elements, from the vector. + + Vectors can be also sorted with various STL algorithms , or it can + be sorted using the \link ntqtl.html TQt Template Library\endlink. + For example with qHeapSort(): + + Example: + \code + TQValueVector v( 4 ); + v.push_back( 5 ); + v.push_back( 8 ); + v.push_back( 3 ); + v.push_back( 4 ); + qHeapSort( v ); + \endcode + + TQValueVector stores its elements in contiguous memory. This means + that you can use a TQValueVector in any situation that requires an + array. +*/ + +/*! \enum TQValueVector::value_type + The type of the object stored in the vector. */ +/*! \enum TQValueVector::ValueType + The type of the object stored in the vector. */ +/*! \enum TQValueVector::pointer + The pointer to T type. */ +/*! \enum TQValueVector::const_pointer + The const pointer to T type. */ +/*! \enum TQValueVector::iterator + The vector's iterator type. */ +/*! \enum TQValueVector::const_iterator + The vector's const iterator type. */ +/*! \enum TQValueVector::Iterator + The vector's iterator type. */ +/*! \enum TQValueVector::ConstIterator + The vector's const iterator type. */ +/*! \enum TQValueVector::reference + The reference to T type. */ +/*! \enum TQValueVector::const_reference + The const reference to T type. */ +/*! \enum TQValueVector::size_type + An unsigned integral type, used to represent various sizes. */ +/*! \enum TQValueVector::difference_type + A signed integral type used to represent the distance between two iterators. */ + + +/*! + \fn TQValueVector::TQValueVector() + + Constructs an empty vector without any elements. To create a + vector which reserves an initial amount of space for elements, use + \c TQValueVector(size_type n). +*/ + +/*! + \fn TQValueVector::TQValueVector( const TQValueVector& v ) + + Constructs a copy of \a v. + + This operation costs O(1) time because TQValueVector is implicitly + shared. + + The first modification to the vector does takes O(n) time, because + the elements must be copied. +*/ + +/*! + \fn TQValueVector::TQValueVector( std::vector& v ) + + Constructs a copy of \a v. +*/ + +/*! + \fn TQValueVector::TQValueVector( const std::vector& v ) + + This operation costs O(n) time because \a v is copied. +*/ + +/*! + \fn TQValueVector::TQValueVector( size_type n, const T& val ) + + Constructs a vector with an initial size of \a n elements. Each + element is initialized with the value of \a val. +*/ + +/*! + \fn TQValueVector::~TQValueVector() + + Destroys the vector, destroying all elements and freeing the + allocated memory. References to the values in the vector and all + iterators of this vector become invalidated. Note that it is + impossible for an iterator to check whether or not it is valid: + TQValueVector is tuned for performance, not for error checking. +*/ + +/*! + \fn TQValueVector& TQValueVector::operator=( const TQValueVector& v ) + + Assigns \a v to this vector and returns a reference to this vector. + + All iterators of the current vector become invalidated by this + operation. The cost of such an assignment is O(1) since + TQValueVector is implicitly shared. +*/ + +/*! + \fn TQValueVector& TQValueVector::operator=( const std::vector& v ) + + \overload + + Assigns \a v to this vector and returns a reference to this vector. + + All iterators of the current vector become invalidated by this + operation. The cost of this assignment is O(n) since \a v is + copied. +*/ + +/*! + \fn size_type TQValueVector::size() const + + Returns the number of elements in the vector. + + This function is provided for STL compatibility. It is equivalent + to count(). + + \sa empty() +*/ + +/*! + \fn size_type TQValueVector::count() const + + Returns the number of items in the vector. + + \sa isEmpty() +*/ + +/*! + \fn bool TQValueVector::empty() const + + Returns TRUE if the vector is empty; otherwise returns FALSE. + Equivalent to size()==0, only faster. + + This function is provided for STL compatibility. It is equivalent + to isEmpty(). + + \sa size() +*/ + +/*! + \fn bool TQValueVector::isEmpty() const + + Returns TRUE if the vector is empty; returns FALSE otherwise. + + \sa count() +*/ + +/*! + \fn size_type TQValueVector::capacity() const + + Returns the maximum number of elements that can be stored in the + vector without forcing memory reallocation. If memory reallocation + takes place, some or all iterators may become invalidated. +*/ + +/*! + \fn iterator TQValueVector::begin() + + Returns an iterator pointing to the beginning of the vector. If + the vector is empty(), the returned iterator will equal end(). +*/ + +/*! + \fn const_iterator TQValueVector::begin() const + + \overload + + Returns a const iterator pointing to the beginning of the vector. + If the vector is empty(), the returned iterator will equal end(). +*/ + +/*! + \fn const_iterator TQValueVector::constBegin() const + + Returns a const iterator pointing to the beginning of the vector. + If the vector is empty(), the returned iterator will equal end(). + + \sa constEnd(); +*/ + +/*! + \fn iterator TQValueVector::end() + + Returns an iterator pointing behind the last element of the + vector. +*/ + +/*! + \fn const_iterator TQValueVector::end() const + + \overload + + Returns a const iterator pointing behind the last element of the + vector. +*/ + +/*! + \fn const_iterator TQValueVector::constEnd() const + + Returns a const iterator pointing behind the last element of the + vector. + + \sa constBegin() +*/ + +/*! + \fn reference TQValueVector::at( size_type i , bool* ok ) + + Returns a reference to the element with index \a i. If \a ok is + non-null, and the index \a i is out of range, *\a ok is set to + FALSE and the returned reference is undefined. If the index \a i + is within the range of the vector, and \a ok is non-null, *\a ok + is set to TRUE and the returned reference is well defined. +*/ + +/*! + \fn const_reference TQValueVector::at( size_type i , bool* ok ) const + + \overload + + Returns a const reference to the element with index \a i. If \a ok + is non-null, and the index \a i is out of range, *\a ok is set to + FALSE and the returned reference is undefined. If the index \a i + is within the range of the vector, and \a ok is non-null, *\a ok + is set to TRUE and the returned reference is well defined. +*/ + +/*! + \fn reference TQValueVector::operator[]( size_type i ) + + Returns a reference to the element at index \a i. If \a i is out + of range, this function has undefined behavior. + + \sa at() +*/ + +/*! + \fn const_reference TQValueVector::operator[]( size_type i ) const + + \overload + + Returns a const reference to the element at index \a i. If \a i is + out of range, this function has undefined behavior. + + \sa at() +*/ + +/*! + \fn reference TQValueVector::front() + + Returns a reference to the first element in the vector. If there + is no first element, this function has undefined behavior. + + \sa empty() back() +*/ + +/*! + \fn const_reference TQValueVector::front() const + + \overload + + Returns a const reference to the first element in the vector. If + there is no first element, this function has undefined behavior. + + \sa empty() back() +*/ + +/*! + \fn reference TQValueVector::first() + + Returns a reference to the first item in the vector. If there is + no first item, this function has undefined behavior. + + \sa empty() last() +*/ + +/*! + \fn const_reference TQValueVector::first() const + + \overload +*/ + +/*! + \fn reference TQValueVector::back() + + Returns a reference to the last element in the vector. If there is + no last element, this function has undefined behavior. + + \sa empty() front() +*/ + +/*! + \fn const_reference TQValueVector::back() const + + \overload + + Returns a const reference to the last element in the vector. If + there is no last element, this function has undefined behavior. + + \sa empty() front() +*/ + +/*! + \fn reference TQValueVector::last() + + Returns a reference to the last item in the vector. If there is no + last item, this function has undefined behavior. + + \sa empty() first() +*/ + +/*! + \fn const_reference TQValueVector::last() const + + \overload +*/ + +/*! + \fn void TQValueVector::push_back( const T& x ) + + Appends a copy of \a x to the end of the vector. This is the + fastest way to add new elements. + + This function is provided for STL compatibility. It is equivalent + to append(). + + \sa insert() +*/ + +/*! + \fn void TQValueVector::append( const T& x ) + + Appends a copy of \a x to the end of the vector. + + \sa push_back() insert() +*/ + +/*! + \fn void TQValueVector::pop_back() + + Removes the last item from the vector. + + This function is provided for STL compatibility. +*/ + +/*! + \fn iterator TQValueVector::insert( iterator pos, const T& x ) + + Inserts a copy of \a x at the position immediately before \a pos. + + \sa push_back() +*/ + +/*! \fn void TQValueVector::detachInternal() + + \internal +*/ + +/*! + \fn iterator TQValueVector::insert( iterator pos, size_type n, const T& x ) + + \overload + + Inserts \a n copies of \a x immediately before position x. + + \sa push_back() +*/ + +/*! + \fn void TQValueVector::reserve( size_type n ) + + Increases the vector's capacity. If \a n is less than or equal to + capacity(), nothing happens. Otherwise, additional memory is + allocated so that capacity() will be increased to a value greater + than or equal to \a n. All iterators will then become invalidated. + Note that the vector's size() and the values of existing elements + remain unchanged. +*/ + +/*! + \fn void TQValueVector::resize( size_type n, const T& val = T() ) + + Changes the size of the vector to \a n. If \a n is greater than + the current size(), elements are added to the end and initialized + with the value of \a val. If \a n is less than size(), elements + are removed from the end. If \a n is equal to size() nothing + happens. +*/ + +/*! + \fn void TQValueVector::clear() + + Removes all the elements from the vector. +*/ + +/*! + \fn iterator TQValueVector::erase( iterator pos ) + + Removes the element at position \a pos and returns the position of + the next element. +*/ + +/*! + \fn iterator TQValueVector::erase( iterator first, iterator last ) + + \overload + + Removes all elements from \a first up to but not including \a last + and returns the position of the next element. +*/ + +/*! + \fn bool TQValueVector::operator==( const TQValueVector& x ) const + + Returns TRUE if each element in this vector equals each + corresponding element in \a x; otherwise returns FALSE. +*/ + +/*! + \fn bool TQValueVector::operator==( const TQValueVector& x ) + + \overload + + Returns TRUE if each element in this vector equals each + corresponding element in \a x; otherwise returns FALSE. +*/ + + +/*! + \fn void TQValueVector::detach() + + \internal + + If the vector does not share its data with another TQValueVector + instance, nothing happens. Otherwise the function creates a new + copy of this data and detaches from the shared one. This function + is called whenever the vector is modified. The implicit sharing + mechanism is implemented this way. +*/ diff --git a/doc/tutorial2.doc b/doc/tutorial2.doc index 75225b0db..6fb8acca3 100644 --- a/doc/tutorial2.doc +++ b/doc/tutorial2.doc @@ -146,13 +146,13 @@ the TQt enum names. An alternative approach would have been to have made \c Element a \link ntqt.html Qt\endlink subclass. We include \c ntqstring.h to make use of Qt's Unicode strings. As a convenience we will \c typedef a vector container for \c{Element}s, which is why we -pull in the \c ntqvaluevector.h header. +pull in the \c tqvaluevector.h header. -\skipto QValueVector +\skipto TQValueVector \printline Qt provides a number of containers, some value based like -QValueVector, and others pointer based. (See \link collection.html +TQValueVector, and others pointer based. (See \link collection.html Collection Classes\endlink.) Here we've just typedefed one container type; we will keep each data set of elements in one \c ElementVector. diff --git a/examples/README b/examples/README index 6c6d0cab7..056320979 100644 --- a/examples/README +++ b/examples/README @@ -52,7 +52,7 @@ checklists Shows two list views with check box and radio button items. (These kinds of lists are often used with setup programs.) Shows the use of QListView, QListViewItem, QCheckListItem, - QListViewItemIterator, and QValueList. + QListViewItemIterator, and TQValueList. cursor This example shows how to set the mouse cursor for a widget. Shows diff --git a/examples/chart/element.h b/examples/chart/element.h index b48cc31af..2529fa8d9 100644 --- a/examples/chart/element.h +++ b/examples/chart/element.h @@ -4,7 +4,7 @@ #include #include #include -#include +#include class Element; diff --git a/examples/checklists/checklists.cpp b/examples/checklists/checklists.cpp index a75043ed4..912529084 100644 --- a/examples/checklists/checklists.cpp +++ b/examples/checklists/checklists.cpp @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/examples/demo/dnd/dnd.h b/examples/demo/dnd/dnd.h index e47b53d10..3487d9cc9 100644 --- a/examples/demo/dnd/dnd.h +++ b/examples/demo/dnd/dnd.h @@ -1,5 +1,5 @@ #include -#include +#include #include "dndbase.h" #ifndef DNDDEMO_H diff --git a/examples/demo/qasteroids/toplevel.h b/examples/demo/qasteroids/toplevel.h index 2d9cc5eee..87af4c8b5 100644 --- a/examples/demo/qasteroids/toplevel.h +++ b/examples/demo/qasteroids/toplevel.h @@ -9,7 +9,7 @@ #include #include -#include +#include #include "view.h" diff --git a/examples/demo/textdrawing/helpwindow.h b/examples/demo/textdrawing/helpwindow.h index af73b4752..3ca7ce97e 100644 --- a/examples/demo/textdrawing/helpwindow.h +++ b/examples/demo/textdrawing/helpwindow.h @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include class TQComboBox; diff --git a/examples/demo/textdrawing/textedit.h b/examples/demo/textdrawing/textedit.h index 43aea5cd7..eef95c32f 100644 --- a/examples/demo/textdrawing/textedit.h +++ b/examples/demo/textdrawing/textedit.h @@ -11,7 +11,7 @@ #define TEXTEDIT_H #include -#include +#include class TQAction; class TQComboBox; diff --git a/examples/helpviewer/helpwindow.h b/examples/helpviewer/helpwindow.h index d2203fb85..b3b5f97a8 100644 --- a/examples/helpviewer/helpwindow.h +++ b/examples/helpviewer/helpwindow.h @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include class TQComboBox; diff --git a/examples/qtl/qtl-qvaluelist.doc b/examples/qtl/qtl-qvaluelist.doc index e87908a83..663724125 100644 --- a/examples/qtl/qtl-qvaluelist.doc +++ b/examples/qtl/qtl-qvaluelist.doc @@ -1,15 +1,15 @@ -/*! \page qtl-qvaluelist-example.html +/*! \page qtl-tqvaluelist-example.html \ingroup examples \title A Tiny QTL Example -This tiny example shows a \l{QValueListIterator}. +This tiny example shows a \l{TQValueListIterator}.
        Implementation: - \include qtl/qvaluelistiterator.cpp + \include qtl/tqvaluelistiterator.cpp */ diff --git a/examples/qtl/qtl.pro b/examples/qtl/qtl.pro index 7601f1796..151acc19b 100644 --- a/examples/qtl/qtl.pro +++ b/examples/qtl/qtl.pro @@ -3,5 +3,5 @@ TARGET = qtl CONFIG += qt console warn_on release -SOURCES = qvaluelistiterator.cpp +SOURCES = tqvaluelistiterator.cpp INTERFACES = diff --git a/examples/qtl/qvaluelistiterator.cpp b/examples/qtl/qvaluelistiterator.cpp deleted file mode 100644 index af4420bdb..000000000 --- a/examples/qtl/qvaluelistiterator.cpp +++ /dev/null @@ -1,57 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. -** -** This file is part of an example program for TQt. This example -** program may be used, distributed and modified without limitation. -** -*****************************************************************************/ - -#include -#include -#include -#include - - -class Employee -{ -public: - Employee(): s(0) {} - Employee( const TQString& name, int salary ) - : n(name), s(salary) {} - - TQString name() const { return n; } - - int salary() const { return s; } - void setSalary( int salary ) { s = salary; } - - // this is here to support very old compilers - TQ_DUMMY_COMPARISON_OPERATOR( Employee ) - -private: - TQString n; - int s; -}; - - -int main( int, char** ) -{ - typedef TQValueList EmployeeList; - EmployeeList list; - - list.append( Employee("Bill", 50000) ); - list.append( Employee("Steve",80000) ); - list.append( Employee("Ron", 60000) ); - - Employee joe( "Joe", 50000 ); - list.append( joe ); - joe.setSalary( 4000 ); - - EmployeeList::ConstIterator it = list.begin(); - while( it != list.end() ) { - printf( "%s earns %d\n", (*it).name().latin1(), (*it).salary() ); - ++it; - } - - return 0; -} diff --git a/examples/qtl/tqvaluelistiterator.cpp b/examples/qtl/tqvaluelistiterator.cpp new file mode 100644 index 000000000..98a908997 --- /dev/null +++ b/examples/qtl/tqvaluelistiterator.cpp @@ -0,0 +1,57 @@ +/**************************************************************************** +** +** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. +** +** This file is part of an example program for TQt. This example +** program may be used, distributed and modified without limitation. +** +*****************************************************************************/ + +#include +#include +#include +#include + + +class Employee +{ +public: + Employee(): s(0) {} + Employee( const TQString& name, int salary ) + : n(name), s(salary) {} + + TQString name() const { return n; } + + int salary() const { return s; } + void setSalary( int salary ) { s = salary; } + + // this is here to support very old compilers + TQ_DUMMY_COMPARISON_OPERATOR( Employee ) + +private: + TQString n; + int s; +}; + + +int main( int, char** ) +{ + typedef TQValueList EmployeeList; + EmployeeList list; + + list.append( Employee("Bill", 50000) ); + list.append( Employee("Steve",80000) ); + list.append( Employee("Ron", 60000) ); + + Employee joe( "Joe", 50000 ); + list.append( joe ); + joe.setSalary( 4000 ); + + EmployeeList::ConstIterator it = list.begin(); + while( it != list.end() ) { + printf( "%s earns %d\n", (*it).name().latin1(), (*it).salary() ); + ++it; + } + + return 0; +} diff --git a/examples/sql/overview/table3/main.h b/examples/sql/overview/table3/main.h index 4e9b07299..37efecfe8 100644 --- a/examples/sql/overview/table3/main.h +++ b/examples/sql/overview/table3/main.h @@ -9,7 +9,7 @@ #include #include -#include +#include #include #include #include diff --git a/examples/sql/overview/table4/main.h b/examples/sql/overview/table4/main.h index d1fb591a0..5d5c5736a 100644 --- a/examples/sql/overview/table4/main.h +++ b/examples/sql/overview/table4/main.h @@ -9,7 +9,7 @@ #include #include -#include +#include #include #include #include diff --git a/examples/textedit/textedit.h b/examples/textedit/textedit.h index 77447b2a3..440b2a6d7 100644 --- a/examples/textedit/textedit.h +++ b/examples/textedit/textedit.h @@ -11,7 +11,7 @@ #define TEXTEDIT_H #include -#include +#include class TQAction; class TQComboBox; diff --git a/include/ntqmap.h b/include/ntqmap.h deleted file mode 120000 index a070d1534..000000000 --- a/include/ntqmap.h +++ /dev/null @@ -1 +0,0 @@ -../src/tools/ntqmap.h \ No newline at end of file diff --git a/include/ntqpair.h b/include/ntqpair.h deleted file mode 120000 index 9e8305240..000000000 --- a/include/ntqpair.h +++ /dev/null @@ -1 +0,0 @@ -../src/tools/ntqpair.h \ No newline at end of file diff --git a/include/ntqvaluelist.h b/include/ntqvaluelist.h deleted file mode 120000 index fcd7a1aae..000000000 --- a/include/ntqvaluelist.h +++ /dev/null @@ -1 +0,0 @@ -../src/tools/ntqvaluelist.h \ No newline at end of file diff --git a/include/ntqvaluestack.h b/include/ntqvaluestack.h deleted file mode 120000 index 3f3d849f1..000000000 --- a/include/ntqvaluestack.h +++ /dev/null @@ -1 +0,0 @@ -../src/tools/ntqvaluestack.h \ No newline at end of file diff --git a/include/ntqvaluevector.h b/include/ntqvaluevector.h deleted file mode 120000 index 147e16a7e..000000000 --- a/include/ntqvaluevector.h +++ /dev/null @@ -1 +0,0 @@ -../src/tools/ntqvaluevector.h \ No newline at end of file diff --git a/include/tqmap.h b/include/tqmap.h new file mode 120000 index 000000000..6669fbf24 --- /dev/null +++ b/include/tqmap.h @@ -0,0 +1 @@ +../src/tools/tqmap.h \ No newline at end of file diff --git a/include/tqpair.h b/include/tqpair.h new file mode 120000 index 000000000..9fb13e8bb --- /dev/null +++ b/include/tqpair.h @@ -0,0 +1 @@ +../src/tools/tqpair.h \ No newline at end of file diff --git a/include/tqvaluelist.h b/include/tqvaluelist.h new file mode 120000 index 000000000..863a982a2 --- /dev/null +++ b/include/tqvaluelist.h @@ -0,0 +1 @@ +../src/tools/tqvaluelist.h \ No newline at end of file diff --git a/include/tqvaluestack.h b/include/tqvaluestack.h new file mode 120000 index 000000000..392473e46 --- /dev/null +++ b/include/tqvaluestack.h @@ -0,0 +1 @@ +../src/tools/tqvaluestack.h \ No newline at end of file diff --git a/include/tqvaluevector.h b/include/tqvaluevector.h new file mode 120000 index 000000000..3cd96d33f --- /dev/null +++ b/include/tqvaluevector.h @@ -0,0 +1 @@ +../src/tools/tqvaluevector.h \ No newline at end of file diff --git a/qmake/Makefile.unix b/qmake/Makefile.unix index 8e94d388a..9f4749190 100644 --- a/qmake/Makefile.unix +++ b/qmake/Makefile.unix @@ -8,7 +8,7 @@ OBJS=project.o property.o main.o makefile.o unixmake2.o unixmake.o msvc_nmake.o QOBJS=qstring.o qtextstream.o qiodevice.o qglobal.o qgdict.o qcstring.o \ qdatastream.o qgarray.o qbuffer.o qglist.o qptrcollection.o qfile.o \ qfile_unix.o qregexp.o qgvector.o qgcache.o qbitarray.o qdir.o quuid.o \ - qfileinfo_unix.o qdir_unix.o qfileinfo.o qdatetime.o qstringlist.o qmap.o \ + qfileinfo_unix.o qdir_unix.o qfileinfo.o qdatetime.o qstringlist.o tqmap.o \ qconfig.o qunicodetables.o qsettings.o qlocale.o @QMAKE_QTOBJS@ #all sources, used for the depend target @@ -28,7 +28,7 @@ DEPEND_SRC=project.cpp property.cpp meta.cpp main.cpp qtmd5.cpp generators/makef @SOURCE_PATH@/src/tools/quuid.cpp @SOURCE_PATH@/src/tools/qfileinfo_unix.cpp \ @SOURCE_PATH@/src/tools/qdir_unix.cpp @SOURCE_PATH@/src/tools/qfileinfo.cpp \ @SOURCE_PATH@/src/tools/qdatetime.cpp @SOURCE_PATH@/src/tools/qstringlist.cpp \ - @SOURCE_PATH@/src/tools/qmap.cpp @SOURCE_PATH@/src/tools/qconfig.cpp \ + @SOURCE_PATH@/src/tools/tqmap.cpp @SOURCE_PATH@/src/tools/qconfig.cpp \ @SOURCE_PATH@/src/tools/qsettings.cpp @SOURCE_PATH@/src/tools/qurl.cpp \ @SOURCE_PATH@/src/tools/qsettings_mac.cpp @SOURCE_PATH@/src/tools/qlocale.cpp @@ -147,8 +147,8 @@ qdatetime.o: @SOURCE_PATH@/src/tools/qdatetime.cpp qstringlist.o: @SOURCE_PATH@/src/tools/qstringlist.cpp $(CXX) -c -o $@ $(CXXFLAGS) @SOURCE_PATH@/src/tools/qstringlist.cpp -qmap.o: @SOURCE_PATH@/src/tools/qmap.cpp - $(CXX) -c -o $@ $(CXXFLAGS) @SOURCE_PATH@/src/tools/qmap.cpp +tqmap.o: @SOURCE_PATH@/src/tools/tqmap.cpp + $(CXX) -c -o $@ $(CXXFLAGS) @SOURCE_PATH@/src/tools/tqmap.cpp qconfig.o: @BUILD_PATH@/src/tools/qconfig.cpp $(CXX) -c -o $@ $(CXXFLAGS) @BUILD_PATH@/src/tools/qconfig.cpp diff --git a/qmake/Makefile.win32-g++ b/qmake/Makefile.win32-g++ index a25b8f35f..b0f8f1371 100644 --- a/qmake/Makefile.win32-g++ +++ b/qmake/Makefile.win32-g++ @@ -22,7 +22,7 @@ OBJS=project.o main.o makefile.o unixmake.o unixmake2.o borland_bmake.o mingw_ma QTOBJS=qstring.o quuid.o qtextstream.o qiodevice.o qglobal.o qgdict.o qcstring.o qdatastream.o \ qgarray.o qbuffer.o qglist.o qptrcollection.o qfile.o qfile_win.o qregexp.o qgvector.o \ qgcache.o qbitarray.o qdir.o qfileinfo_win.o qdir_win.o qfileinfo.o qdatetime.o \ - qstringlist.o qmap.o qlibrary.o qlibrary_win.o qconfig.o qsettings.o qsettings_win.o qunicodetables.o \ + qstringlist.o tqmap.o qlibrary.o qlibrary_win.o qconfig.o qsettings.o qsettings_win.o qunicodetables.o \ qlocale.o @@ -136,8 +136,8 @@ qdatetime.o: ..\src\tools\qdatetime.cpp qstringlist.o: ..\src\tools\qstringlist.cpp $(CXX) $(CXXFLAGS) ..\src\tools\qstringlist.cpp -qmap.o: ..\src\tools\qmap.cpp - $(CXX) $(CXXFLAGS) ..\src\tools\qmap.cpp +tqmap.o: ..\src\tools\tqmap.cpp + $(CXX) $(CXXFLAGS) ..\src\tools\tqmap.cpp qunicodetables.o: ..\src\tools\qunicodetables.cpp $(CXX) $(CXXFLAGS) ..\src\tools\qunicodetables.cpp diff --git a/qmake/generators/win32/msvc_dsp.h b/qmake/generators/win32/msvc_dsp.h index 8656df692..20915a031 100644 --- a/qmake/generators/win32/msvc_dsp.h +++ b/qmake/generators/win32/msvc_dsp.h @@ -40,7 +40,7 @@ #define __MSVC_DSP_H__ #include "winmakefile.h" -#include +#include class DspMakefileGenerator : public Win32MakefileGenerator { diff --git a/qmake/meta.h b/qmake/meta.h index 535a2d8bb..0cf10c4fc 100644 --- a/qmake/meta.h +++ b/qmake/meta.h @@ -39,7 +39,7 @@ #ifndef __META_H__ #define __META_H__ -#include +#include #include #include diff --git a/qmake/project.cpp b/qmake/project.cpp index de57507e2..9f13f85fd 100644 --- a/qmake/project.cpp +++ b/qmake/project.cpp @@ -43,7 +43,7 @@ #include #include #include -#include +#include #ifdef Q_OS_UNIX # include #endif diff --git a/qmake/project.h b/qmake/project.h index 3d7f17779..92c2304e6 100644 --- a/qmake/project.h +++ b/qmake/project.h @@ -41,7 +41,7 @@ #include #include -#include +#include class TQMakeProperty; diff --git a/qmake/property.cpp b/qmake/property.cpp index d7ce32f0f..be7c0d4f7 100644 --- a/qmake/property.cpp +++ b/qmake/property.cpp @@ -40,7 +40,7 @@ #include "option.h" #include #include -#include +#include #include #include diff --git a/src/canvas/tqcanvas.h b/src/canvas/tqcanvas.h index 9bf3d729c..744f21f53 100644 --- a/src/canvas/tqcanvas.h +++ b/src/canvas/tqcanvas.h @@ -47,7 +47,7 @@ #include "ntqptrlist.h" #include "ntqbrush.h" #include "ntqpen.h" -#include "ntqvaluelist.h" +#include "tqvaluelist.h" #include "ntqpointarray.h" #endif // QT_H diff --git a/src/codecs/qtextcodec.cpp b/src/codecs/qtextcodec.cpp index 69e56fd5b..6c83640fd 100644 --- a/src/codecs/qtextcodec.cpp +++ b/src/codecs/qtextcodec.cpp @@ -48,7 +48,7 @@ #include "ntqtextcodec.h" #ifndef TQT_NO_TEXTCODEC -#include "ntqvaluelist.h" +#include "tqvaluelist.h" #include "ntqtextcodecfactory.h" #include "ntqutfcodec.h" #include "ntqnamespace.h" diff --git a/src/dialogs/qfiledialog.cpp b/src/dialogs/qfiledialog.cpp index 2b7ce1b0d..8812f2102 100644 --- a/src/dialogs/qfiledialog.cpp +++ b/src/dialogs/qfiledialog.cpp @@ -74,7 +74,7 @@ #include "ntqlineedit.h" #include "ntqlistbox.h" #include "ntqlistview.h" -#include "ntqmap.h" +#include "tqmap.h" #include "ntqmessagebox.h" #include "ntqmime.h" #include "ntqnetworkprotocol.h" diff --git a/src/kernel/ntqevent.h b/src/kernel/ntqevent.h index ae344371e..91eeb38ed 100644 --- a/src/kernel/ntqevent.h +++ b/src/kernel/ntqevent.h @@ -46,7 +46,7 @@ #include "ntqregion.h" #include "ntqnamespace.h" #include "ntqmime.h" -#include "ntqpair.h" +#include "tqpair.h" #endif // QT_H class TQ_EXPORT TQEvent: public TQt // event base class diff --git a/src/kernel/ntqfontdatabase.h b/src/kernel/ntqfontdatabase.h index 0f2a913af..1894c5598 100644 --- a/src/kernel/ntqfontdatabase.h +++ b/src/kernel/ntqfontdatabase.h @@ -46,7 +46,7 @@ #include "ntqstring.h" #include "ntqstringlist.h" #include "ntqfont.h" -#include "ntqvaluelist.h" +#include "tqvaluelist.h" #endif // QT_H diff --git a/src/kernel/ntqmime.h b/src/kernel/ntqmime.h index 5b541510a..50ed27994 100644 --- a/src/kernel/ntqmime.h +++ b/src/kernel/ntqmime.h @@ -43,7 +43,7 @@ #ifndef QT_H #include "ntqwindowdefs.h" -#include "ntqmap.h" +#include "tqmap.h" #endif // QT_H #ifndef TQT_NO_MIME diff --git a/src/kernel/ntqstylesheet.h b/src/kernel/ntqstylesheet.h index 2b397f946..d11548744 100644 --- a/src/kernel/ntqstylesheet.h +++ b/src/kernel/ntqstylesheet.h @@ -43,7 +43,7 @@ #ifndef QT_H #include "ntqstring.h" -#include "ntqvaluelist.h" +#include "tqvaluelist.h" #include "ntqptrvector.h" #include "ntqdict.h" #include "tqobject.h" diff --git a/src/kernel/ntqt.h b/src/kernel/ntqt.h index d6671bee8..eef4df773 100644 --- a/src/kernel/ntqt.h +++ b/src/kernel/ntqt.h @@ -33,7 +33,7 @@ #include "ntqgdict.h" #include "ntqfont.h" #include "ntqdatastream.h" -#include "ntqpair.h" +#include "tqpair.h" #include "ntqpoint.h" #include #include "ntqtextstream.h" @@ -46,8 +46,8 @@ #include "ntqregion.h" #include "tqsql.h" #include "ntqstrlist.h" -#include "ntqvaluelist.h" -#include "ntqmap.h" +#include "tqvaluelist.h" +#include "tqmap.h" #include "ntqdatetime.h" #include "ntqmime.h" #include "ntqasciidict.h" @@ -251,8 +251,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/src/kernel/ntqtranslator.h b/src/kernel/ntqtranslator.h index e255b81e1..39f9faa36 100644 --- a/src/kernel/ntqtranslator.h +++ b/src/kernel/ntqtranslator.h @@ -44,7 +44,7 @@ #ifndef QT_H #include "tqobject.h" -#include "ntqvaluelist.h" +#include "tqvaluelist.h" #endif // QT_H #ifndef TQT_NO_TRANSLATION diff --git a/src/kernel/ntqvariant.h b/src/kernel/ntqvariant.h index f0657b499..5e4801520 100644 --- a/src/kernel/ntqvariant.h +++ b/src/kernel/ntqvariant.h @@ -42,10 +42,10 @@ #define TQVARIANT_H #ifndef QT_H -#include "ntqmap.h" +#include "tqmap.h" #include "ntqstring.h" #include "ntqstringlist.h" -#include "ntqvaluelist.h" +#include "tqvaluelist.h" #endif // QT_H #ifndef TQT_NO_VARIANT diff --git a/src/kernel/qapplication_x11.cpp b/src/kernel/qapplication_x11.cpp index 56ba9aefa..57c55feba 100644 --- a/src/kernel/qapplication_x11.cpp +++ b/src/kernel/qapplication_x11.cpp @@ -79,7 +79,7 @@ #include "ntqbuffer.h" #include "ntqsocketnotifier.h" #include "ntqsessionmanager.h" -#include "ntqvaluelist.h" +#include "tqvaluelist.h" #include "ntqdict.h" #include "ntqguardedptr.h" #include "ntqclipboard.h" diff --git a/src/kernel/qclipboard_x11.cpp b/src/kernel/qclipboard_x11.cpp index d0571fc5a..51fbc63ab 100644 --- a/src/kernel/qclipboard_x11.cpp +++ b/src/kernel/qclipboard_x11.cpp @@ -71,8 +71,8 @@ #include "ntqdragobject.h" #include "ntqbuffer.h" #include "ntqtextcodec.h" -#include "ntqvaluelist.h" -#include "ntqmap.h" +#include "tqvaluelist.h" +#include "tqmap.h" #include "qt_x11_p.h" #include "qapplication_p.h" diff --git a/src/kernel/qfontengine_p.h b/src/kernel/qfontengine_p.h index e1fc58545..09fa32001 100644 --- a/src/kernel/qfontengine_p.h +++ b/src/kernel/qfontengine_p.h @@ -529,7 +529,7 @@ private: #elif defined( TQ_WS_MAC ) #include "qt_mac.h" -#include +#include #include class TQFontEngineMac : public TQFontEngine diff --git a/src/kernel/qimage.cpp b/src/kernel/qimage.cpp index ce95f1cb6..1097a5f80 100644 --- a/src/kernel/qimage.cpp +++ b/src/kernel/qimage.cpp @@ -49,7 +49,7 @@ #include "ntqpngio.h" #include "ntqmngio.h" #include "ntqjpegio.h" -#include "ntqmap.h" +#include "tqmap.h" #include #include "qimageformatinterface_p.h" #include "ntqwmatrix.h" diff --git a/src/kernel/qkeysequence.cpp b/src/kernel/qkeysequence.cpp index 42a955911..8a8ac86b0 100644 --- a/src/kernel/qkeysequence.cpp +++ b/src/kernel/qkeysequence.cpp @@ -44,7 +44,7 @@ #include "ntqaccel.h" #include "ntqshared.h" -#include "ntqvaluelist.h" +#include "tqvaluelist.h" #ifndef TQT_NO_REGEXP # include "ntqregexp.h" #endif diff --git a/src/kernel/qmime.cpp b/src/kernel/qmime.cpp index e1dd27d68..9b2b2a4ae 100644 --- a/src/kernel/qmime.cpp +++ b/src/kernel/qmime.cpp @@ -40,7 +40,7 @@ #ifndef TQT_NO_MIME -#include "ntqmap.h" +#include "tqmap.h" #include "ntqstringlist.h" #include "ntqfileinfo.h" #include "ntqdir.h" diff --git a/src/kernel/qnetworkprotocol.cpp b/src/kernel/qnetworkprotocol.cpp index 27b6dff44..b8ad2b55d 100644 --- a/src/kernel/qnetworkprotocol.cpp +++ b/src/kernel/qnetworkprotocol.cpp @@ -45,7 +45,7 @@ #include "ntqlocalfs.h" #include "ntqurloperator.h" #include "ntqtimer.h" -#include "ntqmap.h" +#include "tqmap.h" #include "ntqptrqueue.h" //#define TQNETWORKPROTOCOL_DEBUG diff --git a/src/kernel/qpsprinter.cpp b/src/kernel/qpsprinter.cpp index d1678fa38..58a23dfcf 100644 --- a/src/kernel/qpsprinter.cpp +++ b/src/kernel/qpsprinter.cpp @@ -69,7 +69,7 @@ #include "ntqintdict.h" #include "ntqtextcodec.h" #include "ntqsettings.h" -#include "ntqmap.h" +#include "tqmap.h" #include "ntqfontdatabase.h" #include "ntqregexp.h" #include "ntqbitmap.h" diff --git a/src/kernel/qrichtext.cpp b/src/kernel/qrichtext.cpp index ecc304071..a2ab4d0e0 100644 --- a/src/kernel/qrichtext.cpp +++ b/src/kernel/qrichtext.cpp @@ -48,7 +48,7 @@ #include "ntqtextstream.h" #include "ntqfile.h" #include "ntqapplication.h" -#include "ntqmap.h" +#include "tqmap.h" #include "ntqfileinfo.h" #include "ntqstylesheet.h" #include "ntqmime.h" diff --git a/src/kernel/qrichtext_p.h b/src/kernel/qrichtext_p.h index 1915820fa..874e61557 100644 --- a/src/kernel/qrichtext_p.h +++ b/src/kernel/qrichtext_p.h @@ -59,13 +59,13 @@ #include "ntqrect.h" #include "ntqfontmetrics.h" #include "ntqintdict.h" -#include "ntqmap.h" +#include "tqmap.h" #include "ntqstringlist.h" #include "ntqfont.h" #include "ntqcolor.h" #include "ntqsize.h" -#include "ntqvaluelist.h" -#include "ntqvaluestack.h" +#include "tqvaluelist.h" +#include "tqvaluestack.h" #include "tqobject.h" #include "ntqdict.h" #include "ntqpixmap.h" diff --git a/src/kernel/qt_pch.h b/src/kernel/qt_pch.h index 5295f8134..3e5224ae6 100644 --- a/src/kernel/qt_pch.h +++ b/src/kernel/qt_pch.h @@ -21,7 +21,7 @@ # undef _GLIBCPP_FULLY_COMPLIANT_HEADERS // Makes qlocale.cpp compile # endif # endif -#include // I must be first! +#include // I must be first! #include // All moc genereated code has this include #include #include diff --git a/src/kernel/qtranslator.cpp b/src/kernel/qtranslator.cpp index e3d1c5b98..4cc41ae00 100644 --- a/src/kernel/qtranslator.cpp +++ b/src/kernel/qtranslator.cpp @@ -64,7 +64,7 @@ static inline int qt_open(const char *pathname, int flags, mode_t mode) #include "ntqfile.h" #include "ntqbuffer.h" #include "ntqdatastream.h" -#include "ntqmap.h" +#include "tqmap.h" #include "ntqtl.h" #if defined(Q_OS_UNIX) diff --git a/src/kernel/qurloperator.cpp b/src/kernel/qurloperator.cpp index ca508c48c..e5b84ca51 100644 --- a/src/kernel/qurloperator.cpp +++ b/src/kernel/qurloperator.cpp @@ -44,7 +44,7 @@ #include "ntqurlinfo.h" #include "ntqnetworkprotocol.h" -#include "ntqmap.h" +#include "tqmap.h" #include "ntqdir.h" #include "ntqptrdict.h" #include "ntqguardedptr.h" diff --git a/src/moc/moc.pro b/src/moc/moc.pro index c8abcf0d7..6871d9d93 100644 --- a/src/moc/moc.pro +++ b/src/moc/moc.pro @@ -33,7 +33,7 @@ SOURCES = ../tools/qbuffer.cpp \ ../tools/qstringlist.cpp \ ../tools/qtextstream.cpp \ ../tools/qbitarray.cpp \ - ../tools/qmap.cpp \ + ../tools/tqmap.cpp \ ../tools/qgcache.cpp \ ../codecs/qtextcodec.cpp \ ../codecs/qutfcodec.cpp diff --git a/src/network/qhttp.cpp b/src/network/qhttp.cpp index d08f10f24..54c21fcc1 100644 --- a/src/network/qhttp.cpp +++ b/src/network/qhttp.cpp @@ -44,7 +44,7 @@ #include "ntqsocket.h" #include "ntqtextstream.h" -#include "ntqmap.h" +#include "tqmap.h" #include "ntqstring.h" #include "ntqstringlist.h" #include "ntqcstring.h" diff --git a/src/opengl/qgl_x11.cpp b/src/opengl/qgl_x11.cpp index 51daa176b..dc8530f1e 100644 --- a/src/opengl/qgl_x11.cpp +++ b/src/opengl/qgl_x11.cpp @@ -42,7 +42,7 @@ #if defined(TQ_WS_X11) -#include "ntqmap.h" +#include "tqmap.h" #include "ntqpixmap.h" #include "ntqapplication.h" diff --git a/src/sql/drivers/cache/tqsqlcachedresult.h b/src/sql/drivers/cache/tqsqlcachedresult.h index f31c3853f..3542a1749 100644 --- a/src/sql/drivers/cache/tqsqlcachedresult.h +++ b/src/sql/drivers/cache/tqsqlcachedresult.h @@ -54,7 +54,7 @@ #include #include #include -#include +#include #include #if !defined( TQT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL ) diff --git a/src/sql/drivers/mysql/tqsql_mysql.cpp b/src/sql/drivers/mysql/tqsql_mysql.cpp index 3854a5bb3..d91720e80 100644 --- a/src/sql/drivers/mysql/tqsql_mysql.cpp +++ b/src/sql/drivers/mysql/tqsql_mysql.cpp @@ -42,7 +42,7 @@ #include #include -#include +#include #include #define TQMYSQL_DRIVER_NAME "TQMYSQL3" diff --git a/src/sql/drivers/odbc/tqsql_odbc.h b/src/sql/drivers/odbc/tqsql_odbc.h index 3948b087a..f64d3e902 100644 --- a/src/sql/drivers/odbc/tqsql_odbc.h +++ b/src/sql/drivers/odbc/tqsql_odbc.h @@ -41,7 +41,7 @@ #ifndef TQSQL_ODBC_H #define TQSQL_ODBC_H -#include +#include #include #include #include diff --git a/src/sql/drivers/sqlite3/tqsql_sqlite3.cpp b/src/sql/drivers/sqlite3/tqsql_sqlite3.cpp index 61edda2c0..afa21ac86 100644 --- a/src/sql/drivers/sqlite3/tqsql_sqlite3.cpp +++ b/src/sql/drivers/sqlite3/tqsql_sqlite3.cpp @@ -15,7 +15,7 @@ #include "tqsql_sqlite3.h" #include -#include +#include #include #include #include diff --git a/src/sql/tqdatatable.cpp b/src/sql/tqdatatable.cpp index 9d8468c06..bb81ff6c1 100644 --- a/src/sql/tqdatatable.cpp +++ b/src/sql/tqdatatable.cpp @@ -49,7 +49,7 @@ #include "ntqlayout.h" #include "ntqpainter.h" #include "ntqpopupmenu.h" -#include "ntqvaluelist.h" +#include "tqvaluelist.h" #include "tqsqlmanager_p.h" #include "ntqdatetime.h" #include "ntqcursor.h" diff --git a/src/sql/tqsqldriver.h b/src/sql/tqsqldriver.h index 08a6f43de..ba865f099 100644 --- a/src/sql/tqsqldriver.h +++ b/src/sql/tqsqldriver.h @@ -50,7 +50,7 @@ #include "tqsqlfield.h" #include "tqsqlindex.h" #include "ntqstringlist.h" -#include "ntqmap.h" +#include "tqmap.h" #endif // QT_H #if !defined( TQT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL ) diff --git a/src/sql/tqsqlextension_p.h b/src/sql/tqsqlextension_p.h index c4ea2850c..9989b3a31 100644 --- a/src/sql/tqsqlextension_p.h +++ b/src/sql/tqsqlextension_p.h @@ -54,8 +54,8 @@ // #ifndef QT_H -#include "ntqmap.h" -#include "ntqvaluevector.h" +#include "tqmap.h" +#include "tqvaluevector.h" #include "ntqstring.h" #include "ntqvariant.h" #include "tqsql.h" diff --git a/src/sql/tqsqlform.h b/src/sql/tqsqlform.h index 7771f7b70..cdd00b7cd 100644 --- a/src/sql/tqsqlform.h +++ b/src/sql/tqsqlform.h @@ -43,7 +43,7 @@ #ifndef QT_H #include "tqobject.h" -#include "ntqmap.h" +#include "tqmap.h" #endif // QT_H #if !defined( TQT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL ) diff --git a/src/sql/tqsqlpropertymap.cpp b/src/sql/tqsqlpropertymap.cpp index 67451029d..6e4f2d4cc 100644 --- a/src/sql/tqsqlpropertymap.cpp +++ b/src/sql/tqsqlpropertymap.cpp @@ -45,7 +45,7 @@ #include "tqwidget.h" #include "ntqcleanuphandler.h" #include "ntqmetaobject.h" -#include "ntqmap.h" +#include "tqmap.h" class TQSqlPropertyMapPrivate { diff --git a/src/sql/tqsqlquery.h b/src/sql/tqsqlquery.h index eea5eea72..39df825aa 100644 --- a/src/sql/tqsqlquery.h +++ b/src/sql/tqsqlquery.h @@ -45,7 +45,7 @@ #include "tqobject.h" #include "ntqstring.h" #include "ntqvariant.h" -#include "ntqvaluelist.h" +#include "tqvaluelist.h" #include "tqsqlerror.h" #include "tqsqlfield.h" #include "tqsql.h" diff --git a/src/sql/tqsqlrecord.cpp b/src/sql/tqsqlrecord.cpp index b12541f8b..e6c93b1eb 100644 --- a/src/sql/tqsqlrecord.cpp +++ b/src/sql/tqsqlrecord.cpp @@ -43,7 +43,7 @@ #ifndef TQT_NO_SQL #include "ntqregexp.h" -#include "ntqvaluevector.h" +#include "tqvaluevector.h" #include "ntqshared.h" #include "ntqnamespace.h" diff --git a/src/tools/ntqmap.h b/src/tools/ntqmap.h deleted file mode 100644 index f1c41be96..000000000 --- a/src/tools/ntqmap.h +++ /dev/null @@ -1,881 +0,0 @@ -/**************************************************************************** -** -** Definition of TQMap class -** -** Created : 990406 -** -** 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 TQMAP_H -#define TQMAP_H - -#ifndef QT_H -#include "ntqglobal.h" -#include "ntqshared.h" -#include "ntqdatastream.h" -#include "ntqpair.h" -#include "ntqvaluelist.h" -#endif // QT_H - -#ifndef TQT_NO_STL -#include -#include -#include -#endif - -//#define QT_CHECK_MAP_RANGE - -struct TQ_EXPORT TQMapNodeBase -{ - enum Color { Red, Black }; - - TQMapNodeBase* left; - TQMapNodeBase* right; - TQMapNodeBase* parent; - - Color color; - - TQMapNodeBase* minimum() { - TQMapNodeBase* x = this; - while ( x->left ) - x = x->left; - return x; - } - - TQMapNodeBase* maximum() { - TQMapNodeBase* x = this; - while ( x->right ) - x = x->right; - return x; - } -}; - - -template -struct TQMapNode : public TQMapNodeBase -{ - TQMapNode( const K& _key, const T& _data ) { data = _data; key = _key; } - TQMapNode( const K& _key ) { key = _key; } - TQMapNode( const TQMapNode& _n ) { key = _n.key; data = _n.data; } - TQMapNode() { } - T data; - K key; -}; - - -template -class TQMapIterator -{ - public: - /** - * Typedefs - */ - typedef TQMapNode< K, T >* NodePtr; -#ifndef TQT_NO_STL - typedef std::bidirectional_iterator_tag iterator_category; -#endif - typedef T value_type; -#ifndef TQT_NO_STL - typedef ptrdiff_t difference_type; -#else - typedef int difference_type; -#endif - typedef T* pointer; - typedef T& reference; - - /** - * Variables - */ - TQMapNode* node; - - /** - * Functions - */ - TQMapIterator() : node( 0 ) {} - TQMapIterator( TQMapNode* p ) : node( p ) {} - TQMapIterator( const TQMapIterator& it ) : node( it.node ) {} - - bool operator==( const TQMapIterator& it ) const { return node == it.node; } - bool operator!=( const TQMapIterator& it ) const { return node != it.node; } - T& operator*() { return node->data; } - const T& operator*() const { return node->data; } - // UDT for T = x* - // T* operator->() const { return &node->data; } - - const K& key() const { return node->key; } - T& data() { return node->data; } - const T& data() const { return node->data; } - -private: - int inc(); - int dec(); - -public: - TQMapIterator& operator++() { - inc(); - return *this; - } - - TQMapIterator operator++(int) { - TQMapIterator tmp = *this; - inc(); - return tmp; - } - - TQMapIterator& operator--() { - dec(); - return *this; - } - - TQMapIterator operator--(int) { - TQMapIterator tmp = *this; - dec(); - return tmp; - } -}; - -template -TQ_INLINE_TEMPLATES int TQMapIterator::inc() -{ - TQMapNodeBase* tmp = node; - if ( tmp->right ) { - tmp = tmp->right; - while ( tmp->left ) - tmp = tmp->left; - } else { - TQMapNodeBase* y = tmp->parent; - while (tmp == y->right) { - tmp = y; - y = y->parent; - } - if (tmp->right != y) - tmp = y; - } - node = (NodePtr)tmp; - return 0; -} - -template -TQ_INLINE_TEMPLATES int TQMapIterator::dec() -{ - TQMapNodeBase* tmp = node; - if (tmp->color == TQMapNodeBase::Red && - tmp->parent->parent == tmp ) { - tmp = tmp->right; - } else if (tmp->left != 0) { - TQMapNodeBase* y = tmp->left; - while ( y->right ) - y = y->right; - tmp = y; - } else { - TQMapNodeBase* y = tmp->parent; - while (tmp == y->left) { - tmp = y; - y = y->parent; - } - tmp = y; - } - node = (NodePtr)tmp; - return 0; -} - -template -class TQMapConstIterator -{ - public: - /** - * Typedefs - */ - typedef TQMapNode< K, T >* NodePtr; -#ifndef TQT_NO_STL - typedef std::bidirectional_iterator_tag iterator_category; -#endif - typedef T value_type; -#ifndef TQT_NO_STL - typedef ptrdiff_t difference_type; -#else - typedef int difference_type; -#endif - typedef const T* pointer; - typedef const T& reference; - - - /** - * Variables - */ - TQMapNode* node; - - /** - * Functions - */ - TQMapConstIterator() : node( 0 ) {} - TQMapConstIterator( TQMapNode* p ) : node( p ) {} - TQMapConstIterator( const TQMapConstIterator& it ) : node( it.node ) {} - TQMapConstIterator( const TQMapIterator& it ) : node( it.node ) {} - - bool operator==( const TQMapConstIterator& it ) const { return node == it.node; } - bool operator!=( const TQMapConstIterator& it ) const { return node != it.node; } - const T& operator*() const { return node->data; } - // UDT for T = x* - // const T* operator->() const { return &node->data; } - - const K& key() const { return node->key; } - const T& data() const { return node->data; } - -private: - int inc(); - int dec(); - -public: - TQMapConstIterator& operator++() { - inc(); - return *this; - } - - TQMapConstIterator operator++(int) { - TQMapConstIterator tmp = *this; - inc(); - return tmp; - } - - TQMapConstIterator& operator--() { - dec(); - return *this; - } - - TQMapConstIterator operator--(int) { - TQMapConstIterator tmp = *this; - dec(); - return tmp; - } -}; - -template -TQ_INLINE_TEMPLATES int TQMapConstIterator::inc() -{ - TQMapNodeBase* tmp = node; - if ( tmp->right ) { - tmp = tmp->right; - while ( tmp->left ) - tmp = tmp->left; - } else { - TQMapNodeBase* y = tmp->parent; - while (tmp == y->right) { - tmp = y; - y = y->parent; - } - if (tmp->right != y) - tmp = y; - } - node = (NodePtr)tmp; - return 0; -} - -template -TQ_INLINE_TEMPLATES int TQMapConstIterator::dec() -{ - TQMapNodeBase* tmp = node; - if (tmp->color == TQMapNodeBase::Red && - tmp->parent->parent == tmp ) { - tmp = tmp->right; - } else if (tmp->left != 0) { - TQMapNodeBase* y = tmp->left; - while ( y->right ) - y = y->right; - tmp = y; - } else { - TQMapNodeBase* y = tmp->parent; - while (tmp == y->left) { - tmp = y; - y = y->parent; - } - tmp = y; - } - node = (NodePtr)tmp; - return 0; -} - -// ### 4.0: rename to something without Private in it. Not really internal. -class TQ_EXPORT TQMapPrivateBase : public TQShared -{ -public: - TQMapPrivateBase() { - node_count = 0; - } - TQMapPrivateBase( const TQMapPrivateBase* _map) { - node_count = _map->node_count; - } - - /** - * Implementations of basic tree algorithms - */ - void rotateLeft( TQMapNodeBase* x, TQMapNodeBase*& root); - void rotateRight( TQMapNodeBase* x, TQMapNodeBase*& root ); - void rebalance( TQMapNodeBase* x, TQMapNodeBase*& root ); - TQMapNodeBase* removeAndRebalance( TQMapNodeBase* z, TQMapNodeBase*& root, - TQMapNodeBase*& leftmost, - TQMapNodeBase*& rightmost ); - - /** - * Variables - */ - int node_count; -}; - - -template -class TQMapPrivate : public TQMapPrivateBase -{ -public: - /** - * Typedefs - */ - typedef TQMapIterator< Key, T > Iterator; - typedef TQMapConstIterator< Key, T > ConstIterator; - typedef TQMapNode< Key, T > Node; - typedef TQMapNode< Key, T >* NodePtr; - - /** - * Functions - */ - TQMapPrivate(); - TQMapPrivate( const TQMapPrivate< Key, T >* _map ); - ~TQMapPrivate() { clear(); delete header; } - - NodePtr copy( NodePtr p ); - void clear(); - void clear( NodePtr p ); - - Iterator begin() { return Iterator( (NodePtr)(header->left ) ); } - Iterator end() { return Iterator( header ); } - ConstIterator begin() const { return ConstIterator( (NodePtr)(header->left ) ); } - ConstIterator end() const { return ConstIterator( header ); } - - ConstIterator find(const Key& k) const; - - void remove( Iterator it ) { - NodePtr del = (NodePtr) removeAndRebalance( it.node, header->parent, header->left, header->right ); - delete del; - --node_count; - } - -#ifdef QT_QMAP_DEBUG - void inorder( TQMapNodeBase* x = 0, int level = 0 ){ - if ( !x ) - x = header->parent; - if ( x->left ) - inorder( x->left, level + 1 ); - //cout << level << " Key=" << key(x) << " Value=" << ((NodePtr)x)->data << endl; - if ( x->right ) - inorder( x->right, level + 1 ); - } -#endif - -#if 0 - Iterator insertMulti(const Key& v){ - TQMapNodeBase* y = header; - TQMapNodeBase* x = header->parent; - while (x != 0){ - y = x; - x = ( v < key(x) ) ? x->left : x->right; - } - return insert(x, y, v); - } -#endif - - Iterator insertSingle( const Key& k ); - Iterator insert( TQMapNodeBase* x, TQMapNodeBase* y, const Key& k ); - -protected: - /** - * Helpers - */ - const Key& key( TQMapNodeBase* b ) const { return ((NodePtr)b)->key; } - - /** - * Variables - */ - NodePtr header; -}; - - -template -TQ_INLINE_TEMPLATES TQMapPrivate::TQMapPrivate() { - header = new Node; - header->color = TQMapNodeBase::Red; // Mark the header - header->parent = 0; - header->left = header->right = header; -} -template -TQ_INLINE_TEMPLATES TQMapPrivate::TQMapPrivate( const TQMapPrivate< Key, T >* _map ) : TQMapPrivateBase( _map ) { - header = new Node; - header->color = TQMapNodeBase::Red; // Mark the header - if ( _map->header->parent == 0 ) { - header->parent = 0; - header->left = header->right = header; - } else { - header->parent = copy( (NodePtr)(_map->header->parent) ); - header->parent->parent = header; - header->left = header->parent->minimum(); - header->right = header->parent->maximum(); - } -} - -template -TQ_INLINE_TEMPLATES TQ_TYPENAME TQMapPrivate::NodePtr TQMapPrivate::copy( TQ_TYPENAME TQMapPrivate::NodePtr p ) -{ - if ( !p ) - return 0; - NodePtr n = new Node( *p ); - n->color = p->color; - if ( p->left ) { - n->left = copy( (NodePtr)(p->left) ); - n->left->parent = n; - } else { - n->left = 0; - } - if ( p->right ) { - n->right = copy( (NodePtr)(p->right) ); - n->right->parent = n; - } else { - n->right = 0; - } - return n; -} - -template -TQ_INLINE_TEMPLATES void TQMapPrivate::clear() -{ - clear( (NodePtr)(header->parent) ); - header->color = TQMapNodeBase::Red; - header->parent = 0; - header->left = header->right = header; - node_count = 0; -} - -template -TQ_INLINE_TEMPLATES void TQMapPrivate::clear( TQ_TYPENAME TQMapPrivate::NodePtr p ) -{ - while ( p != 0 ) { - clear( (NodePtr)p->right ); - NodePtr y = (NodePtr)p->left; - delete p; - p = y; - } -} - -template -TQ_INLINE_TEMPLATES TQ_TYPENAME TQMapPrivate::ConstIterator TQMapPrivate::find(const Key& k) const -{ - TQMapNodeBase* y = header; // Last node - TQMapNodeBase* x = header->parent; // Root node. - - while ( x != 0 ) { - // If as k <= key(x) go left - if ( !( key(x) < k ) ) { - y = x; - x = x->left; - } else { - x = x->right; - } - } - - // Was k bigger/smaller then the biggest/smallest - // element of the tree ? Return end() - if ( y == header || k < key(y) ) - return ConstIterator( header ); - return ConstIterator( (NodePtr)y ); -} - -template -TQ_INLINE_TEMPLATES TQ_TYPENAME TQMapPrivate::Iterator TQMapPrivate::insertSingle( const Key& k ) -{ - // Search correct position in the tree - TQMapNodeBase* y = header; - TQMapNodeBase* x = header->parent; - bool result = TRUE; - while ( x != 0 ) { - result = ( k < key(x) ); - y = x; - x = result ? x->left : x->right; - } - // Get iterator on the last not empty one - Iterator j( (NodePtr)y ); - if ( result ) { - // Smaller then the leftmost one ? - if ( j == begin() ) { - return insert(x, y, k ); - } else { - // Perhaps daddy is the right one ? - --j; - } - } - // Really bigger ? - if ( (j.node->key) < k ) - return insert(x, y, k ); - // We are going to replace a node - return j; -} - - -template -TQ_INLINE_TEMPLATES TQ_TYPENAME TQMapPrivate::Iterator TQMapPrivate::insert( TQMapNodeBase* x, TQMapNodeBase* y, const Key& k ) -{ - NodePtr z = new Node( k ); - if (y == header || x != 0 || k < key(y) ) { - y->left = z; // also makes leftmost = z when y == header - if ( y == header ) { - header->parent = z; - header->right = z; - } else if ( y == header->left ) - header->left = z; // maintain leftmost pointing to min node - } else { - y->right = z; - if ( y == header->right ) - header->right = z; // maintain rightmost pointing to max node - } - z->parent = y; - z->left = 0; - z->right = 0; - rebalance( z, header->parent ); - ++node_count; - return Iterator(z); -} - - -#ifdef QT_CHECK_RANGE -# if !defined( TQT_NO_DEBUG ) && defined( QT_CHECK_MAP_RANGE ) -# define TQT_CHECK_INVALID_MAP_ELEMENT if ( empty() ) tqWarning( "TQMap: Warning invalid element" ) -# define TQT_CHECK_INVALID_MAP_ELEMENT_FATAL Q_ASSERT( !empty() ); -# else -# define TQT_CHECK_INVALID_MAP_ELEMENT -# define TQT_CHECK_INVALID_MAP_ELEMENT_FATAL -# endif -#else -# define TQT_CHECK_INVALID_MAP_ELEMENT -# define TQT_CHECK_INVALID_MAP_ELEMENT_FATAL -#endif - -template class TQDeepCopy; - -template -class TQMap -{ -public: - /** - * Typedefs - */ - typedef Key key_type; - typedef T mapped_type; - typedef TQPair value_type; - typedef value_type* pointer; - typedef const value_type* const_pointer; - typedef value_type& reference; - typedef const value_type& const_reference; -#ifndef TQT_NO_STL - typedef ptrdiff_t difference_type; -#else - typedef int difference_type; -#endif - typedef size_t size_type; - typedef TQMapIterator iterator; - typedef TQMapConstIterator const_iterator; - typedef TQPair insert_pair; - - typedef TQMapIterator< Key, T > Iterator; - typedef TQMapConstIterator< Key, T > ConstIterator; - typedef T ValueType; - typedef TQMapPrivate< Key, T > Priv; - - /** - * API - */ - TQMap() - { - sh = new TQMapPrivate< Key, T >; - } - TQMap( const TQMap& m ) - { - sh = m.sh; sh->ref(); - } - -#ifndef TQT_NO_STL - TQMap( const std::map& m ) - { - sh = new TQMapPrivate; - TQ_TYPENAME std::map::const_iterator it = m.begin(); - for ( ; it != m.end(); ++it ) { - value_type p( (*it).first, (*it).second ); - insert( p ); - } - } -#endif - ~TQMap() - { - if ( sh ) { - if ( sh->deref() ) { - delete sh; - sh = 0L; - } - } - } - TQMap& operator= ( const TQMap& m ); -#ifndef TQT_NO_STL - TQMap& operator= ( const std::map& m ) - { - clear(); - TQ_TYPENAME std::map::const_iterator it = m.begin(); - for ( ; it != m.end(); ++it ) { - value_type p( (*it).first, (*it).second ); - insert( p ); - } - return *this; - } -#endif - - iterator begin() { detach(); return sh->begin(); } - iterator end() { detach(); return sh->end(); } - const_iterator begin() const { return ((const Priv*)sh)->begin(); } - const_iterator end() const { return ((const Priv*)sh)->end(); } - const_iterator constBegin() const { return begin(); } - const_iterator constEnd() const { return end(); } - - iterator replace( const Key& k, const T& v ) - { - remove( k ); - return insert( k, v ); - } - - size_type size() const - { - return sh->node_count; - } - bool empty() const - { - return sh->node_count == 0; - } - TQPair insert( const value_type& x ); - - void erase( iterator it ) - { - detach(); - sh->remove( it ); - } - void erase( const key_type& k ); - size_type count( const key_type& k ) const; - T& operator[] ( const Key& k ); - void clear(); - - iterator find ( const Key& k ) - { - detach(); - return iterator( sh->find( k ).node ); - } - const_iterator find ( const Key& k ) const { return sh->find( k ); } - - const T& operator[] ( const Key& k ) const - { TQT_CHECK_INVALID_MAP_ELEMENT; return sh->find( k ).data(); } - bool contains ( const Key& k ) const - { return find( k ) != end(); } - //{ return sh->find( k ) != ((const Priv*)sh)->end(); } - - size_type count() const { return sh->node_count; } - - TQValueList keys() const { - TQValueList r; - for (const_iterator i=begin(); i!=end(); ++i) - r.append(i.key()); - return r; - } - - TQValueList values() const { - TQValueList r; - for (const_iterator i=begin(); i!=end(); ++i) - r.append(*i); - return r; - } - - bool isEmpty() const { return sh->node_count == 0; } - - iterator insert( const Key& key, const T& value, bool overwrite = TRUE ); - void remove( iterator it ) { detach(); sh->remove( it ); } - void remove( const Key& k ); - -#if defined(TQ_FULL_TEMPLATE_INSTANTIATION) - bool operator==( const TQMap& ) const { return FALSE; } -#ifndef TQT_NO_STL - bool operator==( const std::map& ) const { return FALSE; } -#endif -#endif - -protected: - /** - * Helpers - */ - void detach() { if ( sh->count > 1 ) detachInternal(); } - - Priv* sh; -private: - void detachInternal(); - - friend class TQDeepCopy< TQMap >; -}; - -template -TQ_INLINE_TEMPLATES TQMap& TQMap::operator= ( const TQMap& m ) -{ - m.sh->ref(); - if ( sh->deref() ) - delete sh; - sh = m.sh; - return *this; -} - -template -TQ_INLINE_TEMPLATES TQ_TYPENAME TQMap::insert_pair TQMap::insert( const TQ_TYPENAME TQMap::value_type& x ) -{ - detach(); - size_type n = size(); - iterator it = sh->insertSingle( x.first ); - bool inserted = FALSE; - if ( n < size() ) { - inserted = TRUE; - it.data() = x.second; - } - return TQPair( it, inserted ); -} - -template -TQ_INLINE_TEMPLATES void TQMap::erase( const Key& k ) -{ - detach(); - iterator it( sh->find( k ).node ); - if ( it != end() ) - sh->remove( it ); -} - -template -TQ_INLINE_TEMPLATES TQ_TYPENAME TQMap::size_type TQMap::count( const Key& k ) const -{ - const_iterator it( sh->find( k ).node ); - if ( it != end() ) { - size_type c = 0; - while ( it != end() ) { - ++it; - ++c; - } - return c; - } - return 0; -} - -template -TQ_INLINE_TEMPLATES T& TQMap::operator[] ( const Key& k ) -{ - detach(); - TQMapNode* p = sh->find( k ).node; - if ( p != sh->end().node ) - return p->data; - return insert( k, T() ).data(); -} - -template -TQ_INLINE_TEMPLATES void TQMap::clear() -{ - if ( sh->count == 1 ) - sh->clear(); - else { - sh->deref(); - sh = new TQMapPrivate; - } -} - -template -TQ_INLINE_TEMPLATES TQ_TYPENAME TQMap::iterator TQMap::insert( const Key& key, const T& value, bool overwrite ) -{ - detach(); - size_type n = size(); - iterator it = sh->insertSingle( key ); - if ( overwrite || n < size() ) - it.data() = value; - return it; -} - -template -TQ_INLINE_TEMPLATES void TQMap::remove( const Key& k ) -{ - detach(); - iterator it( sh->find( k ).node ); - if ( it != end() ) - sh->remove( it ); -} - -template -TQ_INLINE_TEMPLATES void TQMap::detachInternal() -{ - sh->deref(); sh = new TQMapPrivate( sh ); -} - - -#ifndef TQT_NO_DATASTREAM -template -TQ_INLINE_TEMPLATES TQDataStream& operator>>( TQDataStream& s, TQMap& m ) { - m.clear(); - TQ_UINT32 c; - s >> c; - for( TQ_UINT32 i = 0; i < c; ++i ) { - Key k; T t; - s >> k >> t; - m.insert( k, t ); - if ( s.atEnd() ) - break; - } - return s; -} - - -template -TQ_INLINE_TEMPLATES TQDataStream& operator<<( TQDataStream& s, const TQMap& m ) { - s << (TQ_UINT32)m.size(); - TQMapConstIterator it = m.begin(); - for( ; it != m.end(); ++it ) - s << it.key() << it.data(); - return s; -} -#endif - -#define Q_DEFINED_QMAP -#include "ntqwinexport.h" -#endif // TQMAP_H diff --git a/src/tools/ntqpair.h b/src/tools/ntqpair.h deleted file mode 100644 index cd1614685..000000000 --- a/src/tools/ntqpair.h +++ /dev/null @@ -1,109 +0,0 @@ -/**************************************************************************** -** -** Definition of TQPair 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 TQPAIR_H -#define TQPAIR_H - -#ifndef QT_H -#include "ntqglobal.h" -#include "ntqdatastream.h" -#endif // QT_H - -template -struct TQPair -{ - typedef T1 first_type; - typedef T2 second_type; - - TQPair() - : first( T1() ), second( T2() ) - {} - TQPair( const T1& t1, const T2& t2 ) - : first( t1 ), second( t2 ) - {} - - TQPair& operator=(const TQPair& other) - { - if (this != &other) { - first = other.first; - second = other.second; - } - return *this; - } - - T1 first; - T2 second; -}; - -template -TQ_INLINE_TEMPLATES bool operator==( const TQPair& x, const TQPair& y ) -{ - return x.first == y.first && x.second == y.second; -} - -template -TQ_INLINE_TEMPLATES bool operator<( const TQPair& x, const TQPair& y ) -{ - return x.first < y.first || - ( !( y.first < x.first ) && x.second < y.second ); -} - -template -TQ_INLINE_TEMPLATES TQPair qMakePair( const T1& x, const T2& y ) -{ - return TQPair( x, y ); -} - -#ifndef TQT_NO_DATASTREAM -template -inline TQDataStream& operator>>( TQDataStream& s, TQPair& p ) -{ - s >> p.first >> p.second; - return s; -} - -template -inline TQDataStream& operator<<( TQDataStream& s, const TQPair& p ) -{ - s << p.first << p.second; - return s; -} -#endif - -#endif diff --git a/src/tools/ntqstringlist.h b/src/tools/ntqstringlist.h index 7bda85877..219af2bf5 100644 --- a/src/tools/ntqstringlist.h +++ b/src/tools/ntqstringlist.h @@ -42,7 +42,7 @@ #define TQSTRINGLIST_H #ifndef QT_H -#include "ntqvaluelist.h" +#include "tqvaluelist.h" #include "ntqstring.h" #include "ntqstrlist.h" #endif // QT_H diff --git a/src/tools/ntqvaluelist.h b/src/tools/ntqvaluelist.h deleted file mode 100644 index 4056290df..000000000 --- a/src/tools/ntqvaluelist.h +++ /dev/null @@ -1,681 +0,0 @@ -/**************************************************************************** -** -** Definition of TQValueList class -** -** Created : 990406 -** -** 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 TQVALUELIST_H -#define TQVALUELIST_H - -#ifndef QT_H -#include "ntqtl.h" -#include "ntqshared.h" -#include "ntqdatastream.h" -#endif // QT_H - -#ifndef TQT_NO_STL -#include -#include -#include -#endif - -//#define QT_CHECK_VALUELIST_RANGE - -template -class TQValueListNode -{ -public: - TQValueListNode( const T& t ) : data( t ) { } - TQValueListNode() { } -#if defined(Q_TEMPLATEDLL) - // Workaround MS bug in memory de/allocation in DLL vs. EXE - virtual ~TQValueListNode() { } -#endif - - TQValueListNode* next; - TQValueListNode* prev; - T data; -}; - -template -class TQValueListIterator -{ - public: - /** - * Typedefs - */ - typedef TQValueListNode* NodePtr; -#ifndef TQT_NO_STL - typedef std::bidirectional_iterator_tag iterator_category; -#endif - typedef T value_type; - typedef size_t size_type; -#ifndef TQT_NO_STL - typedef ptrdiff_t difference_type; -#else - typedef int difference_type; -#endif - typedef T* pointer; - typedef T& reference; - - /** - * Variables - */ - NodePtr node; - - /** - * Functions - */ - TQValueListIterator() : node( 0 ) {} - TQValueListIterator( NodePtr p ) : node( p ) {} - TQValueListIterator( const TQValueListIterator& it ) : node( it.node ) {} - - bool operator==( const TQValueListIterator& it ) const { return node == it.node; } - bool operator!=( const TQValueListIterator& it ) const { return node != it.node; } - const T& operator*() const { return node->data; } - T& operator*() { return node->data; } - const T* operator->() const { return &node->data; } - T* operator->() { return &node->data; } - - TQValueListIterator& operator++() { - node = node->next; - return *this; - } - - TQValueListIterator operator++(int) { - TQValueListIterator tmp = *this; - node = node->next; - return tmp; - } - - TQValueListIterator& operator--() { - node = node->prev; - return *this; - } - - TQValueListIterator operator--(int) { - TQValueListIterator tmp = *this; - node = node->prev; - return tmp; - } - - TQValueListIterator& operator+=( int j ) { - while ( j-- ) - node = node->next; - return *this; - } - - TQValueListIterator& operator-=( int j ) { - while ( j-- ) - node = node->prev; - return *this; - } - -}; - -template -class TQValueListConstIterator -{ - public: - /** - * Typedefs - */ - typedef TQValueListNode* NodePtr; -#ifndef TQT_NO_STL - typedef std::bidirectional_iterator_tag iterator_category; -#endif - typedef T value_type; - typedef size_t size_type; -#ifndef TQT_NO_STL - typedef ptrdiff_t difference_type; -#else - typedef int difference_type; -#endif - typedef const T* pointer; - typedef const T& reference; - - /** - * Variables - */ - NodePtr node; - - /** - * Functions - */ - TQValueListConstIterator() : node( 0 ) {} - TQValueListConstIterator( NodePtr p ) : node( p ) {} - TQValueListConstIterator( const TQValueListConstIterator& it ) : node( it.node ) {} - TQValueListConstIterator( const TQValueListIterator& it ) : node( it.node ) {} - - bool operator==( const TQValueListConstIterator& it ) const { return node == it.node; } - bool operator!=( const TQValueListConstIterator& it ) const { return node != it.node; } - const T& operator*() const { return node->data; } - // UDT for T = x* - // const T* operator->() const { return &node->data; } - - TQValueListConstIterator& operator++() { - node = node->next; - return *this; - } - - TQValueListConstIterator operator++(int) { - TQValueListConstIterator tmp = *this; - node = node->next; - return tmp; - } - - TQValueListConstIterator& operator--() { - node = node->prev; - return *this; - } - - TQValueListConstIterator operator--(int) { - TQValueListConstIterator tmp = *this; - node = node->prev; - return tmp; - } -}; - -template -class TQValueListPrivate : public TQShared -{ -public: - /** - * Typedefs - */ - typedef TQValueListIterator Iterator; - typedef TQValueListConstIterator ConstIterator; - typedef TQValueListNode Node; - typedef TQValueListNode* NodePtr; - typedef size_t size_type; - - /** - * Functions - */ - TQValueListPrivate(); - TQValueListPrivate( const TQValueListPrivate& _p ); - -#if defined(Q_TEMPLATEDLL) - // Workaround MS bug in memory de/allocation in DLL vs. EXE - virtual -#endif - ~TQValueListPrivate(); - - Iterator insert( Iterator it, const T& x ); - Iterator remove( Iterator it ); - NodePtr find( NodePtr start, const T& x ) const; - int findIndex( NodePtr start, const T& x ) const; - uint contains( const T& x ) const; - bool containsYesNo( const T& x ) const; - uint remove( const T& x ); - NodePtr at( size_type i ) const; - void clear(); - - NodePtr node; - size_type nodes; -}; - -template -TQ_INLINE_TEMPLATES TQValueListPrivate::TQValueListPrivate() -{ - node = new Node(); node->next = node->prev = node; nodes = 0; -} - -template -TQ_INLINE_TEMPLATES TQValueListPrivate::TQValueListPrivate( const TQValueListPrivate& _p ) - : TQShared() -{ - node = new Node(); node->next = node->prev = node; nodes = 0; - Iterator b( _p.node->next ); - Iterator e( _p.node ); - Iterator i( node ); - while( b != e ) - insert( i, *b++ ); -} - -template -TQ_INLINE_TEMPLATES TQValueListPrivate::~TQValueListPrivate() { - NodePtr p = node->next; - while( p != node ) { - NodePtr x = p->next; - delete p; - p = x; - } - delete node; -} - -template -TQ_INLINE_TEMPLATES TQ_TYPENAME TQValueListPrivate::Iterator TQValueListPrivate::insert( TQ_TYPENAME TQValueListPrivate::Iterator it, const T& x ) -{ - NodePtr p = new Node( x ); - p->next = it.node; - p->prev = it.node->prev; - it.node->prev->next = p; - it.node->prev = p; - nodes++; - return p; -} - -template -TQ_INLINE_TEMPLATES TQ_TYPENAME TQValueListPrivate::Iterator TQValueListPrivate::remove( TQ_TYPENAME TQValueListPrivate::Iterator it ) -{ - Q_ASSERT ( it.node != node ); - NodePtr next = it.node->next; - NodePtr prev = it.node->prev; - prev->next = next; - next->prev = prev; - delete it.node; - nodes--; - return Iterator( next ); -} - -template -TQ_INLINE_TEMPLATES TQ_TYPENAME TQValueListPrivate::NodePtr TQValueListPrivate::find( TQ_TYPENAME TQValueListPrivate::NodePtr start, const T& x ) const -{ - ConstIterator first( start ); - ConstIterator last( node ); - while( first != last) { - if ( *first == x ) - return first.node; - ++first; - } - return last.node; -} - -template -TQ_INLINE_TEMPLATES int TQValueListPrivate::findIndex( TQ_TYPENAME TQValueListPrivate::NodePtr start, const T& x ) const -{ - ConstIterator first( start ); - ConstIterator last( node ); - int pos = 0; - while( first != last) { - if ( *first == x ) - return pos; - ++first; - ++pos; - } - return -1; -} - -template -TQ_INLINE_TEMPLATES uint TQValueListPrivate::contains( const T& x ) const -{ - uint result = 0; - Iterator first = Iterator( node->next ); - Iterator last = Iterator( node ); - while( first != last) { - if ( *first == x ) - ++result; - ++first; - } - return result; -} - -template -TQ_INLINE_TEMPLATES bool TQValueListPrivate::containsYesNo( const T& x ) const -{ - Iterator first = Iterator( node->next ); - Iterator last = Iterator( node ); - while( first != last) { - if ( *first == x ) - return true; - ++first; - } - return false; -} - -template -TQ_INLINE_TEMPLATES uint TQValueListPrivate::remove( const T& _x ) -{ - const T x = _x; - uint result = 0; - Iterator first = Iterator( node->next ); - Iterator last = Iterator( node ); - while( first != last) { - if ( *first == x ) { - first = remove( first ); - ++result; - } else - ++first; - } - return result; -} - -template -TQ_INLINE_TEMPLATES TQ_TYPENAME TQValueListPrivate::NodePtr TQValueListPrivate::at( size_type i ) const -{ - Q_ASSERT( i <= nodes ); - NodePtr p = node->next; - for( size_type x = 0; x < i; ++x ) - p = p->next; - return p; -} - -template -TQ_INLINE_TEMPLATES void TQValueListPrivate::clear() -{ - nodes = 0; - NodePtr p = node->next; - while( p != node ) { - NodePtr next = p->next; - delete p; - p = next; - } - node->next = node->prev = node; -} - -#ifdef QT_CHECK_RANGE -# if !defined( TQT_NO_DEBUG ) && defined( QT_CHECK_VALUELIST_RANGE ) -# define QT_CHECK_INVALID_LIST_ELEMENT if ( empty() ) tqWarning( "TQValueList: Warning invalid element" ) -# define QT_CHECK_INVALID_LIST_ELEMENT_FATAL Q_ASSERT( !empty() ); -# else -# define QT_CHECK_INVALID_LIST_ELEMENT -# define QT_CHECK_INVALID_LIST_ELEMENT_FATAL -# endif -#else -# define QT_CHECK_INVALID_LIST_ELEMENT -# define QT_CHECK_INVALID_LIST_ELEMENT_FATAL -#endif - -template class TQDeepCopy; - -template -class TQValueList -{ -public: - /** - * Typedefs - */ - typedef TQValueListIterator iterator; - typedef TQValueListConstIterator const_iterator; - typedef T value_type; - typedef value_type* pointer; - typedef const value_type* const_pointer; - typedef value_type& reference; - typedef const value_type& const_reference; - typedef size_t size_type; -#ifndef TQT_NO_STL - typedef ptrdiff_t difference_type; -#else - typedef int difference_type; -#endif - - /** - * API - */ - TQValueList() { sh = new TQValueListPrivate; } - TQValueList( const TQValueList& l ) { sh = l.sh; sh->ref(); } -#ifndef TQT_NO_STL - TQValueList( const std::list& l ) - { - sh = new TQValueListPrivate; - tqCopy( l.begin(), l.end(), std::back_inserter( *this ) ); - } -#endif - ~TQValueList() - { - if (sh->deref()) - delete sh; - } - - TQValueList& operator= ( const TQValueList& l ) - { - if (this == &l || sh == l.sh) - return *this; // Do nothing is self-assigning - l.sh->ref(); - if (sh->deref()) - delete sh; - sh = l.sh; - return *this; - } - -#ifndef TQT_NO_STL - TQValueList& operator= ( const std::list& l ) - { - detach(); - tqCopy( l.begin(), l.end(), std::back_inserter( *this ) ); - return *this; - } - - bool operator== ( const std::list& l ) const - { - if ( size() != l.size() ) - return FALSE; - const_iterator it2 = begin(); -#if !defined(Q_CC_MIPS) - typename -#endif - std::list::const_iterator it = l.begin(); - for ( ; it2 != end(); ++it2, ++it ) - if ( !((*it2) == (*it)) ) - return FALSE; - return TRUE; - } -#endif - bool operator== ( const TQValueList& l ) const; - bool operator!= ( const TQValueList& l ) const { return !( *this == l ); } - iterator begin() { detach(); return iterator( sh->node->next ); } - const_iterator begin() const { return const_iterator( sh->node->next ); } - const_iterator constBegin() const { return const_iterator( sh->node->next ); } - iterator end() { detach(); return iterator( sh->node ); } - const_iterator end() const { return const_iterator( sh->node ); } - const_iterator constEnd() const { return const_iterator( sh->node ); } - iterator insert( iterator it, const T& x ) { detach(); return sh->insert( it, x ); } - uint remove( const T& x ) { detach(); return sh->remove( x ); } - void clear(); - - // ### 4.0: move out of class - TQValueList& operator<< ( const T& x ) - { - append( x ); - return *this; - } - - size_type size() const { return sh->nodes; } - bool empty() const { return sh->nodes == 0; } - void push_front( const T& x ) { detach(); sh->insert( begin(), x ); } - void push_back( const T& x ) { detach(); sh->insert( end(), x ); } - iterator erase( iterator pos ) { detach(); return sh->remove( pos ); } - iterator erase( iterator first, iterator last ); - reference front() { QT_CHECK_INVALID_LIST_ELEMENT_FATAL; return *begin(); } - const_reference front() const { QT_CHECK_INVALID_LIST_ELEMENT_FATAL; return *begin(); } - reference back() { QT_CHECK_INVALID_LIST_ELEMENT_FATAL; return *(--end()); } - const_reference back() const { QT_CHECK_INVALID_LIST_ELEMENT_FATAL; return *(--end()); } - void pop_front() { QT_CHECK_INVALID_LIST_ELEMENT; erase( begin() ); } - void pop_back() { - QT_CHECK_INVALID_LIST_ELEMENT; - iterator tmp = end(); - erase( --tmp ); - } - void insert( iterator pos, size_type n, const T& x ); - // Some compilers (incl. vc++) would instantiate this function even if - // it is not used; this would constrain TQValueList to classes that provide - // an operator< - /* - void sort() - { - qHeapSort( *this ); - } - */ - - TQValueList operator+ ( const TQValueList& l ) const; - TQValueList& operator+= ( const TQValueList& l ); - - iterator fromLast() { detach(); return iterator( sh->node->prev ); } - const_iterator fromLast() const { return const_iterator( sh->node->prev ); } - - bool isEmpty() const { return ( sh->nodes == 0 ); } - - iterator append( const T& x ) { detach(); return sh->insert( end(), x ); } - iterator prepend( const T& x ) { detach(); return sh->insert( begin(), x ); } - - iterator remove( iterator it ) { detach(); return sh->remove( it ); } - - T& first() { QT_CHECK_INVALID_LIST_ELEMENT; detach(); return sh->node->next->data; } - const T& first() const { QT_CHECK_INVALID_LIST_ELEMENT; return sh->node->next->data; } - T& last() { QT_CHECK_INVALID_LIST_ELEMENT; detach(); return sh->node->prev->data; } - const T& last() const { QT_CHECK_INVALID_LIST_ELEMENT; return sh->node->prev->data; } - - T& operator[] ( size_type i ) { QT_CHECK_INVALID_LIST_ELEMENT; detach(); return sh->at(i)->data; } - const T& operator[] ( size_type i ) const { QT_CHECK_INVALID_LIST_ELEMENT; return sh->at(i)->data; } - iterator at( size_type i ) { QT_CHECK_INVALID_LIST_ELEMENT; detach(); return iterator( sh->at(i) ); } - const_iterator at( size_type i ) const { QT_CHECK_INVALID_LIST_ELEMENT; return const_iterator( sh->at(i) ); } - iterator find ( const T& x ) { detach(); return iterator( sh->find( sh->node->next, x) ); } - const_iterator find ( const T& x ) const { return const_iterator( sh->find( sh->node->next, x) ); } - iterator find ( iterator it, const T& x ) { detach(); return iterator( sh->find( it.node, x ) ); } - const_iterator find ( const_iterator it, const T& x ) const { return const_iterator( sh->find( it.node, x ) ); } - int findIndex( const T& x ) const { return sh->findIndex( sh->node->next, x) ; } - size_type contains( const T& x ) const { return sh->contains( x ); } - bool containsYesNo( const T& x ) const { return sh->containsYesNo( x ); } - - size_type count() const { return sh->nodes; } - - TQValueList& operator+= ( const T& x ) - { - append( x ); - return *this; - } - typedef TQValueListIterator Iterator; - typedef TQValueListConstIterator ConstIterator; - typedef T ValueType; - -protected: - /** - * Helpers - */ - void detach() - { - if (sh->count > 1) - { - sh->deref(); - sh = new TQValueListPrivate(*sh); - } - } - - /** - * Variables - */ - TQValueListPrivate* sh; - -private: - friend class TQDeepCopy< TQValueList >; -}; - -template -TQ_INLINE_TEMPLATES bool TQValueList::operator== ( const TQValueList& l ) const -{ - if ( size() != l.size() ) - return FALSE; - const_iterator it2 = begin(); - const_iterator it = l.begin(); - for( ; it != l.end(); ++it, ++it2 ) - if ( !( *it == *it2 ) ) - return FALSE; - return TRUE; -} - -template -TQ_INLINE_TEMPLATES void TQValueList::clear() -{ - if ( sh->count == 1 ) sh->clear(); else { sh->deref(); sh = new TQValueListPrivate(); } -} - -template -TQ_INLINE_TEMPLATES TQ_TYPENAME TQValueList::iterator TQValueList::erase( TQ_TYPENAME TQValueList::iterator first, TQ_TYPENAME TQValueList::iterator last ) -{ - while ( first != last ) - erase( first++ ); - return last; -} - - -template -TQ_INLINE_TEMPLATES void TQValueList::insert( TQ_TYPENAME TQValueList::iterator pos, size_type n, const T& x ) -{ - for ( ; n > 0; --n ) - insert( pos, x ); -} - -template -TQ_INLINE_TEMPLATES TQValueList TQValueList::operator+ ( const TQValueList& l ) const -{ - TQValueList l2( *this ); - for( const_iterator it = l.begin(); it != l.end(); ++it ) - l2.append( *it ); - return l2; -} - -template -TQ_INLINE_TEMPLATES TQValueList& TQValueList::operator+= ( const TQValueList& l ) -{ - TQValueList copy = l; - for( const_iterator it = copy.begin(); it != copy.end(); ++it ) - append( *it ); - return *this; -} - -#ifndef TQT_NO_DATASTREAM -template -TQ_INLINE_TEMPLATES TQDataStream& operator>>( TQDataStream& s, TQValueList& l ) -{ - l.clear(); - TQ_UINT32 c; - s >> c; - for( TQ_UINT32 i = 0; i < c && !s.atEnd(); ++i ) - { - T t; - s >> t; - l.append( t ); - } - return s; -} - -template -TQ_INLINE_TEMPLATES TQDataStream& operator<<( TQDataStream& s, const TQValueList& l ) -{ - s << (TQ_UINT32)l.size(); - TQValueListConstIterator it = l.begin(); - for( ; it != l.end(); ++it ) - s << *it; - return s; -} -#endif // TQT_NO_DATASTREAM - -#define Q_DEFINED_QVALUELIST -#define Q_DEFINED_QVALUELIST -#include "ntqwinexport.h" -#endif // TQVALUELIST_H diff --git a/src/tools/ntqvaluestack.h b/src/tools/ntqvaluestack.h deleted file mode 100644 index 1c1259fb1..000000000 --- a/src/tools/ntqvaluestack.h +++ /dev/null @@ -1,67 +0,0 @@ -/**************************************************************************** -** -** Definition of TQValueStack class -** -** Created : 990925 -** -** 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 TQVALUESTACK_H -#define TQVALUESTACK_H - -#ifndef QT_H -#include "ntqvaluelist.h" -#endif // QT_H - - -template -class TQValueStack : public TQValueList -{ -public: - TQValueStack() {} - ~TQValueStack() {} - void push( const T& d ) { this->append(d); } - T pop() - { - T elem( this->last() ); - if ( !this->isEmpty() ) - this->remove( this->fromLast() ); - return elem; - } - T& top() { return this->last(); } - const T& top() const { return this->last(); } -}; - -#endif diff --git a/src/tools/ntqvaluevector.h b/src/tools/ntqvaluevector.h deleted file mode 100644 index 90dc45e10..000000000 --- a/src/tools/ntqvaluevector.h +++ /dev/null @@ -1,577 +0,0 @@ -/**************************************************************************** -** -** Definition of TQValueVector 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 TQVALUEVECTOR_H -#define TQVALUEVECTOR_H - -#include - -#ifndef QT_H -#include "ntqtl.h" -#include "ntqshared.h" -#include "ntqdatastream.h" -#endif // QT_H - -#ifndef TQT_NO_STL -#include -#endif - -template -class TQValueVectorPrivate : public TQShared -{ -public: - typedef T value_type; - typedef T* pointer; - - TQValueVectorPrivate() - : start( 0 ), finish( 0 ), end( 0 ) - { - } - - TQValueVectorPrivate( const TQValueVectorPrivate& x ); - TQValueVectorPrivate( size_t size ); - - void derefAndDelete() // work-around for hp-cc - { - if ( deref() ) - delete this; - } - -#if defined(Q_TEMPLATEDLL) - // Workaround MS bug in memory de/allocation in DLL vs. EXE - virtual -#endif - ~TQValueVectorPrivate() - { - delete[] start; - } - - size_t size() const - { - return finish - start; - } - - bool empty() const - { - return start == finish; - } - - size_t capacity() const - { - return end - start; - } - - void insert( pointer pos, const T& x ); - void insert( pointer pos, size_t n, const T& x ); - void reserve( size_t n ); - - void clear() - { - delete[] start; - start = 0; - finish = 0; - end = 0; - } - - - pointer start; - pointer finish; - pointer end; - -private: - pointer growAndCopy( size_t n, pointer s, pointer f ); - - TQValueVectorPrivate& operator=( const TQValueVectorPrivate& x ); - -}; - -template -TQ_INLINE_TEMPLATES TQValueVectorPrivate::TQValueVectorPrivate( const TQValueVectorPrivate& x ) - : TQShared() -{ - size_t i = x.size(); - if ( i > 0 ) { - start = new T[ i ]; - finish = start + i; - end = start + i; -#if defined(__xlC__) && __xlC__ < 0x400 // xlC 3.6 confused by const - tqCopy( (pointer)x.start, (pointer)x.finish, start ); -#else - tqCopy( x.start, x.finish, start ); -#endif - } else { - start = 0; - finish = 0; - end = 0; - } -} - -template -TQ_INLINE_TEMPLATES TQValueVectorPrivate::TQValueVectorPrivate( size_t size ) -{ - if ( size > 0 ) { - start = new T[size]; - finish = start + size; - end = start + size; - } else { - start = 0; - finish = 0; - end = 0; - } -} - -template -TQ_INLINE_TEMPLATES void TQValueVectorPrivate::insert( pointer pos, const T& x ) -{ - const size_t lastSize = size(); - const size_t n = lastSize !=0 ? 2*lastSize : 1; - const size_t offset = pos - start; - pointer newStart = new T[n]; - pointer newFinish = newStart + offset; - tqCopy( start, pos, newStart ); - *newFinish = x; - tqCopy( pos, finish, ++newFinish ); - delete[] start; - start = newStart; - finish = newStart + lastSize + 1; - end = newStart + n; -} - -template -TQ_INLINE_TEMPLATES void TQValueVectorPrivate::insert( pointer pos, size_t n, const T& x ) -{ - if ( size_t( end - finish ) >= n ) { - // enough room - const size_t elems_after = finish - pos; - pointer old_finish = finish; - if ( elems_after > n ) { - tqCopy( finish - n, finish, finish ); - finish += n; - tqCopyBackward( pos, old_finish - n, old_finish ); - tqFill( pos, pos + n, x ); - } else { - pointer filler = finish; - size_t i = n - elems_after; - for ( ; i > 0; --i, ++filler ) - *filler = x; - finish += n - elems_after; - tqCopy( pos, old_finish, finish ); - finish += elems_after; - tqFill( pos, old_finish, x ); - } - } else { - // not enough room - const size_t lastSize = size(); - const size_t len = lastSize + TQMAX( lastSize, n ); - pointer newStart = new T[len]; - pointer newFinish = tqCopy( start, pos, newStart ); - // fill up inserted space - size_t i = n; - for ( ; i > 0; --i, ++newFinish ) - *newFinish = x; - newFinish = tqCopy( pos, finish, newFinish ); - delete[] start; - start = newStart; - finish = newFinish; - end = newStart + len; - } -} - -template -TQ_INLINE_TEMPLATES void TQValueVectorPrivate::reserve( size_t n ) -{ - const size_t lastSize = size(); - pointer tmp = growAndCopy( n, start, finish ); - start = tmp; - finish = tmp + lastSize; - end = start + n; -} - -template -TQ_INLINE_TEMPLATES TQ_TYPENAME TQValueVectorPrivate::pointer TQValueVectorPrivate::growAndCopy( size_t n, pointer s, pointer f ) -{ - pointer newStart = new T[n]; - tqCopy( s, f, newStart ); - delete[] start; - return newStart; -} - -template class TQDeepCopy; - -template -class TQValueVector -{ -public: - typedef T value_type; - typedef value_type* pointer; - typedef const value_type* const_pointer; - typedef value_type* iterator; - typedef const value_type* const_iterator; - typedef value_type& reference; - typedef const value_type& const_reference; - typedef size_t size_type; -#ifndef TQT_NO_STL - typedef ptrdiff_t difference_type; -#else - typedef int difference_type; -#endif - - TQValueVector() - { - sh = new TQValueVectorPrivate; - } - - TQValueVector( const TQValueVector& v ) - { - sh = v.sh; - sh->ref(); - } - - TQValueVector( size_type n, const T& val = T() ); - -#ifndef TQT_NO_STL - TQValueVector( std::vector& v ) // ### remove in 4.0 - { - sh = new TQValueVectorPrivate( v.size() ); - tqCopy( v.begin(), v.end(), begin() ); - } - - TQValueVector( const std::vector& v ) - { - sh = new TQValueVectorPrivate( v.size() ); - tqCopy( v.begin(), v.end(), begin() ); - } -#endif - - ~TQValueVector() - { - sh->derefAndDelete(); - } - - TQValueVector& operator= ( const TQValueVector& v ) - { - v.sh->ref(); - sh->derefAndDelete(); - sh = v.sh; - return *this; - } - -#ifndef TQT_NO_STL - TQValueVector& operator= ( const std::vector& v ) - { - clear(); - resize( v.size() ); - tqCopy( v.begin(), v.end(), begin() ); - return *this; - } -#endif - - size_type size() const { return sh->size(); } - - bool empty() const { return sh->empty(); } - - size_type capacity() const - { - return size_type( sh->capacity() ); - } - - iterator begin() - { - detach(); - return sh->start; - } - - const_iterator begin() const - { - return sh->start; - } - - const_iterator constBegin() const - { - return sh->start; - } - - iterator end() - { - detach(); - return sh->finish; - } - - const_iterator end() const - { - return sh->finish; - } - - const_iterator constEnd() const - { - return sh->finish; - } - - reference at( size_type i, bool* ok = 0 ) - { - detach(); - if ( ok ) - *ok = ( i < size() ); - return *( begin() + i ); - } - - const_reference at( size_type i, bool* ok = 0 ) const - { - if ( ok ) - *ok = ( i < size() ); - return *( begin() + i ); - } - - reference operator[]( size_type i ) - { - detach(); - return *( begin() + i ); - } - - const_reference operator[]( size_type i ) const - { - return *( begin() + i ); - } - - reference front() - { - Q_ASSERT( !empty() ); - detach(); - return *begin(); - } - - const_reference front() const - { - Q_ASSERT( !empty() ); - return *begin(); - } - - reference back() - { - Q_ASSERT( !empty() ); - detach(); - return *( end() - 1 ); - } - - const_reference back() const - { - Q_ASSERT( !empty() ); - return *( end() - 1 ); - } - - void push_back( const T& x ) - { - detach(); - if ( sh->finish == sh->end ) { - sh->reserve( size()+size()/2+1 ); - } - *sh->finish = x; - ++sh->finish; - } - - void pop_back() - { - detach(); - if ( empty() ) - return; - --sh->finish; - } - - iterator insert( iterator pos, const T& x ); - iterator insert( iterator pos, size_type n, const T& x ); - - void reserve( size_type n ) - { - if ( capacity() < n ) { - detach(); - sh->reserve( n ); - } - } - - void resize( size_type n, const T& val = T() ) - { - if ( n < size() ) - erase( begin() + n, end() ); - else - insert( end(), n - size(), val ); - } - - void clear() - { - detach(); - sh->clear(); - } - - iterator erase( iterator pos ) - { - detach(); - if ( pos + 1 != end() ) - tqCopy( pos + 1, sh->finish, pos ); - --sh->finish; - return pos; - } - - iterator erase( iterator first, iterator last ) - { - detach(); - tqCopy( last, sh->finish, first ); - sh->finish = sh->finish - ( last - first ); - return first; - } - - // ### remove in TQt 4.0 - bool operator==( const TQValueVector& x ) - { - return size()==x.size() ? tqEqual( constBegin(), constEnd(), x.begin()) : FALSE; - } - - bool operator==( const TQValueVector& x ) const - { - return size()==x.size() ? tqEqual( begin(), end(), x.begin() ) : FALSE; - } - - typedef T ValueType; - typedef ValueType *Iterator; - typedef const ValueType *ConstIterator; - - size_type count() const { return size(); } - bool isEmpty() const { return empty(); } - - reference first() { return front(); } - const_reference first() const { return front(); } - reference last() { return back(); } - const_reference last() const { return back(); } - void append( const T& x ) { push_back( x ); } - -protected: - void detach() - { - if ( sh->count > 1 ) { detachInternal(); } - } - void detachInternal(); - TQValueVectorPrivate* sh; - -private: - friend class TQDeepCopy< TQValueVector >; -}; - -template -TQ_INLINE_TEMPLATES TQValueVector::TQValueVector( size_type n, const T& val ) -{ - sh = new TQValueVectorPrivate( n ); - tqFill( begin(), end(), val ); -} - -template -TQ_INLINE_TEMPLATES void TQValueVector::detachInternal() -{ - sh->deref(); - sh = new TQValueVectorPrivate( *sh ); -} - -template -TQ_INLINE_TEMPLATES TQ_TYPENAME TQValueVector::iterator TQValueVector::insert( iterator pos, const T& x ) -{ - size_type offset = pos - sh->start; - detach(); - if ( pos == end() ) { - if ( sh->finish == sh->end ) - push_back( x ); - else { - *sh->finish = x; - ++sh->finish; - } - } else { - if ( sh->finish == sh->end ) { - sh->insert( pos, x ); - } else { - *sh->finish = *(sh->finish - 1); - ++sh->finish; - tqCopyBackward( pos, sh->finish - 2, sh->finish - 1 ); - *pos = x; - } - } - return begin() + offset; -} - -template -TQ_INLINE_TEMPLATES TQ_TYPENAME TQValueVector::iterator TQValueVector::insert( iterator pos, size_type n, const T& x ) -{ - if ( n != 0 ) { - size_type offset = pos - sh->start; - detach(); - pos = begin() + offset; - sh->insert( pos, n, x ); - } - return pos; -} - - -#ifndef TQT_NO_DATASTREAM -template -TQ_INLINE_TEMPLATES TQDataStream& operator>>( TQDataStream& s, TQValueVector& v ) -{ - v.clear(); - TQ_UINT32 c; - s >> c; - v.resize( c ); - for( TQ_UINT32 i = 0; i < c; ++i ) - { - T t; - s >> t; - v[i] = t; - } - return s; -} - -template -TQ_INLINE_TEMPLATES TQDataStream& operator<<( TQDataStream& s, const TQValueVector& v ) -{ - s << (TQ_UINT32)v.size(); - // ### use typename TQValueVector::const_iterator once all supported - // ### compilers know about the 'typename' keyword. - const T* it = v.begin(); - for( ; it != v.end(); ++it ) - s << *it; - return s; -} -#endif // TQT_NO_DATASTREAM - -#define Q_DEFINED_QVALUEVECTOR -#include "ntqwinexport.h" -#endif // TQVALUEVECTOR_H diff --git a/src/tools/qdir_p.h b/src/tools/qdir_p.h index 4538e5b26..91138abb5 100644 --- a/src/tools/qdir_p.h +++ b/src/tools/qdir_p.h @@ -56,7 +56,7 @@ #ifndef QT_H #include "ntqregexp.h" -#include "ntqvaluelist.h" +#include "tqvaluelist.h" #endif // QT_H extern TQValueList qt_makeFilterList( const TQString & ); diff --git a/src/tools/qglist.cpp b/src/tools/qglist.cpp index 9dbe81d92..979297870 100644 --- a/src/tools/qglist.cpp +++ b/src/tools/qglist.cpp @@ -41,7 +41,7 @@ #include "ntqglist.h" #include "ntqgvector.h" #include "ntqdatastream.h" -#include "ntqvaluelist.h" +#include "tqvaluelist.h" #if defined(TQT_THREAD_SUPPORT) #include "ntqmutex.h" diff --git a/src/tools/qgpluginmanager.cpp b/src/tools/qgpluginmanager.cpp index c1d6e15f0..dc72dad30 100644 --- a/src/tools/qgpluginmanager.cpp +++ b/src/tools/qgpluginmanager.cpp @@ -39,7 +39,7 @@ #include "qgpluginmanager_p.h" #ifndef TQT_NO_COMPONENT #include "qcomlibrary_p.h" -#include "ntqmap.h" +#include "tqmap.h" #include "ntqdir.h" /* diff --git a/src/tools/qmap.cpp b/src/tools/qmap.cpp deleted file mode 100644 index 4c2884501..000000000 --- a/src/tools/qmap.cpp +++ /dev/null @@ -1,257 +0,0 @@ -/**************************************************************************** -** -** Implementation of TQMap -** -** Created : 990406 -** -** 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 "ntqmap.h" - -typedef TQMapNodeBase* NodePtr; -typedef TQMapNodeBase Node; - - -void TQMapPrivateBase::rotateLeft( NodePtr x, NodePtr& root) -{ - NodePtr y = x->right; - x->right = y->left; - if (y->left !=0) - y->left->parent = x; - y->parent = x->parent; - if (x == root) - root = y; - else if (x == x->parent->left) - x->parent->left = y; - else - x->parent->right = y; - y->left = x; - x->parent = y; -} - - -void TQMapPrivateBase::rotateRight( NodePtr x, NodePtr& root ) -{ - NodePtr y = x->left; - x->left = y->right; - if (y->right != 0) - y->right->parent = x; - y->parent = x->parent; - if (x == root) - root = y; - else if (x == x->parent->right) - x->parent->right = y; - else - x->parent->left = y; - y->right = x; - x->parent = y; -} - - -void TQMapPrivateBase::rebalance( NodePtr x, NodePtr& root) -{ - x->color = Node::Red; - while ( x != root && x->parent->color == Node::Red ) { - if ( x->parent == x->parent->parent->left ) { - NodePtr y = x->parent->parent->right; - if (y && y->color == Node::Red) { - x->parent->color = Node::Black; - y->color = Node::Black; - x->parent->parent->color = Node::Red; - x = x->parent->parent; - } else { - if (x == x->parent->right) { - x = x->parent; - rotateLeft( x, root ); - } - x->parent->color = Node::Black; - x->parent->parent->color = Node::Red; - rotateRight (x->parent->parent, root ); - } - } else { - NodePtr y = x->parent->parent->left; - if ( y && y->color == Node::Red ) { - x->parent->color = Node::Black; - y->color = Node::Black; - x->parent->parent->color = Node::Red; - x = x->parent->parent; - } else { - if (x == x->parent->left) { - x = x->parent; - rotateRight( x, root ); - } - x->parent->color = Node::Black; - x->parent->parent->color = Node::Red; - rotateLeft( x->parent->parent, root ); - } - } - } - root->color = Node::Black; -} - - -NodePtr TQMapPrivateBase::removeAndRebalance( NodePtr z, NodePtr& root, - NodePtr& leftmost, - NodePtr& rightmost ) -{ - NodePtr y = z; - NodePtr x; - NodePtr x_parent; - if (y->left == 0) { - x = y->right; - } else { - if (y->right == 0) - x = y->left; - else - { - y = y->right; - while (y->left != 0) - y = y->left; - x = y->right; - } - } - if (y != z) { - z->left->parent = y; - y->left = z->left; - if (y != z->right) { - x_parent = y->parent; - if (x) - x->parent = y->parent; - y->parent->left = x; - y->right = z->right; - z->right->parent = y; - } else { - x_parent = y; - } - if (root == z) - root = y; - else if (z->parent->left == z) - z->parent->left = y; - else - z->parent->right = y; - y->parent = z->parent; - // Swap the colors - Node::Color c = y->color; - y->color = z->color; - z->color = c; - y = z; - } else { - x_parent = y->parent; - if (x) - x->parent = y->parent; - if (root == z) - root = x; - else if (z->parent->left == z) - z->parent->left = x; - else - z->parent->right = x; - if ( leftmost == z ) { - if (z->right == 0) - leftmost = z->parent; - else - leftmost = x->minimum(); - } - if (rightmost == z) { - if (z->left == 0) - rightmost = z->parent; - else - rightmost = x->maximum(); - } - } - if (y->color != Node::Red) { - while (x != root && (x == 0 || x->color == Node::Black)) { - if (x == x_parent->left) { - NodePtr w = x_parent->right; - if (w->color == Node::Red) { - w->color = Node::Black; - x_parent->color = Node::Red; - rotateLeft(x_parent, root); - w = x_parent->right; - } - if ((w->left == 0 || w->left->color == Node::Black) && - (w->right == 0 || w->right->color == Node::Black)) { - w->color = Node::Red; - x = x_parent; - x_parent = x_parent->parent; - } else { - if (w->right == 0 || w->right->color == Node::Black) { - if (w->left) - w->left->color = Node::Black; - w->color = Node::Red; - rotateRight(w, root); - w = x_parent->right; - } - w->color = x_parent->color; - x_parent->color = Node::Black; - if (w->right) - w->right->color = Node::Black; - rotateLeft(x_parent, root); - break; - } - } else { - NodePtr w = x_parent->left; - if (w->color == Node::Red) { - w->color = Node::Black; - x_parent->color = Node::Red; - rotateRight(x_parent, root); - w = x_parent->left; - } - if ((w->right == 0 || w->right->color == Node::Black) && - (w->left == 0 || w->left->color == Node::Black)) { - w->color = Node::Red; - x = x_parent; - x_parent = x_parent->parent; - } else { - if (w->left == 0 || w->left->color == Node::Black) { - if (w->right) - w->right->color = Node::Black; - w->color = Node::Red; - rotateLeft(w, root); - w = x_parent->left; - } - w->color = x_parent->color; - x_parent->color = Node::Black; - if (w->left) - w->left->color = Node::Black; - rotateRight(x_parent, root); - break; - } - } - } - if (x) - x->color = Node::Black; - } - return y; -} diff --git a/src/tools/qregexp.cpp b/src/tools/qregexp.cpp index 5c0fac766..19b983f75 100644 --- a/src/tools/qregexp.cpp +++ b/src/tools/qregexp.cpp @@ -47,7 +47,7 @@ #include "ntqcache.h" #include "ntqcleanuphandler.h" #include "ntqintdict.h" -#include "ntqmap.h" +#include "tqmap.h" #include "ntqptrvector.h" #include "ntqstring.h" #include "ntqtl.h" diff --git a/src/tools/qsettings.cpp b/src/tools/qsettings.cpp index 6ac18bcc7..ecaa3f7d6 100644 --- a/src/tools/qsettings.cpp +++ b/src/tools/qsettings.cpp @@ -60,7 +60,7 @@ static inline int qt_open( const char *pathname, int flags, mode_t mode ) #include "ntqdir.h" #include "ntqfile.h" #include "ntqfileinfo.h" -#include "ntqmap.h" +#include "tqmap.h" #include "ntqtextstream.h" #include "ntqregexp.h" #include diff --git a/src/tools/qsettings_p.h b/src/tools/qsettings_p.h index 6dcd1a037..303466cd5 100644 --- a/src/tools/qsettings_p.h +++ b/src/tools/qsettings_p.h @@ -55,8 +55,8 @@ #ifndef QT_H #include "ntqstringlist.h" -#include "ntqmap.h" -#include "ntqvaluestack.h" +#include "tqmap.h" +#include "tqvaluestack.h" #endif // QT_H #ifndef TQT_NO_SETTINGS diff --git a/src/tools/qt_tools.pri b/src/tools/qt_tools.pri index 7153653b8..5026f3791 100644 --- a/src/tools/qt_tools.pri +++ b/src/tools/qt_tools.pri @@ -37,7 +37,7 @@ tools { $$TOOLS_H/ntqlocale.h \ $$TOOLS_P/qlocale_p.h \ $$TOOLS_H/ntqptrlist.h \ - $$TOOLS_H/ntqmap.h \ + $$TOOLS_H/tqmap.h \ $$TOOLS_H/ntqmutex.h \ $$TOOLS_P/qmutex_p.h \ $$TOOLS_P/qmutexpool_p.h \ @@ -60,9 +60,9 @@ tools { $$TOOLS_H/ntqthreadstorage.h\ $$TOOLS_P/qunicodetables_p.h \ $$TOOLS_H/ntqptrvector.h \ - $$TOOLS_H/ntqvaluelist.h \ - $$TOOLS_H/ntqvaluestack.h \ - $$TOOLS_H/ntqvaluevector.h \ + $$TOOLS_H/tqvaluelist.h \ + $$TOOLS_H/tqvaluestack.h \ + $$TOOLS_H/tqvaluevector.h \ $$TOOLS_H/ntqwaitcondition.h \ $$TOOLS_P/qcom_p.h \ $$TOOLS_P/qucom_p.h \ @@ -127,7 +127,7 @@ tools { $$TOOLS_CPP/qiodevice.cpp \ $$TOOLS_CPP/qlibrary.cpp \ $$TOOLS_CPP/qlocale.cpp \ - $$TOOLS_CPP/qmap.cpp \ + $$TOOLS_CPP/tqmap.cpp \ $$TOOLS_CPP/qmutexpool.cpp \ $$TOOLS_CPP/qptrcollection.cpp \ $$TOOLS_CPP/qregexp.cpp \ diff --git a/src/tools/qwinexport.cpp b/src/tools/qwinexport.cpp index 1584aa817..244db1cea 100644 --- a/src/tools/qwinexport.cpp +++ b/src/tools/qwinexport.cpp @@ -20,12 +20,12 @@ #include #include #include -#include +#include #include #include #include #include -#include -#include +#include +#include #include #include diff --git a/src/tools/tqmap.cpp b/src/tools/tqmap.cpp new file mode 100644 index 000000000..cbc874c63 --- /dev/null +++ b/src/tools/tqmap.cpp @@ -0,0 +1,257 @@ +/**************************************************************************** +** +** Implementation of TQMap +** +** Created : 990406 +** +** 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 "tqmap.h" + +typedef TQMapNodeBase* NodePtr; +typedef TQMapNodeBase Node; + + +void TQMapPrivateBase::rotateLeft( NodePtr x, NodePtr& root) +{ + NodePtr y = x->right; + x->right = y->left; + if (y->left !=0) + y->left->parent = x; + y->parent = x->parent; + if (x == root) + root = y; + else if (x == x->parent->left) + x->parent->left = y; + else + x->parent->right = y; + y->left = x; + x->parent = y; +} + + +void TQMapPrivateBase::rotateRight( NodePtr x, NodePtr& root ) +{ + NodePtr y = x->left; + x->left = y->right; + if (y->right != 0) + y->right->parent = x; + y->parent = x->parent; + if (x == root) + root = y; + else if (x == x->parent->right) + x->parent->right = y; + else + x->parent->left = y; + y->right = x; + x->parent = y; +} + + +void TQMapPrivateBase::rebalance( NodePtr x, NodePtr& root) +{ + x->color = Node::Red; + while ( x != root && x->parent->color == Node::Red ) { + if ( x->parent == x->parent->parent->left ) { + NodePtr y = x->parent->parent->right; + if (y && y->color == Node::Red) { + x->parent->color = Node::Black; + y->color = Node::Black; + x->parent->parent->color = Node::Red; + x = x->parent->parent; + } else { + if (x == x->parent->right) { + x = x->parent; + rotateLeft( x, root ); + } + x->parent->color = Node::Black; + x->parent->parent->color = Node::Red; + rotateRight (x->parent->parent, root ); + } + } else { + NodePtr y = x->parent->parent->left; + if ( y && y->color == Node::Red ) { + x->parent->color = Node::Black; + y->color = Node::Black; + x->parent->parent->color = Node::Red; + x = x->parent->parent; + } else { + if (x == x->parent->left) { + x = x->parent; + rotateRight( x, root ); + } + x->parent->color = Node::Black; + x->parent->parent->color = Node::Red; + rotateLeft( x->parent->parent, root ); + } + } + } + root->color = Node::Black; +} + + +NodePtr TQMapPrivateBase::removeAndRebalance( NodePtr z, NodePtr& root, + NodePtr& leftmost, + NodePtr& rightmost ) +{ + NodePtr y = z; + NodePtr x; + NodePtr x_parent; + if (y->left == 0) { + x = y->right; + } else { + if (y->right == 0) + x = y->left; + else + { + y = y->right; + while (y->left != 0) + y = y->left; + x = y->right; + } + } + if (y != z) { + z->left->parent = y; + y->left = z->left; + if (y != z->right) { + x_parent = y->parent; + if (x) + x->parent = y->parent; + y->parent->left = x; + y->right = z->right; + z->right->parent = y; + } else { + x_parent = y; + } + if (root == z) + root = y; + else if (z->parent->left == z) + z->parent->left = y; + else + z->parent->right = y; + y->parent = z->parent; + // Swap the colors + Node::Color c = y->color; + y->color = z->color; + z->color = c; + y = z; + } else { + x_parent = y->parent; + if (x) + x->parent = y->parent; + if (root == z) + root = x; + else if (z->parent->left == z) + z->parent->left = x; + else + z->parent->right = x; + if ( leftmost == z ) { + if (z->right == 0) + leftmost = z->parent; + else + leftmost = x->minimum(); + } + if (rightmost == z) { + if (z->left == 0) + rightmost = z->parent; + else + rightmost = x->maximum(); + } + } + if (y->color != Node::Red) { + while (x != root && (x == 0 || x->color == Node::Black)) { + if (x == x_parent->left) { + NodePtr w = x_parent->right; + if (w->color == Node::Red) { + w->color = Node::Black; + x_parent->color = Node::Red; + rotateLeft(x_parent, root); + w = x_parent->right; + } + if ((w->left == 0 || w->left->color == Node::Black) && + (w->right == 0 || w->right->color == Node::Black)) { + w->color = Node::Red; + x = x_parent; + x_parent = x_parent->parent; + } else { + if (w->right == 0 || w->right->color == Node::Black) { + if (w->left) + w->left->color = Node::Black; + w->color = Node::Red; + rotateRight(w, root); + w = x_parent->right; + } + w->color = x_parent->color; + x_parent->color = Node::Black; + if (w->right) + w->right->color = Node::Black; + rotateLeft(x_parent, root); + break; + } + } else { + NodePtr w = x_parent->left; + if (w->color == Node::Red) { + w->color = Node::Black; + x_parent->color = Node::Red; + rotateRight(x_parent, root); + w = x_parent->left; + } + if ((w->right == 0 || w->right->color == Node::Black) && + (w->left == 0 || w->left->color == Node::Black)) { + w->color = Node::Red; + x = x_parent; + x_parent = x_parent->parent; + } else { + if (w->left == 0 || w->left->color == Node::Black) { + if (w->right) + w->right->color = Node::Black; + w->color = Node::Red; + rotateLeft(w, root); + w = x_parent->left; + } + w->color = x_parent->color; + x_parent->color = Node::Black; + if (w->left) + w->left->color = Node::Black; + rotateRight(x_parent, root); + break; + } + } + } + if (x) + x->color = Node::Black; + } + return y; +} diff --git a/src/tools/tqmap.h b/src/tools/tqmap.h new file mode 100644 index 000000000..97a21883a --- /dev/null +++ b/src/tools/tqmap.h @@ -0,0 +1,881 @@ +/**************************************************************************** +** +** Definition of TQMap class +** +** Created : 990406 +** +** 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 TQMAP_H +#define TQMAP_H + +#ifndef QT_H +#include "ntqglobal.h" +#include "ntqshared.h" +#include "ntqdatastream.h" +#include "tqpair.h" +#include "tqvaluelist.h" +#endif // QT_H + +#ifndef TQT_NO_STL +#include +#include +#include +#endif + +//#define QT_CHECK_MAP_RANGE + +struct TQ_EXPORT TQMapNodeBase +{ + enum Color { Red, Black }; + + TQMapNodeBase* left; + TQMapNodeBase* right; + TQMapNodeBase* parent; + + Color color; + + TQMapNodeBase* minimum() { + TQMapNodeBase* x = this; + while ( x->left ) + x = x->left; + return x; + } + + TQMapNodeBase* maximum() { + TQMapNodeBase* x = this; + while ( x->right ) + x = x->right; + return x; + } +}; + + +template +struct TQMapNode : public TQMapNodeBase +{ + TQMapNode( const K& _key, const T& _data ) { data = _data; key = _key; } + TQMapNode( const K& _key ) { key = _key; } + TQMapNode( const TQMapNode& _n ) { key = _n.key; data = _n.data; } + TQMapNode() { } + T data; + K key; +}; + + +template +class TQMapIterator +{ + public: + /** + * Typedefs + */ + typedef TQMapNode< K, T >* NodePtr; +#ifndef TQT_NO_STL + typedef std::bidirectional_iterator_tag iterator_category; +#endif + typedef T value_type; +#ifndef TQT_NO_STL + typedef ptrdiff_t difference_type; +#else + typedef int difference_type; +#endif + typedef T* pointer; + typedef T& reference; + + /** + * Variables + */ + TQMapNode* node; + + /** + * Functions + */ + TQMapIterator() : node( 0 ) {} + TQMapIterator( TQMapNode* p ) : node( p ) {} + TQMapIterator( const TQMapIterator& it ) : node( it.node ) {} + + bool operator==( const TQMapIterator& it ) const { return node == it.node; } + bool operator!=( const TQMapIterator& it ) const { return node != it.node; } + T& operator*() { return node->data; } + const T& operator*() const { return node->data; } + // UDT for T = x* + // T* operator->() const { return &node->data; } + + const K& key() const { return node->key; } + T& data() { return node->data; } + const T& data() const { return node->data; } + +private: + int inc(); + int dec(); + +public: + TQMapIterator& operator++() { + inc(); + return *this; + } + + TQMapIterator operator++(int) { + TQMapIterator tmp = *this; + inc(); + return tmp; + } + + TQMapIterator& operator--() { + dec(); + return *this; + } + + TQMapIterator operator--(int) { + TQMapIterator tmp = *this; + dec(); + return tmp; + } +}; + +template +TQ_INLINE_TEMPLATES int TQMapIterator::inc() +{ + TQMapNodeBase* tmp = node; + if ( tmp->right ) { + tmp = tmp->right; + while ( tmp->left ) + tmp = tmp->left; + } else { + TQMapNodeBase* y = tmp->parent; + while (tmp == y->right) { + tmp = y; + y = y->parent; + } + if (tmp->right != y) + tmp = y; + } + node = (NodePtr)tmp; + return 0; +} + +template +TQ_INLINE_TEMPLATES int TQMapIterator::dec() +{ + TQMapNodeBase* tmp = node; + if (tmp->color == TQMapNodeBase::Red && + tmp->parent->parent == tmp ) { + tmp = tmp->right; + } else if (tmp->left != 0) { + TQMapNodeBase* y = tmp->left; + while ( y->right ) + y = y->right; + tmp = y; + } else { + TQMapNodeBase* y = tmp->parent; + while (tmp == y->left) { + tmp = y; + y = y->parent; + } + tmp = y; + } + node = (NodePtr)tmp; + return 0; +} + +template +class TQMapConstIterator +{ + public: + /** + * Typedefs + */ + typedef TQMapNode< K, T >* NodePtr; +#ifndef TQT_NO_STL + typedef std::bidirectional_iterator_tag iterator_category; +#endif + typedef T value_type; +#ifndef TQT_NO_STL + typedef ptrdiff_t difference_type; +#else + typedef int difference_type; +#endif + typedef const T* pointer; + typedef const T& reference; + + + /** + * Variables + */ + TQMapNode* node; + + /** + * Functions + */ + TQMapConstIterator() : node( 0 ) {} + TQMapConstIterator( TQMapNode* p ) : node( p ) {} + TQMapConstIterator( const TQMapConstIterator& it ) : node( it.node ) {} + TQMapConstIterator( const TQMapIterator& it ) : node( it.node ) {} + + bool operator==( const TQMapConstIterator& it ) const { return node == it.node; } + bool operator!=( const TQMapConstIterator& it ) const { return node != it.node; } + const T& operator*() const { return node->data; } + // UDT for T = x* + // const T* operator->() const { return &node->data; } + + const K& key() const { return node->key; } + const T& data() const { return node->data; } + +private: + int inc(); + int dec(); + +public: + TQMapConstIterator& operator++() { + inc(); + return *this; + } + + TQMapConstIterator operator++(int) { + TQMapConstIterator tmp = *this; + inc(); + return tmp; + } + + TQMapConstIterator& operator--() { + dec(); + return *this; + } + + TQMapConstIterator operator--(int) { + TQMapConstIterator tmp = *this; + dec(); + return tmp; + } +}; + +template +TQ_INLINE_TEMPLATES int TQMapConstIterator::inc() +{ + TQMapNodeBase* tmp = node; + if ( tmp->right ) { + tmp = tmp->right; + while ( tmp->left ) + tmp = tmp->left; + } else { + TQMapNodeBase* y = tmp->parent; + while (tmp == y->right) { + tmp = y; + y = y->parent; + } + if (tmp->right != y) + tmp = y; + } + node = (NodePtr)tmp; + return 0; +} + +template +TQ_INLINE_TEMPLATES int TQMapConstIterator::dec() +{ + TQMapNodeBase* tmp = node; + if (tmp->color == TQMapNodeBase::Red && + tmp->parent->parent == tmp ) { + tmp = tmp->right; + } else if (tmp->left != 0) { + TQMapNodeBase* y = tmp->left; + while ( y->right ) + y = y->right; + tmp = y; + } else { + TQMapNodeBase* y = tmp->parent; + while (tmp == y->left) { + tmp = y; + y = y->parent; + } + tmp = y; + } + node = (NodePtr)tmp; + return 0; +} + +// ### 4.0: rename to something without Private in it. Not really internal. +class TQ_EXPORT TQMapPrivateBase : public TQShared +{ +public: + TQMapPrivateBase() { + node_count = 0; + } + TQMapPrivateBase( const TQMapPrivateBase* _map) { + node_count = _map->node_count; + } + + /** + * Implementations of basic tree algorithms + */ + void rotateLeft( TQMapNodeBase* x, TQMapNodeBase*& root); + void rotateRight( TQMapNodeBase* x, TQMapNodeBase*& root ); + void rebalance( TQMapNodeBase* x, TQMapNodeBase*& root ); + TQMapNodeBase* removeAndRebalance( TQMapNodeBase* z, TQMapNodeBase*& root, + TQMapNodeBase*& leftmost, + TQMapNodeBase*& rightmost ); + + /** + * Variables + */ + int node_count; +}; + + +template +class TQMapPrivate : public TQMapPrivateBase +{ +public: + /** + * Typedefs + */ + typedef TQMapIterator< Key, T > Iterator; + typedef TQMapConstIterator< Key, T > ConstIterator; + typedef TQMapNode< Key, T > Node; + typedef TQMapNode< Key, T >* NodePtr; + + /** + * Functions + */ + TQMapPrivate(); + TQMapPrivate( const TQMapPrivate< Key, T >* _map ); + ~TQMapPrivate() { clear(); delete header; } + + NodePtr copy( NodePtr p ); + void clear(); + void clear( NodePtr p ); + + Iterator begin() { return Iterator( (NodePtr)(header->left ) ); } + Iterator end() { return Iterator( header ); } + ConstIterator begin() const { return ConstIterator( (NodePtr)(header->left ) ); } + ConstIterator end() const { return ConstIterator( header ); } + + ConstIterator find(const Key& k) const; + + void remove( Iterator it ) { + NodePtr del = (NodePtr) removeAndRebalance( it.node, header->parent, header->left, header->right ); + delete del; + --node_count; + } + +#ifdef QT_QMAP_DEBUG + void inorder( TQMapNodeBase* x = 0, int level = 0 ){ + if ( !x ) + x = header->parent; + if ( x->left ) + inorder( x->left, level + 1 ); + //cout << level << " Key=" << key(x) << " Value=" << ((NodePtr)x)->data << endl; + if ( x->right ) + inorder( x->right, level + 1 ); + } +#endif + +#if 0 + Iterator insertMulti(const Key& v){ + TQMapNodeBase* y = header; + TQMapNodeBase* x = header->parent; + while (x != 0){ + y = x; + x = ( v < key(x) ) ? x->left : x->right; + } + return insert(x, y, v); + } +#endif + + Iterator insertSingle( const Key& k ); + Iterator insert( TQMapNodeBase* x, TQMapNodeBase* y, const Key& k ); + +protected: + /** + * Helpers + */ + const Key& key( TQMapNodeBase* b ) const { return ((NodePtr)b)->key; } + + /** + * Variables + */ + NodePtr header; +}; + + +template +TQ_INLINE_TEMPLATES TQMapPrivate::TQMapPrivate() { + header = new Node; + header->color = TQMapNodeBase::Red; // Mark the header + header->parent = 0; + header->left = header->right = header; +} +template +TQ_INLINE_TEMPLATES TQMapPrivate::TQMapPrivate( const TQMapPrivate< Key, T >* _map ) : TQMapPrivateBase( _map ) { + header = new Node; + header->color = TQMapNodeBase::Red; // Mark the header + if ( _map->header->parent == 0 ) { + header->parent = 0; + header->left = header->right = header; + } else { + header->parent = copy( (NodePtr)(_map->header->parent) ); + header->parent->parent = header; + header->left = header->parent->minimum(); + header->right = header->parent->maximum(); + } +} + +template +TQ_INLINE_TEMPLATES TQ_TYPENAME TQMapPrivate::NodePtr TQMapPrivate::copy( TQ_TYPENAME TQMapPrivate::NodePtr p ) +{ + if ( !p ) + return 0; + NodePtr n = new Node( *p ); + n->color = p->color; + if ( p->left ) { + n->left = copy( (NodePtr)(p->left) ); + n->left->parent = n; + } else { + n->left = 0; + } + if ( p->right ) { + n->right = copy( (NodePtr)(p->right) ); + n->right->parent = n; + } else { + n->right = 0; + } + return n; +} + +template +TQ_INLINE_TEMPLATES void TQMapPrivate::clear() +{ + clear( (NodePtr)(header->parent) ); + header->color = TQMapNodeBase::Red; + header->parent = 0; + header->left = header->right = header; + node_count = 0; +} + +template +TQ_INLINE_TEMPLATES void TQMapPrivate::clear( TQ_TYPENAME TQMapPrivate::NodePtr p ) +{ + while ( p != 0 ) { + clear( (NodePtr)p->right ); + NodePtr y = (NodePtr)p->left; + delete p; + p = y; + } +} + +template +TQ_INLINE_TEMPLATES TQ_TYPENAME TQMapPrivate::ConstIterator TQMapPrivate::find(const Key& k) const +{ + TQMapNodeBase* y = header; // Last node + TQMapNodeBase* x = header->parent; // Root node. + + while ( x != 0 ) { + // If as k <= key(x) go left + if ( !( key(x) < k ) ) { + y = x; + x = x->left; + } else { + x = x->right; + } + } + + // Was k bigger/smaller then the biggest/smallest + // element of the tree ? Return end() + if ( y == header || k < key(y) ) + return ConstIterator( header ); + return ConstIterator( (NodePtr)y ); +} + +template +TQ_INLINE_TEMPLATES TQ_TYPENAME TQMapPrivate::Iterator TQMapPrivate::insertSingle( const Key& k ) +{ + // Search correct position in the tree + TQMapNodeBase* y = header; + TQMapNodeBase* x = header->parent; + bool result = TRUE; + while ( x != 0 ) { + result = ( k < key(x) ); + y = x; + x = result ? x->left : x->right; + } + // Get iterator on the last not empty one + Iterator j( (NodePtr)y ); + if ( result ) { + // Smaller then the leftmost one ? + if ( j == begin() ) { + return insert(x, y, k ); + } else { + // Perhaps daddy is the right one ? + --j; + } + } + // Really bigger ? + if ( (j.node->key) < k ) + return insert(x, y, k ); + // We are going to replace a node + return j; +} + + +template +TQ_INLINE_TEMPLATES TQ_TYPENAME TQMapPrivate::Iterator TQMapPrivate::insert( TQMapNodeBase* x, TQMapNodeBase* y, const Key& k ) +{ + NodePtr z = new Node( k ); + if (y == header || x != 0 || k < key(y) ) { + y->left = z; // also makes leftmost = z when y == header + if ( y == header ) { + header->parent = z; + header->right = z; + } else if ( y == header->left ) + header->left = z; // maintain leftmost pointing to min node + } else { + y->right = z; + if ( y == header->right ) + header->right = z; // maintain rightmost pointing to max node + } + z->parent = y; + z->left = 0; + z->right = 0; + rebalance( z, header->parent ); + ++node_count; + return Iterator(z); +} + + +#ifdef QT_CHECK_RANGE +# if !defined( TQT_NO_DEBUG ) && defined( QT_CHECK_MAP_RANGE ) +# define TQT_CHECK_INVALID_MAP_ELEMENT if ( empty() ) tqWarning( "TQMap: Warning invalid element" ) +# define TQT_CHECK_INVALID_MAP_ELEMENT_FATAL Q_ASSERT( !empty() ); +# else +# define TQT_CHECK_INVALID_MAP_ELEMENT +# define TQT_CHECK_INVALID_MAP_ELEMENT_FATAL +# endif +#else +# define TQT_CHECK_INVALID_MAP_ELEMENT +# define TQT_CHECK_INVALID_MAP_ELEMENT_FATAL +#endif + +template class TQDeepCopy; + +template +class TQMap +{ +public: + /** + * Typedefs + */ + typedef Key key_type; + typedef T mapped_type; + typedef TQPair value_type; + typedef value_type* pointer; + typedef const value_type* const_pointer; + typedef value_type& reference; + typedef const value_type& const_reference; +#ifndef TQT_NO_STL + typedef ptrdiff_t difference_type; +#else + typedef int difference_type; +#endif + typedef size_t size_type; + typedef TQMapIterator iterator; + typedef TQMapConstIterator const_iterator; + typedef TQPair insert_pair; + + typedef TQMapIterator< Key, T > Iterator; + typedef TQMapConstIterator< Key, T > ConstIterator; + typedef T ValueType; + typedef TQMapPrivate< Key, T > Priv; + + /** + * API + */ + TQMap() + { + sh = new TQMapPrivate< Key, T >; + } + TQMap( const TQMap& m ) + { + sh = m.sh; sh->ref(); + } + +#ifndef TQT_NO_STL + TQMap( const std::map& m ) + { + sh = new TQMapPrivate; + TQ_TYPENAME std::map::const_iterator it = m.begin(); + for ( ; it != m.end(); ++it ) { + value_type p( (*it).first, (*it).second ); + insert( p ); + } + } +#endif + ~TQMap() + { + if ( sh ) { + if ( sh->deref() ) { + delete sh; + sh = 0L; + } + } + } + TQMap& operator= ( const TQMap& m ); +#ifndef TQT_NO_STL + TQMap& operator= ( const std::map& m ) + { + clear(); + TQ_TYPENAME std::map::const_iterator it = m.begin(); + for ( ; it != m.end(); ++it ) { + value_type p( (*it).first, (*it).second ); + insert( p ); + } + return *this; + } +#endif + + iterator begin() { detach(); return sh->begin(); } + iterator end() { detach(); return sh->end(); } + const_iterator begin() const { return ((const Priv*)sh)->begin(); } + const_iterator end() const { return ((const Priv*)sh)->end(); } + const_iterator constBegin() const { return begin(); } + const_iterator constEnd() const { return end(); } + + iterator replace( const Key& k, const T& v ) + { + remove( k ); + return insert( k, v ); + } + + size_type size() const + { + return sh->node_count; + } + bool empty() const + { + return sh->node_count == 0; + } + TQPair insert( const value_type& x ); + + void erase( iterator it ) + { + detach(); + sh->remove( it ); + } + void erase( const key_type& k ); + size_type count( const key_type& k ) const; + T& operator[] ( const Key& k ); + void clear(); + + iterator find ( const Key& k ) + { + detach(); + return iterator( sh->find( k ).node ); + } + const_iterator find ( const Key& k ) const { return sh->find( k ); } + + const T& operator[] ( const Key& k ) const + { TQT_CHECK_INVALID_MAP_ELEMENT; return sh->find( k ).data(); } + bool contains ( const Key& k ) const + { return find( k ) != end(); } + //{ return sh->find( k ) != ((const Priv*)sh)->end(); } + + size_type count() const { return sh->node_count; } + + TQValueList keys() const { + TQValueList r; + for (const_iterator i=begin(); i!=end(); ++i) + r.append(i.key()); + return r; + } + + TQValueList values() const { + TQValueList r; + for (const_iterator i=begin(); i!=end(); ++i) + r.append(*i); + return r; + } + + bool isEmpty() const { return sh->node_count == 0; } + + iterator insert( const Key& key, const T& value, bool overwrite = TRUE ); + void remove( iterator it ) { detach(); sh->remove( it ); } + void remove( const Key& k ); + +#if defined(TQ_FULL_TEMPLATE_INSTANTIATION) + bool operator==( const TQMap& ) const { return FALSE; } +#ifndef TQT_NO_STL + bool operator==( const std::map& ) const { return FALSE; } +#endif +#endif + +protected: + /** + * Helpers + */ + void detach() { if ( sh->count > 1 ) detachInternal(); } + + Priv* sh; +private: + void detachInternal(); + + friend class TQDeepCopy< TQMap >; +}; + +template +TQ_INLINE_TEMPLATES TQMap& TQMap::operator= ( const TQMap& m ) +{ + m.sh->ref(); + if ( sh->deref() ) + delete sh; + sh = m.sh; + return *this; +} + +template +TQ_INLINE_TEMPLATES TQ_TYPENAME TQMap::insert_pair TQMap::insert( const TQ_TYPENAME TQMap::value_type& x ) +{ + detach(); + size_type n = size(); + iterator it = sh->insertSingle( x.first ); + bool inserted = FALSE; + if ( n < size() ) { + inserted = TRUE; + it.data() = x.second; + } + return TQPair( it, inserted ); +} + +template +TQ_INLINE_TEMPLATES void TQMap::erase( const Key& k ) +{ + detach(); + iterator it( sh->find( k ).node ); + if ( it != end() ) + sh->remove( it ); +} + +template +TQ_INLINE_TEMPLATES TQ_TYPENAME TQMap::size_type TQMap::count( const Key& k ) const +{ + const_iterator it( sh->find( k ).node ); + if ( it != end() ) { + size_type c = 0; + while ( it != end() ) { + ++it; + ++c; + } + return c; + } + return 0; +} + +template +TQ_INLINE_TEMPLATES T& TQMap::operator[] ( const Key& k ) +{ + detach(); + TQMapNode* p = sh->find( k ).node; + if ( p != sh->end().node ) + return p->data; + return insert( k, T() ).data(); +} + +template +TQ_INLINE_TEMPLATES void TQMap::clear() +{ + if ( sh->count == 1 ) + sh->clear(); + else { + sh->deref(); + sh = new TQMapPrivate; + } +} + +template +TQ_INLINE_TEMPLATES TQ_TYPENAME TQMap::iterator TQMap::insert( const Key& key, const T& value, bool overwrite ) +{ + detach(); + size_type n = size(); + iterator it = sh->insertSingle( key ); + if ( overwrite || n < size() ) + it.data() = value; + return it; +} + +template +TQ_INLINE_TEMPLATES void TQMap::remove( const Key& k ) +{ + detach(); + iterator it( sh->find( k ).node ); + if ( it != end() ) + sh->remove( it ); +} + +template +TQ_INLINE_TEMPLATES void TQMap::detachInternal() +{ + sh->deref(); sh = new TQMapPrivate( sh ); +} + + +#ifndef TQT_NO_DATASTREAM +template +TQ_INLINE_TEMPLATES TQDataStream& operator>>( TQDataStream& s, TQMap& m ) { + m.clear(); + TQ_UINT32 c; + s >> c; + for( TQ_UINT32 i = 0; i < c; ++i ) { + Key k; T t; + s >> k >> t; + m.insert( k, t ); + if ( s.atEnd() ) + break; + } + return s; +} + + +template +TQ_INLINE_TEMPLATES TQDataStream& operator<<( TQDataStream& s, const TQMap& m ) { + s << (TQ_UINT32)m.size(); + TQMapConstIterator it = m.begin(); + for( ; it != m.end(); ++it ) + s << it.key() << it.data(); + return s; +} +#endif + +#define Q_DEFINED_QMAP +#include "ntqwinexport.h" +#endif // TQMAP_H diff --git a/src/tools/tqpair.h b/src/tools/tqpair.h new file mode 100644 index 000000000..cd1614685 --- /dev/null +++ b/src/tools/tqpair.h @@ -0,0 +1,109 @@ +/**************************************************************************** +** +** Definition of TQPair 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 TQPAIR_H +#define TQPAIR_H + +#ifndef QT_H +#include "ntqglobal.h" +#include "ntqdatastream.h" +#endif // QT_H + +template +struct TQPair +{ + typedef T1 first_type; + typedef T2 second_type; + + TQPair() + : first( T1() ), second( T2() ) + {} + TQPair( const T1& t1, const T2& t2 ) + : first( t1 ), second( t2 ) + {} + + TQPair& operator=(const TQPair& other) + { + if (this != &other) { + first = other.first; + second = other.second; + } + return *this; + } + + T1 first; + T2 second; +}; + +template +TQ_INLINE_TEMPLATES bool operator==( const TQPair& x, const TQPair& y ) +{ + return x.first == y.first && x.second == y.second; +} + +template +TQ_INLINE_TEMPLATES bool operator<( const TQPair& x, const TQPair& y ) +{ + return x.first < y.first || + ( !( y.first < x.first ) && x.second < y.second ); +} + +template +TQ_INLINE_TEMPLATES TQPair qMakePair( const T1& x, const T2& y ) +{ + return TQPair( x, y ); +} + +#ifndef TQT_NO_DATASTREAM +template +inline TQDataStream& operator>>( TQDataStream& s, TQPair& p ) +{ + s >> p.first >> p.second; + return s; +} + +template +inline TQDataStream& operator<<( TQDataStream& s, const TQPair& p ) +{ + s << p.first << p.second; + return s; +} +#endif + +#endif diff --git a/src/tools/tqvaluelist.h b/src/tools/tqvaluelist.h new file mode 100644 index 000000000..4056290df --- /dev/null +++ b/src/tools/tqvaluelist.h @@ -0,0 +1,681 @@ +/**************************************************************************** +** +** Definition of TQValueList class +** +** Created : 990406 +** +** 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 TQVALUELIST_H +#define TQVALUELIST_H + +#ifndef QT_H +#include "ntqtl.h" +#include "ntqshared.h" +#include "ntqdatastream.h" +#endif // QT_H + +#ifndef TQT_NO_STL +#include +#include +#include +#endif + +//#define QT_CHECK_VALUELIST_RANGE + +template +class TQValueListNode +{ +public: + TQValueListNode( const T& t ) : data( t ) { } + TQValueListNode() { } +#if defined(Q_TEMPLATEDLL) + // Workaround MS bug in memory de/allocation in DLL vs. EXE + virtual ~TQValueListNode() { } +#endif + + TQValueListNode* next; + TQValueListNode* prev; + T data; +}; + +template +class TQValueListIterator +{ + public: + /** + * Typedefs + */ + typedef TQValueListNode* NodePtr; +#ifndef TQT_NO_STL + typedef std::bidirectional_iterator_tag iterator_category; +#endif + typedef T value_type; + typedef size_t size_type; +#ifndef TQT_NO_STL + typedef ptrdiff_t difference_type; +#else + typedef int difference_type; +#endif + typedef T* pointer; + typedef T& reference; + + /** + * Variables + */ + NodePtr node; + + /** + * Functions + */ + TQValueListIterator() : node( 0 ) {} + TQValueListIterator( NodePtr p ) : node( p ) {} + TQValueListIterator( const TQValueListIterator& it ) : node( it.node ) {} + + bool operator==( const TQValueListIterator& it ) const { return node == it.node; } + bool operator!=( const TQValueListIterator& it ) const { return node != it.node; } + const T& operator*() const { return node->data; } + T& operator*() { return node->data; } + const T* operator->() const { return &node->data; } + T* operator->() { return &node->data; } + + TQValueListIterator& operator++() { + node = node->next; + return *this; + } + + TQValueListIterator operator++(int) { + TQValueListIterator tmp = *this; + node = node->next; + return tmp; + } + + TQValueListIterator& operator--() { + node = node->prev; + return *this; + } + + TQValueListIterator operator--(int) { + TQValueListIterator tmp = *this; + node = node->prev; + return tmp; + } + + TQValueListIterator& operator+=( int j ) { + while ( j-- ) + node = node->next; + return *this; + } + + TQValueListIterator& operator-=( int j ) { + while ( j-- ) + node = node->prev; + return *this; + } + +}; + +template +class TQValueListConstIterator +{ + public: + /** + * Typedefs + */ + typedef TQValueListNode* NodePtr; +#ifndef TQT_NO_STL + typedef std::bidirectional_iterator_tag iterator_category; +#endif + typedef T value_type; + typedef size_t size_type; +#ifndef TQT_NO_STL + typedef ptrdiff_t difference_type; +#else + typedef int difference_type; +#endif + typedef const T* pointer; + typedef const T& reference; + + /** + * Variables + */ + NodePtr node; + + /** + * Functions + */ + TQValueListConstIterator() : node( 0 ) {} + TQValueListConstIterator( NodePtr p ) : node( p ) {} + TQValueListConstIterator( const TQValueListConstIterator& it ) : node( it.node ) {} + TQValueListConstIterator( const TQValueListIterator& it ) : node( it.node ) {} + + bool operator==( const TQValueListConstIterator& it ) const { return node == it.node; } + bool operator!=( const TQValueListConstIterator& it ) const { return node != it.node; } + const T& operator*() const { return node->data; } + // UDT for T = x* + // const T* operator->() const { return &node->data; } + + TQValueListConstIterator& operator++() { + node = node->next; + return *this; + } + + TQValueListConstIterator operator++(int) { + TQValueListConstIterator tmp = *this; + node = node->next; + return tmp; + } + + TQValueListConstIterator& operator--() { + node = node->prev; + return *this; + } + + TQValueListConstIterator operator--(int) { + TQValueListConstIterator tmp = *this; + node = node->prev; + return tmp; + } +}; + +template +class TQValueListPrivate : public TQShared +{ +public: + /** + * Typedefs + */ + typedef TQValueListIterator Iterator; + typedef TQValueListConstIterator ConstIterator; + typedef TQValueListNode Node; + typedef TQValueListNode* NodePtr; + typedef size_t size_type; + + /** + * Functions + */ + TQValueListPrivate(); + TQValueListPrivate( const TQValueListPrivate& _p ); + +#if defined(Q_TEMPLATEDLL) + // Workaround MS bug in memory de/allocation in DLL vs. EXE + virtual +#endif + ~TQValueListPrivate(); + + Iterator insert( Iterator it, const T& x ); + Iterator remove( Iterator it ); + NodePtr find( NodePtr start, const T& x ) const; + int findIndex( NodePtr start, const T& x ) const; + uint contains( const T& x ) const; + bool containsYesNo( const T& x ) const; + uint remove( const T& x ); + NodePtr at( size_type i ) const; + void clear(); + + NodePtr node; + size_type nodes; +}; + +template +TQ_INLINE_TEMPLATES TQValueListPrivate::TQValueListPrivate() +{ + node = new Node(); node->next = node->prev = node; nodes = 0; +} + +template +TQ_INLINE_TEMPLATES TQValueListPrivate::TQValueListPrivate( const TQValueListPrivate& _p ) + : TQShared() +{ + node = new Node(); node->next = node->prev = node; nodes = 0; + Iterator b( _p.node->next ); + Iterator e( _p.node ); + Iterator i( node ); + while( b != e ) + insert( i, *b++ ); +} + +template +TQ_INLINE_TEMPLATES TQValueListPrivate::~TQValueListPrivate() { + NodePtr p = node->next; + while( p != node ) { + NodePtr x = p->next; + delete p; + p = x; + } + delete node; +} + +template +TQ_INLINE_TEMPLATES TQ_TYPENAME TQValueListPrivate::Iterator TQValueListPrivate::insert( TQ_TYPENAME TQValueListPrivate::Iterator it, const T& x ) +{ + NodePtr p = new Node( x ); + p->next = it.node; + p->prev = it.node->prev; + it.node->prev->next = p; + it.node->prev = p; + nodes++; + return p; +} + +template +TQ_INLINE_TEMPLATES TQ_TYPENAME TQValueListPrivate::Iterator TQValueListPrivate::remove( TQ_TYPENAME TQValueListPrivate::Iterator it ) +{ + Q_ASSERT ( it.node != node ); + NodePtr next = it.node->next; + NodePtr prev = it.node->prev; + prev->next = next; + next->prev = prev; + delete it.node; + nodes--; + return Iterator( next ); +} + +template +TQ_INLINE_TEMPLATES TQ_TYPENAME TQValueListPrivate::NodePtr TQValueListPrivate::find( TQ_TYPENAME TQValueListPrivate::NodePtr start, const T& x ) const +{ + ConstIterator first( start ); + ConstIterator last( node ); + while( first != last) { + if ( *first == x ) + return first.node; + ++first; + } + return last.node; +} + +template +TQ_INLINE_TEMPLATES int TQValueListPrivate::findIndex( TQ_TYPENAME TQValueListPrivate::NodePtr start, const T& x ) const +{ + ConstIterator first( start ); + ConstIterator last( node ); + int pos = 0; + while( first != last) { + if ( *first == x ) + return pos; + ++first; + ++pos; + } + return -1; +} + +template +TQ_INLINE_TEMPLATES uint TQValueListPrivate::contains( const T& x ) const +{ + uint result = 0; + Iterator first = Iterator( node->next ); + Iterator last = Iterator( node ); + while( first != last) { + if ( *first == x ) + ++result; + ++first; + } + return result; +} + +template +TQ_INLINE_TEMPLATES bool TQValueListPrivate::containsYesNo( const T& x ) const +{ + Iterator first = Iterator( node->next ); + Iterator last = Iterator( node ); + while( first != last) { + if ( *first == x ) + return true; + ++first; + } + return false; +} + +template +TQ_INLINE_TEMPLATES uint TQValueListPrivate::remove( const T& _x ) +{ + const T x = _x; + uint result = 0; + Iterator first = Iterator( node->next ); + Iterator last = Iterator( node ); + while( first != last) { + if ( *first == x ) { + first = remove( first ); + ++result; + } else + ++first; + } + return result; +} + +template +TQ_INLINE_TEMPLATES TQ_TYPENAME TQValueListPrivate::NodePtr TQValueListPrivate::at( size_type i ) const +{ + Q_ASSERT( i <= nodes ); + NodePtr p = node->next; + for( size_type x = 0; x < i; ++x ) + p = p->next; + return p; +} + +template +TQ_INLINE_TEMPLATES void TQValueListPrivate::clear() +{ + nodes = 0; + NodePtr p = node->next; + while( p != node ) { + NodePtr next = p->next; + delete p; + p = next; + } + node->next = node->prev = node; +} + +#ifdef QT_CHECK_RANGE +# if !defined( TQT_NO_DEBUG ) && defined( QT_CHECK_VALUELIST_RANGE ) +# define QT_CHECK_INVALID_LIST_ELEMENT if ( empty() ) tqWarning( "TQValueList: Warning invalid element" ) +# define QT_CHECK_INVALID_LIST_ELEMENT_FATAL Q_ASSERT( !empty() ); +# else +# define QT_CHECK_INVALID_LIST_ELEMENT +# define QT_CHECK_INVALID_LIST_ELEMENT_FATAL +# endif +#else +# define QT_CHECK_INVALID_LIST_ELEMENT +# define QT_CHECK_INVALID_LIST_ELEMENT_FATAL +#endif + +template class TQDeepCopy; + +template +class TQValueList +{ +public: + /** + * Typedefs + */ + typedef TQValueListIterator iterator; + typedef TQValueListConstIterator const_iterator; + typedef T value_type; + typedef value_type* pointer; + typedef const value_type* const_pointer; + typedef value_type& reference; + typedef const value_type& const_reference; + typedef size_t size_type; +#ifndef TQT_NO_STL + typedef ptrdiff_t difference_type; +#else + typedef int difference_type; +#endif + + /** + * API + */ + TQValueList() { sh = new TQValueListPrivate; } + TQValueList( const TQValueList& l ) { sh = l.sh; sh->ref(); } +#ifndef TQT_NO_STL + TQValueList( const std::list& l ) + { + sh = new TQValueListPrivate; + tqCopy( l.begin(), l.end(), std::back_inserter( *this ) ); + } +#endif + ~TQValueList() + { + if (sh->deref()) + delete sh; + } + + TQValueList& operator= ( const TQValueList& l ) + { + if (this == &l || sh == l.sh) + return *this; // Do nothing is self-assigning + l.sh->ref(); + if (sh->deref()) + delete sh; + sh = l.sh; + return *this; + } + +#ifndef TQT_NO_STL + TQValueList& operator= ( const std::list& l ) + { + detach(); + tqCopy( l.begin(), l.end(), std::back_inserter( *this ) ); + return *this; + } + + bool operator== ( const std::list& l ) const + { + if ( size() != l.size() ) + return FALSE; + const_iterator it2 = begin(); +#if !defined(Q_CC_MIPS) + typename +#endif + std::list::const_iterator it = l.begin(); + for ( ; it2 != end(); ++it2, ++it ) + if ( !((*it2) == (*it)) ) + return FALSE; + return TRUE; + } +#endif + bool operator== ( const TQValueList& l ) const; + bool operator!= ( const TQValueList& l ) const { return !( *this == l ); } + iterator begin() { detach(); return iterator( sh->node->next ); } + const_iterator begin() const { return const_iterator( sh->node->next ); } + const_iterator constBegin() const { return const_iterator( sh->node->next ); } + iterator end() { detach(); return iterator( sh->node ); } + const_iterator end() const { return const_iterator( sh->node ); } + const_iterator constEnd() const { return const_iterator( sh->node ); } + iterator insert( iterator it, const T& x ) { detach(); return sh->insert( it, x ); } + uint remove( const T& x ) { detach(); return sh->remove( x ); } + void clear(); + + // ### 4.0: move out of class + TQValueList& operator<< ( const T& x ) + { + append( x ); + return *this; + } + + size_type size() const { return sh->nodes; } + bool empty() const { return sh->nodes == 0; } + void push_front( const T& x ) { detach(); sh->insert( begin(), x ); } + void push_back( const T& x ) { detach(); sh->insert( end(), x ); } + iterator erase( iterator pos ) { detach(); return sh->remove( pos ); } + iterator erase( iterator first, iterator last ); + reference front() { QT_CHECK_INVALID_LIST_ELEMENT_FATAL; return *begin(); } + const_reference front() const { QT_CHECK_INVALID_LIST_ELEMENT_FATAL; return *begin(); } + reference back() { QT_CHECK_INVALID_LIST_ELEMENT_FATAL; return *(--end()); } + const_reference back() const { QT_CHECK_INVALID_LIST_ELEMENT_FATAL; return *(--end()); } + void pop_front() { QT_CHECK_INVALID_LIST_ELEMENT; erase( begin() ); } + void pop_back() { + QT_CHECK_INVALID_LIST_ELEMENT; + iterator tmp = end(); + erase( --tmp ); + } + void insert( iterator pos, size_type n, const T& x ); + // Some compilers (incl. vc++) would instantiate this function even if + // it is not used; this would constrain TQValueList to classes that provide + // an operator< + /* + void sort() + { + qHeapSort( *this ); + } + */ + + TQValueList operator+ ( const TQValueList& l ) const; + TQValueList& operator+= ( const TQValueList& l ); + + iterator fromLast() { detach(); return iterator( sh->node->prev ); } + const_iterator fromLast() const { return const_iterator( sh->node->prev ); } + + bool isEmpty() const { return ( sh->nodes == 0 ); } + + iterator append( const T& x ) { detach(); return sh->insert( end(), x ); } + iterator prepend( const T& x ) { detach(); return sh->insert( begin(), x ); } + + iterator remove( iterator it ) { detach(); return sh->remove( it ); } + + T& first() { QT_CHECK_INVALID_LIST_ELEMENT; detach(); return sh->node->next->data; } + const T& first() const { QT_CHECK_INVALID_LIST_ELEMENT; return sh->node->next->data; } + T& last() { QT_CHECK_INVALID_LIST_ELEMENT; detach(); return sh->node->prev->data; } + const T& last() const { QT_CHECK_INVALID_LIST_ELEMENT; return sh->node->prev->data; } + + T& operator[] ( size_type i ) { QT_CHECK_INVALID_LIST_ELEMENT; detach(); return sh->at(i)->data; } + const T& operator[] ( size_type i ) const { QT_CHECK_INVALID_LIST_ELEMENT; return sh->at(i)->data; } + iterator at( size_type i ) { QT_CHECK_INVALID_LIST_ELEMENT; detach(); return iterator( sh->at(i) ); } + const_iterator at( size_type i ) const { QT_CHECK_INVALID_LIST_ELEMENT; return const_iterator( sh->at(i) ); } + iterator find ( const T& x ) { detach(); return iterator( sh->find( sh->node->next, x) ); } + const_iterator find ( const T& x ) const { return const_iterator( sh->find( sh->node->next, x) ); } + iterator find ( iterator it, const T& x ) { detach(); return iterator( sh->find( it.node, x ) ); } + const_iterator find ( const_iterator it, const T& x ) const { return const_iterator( sh->find( it.node, x ) ); } + int findIndex( const T& x ) const { return sh->findIndex( sh->node->next, x) ; } + size_type contains( const T& x ) const { return sh->contains( x ); } + bool containsYesNo( const T& x ) const { return sh->containsYesNo( x ); } + + size_type count() const { return sh->nodes; } + + TQValueList& operator+= ( const T& x ) + { + append( x ); + return *this; + } + typedef TQValueListIterator Iterator; + typedef TQValueListConstIterator ConstIterator; + typedef T ValueType; + +protected: + /** + * Helpers + */ + void detach() + { + if (sh->count > 1) + { + sh->deref(); + sh = new TQValueListPrivate(*sh); + } + } + + /** + * Variables + */ + TQValueListPrivate* sh; + +private: + friend class TQDeepCopy< TQValueList >; +}; + +template +TQ_INLINE_TEMPLATES bool TQValueList::operator== ( const TQValueList& l ) const +{ + if ( size() != l.size() ) + return FALSE; + const_iterator it2 = begin(); + const_iterator it = l.begin(); + for( ; it != l.end(); ++it, ++it2 ) + if ( !( *it == *it2 ) ) + return FALSE; + return TRUE; +} + +template +TQ_INLINE_TEMPLATES void TQValueList::clear() +{ + if ( sh->count == 1 ) sh->clear(); else { sh->deref(); sh = new TQValueListPrivate(); } +} + +template +TQ_INLINE_TEMPLATES TQ_TYPENAME TQValueList::iterator TQValueList::erase( TQ_TYPENAME TQValueList::iterator first, TQ_TYPENAME TQValueList::iterator last ) +{ + while ( first != last ) + erase( first++ ); + return last; +} + + +template +TQ_INLINE_TEMPLATES void TQValueList::insert( TQ_TYPENAME TQValueList::iterator pos, size_type n, const T& x ) +{ + for ( ; n > 0; --n ) + insert( pos, x ); +} + +template +TQ_INLINE_TEMPLATES TQValueList TQValueList::operator+ ( const TQValueList& l ) const +{ + TQValueList l2( *this ); + for( const_iterator it = l.begin(); it != l.end(); ++it ) + l2.append( *it ); + return l2; +} + +template +TQ_INLINE_TEMPLATES TQValueList& TQValueList::operator+= ( const TQValueList& l ) +{ + TQValueList copy = l; + for( const_iterator it = copy.begin(); it != copy.end(); ++it ) + append( *it ); + return *this; +} + +#ifndef TQT_NO_DATASTREAM +template +TQ_INLINE_TEMPLATES TQDataStream& operator>>( TQDataStream& s, TQValueList& l ) +{ + l.clear(); + TQ_UINT32 c; + s >> c; + for( TQ_UINT32 i = 0; i < c && !s.atEnd(); ++i ) + { + T t; + s >> t; + l.append( t ); + } + return s; +} + +template +TQ_INLINE_TEMPLATES TQDataStream& operator<<( TQDataStream& s, const TQValueList& l ) +{ + s << (TQ_UINT32)l.size(); + TQValueListConstIterator it = l.begin(); + for( ; it != l.end(); ++it ) + s << *it; + return s; +} +#endif // TQT_NO_DATASTREAM + +#define Q_DEFINED_QVALUELIST +#define Q_DEFINED_QVALUELIST +#include "ntqwinexport.h" +#endif // TQVALUELIST_H diff --git a/src/tools/tqvaluestack.h b/src/tools/tqvaluestack.h new file mode 100644 index 000000000..5d76820de --- /dev/null +++ b/src/tools/tqvaluestack.h @@ -0,0 +1,67 @@ +/**************************************************************************** +** +** Definition of TQValueStack class +** +** Created : 990925 +** +** 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 TQVALUESTACK_H +#define TQVALUESTACK_H + +#ifndef QT_H +#include "tqvaluelist.h" +#endif // QT_H + + +template +class TQValueStack : public TQValueList +{ +public: + TQValueStack() {} + ~TQValueStack() {} + void push( const T& d ) { this->append(d); } + T pop() + { + T elem( this->last() ); + if ( !this->isEmpty() ) + this->remove( this->fromLast() ); + return elem; + } + T& top() { return this->last(); } + const T& top() const { return this->last(); } +}; + +#endif diff --git a/src/tools/tqvaluevector.h b/src/tools/tqvaluevector.h new file mode 100644 index 000000000..90dc45e10 --- /dev/null +++ b/src/tools/tqvaluevector.h @@ -0,0 +1,577 @@ +/**************************************************************************** +** +** Definition of TQValueVector 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 TQVALUEVECTOR_H +#define TQVALUEVECTOR_H + +#include + +#ifndef QT_H +#include "ntqtl.h" +#include "ntqshared.h" +#include "ntqdatastream.h" +#endif // QT_H + +#ifndef TQT_NO_STL +#include +#endif + +template +class TQValueVectorPrivate : public TQShared +{ +public: + typedef T value_type; + typedef T* pointer; + + TQValueVectorPrivate() + : start( 0 ), finish( 0 ), end( 0 ) + { + } + + TQValueVectorPrivate( const TQValueVectorPrivate& x ); + TQValueVectorPrivate( size_t size ); + + void derefAndDelete() // work-around for hp-cc + { + if ( deref() ) + delete this; + } + +#if defined(Q_TEMPLATEDLL) + // Workaround MS bug in memory de/allocation in DLL vs. EXE + virtual +#endif + ~TQValueVectorPrivate() + { + delete[] start; + } + + size_t size() const + { + return finish - start; + } + + bool empty() const + { + return start == finish; + } + + size_t capacity() const + { + return end - start; + } + + void insert( pointer pos, const T& x ); + void insert( pointer pos, size_t n, const T& x ); + void reserve( size_t n ); + + void clear() + { + delete[] start; + start = 0; + finish = 0; + end = 0; + } + + + pointer start; + pointer finish; + pointer end; + +private: + pointer growAndCopy( size_t n, pointer s, pointer f ); + + TQValueVectorPrivate& operator=( const TQValueVectorPrivate& x ); + +}; + +template +TQ_INLINE_TEMPLATES TQValueVectorPrivate::TQValueVectorPrivate( const TQValueVectorPrivate& x ) + : TQShared() +{ + size_t i = x.size(); + if ( i > 0 ) { + start = new T[ i ]; + finish = start + i; + end = start + i; +#if defined(__xlC__) && __xlC__ < 0x400 // xlC 3.6 confused by const + tqCopy( (pointer)x.start, (pointer)x.finish, start ); +#else + tqCopy( x.start, x.finish, start ); +#endif + } else { + start = 0; + finish = 0; + end = 0; + } +} + +template +TQ_INLINE_TEMPLATES TQValueVectorPrivate::TQValueVectorPrivate( size_t size ) +{ + if ( size > 0 ) { + start = new T[size]; + finish = start + size; + end = start + size; + } else { + start = 0; + finish = 0; + end = 0; + } +} + +template +TQ_INLINE_TEMPLATES void TQValueVectorPrivate::insert( pointer pos, const T& x ) +{ + const size_t lastSize = size(); + const size_t n = lastSize !=0 ? 2*lastSize : 1; + const size_t offset = pos - start; + pointer newStart = new T[n]; + pointer newFinish = newStart + offset; + tqCopy( start, pos, newStart ); + *newFinish = x; + tqCopy( pos, finish, ++newFinish ); + delete[] start; + start = newStart; + finish = newStart + lastSize + 1; + end = newStart + n; +} + +template +TQ_INLINE_TEMPLATES void TQValueVectorPrivate::insert( pointer pos, size_t n, const T& x ) +{ + if ( size_t( end - finish ) >= n ) { + // enough room + const size_t elems_after = finish - pos; + pointer old_finish = finish; + if ( elems_after > n ) { + tqCopy( finish - n, finish, finish ); + finish += n; + tqCopyBackward( pos, old_finish - n, old_finish ); + tqFill( pos, pos + n, x ); + } else { + pointer filler = finish; + size_t i = n - elems_after; + for ( ; i > 0; --i, ++filler ) + *filler = x; + finish += n - elems_after; + tqCopy( pos, old_finish, finish ); + finish += elems_after; + tqFill( pos, old_finish, x ); + } + } else { + // not enough room + const size_t lastSize = size(); + const size_t len = lastSize + TQMAX( lastSize, n ); + pointer newStart = new T[len]; + pointer newFinish = tqCopy( start, pos, newStart ); + // fill up inserted space + size_t i = n; + for ( ; i > 0; --i, ++newFinish ) + *newFinish = x; + newFinish = tqCopy( pos, finish, newFinish ); + delete[] start; + start = newStart; + finish = newFinish; + end = newStart + len; + } +} + +template +TQ_INLINE_TEMPLATES void TQValueVectorPrivate::reserve( size_t n ) +{ + const size_t lastSize = size(); + pointer tmp = growAndCopy( n, start, finish ); + start = tmp; + finish = tmp + lastSize; + end = start + n; +} + +template +TQ_INLINE_TEMPLATES TQ_TYPENAME TQValueVectorPrivate::pointer TQValueVectorPrivate::growAndCopy( size_t n, pointer s, pointer f ) +{ + pointer newStart = new T[n]; + tqCopy( s, f, newStart ); + delete[] start; + return newStart; +} + +template class TQDeepCopy; + +template +class TQValueVector +{ +public: + typedef T value_type; + typedef value_type* pointer; + typedef const value_type* const_pointer; + typedef value_type* iterator; + typedef const value_type* const_iterator; + typedef value_type& reference; + typedef const value_type& const_reference; + typedef size_t size_type; +#ifndef TQT_NO_STL + typedef ptrdiff_t difference_type; +#else + typedef int difference_type; +#endif + + TQValueVector() + { + sh = new TQValueVectorPrivate; + } + + TQValueVector( const TQValueVector& v ) + { + sh = v.sh; + sh->ref(); + } + + TQValueVector( size_type n, const T& val = T() ); + +#ifndef TQT_NO_STL + TQValueVector( std::vector& v ) // ### remove in 4.0 + { + sh = new TQValueVectorPrivate( v.size() ); + tqCopy( v.begin(), v.end(), begin() ); + } + + TQValueVector( const std::vector& v ) + { + sh = new TQValueVectorPrivate( v.size() ); + tqCopy( v.begin(), v.end(), begin() ); + } +#endif + + ~TQValueVector() + { + sh->derefAndDelete(); + } + + TQValueVector& operator= ( const TQValueVector& v ) + { + v.sh->ref(); + sh->derefAndDelete(); + sh = v.sh; + return *this; + } + +#ifndef TQT_NO_STL + TQValueVector& operator= ( const std::vector& v ) + { + clear(); + resize( v.size() ); + tqCopy( v.begin(), v.end(), begin() ); + return *this; + } +#endif + + size_type size() const { return sh->size(); } + + bool empty() const { return sh->empty(); } + + size_type capacity() const + { + return size_type( sh->capacity() ); + } + + iterator begin() + { + detach(); + return sh->start; + } + + const_iterator begin() const + { + return sh->start; + } + + const_iterator constBegin() const + { + return sh->start; + } + + iterator end() + { + detach(); + return sh->finish; + } + + const_iterator end() const + { + return sh->finish; + } + + const_iterator constEnd() const + { + return sh->finish; + } + + reference at( size_type i, bool* ok = 0 ) + { + detach(); + if ( ok ) + *ok = ( i < size() ); + return *( begin() + i ); + } + + const_reference at( size_type i, bool* ok = 0 ) const + { + if ( ok ) + *ok = ( i < size() ); + return *( begin() + i ); + } + + reference operator[]( size_type i ) + { + detach(); + return *( begin() + i ); + } + + const_reference operator[]( size_type i ) const + { + return *( begin() + i ); + } + + reference front() + { + Q_ASSERT( !empty() ); + detach(); + return *begin(); + } + + const_reference front() const + { + Q_ASSERT( !empty() ); + return *begin(); + } + + reference back() + { + Q_ASSERT( !empty() ); + detach(); + return *( end() - 1 ); + } + + const_reference back() const + { + Q_ASSERT( !empty() ); + return *( end() - 1 ); + } + + void push_back( const T& x ) + { + detach(); + if ( sh->finish == sh->end ) { + sh->reserve( size()+size()/2+1 ); + } + *sh->finish = x; + ++sh->finish; + } + + void pop_back() + { + detach(); + if ( empty() ) + return; + --sh->finish; + } + + iterator insert( iterator pos, const T& x ); + iterator insert( iterator pos, size_type n, const T& x ); + + void reserve( size_type n ) + { + if ( capacity() < n ) { + detach(); + sh->reserve( n ); + } + } + + void resize( size_type n, const T& val = T() ) + { + if ( n < size() ) + erase( begin() + n, end() ); + else + insert( end(), n - size(), val ); + } + + void clear() + { + detach(); + sh->clear(); + } + + iterator erase( iterator pos ) + { + detach(); + if ( pos + 1 != end() ) + tqCopy( pos + 1, sh->finish, pos ); + --sh->finish; + return pos; + } + + iterator erase( iterator first, iterator last ) + { + detach(); + tqCopy( last, sh->finish, first ); + sh->finish = sh->finish - ( last - first ); + return first; + } + + // ### remove in TQt 4.0 + bool operator==( const TQValueVector& x ) + { + return size()==x.size() ? tqEqual( constBegin(), constEnd(), x.begin()) : FALSE; + } + + bool operator==( const TQValueVector& x ) const + { + return size()==x.size() ? tqEqual( begin(), end(), x.begin() ) : FALSE; + } + + typedef T ValueType; + typedef ValueType *Iterator; + typedef const ValueType *ConstIterator; + + size_type count() const { return size(); } + bool isEmpty() const { return empty(); } + + reference first() { return front(); } + const_reference first() const { return front(); } + reference last() { return back(); } + const_reference last() const { return back(); } + void append( const T& x ) { push_back( x ); } + +protected: + void detach() + { + if ( sh->count > 1 ) { detachInternal(); } + } + void detachInternal(); + TQValueVectorPrivate* sh; + +private: + friend class TQDeepCopy< TQValueVector >; +}; + +template +TQ_INLINE_TEMPLATES TQValueVector::TQValueVector( size_type n, const T& val ) +{ + sh = new TQValueVectorPrivate( n ); + tqFill( begin(), end(), val ); +} + +template +TQ_INLINE_TEMPLATES void TQValueVector::detachInternal() +{ + sh->deref(); + sh = new TQValueVectorPrivate( *sh ); +} + +template +TQ_INLINE_TEMPLATES TQ_TYPENAME TQValueVector::iterator TQValueVector::insert( iterator pos, const T& x ) +{ + size_type offset = pos - sh->start; + detach(); + if ( pos == end() ) { + if ( sh->finish == sh->end ) + push_back( x ); + else { + *sh->finish = x; + ++sh->finish; + } + } else { + if ( sh->finish == sh->end ) { + sh->insert( pos, x ); + } else { + *sh->finish = *(sh->finish - 1); + ++sh->finish; + tqCopyBackward( pos, sh->finish - 2, sh->finish - 1 ); + *pos = x; + } + } + return begin() + offset; +} + +template +TQ_INLINE_TEMPLATES TQ_TYPENAME TQValueVector::iterator TQValueVector::insert( iterator pos, size_type n, const T& x ) +{ + if ( n != 0 ) { + size_type offset = pos - sh->start; + detach(); + pos = begin() + offset; + sh->insert( pos, n, x ); + } + return pos; +} + + +#ifndef TQT_NO_DATASTREAM +template +TQ_INLINE_TEMPLATES TQDataStream& operator>>( TQDataStream& s, TQValueVector& v ) +{ + v.clear(); + TQ_UINT32 c; + s >> c; + v.resize( c ); + for( TQ_UINT32 i = 0; i < c; ++i ) + { + T t; + s >> t; + v[i] = t; + } + return s; +} + +template +TQ_INLINE_TEMPLATES TQDataStream& operator<<( TQDataStream& s, const TQValueVector& v ) +{ + s << (TQ_UINT32)v.size(); + // ### use typename TQValueVector::const_iterator once all supported + // ### compilers know about the 'typename' keyword. + const T* it = v.begin(); + for( ; it != v.end(); ++it ) + s << *it; + return s; +} +#endif // TQT_NO_DATASTREAM + +#define Q_DEFINED_QVALUEVECTOR +#include "ntqwinexport.h" +#endif // TQVALUEVECTOR_H diff --git a/src/widgets/ntqdockarea.h b/src/widgets/ntqdockarea.h index ee9201597..85dce12b5 100644 --- a/src/widgets/ntqdockarea.h +++ b/src/widgets/ntqdockarea.h @@ -46,7 +46,7 @@ #include "ntqptrlist.h" #include "ntqdockwindow.h" #include "ntqlayout.h" -#include "ntqvaluelist.h" +#include "tqvaluelist.h" #include "ntqguardedptr.h" #include "ntqtextstream.h" #endif // QT_H diff --git a/src/widgets/ntqsplitter.h b/src/widgets/ntqsplitter.h index 887b1b265..425b9718f 100644 --- a/src/widgets/ntqsplitter.h +++ b/src/widgets/ntqsplitter.h @@ -43,7 +43,7 @@ #ifndef QT_H #include "ntqframe.h" -#include "ntqvaluelist.h" +#include "tqvaluelist.h" #endif // QT_H #ifndef TQT_NO_SPLITTER diff --git a/src/widgets/ntqtextedit.h b/src/widgets/ntqtextedit.h index 322fb4e00..f14e06ff8 100644 --- a/src/widgets/ntqtextedit.h +++ b/src/widgets/ntqtextedit.h @@ -45,7 +45,7 @@ #include "ntqscrollview.h" #include "ntqstylesheet.h" #include "ntqptrvector.h" -#include "ntqvaluelist.h" +#include "tqvaluelist.h" #include "ntqptrlist.h" #endif // QT_H diff --git a/src/widgets/qdatetimeedit.cpp b/src/widgets/qdatetimeedit.cpp index 0084be77d..c8ebee765 100644 --- a/src/widgets/qdatetimeedit.cpp +++ b/src/widgets/qdatetimeedit.cpp @@ -48,7 +48,7 @@ #include "ntqapplication.h" #include "ntqpixmap.h" #include "ntqapplication.h" -#include "ntqvaluelist.h" +#include "tqvaluelist.h" #include "ntqstring.h" #include "ntqstyle.h" diff --git a/src/widgets/qdialogbuttons.cpp b/src/widgets/qdialogbuttons.cpp index 8f32fd61d..ed1f4064c 100644 --- a/src/widgets/qdialogbuttons.cpp +++ b/src/widgets/qdialogbuttons.cpp @@ -42,14 +42,14 @@ #include #include #include -#include +#include #include #ifndef TQT_NO_DIALOG #include #endif // TQT_NO_DIALOG #include #include -#include +#include struct TQDialogButtonsPrivate { diff --git a/src/widgets/qdockarea.cpp b/src/widgets/qdockarea.cpp index 3693a036d..1f982a1de 100644 --- a/src/widgets/qdockarea.cpp +++ b/src/widgets/qdockarea.cpp @@ -47,7 +47,7 @@ #include "ntqapplication.h" #include "ntqpainter.h" #include "tqwidgetlist.h" -#include "ntqmap.h" +#include "tqmap.h" #include "ntqmainwindow.h" //#define TQDOCKAREA_DEBUG diff --git a/src/widgets/qlineedit.cpp b/src/widgets/qlineedit.cpp index 68048abcd..3fb88d21e 100644 --- a/src/widgets/qlineedit.cpp +++ b/src/widgets/qlineedit.cpp @@ -62,7 +62,7 @@ #include "ntqwhatsthis.h" #include "../kernel/qinternal_p.h" #include "private/qtextlayout_p.h" -#include "ntqvaluevector.h" +#include "tqvaluevector.h" #if defined(Q_OS_LINUX) #include #endif diff --git a/src/widgets/qmainwindow.cpp b/src/widgets/qmainwindow.cpp index 970d8cdf4..3510c8290 100644 --- a/src/widgets/qmainwindow.cpp +++ b/src/widgets/qmainwindow.cpp @@ -47,7 +47,7 @@ #include "ntqintdict.h" #include "ntqapplication.h" #include "ntqptrlist.h" -#include "ntqmap.h" +#include "tqmap.h" #include "ntqcursor.h" #include "ntqpainter.h" #include "ntqmenubar.h" diff --git a/src/widgets/qtextbrowser.cpp b/src/widgets/qtextbrowser.cpp index 0cc40aa64..c9baa8144 100644 --- a/src/widgets/qtextbrowser.cpp +++ b/src/widgets/qtextbrowser.cpp @@ -46,7 +46,7 @@ #include "ntqlayout.h" #include "ntqpainter.h" -#include "ntqvaluestack.h" +#include "tqvaluestack.h" #include "stdio.h" #include "ntqfile.h" #include "ntqtextstream.h" diff --git a/src/widgets/qtoolbox.cpp b/src/widgets/qtoolbox.cpp index a04c78dbe..9b4eec8e3 100644 --- a/src/widgets/qtoolbox.cpp +++ b/src/widgets/qtoolbox.cpp @@ -51,7 +51,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/xml/qsvgdevice.cpp b/src/xml/qsvgdevice.cpp index 02fa7933f..ceeb8b6e6 100644 --- a/src/xml/qsvgdevice.cpp +++ b/src/xml/qsvgdevice.cpp @@ -43,9 +43,9 @@ #include "ntqpainter.h" #include "ntqpaintdevicemetrics.h" #include "ntqfile.h" -#include "ntqmap.h" +#include "tqmap.h" #include "ntqregexp.h" -#include "ntqvaluelist.h" +#include "tqvaluelist.h" #include "ntqtextstream.h" #include "ntqimage.h" #include "ntqpixmap.h" diff --git a/src/xml/tqxml.cpp b/src/xml/tqxml.cpp index 11d6ab169..a0d3f7f18 100644 --- a/src/xml/tqxml.cpp +++ b/src/xml/tqxml.cpp @@ -43,8 +43,8 @@ #include "ntqbuffer.h" #include "ntqregexp.h" #include "ntqptrstack.h" -#include "ntqmap.h" -#include "ntqvaluestack.h" +#include "tqmap.h" +#include "tqvaluestack.h" // needed for TQT_TRANSLATE_NOOP: #include "tqobject.h" diff --git a/src/xml/tqxml.h b/src/xml/tqxml.h index b2f86dc93..caff6f125 100644 --- a/src/xml/tqxml.h +++ b/src/xml/tqxml.h @@ -46,7 +46,7 @@ #include "ntqfile.h" #include "ntqstring.h" #include "ntqstringlist.h" -#include "ntqvaluevector.h" +#include "tqvaluevector.h" #endif // QT_H #if !defined(TQT_MODULE_XML) || defined( QT_LICENSE_PROFESSIONAL ) || defined( QT_INTERNAL_XML ) diff --git a/tools/assistant/config.h b/tools/assistant/config.h index 3bf6c6ad1..8d4f0ecaa 100644 --- a/tools/assistant/config.h +++ b/tools/assistant/config.h @@ -39,7 +39,7 @@ #include #include #include -#include +#include class Profile; diff --git a/tools/assistant/docuparser.h b/tools/assistant/docuparser.h index f120f05be..f27957cce 100644 --- a/tools/assistant/docuparser.h +++ b/tools/assistant/docuparser.h @@ -36,7 +36,7 @@ #include #include -#include +#include class Profile; diff --git a/tools/assistant/helpdialogimpl.h b/tools/assistant/helpdialogimpl.h index 08db2fc20..1c0585fb5 100644 --- a/tools/assistant/helpdialogimpl.h +++ b/tools/assistant/helpdialogimpl.h @@ -41,7 +41,7 @@ #include #include -#include +#include #include #include #include diff --git a/tools/assistant/mainwindow.ui b/tools/assistant/mainwindow.ui index 7087e2f3a..b4ffa8f4a 100644 --- a/tools/assistant/mainwindow.ui +++ b/tools/assistant/mainwindow.ui @@ -598,7 +598,7 @@ tabbedbrowser.h ntqptrlist.h ntqguardedptr.h - ntqmap.h + tqmap.h finddialog.h ntqstringlist.h helpwindow.h diff --git a/tools/assistant/profile.h b/tools/assistant/profile.h index 5d3dd34e9..9514fbe1c 100644 --- a/tools/assistant/profile.h +++ b/tools/assistant/profile.h @@ -37,7 +37,7 @@ #include #include #include -#include +#include class DocuParser; diff --git a/tools/assistant/settingsdialogimpl.cpp b/tools/assistant/settingsdialogimpl.cpp index e9111d6d9..5cf462b4b 100644 --- a/tools/assistant/settingsdialogimpl.cpp +++ b/tools/assistant/settingsdialogimpl.cpp @@ -51,7 +51,7 @@ #include #include #include -#include +#include SettingsDialog::SettingsDialog( TQWidget *parent, const char* name ) diff --git a/tools/designer/designer/actiondnd.h b/tools/designer/designer/actiondnd.h index d444dcd5a..29d454a05 100644 --- a/tools/designer/designer/actiondnd.h +++ b/tools/designer/designer/actiondnd.h @@ -36,7 +36,7 @@ #include #include -#include +#include #include #include #include diff --git a/tools/designer/designer/command.h b/tools/designer/designer/command.h index ce3ab98f6..5bc5fd20e 100644 --- a/tools/designer/designer/command.h +++ b/tools/designer/designer/command.h @@ -39,12 +39,12 @@ #include #include -#include +#include #include #include #include #include -#include +#include #include class TQWizard; diff --git a/tools/designer/designer/customwidgeteditorimpl.h b/tools/designer/designer/customwidgeteditorimpl.h index b5efa95ac..04a6e63ca 100644 --- a/tools/designer/designer/customwidgeteditorimpl.h +++ b/tools/designer/designer/customwidgeteditorimpl.h @@ -37,7 +37,7 @@ #include "customwidgeteditor.h" #include "metadatabase.h" -#include +#include #include class TQTimer; diff --git a/tools/designer/designer/designer_pch.h b/tools/designer/designer/designer_pch.h index 7e30608f7..6403b2b5a 100644 --- a/tools/designer/designer/designer_pch.h +++ b/tools/designer/designer/designer_pch.h @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tools/designer/designer/editfunctionsimpl.h b/tools/designer/designer/editfunctionsimpl.h index cc1661764..80d901709 100644 --- a/tools/designer/designer/editfunctionsimpl.h +++ b/tools/designer/designer/editfunctionsimpl.h @@ -37,7 +37,7 @@ #include "editfunctions.h" #include "hierarchyview.h" #include "metadatabase.h" -#include +#include class FormWindow; class TQListViewItem; diff --git a/tools/designer/designer/formwindow.h b/tools/designer/designer/formwindow.h index f736a8395..a934bcdb8 100644 --- a/tools/designer/designer/formwindow.h +++ b/tools/designer/designer/formwindow.h @@ -43,7 +43,7 @@ #include #include #include -#include +#include class TQPaintEvent; class TQMouseEvent; diff --git a/tools/designer/designer/layout.cpp b/tools/designer/designer/layout.cpp index c4f9aa819..6e95c6cca 100644 --- a/tools/designer/designer/layout.cpp +++ b/tools/designer/designer/layout.cpp @@ -42,7 +42,7 @@ #include #include #include -#include +#include #include bool operator<( const TQGuardedPtr &p1, const TQGuardedPtr &p2 ) diff --git a/tools/designer/designer/layout.h b/tools/designer/designer/layout.h index 919226cd8..61af84c55 100644 --- a/tools/designer/designer/layout.h +++ b/tools/designer/designer/layout.h @@ -35,11 +35,11 @@ #define LAYOUT_H #include -#include +#include #include #include #include -#include +#include #include class FormWindow; diff --git a/tools/designer/designer/listboxdnd.cpp b/tools/designer/designer/listboxdnd.cpp index 2f368b758..916db2265 100644 --- a/tools/designer/designer/listboxdnd.cpp +++ b/tools/designer/designer/listboxdnd.cpp @@ -36,7 +36,7 @@ #include #include #include -#include +#include // The Dragobject Declaration --------------------------------------- class ListBoxItemDrag : public TQStoredDrag diff --git a/tools/designer/designer/listviewdnd.cpp b/tools/designer/designer/listviewdnd.cpp index 8061f7f35..04788fafc 100644 --- a/tools/designer/designer/listviewdnd.cpp +++ b/tools/designer/designer/listviewdnd.cpp @@ -36,7 +36,7 @@ #include #include #include -#include +#include // The Dragobject Declaration --------------------------------------- class ListViewItemDrag : public TQStoredDrag diff --git a/tools/designer/designer/listvieweditorimpl.h b/tools/designer/designer/listvieweditorimpl.h index 9281319d1..bbe15dc0a 100644 --- a/tools/designer/designer/listvieweditorimpl.h +++ b/tools/designer/designer/listvieweditorimpl.h @@ -36,9 +36,9 @@ #include "listvieweditor.h" -#include +#include #include -#include +#include class FormWindow; diff --git a/tools/designer/designer/mainwindow.h b/tools/designer/designer/mainwindow.h index 43bbfbc9b..32d356f46 100644 --- a/tools/designer/designer/mainwindow.h +++ b/tools/designer/designer/mainwindow.h @@ -48,7 +48,7 @@ #include #include -#include +#include #include #include #include diff --git a/tools/designer/designer/metadatabase.h b/tools/designer/designer/metadatabase.h index 94009edec..269d829c0 100644 --- a/tools/designer/designer/metadatabase.h +++ b/tools/designer/designer/metadatabase.h @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tools/designer/designer/outputwindow.h b/tools/designer/designer/outputwindow.h index a523793b2..335d84f68 100644 --- a/tools/designer/designer/outputwindow.h +++ b/tools/designer/designer/outputwindow.h @@ -36,7 +36,7 @@ #include #include -#include +#include #include struct DesignerOutputDock; diff --git a/tools/designer/designer/pixmapcollection.h b/tools/designer/designer/pixmapcollection.h index afff12d94..07376a191 100644 --- a/tools/designer/designer/pixmapcollection.h +++ b/tools/designer/designer/pixmapcollection.h @@ -36,7 +36,7 @@ #include #include -#include +#include #include "designerappiface.h" class TQMimeSourceFactory; diff --git a/tools/designer/designer/project.h b/tools/designer/designer/project.h index ed0989d11..ceb42afcf 100644 --- a/tools/designer/designer/project.h +++ b/tools/designer/designer/project.h @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include "../interfaces/projectsettingsiface.h" #include "sourcefile.h" diff --git a/tools/designer/designer/resource.h b/tools/designer/designer/resource.h index f16344dbe..6e75e83c9 100644 --- a/tools/designer/designer/resource.h +++ b/tools/designer/designer/resource.h @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include #include "actiondnd.h" diff --git a/tools/designer/designer/startdialogimpl.cpp b/tools/designer/designer/startdialogimpl.cpp index 8040a4aad..aec2362be 100644 --- a/tools/designer/designer/startdialogimpl.cpp +++ b/tools/designer/designer/startdialogimpl.cpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tools/designer/designer/startdialogimpl.h b/tools/designer/designer/startdialogimpl.h index 21d0b1dfa..3d7919ca3 100644 --- a/tools/designer/designer/startdialogimpl.h +++ b/tools/designer/designer/startdialogimpl.h @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include "newformimpl.h" #include "startdialog.h" diff --git a/tools/designer/designer/syntaxhighlighter_html.cpp b/tools/designer/designer/syntaxhighlighter_html.cpp index c41c8bac3..48dbbe7eb 100644 --- a/tools/designer/designer/syntaxhighlighter_html.cpp +++ b/tools/designer/designer/syntaxhighlighter_html.cpp @@ -34,7 +34,7 @@ #include "syntaxhighlighter_html.h" #include "ntqstring.h" -#include "ntqmap.h" +#include "tqmap.h" #include "ntqapplication.h" diff --git a/tools/designer/designer/tableeditorimpl.cpp b/tools/designer/designer/tableeditorimpl.cpp index e60ce6122..329dd667a 100644 --- a/tools/designer/designer/tableeditorimpl.cpp +++ b/tools/designer/designer/tableeditorimpl.cpp @@ -44,7 +44,7 @@ #include #include "pixmapchooser.h" #include "command.h" -#include +#include #include #include #include "project.h" diff --git a/tools/designer/designer/tableeditorimpl.h b/tools/designer/designer/tableeditorimpl.h index f566f2643..48effe8ff 100644 --- a/tools/designer/designer/tableeditorimpl.h +++ b/tools/designer/designer/tableeditorimpl.h @@ -35,7 +35,7 @@ #define TABLEEDITORIMPL_H #include "tableeditor.h" -#include +#include class TQListBoxItem; class TQTable; diff --git a/tools/designer/designer/widgetfactory.cpp b/tools/designer/designer/widgetfactory.cpp index e4c8b4a81..d5ef3df8a 100644 --- a/tools/designer/designer/widgetfactory.cpp +++ b/tools/designer/designer/widgetfactory.cpp @@ -86,7 +86,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tools/designer/editor/completion.cpp b/tools/designer/editor/completion.cpp index fb7365058..820f65c73 100644 --- a/tools/designer/editor/completion.cpp +++ b/tools/designer/editor/completion.cpp @@ -36,7 +36,7 @@ #include "editor.h" #include #include -#include +#include #include #include #include diff --git a/tools/designer/editor/completion.h b/tools/designer/editor/completion.h index 4b1b9d03c..719582990 100644 --- a/tools/designer/editor/completion.h +++ b/tools/designer/editor/completion.h @@ -37,7 +37,7 @@ #include #include #include -#include +#include class TQTextDocument; class Editor; diff --git a/tools/designer/editor/conf.h b/tools/designer/editor/conf.h index dee40d651..55eb7f466 100644 --- a/tools/designer/editor/conf.h +++ b/tools/designer/editor/conf.h @@ -36,7 +36,7 @@ #include #include -#include +#include struct ConfigStyle { diff --git a/tools/designer/editor/parenmatcher.h b/tools/designer/editor/parenmatcher.h index 14eba4385..34318493b 100644 --- a/tools/designer/editor/parenmatcher.h +++ b/tools/designer/editor/parenmatcher.h @@ -35,7 +35,7 @@ #define PARENMATCHER_H #include -#include +#include class TQTextCursor; diff --git a/tools/designer/editor/preferences.ui b/tools/designer/editor/preferences.ui index 00c56b64e..3f1131c88 100644 --- a/tools/designer/editor/preferences.ui +++ b/tools/designer/editor/preferences.ui @@ -470,7 +470,7 @@ checkParenMatching - ntqmap.h + tqmap.h conf.h ntqpalette.h ntqlineedit.h diff --git a/tools/designer/editor/viewmanager.h b/tools/designer/editor/viewmanager.h index 2c2d1afc4..cdd66eea4 100644 --- a/tools/designer/editor/viewmanager.h +++ b/tools/designer/editor/viewmanager.h @@ -35,7 +35,7 @@ #define VIEWMANAGER_H #include -#include +#include class TQChildEvent; class MarkerWidget; diff --git a/tools/designer/examples/colortool/colornameform.ui.h b/tools/designer/examples/colortool/colornameform.ui.h index 5dcffa3cf..8a138c84f 100644 --- a/tools/designer/examples/colortool/colornameform.ui.h +++ b/tools/designer/examples/colortool/colornameform.ui.h @@ -6,7 +6,7 @@ ** of a constructor, and a destroy() function in place of a destructor. *****************************************************************************/ #include -#include +#include #include TQMap m_colors; diff --git a/tools/designer/interfaces/designerinterface.h b/tools/designer/interfaces/designerinterface.h index c9dabc06c..10084bebf 100644 --- a/tools/designer/interfaces/designerinterface.h +++ b/tools/designer/interfaces/designerinterface.h @@ -50,7 +50,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tools/designer/interfaces/editorinterface.h b/tools/designer/interfaces/editorinterface.h index 099f4dda8..e14d563d3 100644 --- a/tools/designer/interfaces/editorinterface.h +++ b/tools/designer/interfaces/editorinterface.h @@ -48,8 +48,8 @@ // #include -#include -#include +#include +#include class TQWidget; class TQObjectList; diff --git a/tools/designer/interfaces/languageinterface.h b/tools/designer/interfaces/languageinterface.h index 0ff51afce..2f6dcc052 100644 --- a/tools/designer/interfaces/languageinterface.h +++ b/tools/designer/interfaces/languageinterface.h @@ -48,9 +48,9 @@ // #include -#include +#include #include -#include +#include #include // {f208499a-6f69-4883-9219-6e936e55a330} diff --git a/tools/designer/plugins/cppeditor/syntaxhighliter_cpp.cpp b/tools/designer/plugins/cppeditor/syntaxhighliter_cpp.cpp index 7607cf730..faa341b46 100644 --- a/tools/designer/plugins/cppeditor/syntaxhighliter_cpp.cpp +++ b/tools/designer/plugins/cppeditor/syntaxhighliter_cpp.cpp @@ -36,7 +36,7 @@ #include "paragdata.h" #include "ntqstring.h" #include "ntqstringlist.h" -#include "ntqmap.h" +#include "tqmap.h" #include "ntqapplication.h" #include "ntqregexp.h" diff --git a/tools/designer/plugins/cppeditor/yyreg.h b/tools/designer/plugins/cppeditor/yyreg.h index 5ac3fc2f3..bb4922f21 100644 --- a/tools/designer/plugins/cppeditor/yyreg.h +++ b/tools/designer/plugins/cppeditor/yyreg.h @@ -36,7 +36,7 @@ #define YYREG_H #include -#include +#include class CppFunction { diff --git a/tools/designer/plugins/dlg/dlg2ui.h b/tools/designer/plugins/dlg/dlg2ui.h index e06ade624..15b5377e8 100644 --- a/tools/designer/plugins/dlg/dlg2ui.h +++ b/tools/designer/plugins/dlg/dlg2ui.h @@ -36,7 +36,7 @@ #define DLG2UI_H #include -#include +#include #include #include diff --git a/tools/designer/plugins/glade/glade2ui.h b/tools/designer/plugins/glade/glade2ui.h index e8c46caf6..936818226 100644 --- a/tools/designer/plugins/glade/glade2ui.h +++ b/tools/designer/plugins/glade/glade2ui.h @@ -36,7 +36,7 @@ #define GLADE2UI_H #include -#include +#include #include #include diff --git a/tools/designer/plugins/wizards/sqlformwizardimpl.h b/tools/designer/plugins/wizards/sqlformwizardimpl.h index 1bce4780e..1fa52d920 100644 --- a/tools/designer/plugins/wizards/sqlformwizardimpl.h +++ b/tools/designer/plugins/wizards/sqlformwizardimpl.h @@ -37,7 +37,7 @@ #include "sqlformwizard.h" #include #include -#include +#include class SqlFormWizard : public SqlFormWizardBase { diff --git a/tools/designer/tools/tqtcreatecw/main.cpp b/tools/designer/tools/tqtcreatecw/main.cpp index fcfa43168..706983a62 100644 --- a/tools/designer/tools/tqtcreatecw/main.cpp +++ b/tools/designer/tools/tqtcreatecw/main.cpp @@ -33,7 +33,7 @@ #include #include -#include +#include #include #include #include diff --git a/tools/designer/uic/form.cpp b/tools/designer/uic/form.cpp index 4706675e0..127d1915d 100644 --- a/tools/designer/uic/form.cpp +++ b/tools/designer/uic/form.cpp @@ -36,7 +36,7 @@ #include "widgetdatabase.h" #include "domtool.h" #include -#include +#include #include #include #include diff --git a/tools/designer/uic/uic.h b/tools/designer/uic/uic.h index e0face7fd..68298665e 100644 --- a/tools/designer/uic/uic.h +++ b/tools/designer/uic/uic.h @@ -36,7 +36,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tools/designer/uilib/tqwidgetfactory.h b/tools/designer/uilib/tqwidgetfactory.h index fb54e8ae1..a188c0be3 100644 --- a/tools/designer/uilib/tqwidgetfactory.h +++ b/tools/designer/uilib/tqwidgetfactory.h @@ -39,8 +39,8 @@ #include #include #include -#include -#include +#include +#include #include #endif // QT_H diff --git a/tools/linguist/linguist/msgedit.h b/tools/linguist/linguist/msgedit.h index b1cfd9442..9046c2011 100644 --- a/tools/linguist/linguist/msgedit.h +++ b/tools/linguist/linguist/msgedit.h @@ -42,7 +42,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tools/linguist/linguist/phrase.h b/tools/linguist/linguist/phrase.h index c1dfc4995..627dc7eed 100644 --- a/tools/linguist/linguist/phrase.h +++ b/tools/linguist/linguist/phrase.h @@ -35,7 +35,7 @@ #define PHRASE_H #include -#include +#include class Phrase { diff --git a/tools/linguist/linguist/phrasebookbox.h b/tools/linguist/linguist/phrasebookbox.h index 99edb9f81..64071000a 100644 --- a/tools/linguist/linguist/phrasebookbox.h +++ b/tools/linguist/linguist/phrasebookbox.h @@ -37,7 +37,7 @@ #include "phrase.h" #include -#include +#include class TQLineEdit; class TQPushButton; diff --git a/tools/linguist/linguist/printout.h b/tools/linguist/linguist/printout.h index bba3da6af..73309fb35 100644 --- a/tools/linguist/linguist/printout.h +++ b/tools/linguist/linguist/printout.h @@ -38,7 +38,7 @@ #include #include #include -#include +#include #include class TQPrinter; diff --git a/tools/linguist/linguist/simtexth.cpp b/tools/linguist/linguist/simtexth.cpp index 0611058d3..ab0c992e7 100644 --- a/tools/linguist/linguist/simtexth.cpp +++ b/tools/linguist/linguist/simtexth.cpp @@ -37,10 +37,10 @@ #include #include -#include +#include #include #include -#include +#include #include diff --git a/tools/linguist/linguist/simtexth.h b/tools/linguist/linguist/simtexth.h index 01ae6f485..132842888 100644 --- a/tools/linguist/linguist/simtexth.h +++ b/tools/linguist/linguist/simtexth.h @@ -35,7 +35,7 @@ #define SIMTEXTH_H #include -#include +#include class MetaTranslator; diff --git a/tools/linguist/lupdate/fetchtr.cpp b/tools/linguist/lupdate/fetchtr.cpp index 150073f4a..8a83c1588 100644 --- a/tools/linguist/lupdate/fetchtr.cpp +++ b/tools/linguist/lupdate/fetchtr.cpp @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include #include diff --git a/tools/linguist/lupdate/numberh.cpp b/tools/linguist/lupdate/numberh.cpp index 29d6fd2f9..ac594ef86 100644 --- a/tools/linguist/lupdate/numberh.cpp +++ b/tools/linguist/lupdate/numberh.cpp @@ -35,7 +35,7 @@ #include #include -#include +#include #include #include diff --git a/tools/linguist/lupdate/sametexth.cpp b/tools/linguist/lupdate/sametexth.cpp index d3d9619e2..9ade0764c 100644 --- a/tools/linguist/lupdate/sametexth.cpp +++ b/tools/linguist/lupdate/sametexth.cpp @@ -34,7 +34,7 @@ #include #include -#include +#include typedef TQMap TMM; typedef TQValueList TML; diff --git a/tools/linguist/shared/metatranslator.h b/tools/linguist/shared/metatranslator.h index 4462a77f5..9eb04c706 100644 --- a/tools/linguist/shared/metatranslator.h +++ b/tools/linguist/shared/metatranslator.h @@ -34,10 +34,10 @@ #ifndef METATRANSLATOR_H #define METATRANSLATOR_H -#include +#include #include #include -#include +#include class TQTextCodec; diff --git a/tools/linguist/shared/proparser.h b/tools/linguist/shared/proparser.h index a18ccac8e..98692f90c 100644 --- a/tools/linguist/shared/proparser.h +++ b/tools/linguist/shared/proparser.h @@ -34,7 +34,7 @@ #ifndef PROPARSER_H #define PROPARSER_H -#include +#include #include TQMap proFileTagMap( const TQString& text ); diff --git a/tools/qconfig/main.h b/tools/qconfig/main.h index 48ffacddc..311e38cb7 100644 --- a/tools/qconfig/main.h +++ b/tools/qconfig/main.h @@ -32,7 +32,7 @@ **********************************************************************/ #include -#include +#include #include #include -- cgit v1.2.1